2016-09-11 02:42:47 +00:00
|
|
|
From 40b69207b686437a0b1414c9f46ad9c3d11f5d6f Mon Sep 17 00:00:00 2001
|
2016-03-16 07:21:39 +00:00
|
|
|
From: DoctorDark <doctordark11@gmail.com>
|
|
|
|
Date: Wed, 16 Mar 2016 02:21:39 -0500
|
|
|
|
Subject: [PATCH] Configurable end credits
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2016-05-17 02:07:12 +00:00
|
|
|
index 158db3a..e4e5487 100644
|
2016-03-16 07:21:39 +00:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2016-05-17 02:07:12 +00:00
|
|
|
@@ -164,4 +164,10 @@ public class PaperWorldConfig {
|
2016-03-25 06:38:38 +00:00
|
|
|
queueLightUpdates = getBoolean("queue-light-updates", false);
|
|
|
|
log("Lighting Queue enabled: " + queueLightUpdates);
|
2016-03-16 07:21:39 +00:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean disableEndCredits;
|
|
|
|
+ private void disableEndCredits() {
|
|
|
|
+ disableEndCredits = getBoolean("game-mechanics.disable-end-credits", false);
|
|
|
|
+ log("End credits disabled: " + disableEndCredits);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
2016-06-09 03:57:14 +00:00
|
|
|
index 37c94f8..522c7f2 100644
|
2016-03-16 07:21:39 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
2016-06-09 03:57:14 +00:00
|
|
|
@@ -511,6 +511,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
2016-03-16 07:21:39 +00:00
|
|
|
return this.world.pvpMode;
|
|
|
|
}
|
|
|
|
|
2016-05-12 02:07:46 +00:00
|
|
|
+
|
|
|
|
+ // Paper start - Give "theEnd2" achievement if the player doesn't already have it
|
2016-03-16 07:21:39 +00:00
|
|
|
+ private void giveTheEnd2() {
|
|
|
|
+ if (!this.a(AchievementList.D)) {
|
|
|
|
+ this.b(AchievementList.D);
|
|
|
|
+ }
|
|
|
|
+ }
|
2016-05-12 02:07:46 +00:00
|
|
|
+ // Paper end
|
2016-03-16 07:21:39 +00:00
|
|
|
+
|
2016-05-12 02:07:46 +00:00
|
|
|
@Nullable
|
2016-03-16 07:21:39 +00:00
|
|
|
public Entity c(int i) {
|
2016-06-09 03:57:14 +00:00
|
|
|
// this.worldChangeInvuln = true; // CraftBukkit - Moved down and into PlayerList#changeDimension
|
|
|
|
@@ -519,7 +528,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
2016-03-16 07:21:39 +00:00
|
|
|
this.world.kill(this);
|
|
|
|
if (!this.viewingCredits) {
|
|
|
|
this.viewingCredits = true;
|
|
|
|
- if (this.a(AchievementList.D)) {
|
|
|
|
+ // Paper start - Allow configurable end portal credits
|
|
|
|
+ if (world.paperConfig.disableEndCredits || this.a(AchievementList.D)) {
|
|
|
|
+ this.giveTheEnd2();
|
|
|
|
+ // Paper end
|
|
|
|
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, 0.0F));
|
|
|
|
} else {
|
|
|
|
this.b((Statistic) AchievementList.D);
|
|
|
|
--
|
2016-09-11 02:42:47 +00:00
|
|
|
2.10.0.windows.1
|
2016-03-16 07:21:39 +00:00
|
|
|
|