A bit more work for 1.14

This commit is contained in:
Shane Freeder
2019-04-24 03:34:11 +01:00
parent 43b4755c1b
commit 024f92b2bb
11 changed files with 119 additions and 408 deletions

View File

@@ -5,12 +5,12 @@ 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
index 59d82fa4fb..012182378a 100644
index a797a57671..c2b9690a0c 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
log("Warning: This feature may help reduce TPS loss from light, but comes at the cost of buggy light data");
log("We are working to improve this feature.");
}
}
}
+
+ public boolean disableEndCredits;
@@ -20,24 +20,24 @@ index 59d82fa4fb..012182378a 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 0902c69f33..c4a55c6a1f 100644
index e7856b2abe..5548163666 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
private long cu = SystemUtils.getMonotonicMillis();
private long cm = SystemUtils.getMonotonicMillis();
private Entity spectatedEntity;
public boolean worldChangeInvuln;
- private boolean cx;
+ private boolean cx; private void setHasSeenCredits(boolean has) { this.cx = has; } // Paper - OBFHELPER
- private boolean cp;
+ private boolean cp; private void setHasSeenCredits(boolean has) { this.cp = has; } // Paper - OBFHELPER
private final RecipeBookServer recipeBook;
private Vec3D cz;
private int cA;
private Vec3D cr;
private int cs;
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.world.kill(this);
this.getWorldServer().removePlayer(this);
if (!this.viewingCredits) {
this.viewingCredits = true;
+ if (world.paperConfig.disableEndCredits) this.setHasSeenCredits(true); // Paper - Toggle to always disable end credits
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cx ? 0.0F : 1.0F));
this.cx = true;
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cp ? 0.0F : 1.0F));
this.cp = true;
}
--