2016-03-25 01:23:23 +00:00
|
|
|
From 68c014e72798406a3e96d89f8ba4871a74893f7e 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-03-19 02:10:20 +00:00
|
|
|
index 9991a4a..1b88731 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-03-19 02:10:20 +00:00
|
|
|
@@ -171,4 +171,10 @@ public class PaperWorldConfig {
|
2016-03-16 07:21:39 +00:00
|
|
|
useAsyncLighting = false; //getBoolean( "use-async-lighting", false );
|
|
|
|
log("World async lighting: " + useAsyncLighting);
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ 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-03-25 01:23:23 +00:00
|
|
|
index 8f57b21..47ba1e3 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-03-25 01:23:23 +00:00
|
|
|
@@ -523,6 +523,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
2016-03-16 07:21:39 +00:00
|
|
|
return this.world.pvpMode;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Paper - Give "theEnd2" achievement if the player doesn't already have it
|
|
|
|
+ */
|
|
|
|
+ private void giveTheEnd2() {
|
|
|
|
+ if (!this.a(AchievementList.D)) {
|
|
|
|
+ this.b(AchievementList.D);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
public Entity c(int i) {
|
2016-03-25 01:23:23 +00:00
|
|
|
//this.cj = true; // CraftBukkit - Moved down and into PlayerList#changeDimension
|
2016-03-16 07:21:39 +00:00
|
|
|
if (this.dimension == 1 && i == 1) {
|
2016-03-25 01:23:23 +00:00
|
|
|
@@ -530,7 +539,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-03-25 01:23:23 +00:00
|
|
|
2.7.4
|
2016-03-16 07:21:39 +00:00
|
|
|
|