2016-12-17 05:13:45 +01:00
|
|
|
From c0b4ee8d6319a0fa582a082b881713ff96d27b2b Mon Sep 17 00:00:00 2001
|
2016-03-16 08:21:39 +01: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-11-17 03:23:38 +01:00
|
|
|
index f7a0c18..31503e7 100644
|
2016-03-16 08:21:39 +01:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2016-11-17 03:23:38 +01:00
|
|
|
@@ -155,4 +155,10 @@ public class PaperWorldConfig {
|
2016-03-25 07:38:38 +01:00
|
|
|
queueLightUpdates = getBoolean("queue-light-updates", false);
|
|
|
|
log("Lighting Queue enabled: " + queueLightUpdates);
|
2016-03-16 08:21:39 +01: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-12-17 05:13:45 +01:00
|
|
|
index 5b88b7a..ca9e94a 100644
|
2016-03-16 08:21:39 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
2016-11-17 03:23:38 +01:00
|
|
|
@@ -495,6 +495,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
2016-03-16 08:21:39 +01:00
|
|
|
return this.world.pvpMode;
|
|
|
|
}
|
|
|
|
|
2016-05-12 04:07:46 +02:00
|
|
|
+
|
|
|
|
+ // Paper start - Give "theEnd2" achievement if the player doesn't already have it
|
2016-03-16 08:21:39 +01:00
|
|
|
+ private void giveTheEnd2() {
|
|
|
|
+ if (!this.a(AchievementList.D)) {
|
|
|
|
+ this.b(AchievementList.D);
|
|
|
|
+ }
|
|
|
|
+ }
|
2016-05-12 04:07:46 +02:00
|
|
|
+ // Paper end
|
2016-03-16 08:21:39 +01:00
|
|
|
+
|
2016-05-12 04:07:46 +02:00
|
|
|
@Nullable
|
2016-03-16 08:21:39 +01:00
|
|
|
public Entity c(int i) {
|
2016-06-09 05:57:14 +02:00
|
|
|
// this.worldChangeInvuln = true; // CraftBukkit - Moved down and into PlayerList#changeDimension
|
2016-11-17 03:23:38 +01:00
|
|
|
@@ -503,7 +512,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
2016-03-16 08:21:39 +01: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-12-17 05:13:45 +01:00
|
|
|
2.9.3
|
2016-03-16 08:21:39 +01:00
|
|
|
|