mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-08 16:12:18 -07:00
more 1.14 stuffs yay!
This commit is contained in:
@@ -5,27 +5,16 @@ Subject: [PATCH] Add more Zombie API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||||
index 81cc0c3b33..24bc3e0f08 100644
|
index 92d1cd851..f8baaea03 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||||
@@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster {
|
@@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster {
|
||||||
private final AttributeModifier babyModifier = new AttributeModifier(EntityZombie.a, "Baby speed boost", world.paperConfig.babyZombieMovementSpeed, 1); // Paper - Remove static - Make baby speed configurable
|
private int bF;
|
||||||
private static final DataWatcherObject<Boolean> bC = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
|
public int drownedConversionTime;
|
||||||
private static final DataWatcherObject<Integer> bD = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b);
|
|
||||||
- private static final DataWatcherObject<Boolean> bE = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
|
|
||||||
- public static final DataWatcherObject<Boolean> DROWN_CONVERTING = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
|
|
||||||
+ private static final DataWatcherObject<Boolean> bE = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); private static final DataWatcherObject<Boolean> armsRaised = bE; // Paper - OBFHELPER
|
|
||||||
+ public static final DataWatcherObject<Boolean> DROWN_CONVERTING = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); private static final DataWatcherObject<Boolean> drowning = DROWN_CONVERTING; // Paper - OBFHELPER
|
|
||||||
private final PathfinderGoalBreakDoor bG;
|
|
||||||
private boolean bH;
|
|
||||||
private int bI;
|
|
||||||
@@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster {
|
|
||||||
private float bK;
|
|
||||||
private float bL;
|
|
||||||
private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field
|
private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field
|
||||||
+ private boolean shouldBurnInDay = true; // Paper
|
+ private boolean shouldBurnInDay = true; // Paper
|
||||||
|
|
||||||
public EntityZombie(EntityTypes<?> entitytypes, World world) {
|
public EntityZombie(EntityTypes<? extends EntityZombie> entitytypes, World world) {
|
||||||
super(entitytypes, world);
|
super(entitytypes, world);
|
||||||
@@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster {
|
@@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster {
|
||||||
this.getDataWatcher().register(EntityZombie.DROWN_CONVERTING, false);
|
this.getDataWatcher().register(EntityZombie.DROWN_CONVERTING, false);
|
||||||
@@ -35,21 +24,6 @@ index 81cc0c3b33..24bc3e0f08 100644
|
|||||||
public boolean isDrownConverting() {
|
public boolean isDrownConverting() {
|
||||||
return (Boolean) this.getDataWatcher().get(EntityZombie.DROWN_CONVERTING);
|
return (Boolean) this.getDataWatcher().get(EntityZombie.DROWN_CONVERTING);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public void setArmsRaised(boolean raised) { s(raised); } // Paper - OBFHELPER
|
|
||||||
public void s(boolean flag) {
|
|
||||||
this.getDataWatcher().set(EntityZombie.bE, flag);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ // Paper start
|
|
||||||
+ public boolean isArmsRaised() {
|
|
||||||
+ return ((Boolean) this.getDataWatcher().get(EntityZombie.armsRaised)).booleanValue();
|
|
||||||
+ }
|
|
||||||
+ // Paper end
|
|
||||||
+
|
|
||||||
public boolean dH() {
|
|
||||||
return this.bH;
|
|
||||||
}
|
|
||||||
@@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster {
|
@@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster {
|
||||||
this.getDataWatcher().set(EntityZombie.DROWN_CONVERTING, true);
|
this.getDataWatcher().set(EntityZombie.DROWN_CONVERTING, true);
|
||||||
}
|
}
|
||||||
@@ -57,21 +31,21 @@ index 81cc0c3b33..24bc3e0f08 100644
|
|||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ public void stopDrowning() {
|
+ public void stopDrowning() {
|
||||||
+ this.drownedConversionTime = -1;
|
+ this.drownedConversionTime = -1;
|
||||||
+ this.getDataWatcher().set(EntityZombie.drowning, Boolean.valueOf(false));
|
+ this.getDataWatcher().set(EntityZombie.DROWN_CONVERTING, false);
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
protected void dE() {
|
protected void eb() {
|
||||||
this.a((EntityZombie) EntityTypes.DROWNED.create(world)); // Paper
|
this.b(EntityTypes.DROWNED);
|
||||||
this.world.a((EntityHuman) null, 1040, new BlockPosition((int) this.locX, (int) this.locY, (int) this.locZ), 0);
|
this.world.a((EntityHuman) null, 1040, new BlockPosition((int) this.locX, (int) this.locY, (int) this.locZ), 0);
|
||||||
@@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster {
|
@@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public boolean shouldBurnInDay() { return L_(); } // Paper - OBFHELPER
|
+ public boolean shouldBurnInDay() { return J_(); } // Paper - OBFHELPER
|
||||||
protected boolean L_() {
|
protected boolean J_() {
|
||||||
- return true;
|
- return true;
|
||||||
+ return shouldBurnInDay; // Paper
|
+ return shouldBurnInDay;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
@@ -80,17 +54,17 @@ index 81cc0c3b33..24bc3e0f08 100644
|
|||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
|
@Override
|
||||||
public boolean damageEntity(DamageSource damagesource, float f) {
|
public boolean damageEntity(DamageSource damagesource, float f) {
|
||||||
if (super.damageEntity(damagesource, f)) {
|
if (super.damageEntity(damagesource, f)) {
|
||||||
EntityLiving entityliving = this.getGoalTarget();
|
|
||||||
@@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster {
|
@@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster {
|
||||||
nbttagcompound.setBoolean("CanBreakDoors", this.dH());
|
nbttagcompound.setBoolean("CanBreakDoors", this.ef());
|
||||||
nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bI : -1);
|
nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bF : -1);
|
||||||
nbttagcompound.setInt("DrownedConversionTime", this.isDrownConverting() ? this.drownedConversionTime : -1);
|
nbttagcompound.setInt("DrownedConversionTime", this.isDrownConverting() ? this.drownedConversionTime : -1);
|
||||||
+ nbttagcompound.setBoolean("Paper.ShouldBurnInDay", shouldBurnInDay); // Paper
|
+ nbttagcompound.setBoolean("Paper.ShouldBurnInDay", shouldBurnInDay); // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(NBTTagCompound nbttagcompound) {
|
@Override
|
||||||
@@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster {
|
@@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster {
|
||||||
if (nbttagcompound.hasKeyOfType("DrownedConversionTime", 99) && nbttagcompound.getInt("DrownedConversionTime") > -1) {
|
if (nbttagcompound.hasKeyOfType("DrownedConversionTime", 99) && nbttagcompound.getInt("DrownedConversionTime") > -1) {
|
||||||
this.startDrownedConversion(nbttagcompound.getInt("DrownedConversionTime"));
|
this.startDrownedConversion(nbttagcompound.getInt("DrownedConversionTime"));
|
||||||
@@ -103,9 +77,9 @@ index 81cc0c3b33..24bc3e0f08 100644
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(EntityLiving entityliving) {
|
@Override
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
|
||||||
index e93ecb076b..c516d34759 100644
|
index c28ccd0d9..442befba8 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
|
||||||
@@ -0,0 +0,0 @@ public class CraftZombie extends CraftMonster implements Zombie {
|
@@ -0,0 +0,0 @@ public class CraftZombie extends CraftMonster implements Zombie {
|
||||||
@@ -126,14 +100,6 @@ index e93ecb076b..c516d34759 100644
|
|||||||
+ getHandle().stopDrowning();
|
+ getHandle().stopDrowning();
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public void setArmsRaised(boolean raised) {
|
|
||||||
+ getHandle().setArmsRaised(raised);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ public boolean isArmsRaised() {
|
|
||||||
+ return getHandle().isArmsRaised();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ public boolean shouldBurnInDay() {
|
+ public boolean shouldBurnInDay() {
|
||||||
+ return getHandle().shouldBurnInDay();
|
+ return getHandle().shouldBurnInDay();
|
||||||
+ }
|
+ }
|
||||||
|
@@ -6,12 +6,12 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
index 2a912286b2..61ad2cef7b 100644
|
index fb44fccc9..ad793ffa3 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||||
replacementBlocks = getList("anti-xray.replacement-blocks", Arrays.asList("stone", "planks"));
|
this.armorStandTick = this.getBoolean("armor-stands-tick", this.armorStandTick);
|
||||||
log("Anti-Xray: " + (antiXray ? "enabled" : "disabled") + " / Engine Mode: " + engineMode.getDescription() + " / Chunk Edge Mode: " + chunkEdgeMode.getDescription() + " / Up to " + ((maxChunkSectionIndex + 1) * 16) + " blocks / Update Radius: " + updateRadius);
|
log("ArmorStand ticking is " + (this.armorStandTick ? "enabled" : "disabled") + " by default");
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ public boolean preventMovingIntoUnloadedChunks = false;
|
+ public boolean preventMovingIntoUnloadedChunks = false;
|
||||||
@@ -20,24 +20,24 @@ index 2a912286b2..61ad2cef7b 100644
|
|||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 9a96078004..4705dd2c68 100644
|
index e59037211..16a7aba49 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||||
}
|
}
|
||||||
speed *= 2f; // TODO: Get the speed of the vehicle instead of the player
|
speed *= 2f; // TODO: Get the speed of the vehicle instead of the player
|
||||||
|
|
||||||
+ // Paper start - Prevent moving into unloaded chunks
|
+ // Paper start - Prevent moving into unloaded chunks
|
||||||
+ if (player.world.paperConfig.preventMovingIntoUnloadedChunks && !worldserver.isChunkLoaded((int) Math.floor(packetplayinvehiclemove.getX()) >> 4, (int) Math.floor(packetplayinvehiclemove.getZ()) >> 4, false)) {
|
+ if (player.world.paperConfig.preventMovingIntoUnloadedChunks && !worldserver.isChunkLoaded((int) Math.floor(packetplayinvehiclemove.getX()) >> 4, (int) Math.floor(packetplayinvehiclemove.getZ()) >> 4)) {
|
||||||
+ this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity));
|
+ this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity));
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && (!this.minecraftServer.H() || !this.minecraftServer.G().equals(entity.getDisplayName().getString()))) {
|
if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isExemptPlayer()) {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), d6, d7, d8);
|
PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), d6, d7, d8);
|
||||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||||
double d1 = this.player.locY;
|
double d1 = this.player.locY;
|
||||||
double d2 = this.player.locZ;
|
double d2 = this.player.locZ;
|
||||||
double d3 = this.player.locY;
|
double d3 = this.player.locY;
|
||||||
@@ -49,18 +49,18 @@ index 9a96078004..4705dd2c68 100644
|
|||||||
float f = packetplayinflying.a(this.player.yaw);
|
float f = packetplayinflying.a(this.player.yaw);
|
||||||
float f1 = packetplayinflying.b(this.player.pitch);
|
float f1 = packetplayinflying.b(this.player.pitch);
|
||||||
double d7 = d4 - this.l;
|
double d7 = d4 - this.l;
|
||||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||||
speed = player.abilities.walkSpeed * 10f;
|
speed = player.abilities.walkSpeed * 10f;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start - Prevent moving into unloaded chunks
|
+ // Paper start - Prevent moving into unloaded chunks
|
||||||
+ if (player.world.paperConfig.preventMovingIntoUnloadedChunks && (this.player.locX != toX || this.player.locZ != toZ) && !worldserver.isChunkLoaded((int) Math.floor(toX) >> 4, (int) Math.floor(toZ) >> 4, false)) {
|
+ if (player.world.paperConfig.preventMovingIntoUnloadedChunks && (this.player.locX != toX || this.player.locZ != toZ) && !worldserver.isChunkLoaded((int) Math.floor(toX) >> 4, (int) Math.floor(toZ) >> 4)) {
|
||||||
+ this.internalTeleport(this.player.locX, this.player.locY, this.player.locZ, this.player.yaw, this.player.pitch, Collections.emptySet());
|
+ this.internalTeleport(this.player.locX, this.player.locY, this.player.locZ, this.player.yaw, this.player.pitch, Collections.emptySet());
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
if (!this.player.H() && (!this.player.getWorldServer().getGameRules().getBoolean("disableElytraMovementCheck") || !this.player.dc())) {
|
if (!this.player.H() && (!this.player.getWorldServer().getGameRules().getBoolean("disableElytraMovementCheck") || !this.player.isGliding())) {
|
||||||
float f2 = this.player.dc() ? 300.0F : 100.0F;
|
float f2 = this.player.isGliding() ? 300.0F : 100.0F;
|
||||||
|
|
||||||
--
|
--
|
@@ -6,7 +6,7 @@ Subject: [PATCH] Book Size Limits
|
|||||||
Puts some limits on the size of books.
|
Puts some limits on the size of books.
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
index cac79686d8..c5b8354fa7 100644
|
index ee282cb35..3d6101c4d 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
@@ -0,0 +0,0 @@ public class PaperConfig {
|
@@ -0,0 +0,0 @@ public class PaperConfig {
|
||||||
@@ -22,21 +22,20 @@ index cac79686d8..c5b8354fa7 100644
|
|||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 0467a8feab..5c041c48fa 100644
|
index 8d2b02894..15fb7ed60 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -0,0 +0,0 @@ import java.util.Collections;
|
@@ -0,0 +0,0 @@ import java.util.Iterator;
|
||||||
import java.util.Iterator;
|
import java.util.Optional;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
+
|
|
||||||
+import org.apache.commons.lang3.StringEscapeUtils;
|
+import org.apache.commons.lang3.StringEscapeUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||||
}
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public void a(PacketPlayInBEdit packetplayinbedit) {
|
public void a(PacketPlayInBEdit packetplayinbedit) {
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ ItemStack testStack = packetplayinbedit.b();
|
+ ItemStack testStack = packetplayinbedit.b();
|
||||||
|
@@ -5,7 +5,7 @@ Subject: [PATCH] Call player spectator target events
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
index 634c30d93..d34daafda 100644
|
index 332515128..8d18c51c9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
+++ b/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 {
|
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
|
@@ -26,7 +26,7 @@ index 4b7aefb7a..9e568d5d1 100644
|
|||||||
|
|
||||||
if (nbttagcompound.hasKeyOfType("TrackOutput", 1)) {
|
if (nbttagcompound.hasKeyOfType("TrackOutput", 1)) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 2dfa7d251..98d798abd 100644
|
index 03e0e9e26..c9aa5ae16 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
|
@@ -5,10 +5,10 @@ Subject: [PATCH] Don't allow digging into unloaded chunks
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 4705dd2c68..0467a8feab 100644
|
index 16a7aba49..8d2b02894 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||||
case START_DESTROY_BLOCK:
|
case START_DESTROY_BLOCK:
|
||||||
case ABORT_DESTROY_BLOCK:
|
case ABORT_DESTROY_BLOCK:
|
||||||
case STOP_DESTROY_BLOCK:
|
case STOP_DESTROY_BLOCK:
|
||||||
|
@@ -7,7 +7,7 @@ Mojang was sleeping even if we had no more requests to go after
|
|||||||
the current one finished, resulting in 100ms lost per profile lookup
|
the current one finished, resulting in 100ms lost per profile lookup
|
||||||
|
|
||||||
diff --git a/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java b/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java
|
diff --git a/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java b/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java
|
||||||
index 71e48e87b4..23f1447cfc 100644
|
index 71e48e87b..23f1447cf 100644
|
||||||
--- a/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java
|
--- a/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java
|
||||||
+++ b/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java
|
+++ b/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java
|
||||||
@@ -0,0 +0,0 @@ public class YggdrasilGameProfileRepository implements GameProfileRepository {
|
@@ -0,0 +0,0 @@ public class YggdrasilGameProfileRepository implements GameProfileRepository {
|
||||||
|
@@ -5,38 +5,35 @@ Subject: [PATCH] Fix SpongeAbsortEvent handling
|
|||||||
|
|
||||||
Only process drops when the block is actually going to be removed
|
Only process drops when the block is actually going to be removed
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
||||||
|
index 549c50de7..5e6609944 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/Block.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/Block.java
|
||||||
|
@@ -0,0 +0,0 @@ public class Block implements IMaterial {
|
||||||
|
|
||||||
|
iblockdata.dropNaturally(world, blockposition, ItemStack.a);
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+ public static void dropNaturally(IBlockData iblockdata, World world, BlockPosition blockposition, @Nullable TileEntity tileentity) { a(iblockdata, world, blockposition, tileentity); }
|
||||||
|
public static void a(IBlockData iblockdata, World world, BlockPosition blockposition, @Nullable TileEntity tileentity) {
|
||||||
|
if (world instanceof WorldServer) {
|
||||||
|
a(iblockdata, (WorldServer) world, blockposition, tileentity).forEach((itemstack) -> {
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockSponge.java b/src/main/java/net/minecraft/server/BlockSponge.java
|
diff --git a/src/main/java/net/minecraft/server/BlockSponge.java b/src/main/java/net/minecraft/server/BlockSponge.java
|
||||||
index cbc8e8d139..cda6f2b732 100644
|
index 4e281ce6d..6a64af71b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockSponge.java
|
--- a/src/main/java/net/minecraft/server/BlockSponge.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockSponge.java
|
+++ b/src/main/java/net/minecraft/server/BlockSponge.java
|
||||||
@@ -0,0 +0,0 @@ public class BlockSponge extends Block {
|
@@ -0,0 +0,0 @@ public class BlockSponge extends Block {
|
||||||
} else if (iblockdata.getBlock() instanceof BlockFluids) {
|
|
||||||
// NOP
|
// NOP
|
||||||
} else if (material == Material.WATER_PLANT || material == Material.REPLACEABLE_WATER_PLANT) {
|
} else if (material == Material.WATER_PLANT || material == Material.REPLACEABLE_WATER_PLANT) {
|
||||||
- iblockdata.a(world, blockposition2, 0);
|
TileEntity tileentity = iblockdata.getBlock().isTileEntity() ? world.getTileEntity(blockposition2) : null;
|
||||||
|
-
|
||||||
|
- a(iblockdata, world, blockposition2, tileentity);
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ if (block.getHandle().getMaterial() == Material.AIR) {
|
+ if (block.getHandle().getMaterial() == Material.AIR) {
|
||||||
+ iblockdata.dropNaturally(world, blockposition2, 0);
|
+ dropNaturally(iblockdata, world, blockposition2, tileentity);
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
world.setTypeAndData(blockposition2, block.getHandle(), block.getFlag());
|
world.setTypeAndData(blockposition2, block.getHandle(), block.getFlag());
|
||||||
@@ -0,0 +0,0 @@ public class BlockSponge extends Block {
|
|
||||||
return i > 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java
|
|
||||||
index 08a5acb0ac..aa3547690a 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/IBlockData.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/IBlockData.java
|
|
||||||
@@ -0,0 +0,0 @@ public interface IBlockData extends IBlockDataHolder<IBlockData> {
|
|
||||||
this.getBlock().a(this, world, blockposition, entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ default void dropNaturally(World world, BlockPosition blockPosition, int i) { a(world, blockPosition, i);} // Paper - OBFHELPER
|
|
||||||
default void a(World world, BlockPosition blockposition, int i) {
|
|
||||||
this.dropNaturally(world, blockposition, 1.0F, i);
|
|
||||||
}
|
|
||||||
--
|
--
|
@@ -14,7 +14,7 @@ DimensionManager set to the world it is being placed into.
|
|||||||
This fixes corrupt entities breaking chunk saving in custom worlds.
|
This fixes corrupt entities breaking chunk saving in custom worlds.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 98d798abd..f5625fca3 100644
|
index c9aa5ae16..464e1d2d9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
|
@@ -15,7 +15,7 @@ items and experience which is otherwise only properly possible by using
|
|||||||
internal code.
|
internal code.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/CombatTracker.java b/src/main/java/net/minecraft/server/CombatTracker.java
|
diff --git a/src/main/java/net/minecraft/server/CombatTracker.java b/src/main/java/net/minecraft/server/CombatTracker.java
|
||||||
index bbd5e2b2a8..19750ceed1 100644
|
index 20db76abd..a148cd437 100644
|
||||||
--- a/src/main/java/net/minecraft/server/CombatTracker.java
|
--- a/src/main/java/net/minecraft/server/CombatTracker.java
|
||||||
+++ b/src/main/java/net/minecraft/server/CombatTracker.java
|
+++ b/src/main/java/net/minecraft/server/CombatTracker.java
|
||||||
@@ -0,0 +0,0 @@ public class CombatTracker {
|
@@ -0,0 +0,0 @@ public class CombatTracker {
|
||||||
@@ -27,7 +27,7 @@ index bbd5e2b2a8..19750ceed1 100644
|
|||||||
int i = this.f ? 300 : 100;
|
int i = this.f ? 300 : 100;
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 90e0d9d453..c4d4775627 100644
|
index 2dfa7d251..03e0e9e26 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
@@ -45,22 +45,14 @@ index 90e0d9d453..c4d4775627 100644
|
|||||||
+ public void onKill(EntityLiving entityLiving) { this.b(entityLiving); } // Paper - OBFHELPER
|
+ public void onKill(EntityLiving entityLiving) { this.b(entityLiving); } // Paper - OBFHELPER
|
||||||
public void b(EntityLiving entityliving) {}
|
public void b(EntityLiving entityliving) {}
|
||||||
|
|
||||||
protected boolean i(double d0, double d1, double d2) {
|
protected void i(double d0, double d1, double d2) {
|
||||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
||||||
return EnumPistonReaction.NORMAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ public SoundCategory getDeathSoundCategory() { return bV();} // Paper - OBFHELPER
|
|
||||||
public SoundCategory bV() {
|
|
||||||
return SoundCategory.NEUTRAL;
|
|
||||||
}
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||||
index 2c54e3e34a..a5cc5e2842 100644
|
index 7031dd0e4..f6dc96434 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
|
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||||
@@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving {
|
@@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving {
|
||||||
}
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public void killEntity() {
|
public void killEntity() {
|
||||||
- org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, drops); // CraftBukkit - call event
|
- org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, drops); // CraftBukkit - call event
|
||||||
+ org.bukkit.event.entity.EntityDeathEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, drops); // CraftBukkit - call event // Paper - make cancellable
|
+ org.bukkit.event.entity.EntityDeathEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, drops); // CraftBukkit - call event // Paper - make cancellable
|
||||||
@@ -69,26 +61,27 @@ index 2c54e3e34a..a5cc5e2842 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index 6367fdd469..3d1cdd6271 100644
|
index 064703afe..bd8385cd5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||||
public float aU;
|
public float aN;
|
||||||
|
public float aO;
|
||||||
public EntityHuman killer;
|
public EntityHuman killer;
|
||||||
public int lastDamageByPlayerTime; // Paper - public
|
- protected int lastDamageByPlayerTime;
|
||||||
- protected boolean killed;
|
+ public int lastDamageByPlayerTime; // Paper - public
|
||||||
+ protected boolean killed; protected void setDying(boolean dying) { this.killed = dying; } protected boolean isDying() { return this.killed; } // Paper - OBFHELPER
|
protected boolean killed;
|
||||||
protected int ticksFarFromPlayer;
|
protected int ticksFarFromPlayer;
|
||||||
protected float aZ;
|
protected float aT;
|
||||||
protected float ba;
|
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||||
protected float bb;
|
protected float aV;
|
||||||
protected float bc;
|
protected float aW;
|
||||||
protected float bd;
|
protected float aX;
|
||||||
- protected int be;
|
- protected int aY;
|
||||||
+ protected int be; protected int getKillCount() { return this.be; } // Paper - OBFHELPER
|
+ protected int aY; protected int getKillCount() { return this.aY; } // Paper - OBFHELPER
|
||||||
public float lastDamage;
|
public float lastDamage;
|
||||||
protected boolean bg;
|
protected boolean jumping;
|
||||||
public float bh;
|
public float bb;
|
||||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||||
public boolean collides = true;
|
public boolean collides = true;
|
||||||
public boolean canPickUpLoot;
|
public boolean canPickUpLoot;
|
||||||
@@ -100,16 +93,16 @@ index 6367fdd469..3d1cdd6271 100644
|
|||||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||||
|
|
||||||
if (this.getHealth() <= 0.0F) {
|
if (this.getHealth() <= 0.0F) {
|
||||||
if (!this.e(damagesource)) {
|
if (!this.f(damagesource)) {
|
||||||
- SoundEffect soundeffect = this.cs();
|
- SoundEffect soundeffect = this.getSoundDeath();
|
||||||
+ // Paper start - moved into CraftEventFactory event caller for cancellable death event
|
+ // Paper start - moved into CraftEventFactory event caller for cancellable death event
|
||||||
+ //SoundEffect soundeffect = this.cs();
|
+ //SoundEffect soundeffect = this.getSoundDeath();
|
||||||
|
|
||||||
- if (flag1 && soundeffect != null) {
|
- if (flag1 && soundeffect != null) {
|
||||||
- this.a(soundeffect, this.cD(), this.cE());
|
- this.a(soundeffect, this.getSoundVolume(), this.cU());
|
||||||
- }
|
- }
|
||||||
+ //if (flag1 && soundeffect != null) {
|
+ //if (flag1 && soundeffect != null) {
|
||||||
+ // this.a(soundeffect, this.cD(), this.cE());
|
+ // this.a(soundeffect, this.getSoundVolume(), this.cU());
|
||||||
+ //}
|
+ //}
|
||||||
+ this.silentDeath = !flag1; // mark entity as dying silently
|
+ this.silentDeath = !flag1; // mark entity as dying silently
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
@@ -121,92 +114,105 @@ index 6367fdd469..3d1cdd6271 100644
|
|||||||
this.c(damagesource);
|
this.c(damagesource);
|
||||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||||
Entity entity = damagesource.getEntity();
|
Entity entity = damagesource.getEntity();
|
||||||
EntityLiving entityliving = this.cv();
|
EntityLiving entityliving = this.getKillingEntity();
|
||||||
|
|
||||||
- if (this.be >= 0 && entityliving != null) {
|
- if (this.aY >= 0 && entityliving != null) {
|
||||||
- entityliving.a(this, this.be, damagesource);
|
- entityliving.a(this, this.aY, damagesource);
|
||||||
- }
|
- }
|
||||||
+ // Paper start - move down to make death event cancellable
|
-
|
||||||
+ //if (this.be >= 0 && entityliving != null) {
|
|
||||||
+ // entityliving.a(this, this.be, damagesource);
|
|
||||||
+ //}
|
|
||||||
|
|
||||||
- if (entity != null) {
|
- if (entity != null) {
|
||||||
- entity.b(this);
|
- entity.b(this);
|
||||||
- }
|
- }
|
||||||
|
-
|
||||||
|
- if (this.isSleeping()) {
|
||||||
|
- this.dy();
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
+ // Paper start - move down to make death event cancellable
|
||||||
|
+ //if (this.aY >= 0 && entityliving != null) {
|
||||||
|
+ // entityliving.a(this, this.aY, damagesource);
|
||||||
|
+ //}
|
||||||
|
+ //
|
||||||
+ //if (entity != null) {
|
+ //if (entity != null) {
|
||||||
+ // entity.b(this);
|
+ // entity.b(this);
|
||||||
+ //}
|
+ //}
|
||||||
|
+ //
|
||||||
|
+ //if (this.isSleeping()) {
|
||||||
|
+ // this.dy();
|
||||||
|
+ //}
|
||||||
|
+ //
|
||||||
this.killed = true;
|
this.killed = true;
|
||||||
- this.getCombatTracker().g();
|
- this.getCombatTracker().g();
|
||||||
+ //this.getCombatTracker().g();
|
+ //this.getCombatTracker().g();
|
||||||
+
|
|
||||||
+ org.bukkit.event.entity.EntityDeathEvent deathEvent = null;
|
|
||||||
+ // Paper end
|
|
||||||
if (!this.world.isClientSide) {
|
if (!this.world.isClientSide) {
|
||||||
int i = 0;
|
- this.d(damagesource);
|
||||||
|
+ org.bukkit.event.entity.EntityDeathEvent deathEvent = this.d(damagesource);
|
||||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
+ if (deathEvent == null || deathEvent.isCancelled()) {
|
||||||
|
|
||||||
this.a(flag, i, damagesource);
|
|
||||||
// CraftBukkit start - Call death event
|
|
||||||
- CraftEventFactory.callEntityDeathEvent(this, this.drops);
|
|
||||||
+ deathEvent = CraftEventFactory.callEntityDeathEvent(this, this.drops); // Paper - cancellable death event
|
|
||||||
this.drops = new ArrayList<org.bukkit.inventory.ItemStack>();
|
|
||||||
} else {
|
|
||||||
- CraftEventFactory.callEntityDeathEvent(this);
|
|
||||||
+ deathEvent = CraftEventFactory.callEntityDeathEvent(this); // Paper - cancellable death event
|
|
||||||
// CraftBukkit end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- this.world.broadcastEntityEffect(this, (byte) 3);
|
|
||||||
+ // Paper start - cancellable death event
|
|
||||||
+ if (deathEvent == null || !deathEvent.isCancelled()) {
|
|
||||||
+ // triggers and stats got moved down
|
|
||||||
+ if (this.getKillCount() >= 0 && entityliving != null) {
|
+ if (this.getKillCount() >= 0 && entityliving != null) {
|
||||||
+ entityliving.runKillTrigger(this, this.getKillCount(), damagesource);
|
+ entityliving.runKillTrigger(this, this.getKillCount(), damagesource);
|
||||||
+ }
|
+ }
|
||||||
+
|
|
||||||
+ if (entity != null) {
|
+ if (entity != null) {
|
||||||
+ entity.onKill(this);
|
+ entity.onKill(this);
|
||||||
+ }
|
+ }
|
||||||
+
|
+ if (this.isSleeping()) {
|
||||||
|
+ this.dy();
|
||||||
|
+ }
|
||||||
+ this.getCombatTracker().reset();
|
+ this.getCombatTracker().reset();
|
||||||
+ this.setDying(true);
|
|
||||||
+ this.world.broadcastEntityEffect(this, (byte) 3);
|
|
||||||
+ } else {
|
+ } else {
|
||||||
+ this.setDying(false); // Paper - reset if cancelled
|
+ this.killed = false;
|
||||||
+ this.setHealth((float) deathEvent.getReviveHealth());
|
+ this.setHealth((float) deathEvent.getReviveHealth());
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
+
|
||||||
|
boolean flag = false;
|
||||||
|
|
||||||
|
if (entityliving instanceof EntityWither) {
|
||||||
|
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- protected void d(DamageSource damagesource) {
|
||||||
|
+ protected org.bukkit.event.entity.EntityDeathEvent processDeath(DamageSource damagesource) { return d(damagesource); }
|
||||||
|
+ protected org.bukkit.event.entity.EntityDeathEvent d(DamageSource damagesource) { // Paper
|
||||||
|
Entity entity = damagesource.getEntity();
|
||||||
|
int i;
|
||||||
|
|
||||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||||
return SoundEffects.ENTITY_GENERIC_HURT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ @Nullable public SoundEffect getDeathSoundEffect() { return cs();} // Paper - OBFHELPER
|
boolean flag = this.lastDamageByPlayerTime > 0;
|
||||||
@Nullable
|
-
|
||||||
protected SoundEffect cs() {
|
+ org.bukkit.event.entity.EntityDeathEvent deathEvent = null; // Paper
|
||||||
return SoundEffects.ENTITY_GENERIC_DEATH;
|
if (this.isDropExperience() && this.world.getGameRules().getBoolean("doMobLoot")) {
|
||||||
|
this.a(damagesource, flag);
|
||||||
|
this.dropDeathLoot(damagesource, i, flag);
|
||||||
|
// CraftBukkit start - Call death event
|
||||||
|
- CraftEventFactory.callEntityDeathEvent(this, this.drops);
|
||||||
|
- this.drops = new ArrayList<org.bukkit.inventory.ItemStack>();
|
||||||
|
+ deathEvent = CraftEventFactory.callEntityDeathEvent(this, this.drops); // Paper
|
||||||
|
+ if (!deathEvent.isCancelled()) this.drops = new ArrayList<org.bukkit.inventory.ItemStack>(); // Paper
|
||||||
|
} else {
|
||||||
|
- CraftEventFactory.callEntityDeathEvent(this);
|
||||||
|
+ deathEvent = CraftEventFactory.callEntityDeathEvent(this); // Paper
|
||||||
|
// CraftBukkit end
|
||||||
|
}
|
||||||
|
|
||||||
|
- this.cE();
|
||||||
|
+ if (!deathEvent.isCancelled()) this.cE(); // Paper
|
||||||
|
+ return deathEvent; // Paper
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void cE() {}
|
||||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
+ public float getDeathSoundVolume() { return cD();} // Paper - OBFHELPER
|
|
||||||
protected float cD() {
|
|
||||||
return 1.0F;
|
return 1.0F;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public float getDeathSoundPitch() { return cE();} // Paper - OBFHELPER
|
+ public float getSoundPitch() { return cU();} // Paper - OBFHELPER
|
||||||
protected float cE() {
|
protected float cU() {
|
||||||
return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F;
|
return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
index dc72538de6..62feadc8af 100644
|
index 634c30d93..332515128 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
+++ b/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 {
|
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
@@ -257,7 +263,7 @@ index dc72538de6..62feadc8af 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||||
index 17fab031b4..ee8219e3ba 100644
|
index 73cb64e09..9f317ff2e 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||||
@@ -0,0 +0,0 @@ public enum CraftSound {
|
@@ -0,0 +0,0 @@ public enum CraftSound {
|
||||||
@@ -284,7 +290,7 @@ index 17fab031b4..ee8219e3ba 100644
|
|||||||
this.minecraftKey = minecraftKey;
|
this.minecraftKey = minecraftKey;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 7a918ea72f..8d32982c53 100644
|
index d505af188..5f752784d 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
@@ -305,7 +311,7 @@ index 7a918ea72f..8d32982c53 100644
|
|||||||
|
|
||||||
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
|
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index e76862ef49..68e30185a2 100644
|
index 50444ed94..46c05c398 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -0,0 +0,0 @@ public class CraftEventFactory {
|
@@ -0,0 +0,0 @@ public class CraftEventFactory {
|
||||||
|
@@ -13,7 +13,7 @@ keep the clone of the item used to a non empty value so it represents
|
|||||||
the item used.
|
the item used.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||||
index 22378b6bc8..5e595b62e5 100644
|
index f692da609..5bc8bd7cd 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||||
@@ -0,0 +0,0 @@ public class PlayerInteractManager {
|
@@ -0,0 +0,0 @@ public class PlayerInteractManager {
|
||||||
|
@@ -5,7 +5,7 @@ Subject: [PATCH] Make the default permission message configurable
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
index c5b8354fa7..9f240c35d6 100644
|
index 3d6101c4d..010d2a796 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
@@ -0,0 +0,0 @@ import java.util.regex.Pattern;
|
@@ -0,0 +0,0 @@ import java.util.regex.Pattern;
|
||||||
@@ -29,18 +29,19 @@ index c5b8354fa7..9f240c35d6 100644
|
|||||||
private static void savePlayerData() {
|
private static void savePlayerData() {
|
||||||
savePlayerData = getBoolean("settings.save-player-data", savePlayerData);
|
savePlayerData = getBoolean("settings.save-player-data", savePlayerData);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index af065bd705..9c5b79920f 100644
|
index 15756014a..b05d7b0e8 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
||||||
return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions;
|
return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ @Override
|
||||||
+ public String getPermissionMessage() {
|
+ public String getPermissionMessage() {
|
||||||
+ return com.destroystokyo.paper.PaperConfig.noPermissionMessage;
|
+ return com.destroystokyo.paper.PaperConfig.noPermissionMessage;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
@Override
|
||||||
public com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nonnull UUID uuid) {
|
public com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nonnull UUID uuid) {
|
||||||
return createProfile(uuid, null);
|
return createProfile(uuid, null);
|
||||||
}
|
|
||||||
--
|
--
|
@@ -8,12 +8,12 @@ the updates per world, so that we can re-use the same packet
|
|||||||
object for every player unless they have per-player time enabled.
|
object for every player unless they have per-player time enabled.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 236fbafeb5..ce39ea09e8 100644
|
index e6054dddb..e90cf0629 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
@@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||||
|
|
||||||
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot
|
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
|
||||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||||
- if (this.ticks % 20 == 0) {
|
- if (this.ticks % 20 == 0) {
|
||||||
- for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
|
- for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
|
||||||
@@ -25,7 +25,7 @@ index 236fbafeb5..ce39ea09e8 100644
|
|||||||
+ final long dayTime = world.getDayTime();
|
+ final long dayTime = world.getDayTime();
|
||||||
+ long worldTime = world.getTime();
|
+ long worldTime = world.getTime();
|
||||||
+ final PacketPlayOutUpdateTime worldPacket = new PacketPlayOutUpdateTime(worldTime, dayTime, doDaylight);
|
+ final PacketPlayOutUpdateTime worldPacket = new PacketPlayOutUpdateTime(worldTime, dayTime, doDaylight);
|
||||||
+ for (EntityHuman entityhuman : world.players) {
|
+ for (EntityHuman entityhuman : world.getPlayers()) {
|
||||||
+ if (!(entityhuman instanceof EntityPlayer) || (ticks + entityhuman.getId()) % 20 != 0) {
|
+ if (!(entityhuman instanceof EntityPlayer) || (ticks + entityhuman.getId()) % 20 != 0) {
|
||||||
+ continue;
|
+ continue;
|
||||||
+ }
|
+ }
|
||||||
@@ -37,7 +37,7 @@ index 236fbafeb5..ce39ea09e8 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot
|
MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper
|
||||||
|
|
||||||
// WorldServer worldserver; // CraftBukkit - dropped down
|
// WorldServer worldserver; // CraftBukkit - dropped down
|
||||||
--
|
--
|
@@ -19,7 +19,7 @@ Aside from making the obvious class/function renames and obfhelpers I didn't nee
|
|||||||
Just added Bukkit's event system and took a few liberties with dead code and comment misspellings.
|
Just added Bukkit's event system and took a few liberties with dead code and comment misspellings.
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
index 61ad2cef7b..a70a64070e 100644
|
index ad793ffa3..ef882b897 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||||
@@ -39,7 +39,7 @@ index 61ad2cef7b..a70a64070e 100644
|
|||||||
}
|
}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
|
diff --git a/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000..21d9d6d7ed
|
index 000000000..21d9d6d7e
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
|
+++ b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
@@ -954,7 +954,7 @@ index 0000000000..21d9d6d7ed
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
|
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
|
||||||
index 2e30270bb7..72d2617071 100644
|
index da903f74b..f8dfc91f2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java
|
--- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
|
+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
@@ -966,18 +966,18 @@ index 2e30270bb7..72d2617071 100644
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
@@ -0,0 +0,0 @@ public class BlockRedstoneWire extends Block {
|
@@ -0,0 +0,0 @@ public class BlockRedstoneWire extends Block {
|
||||||
public static final BlockStateInteger POWER = BlockProperties.al;
|
public static final BlockStateInteger POWER = BlockProperties.as;
|
||||||
public static final Map<EnumDirection, BlockStateEnum<BlockPropertyRedstoneSide>> q = Maps.newEnumMap(ImmutableMap.of(EnumDirection.NORTH, BlockRedstoneWire.NORTH, EnumDirection.EAST, BlockRedstoneWire.EAST, EnumDirection.SOUTH, BlockRedstoneWire.SOUTH, EnumDirection.WEST, BlockRedstoneWire.WEST));
|
public static final Map<EnumDirection, BlockStateEnum<BlockPropertyRedstoneSide>> f = Maps.newEnumMap(ImmutableMap.of(EnumDirection.NORTH, BlockRedstoneWire.NORTH, EnumDirection.EAST, BlockRedstoneWire.EAST, EnumDirection.SOUTH, BlockRedstoneWire.SOUTH, EnumDirection.WEST, BlockRedstoneWire.WEST));
|
||||||
protected static final VoxelShape[] r = new VoxelShape[] { Block.a(3.0D, 0.0D, 3.0D, 13.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 3.0D, 13.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 3.0D, 13.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 3.0D, 13.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 0.0D, 13.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 0.0D, 13.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 0.0D, 13.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 0.0D, 13.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 3.0D, 16.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 3.0D, 16.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 3.0D, 16.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 3.0D, 16.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 0.0D, 16.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 0.0D, 16.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 0.0D, 16.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 0.0D, 16.0D, 1.0D, 16.0D)};
|
protected static final VoxelShape[] g = new VoxelShape[] { Block.a(3.0D, 0.0D, 3.0D, 13.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 3.0D, 13.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 3.0D, 13.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 3.0D, 13.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 0.0D, 13.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 0.0D, 13.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 0.0D, 13.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 0.0D, 13.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 3.0D, 16.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 3.0D, 16.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 3.0D, 16.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 3.0D, 16.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 0.0D, 16.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 0.0D, 16.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 0.0D, 16.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 0.0D, 16.0D, 1.0D, 16.0D)};
|
||||||
+ public boolean canProvidePower() { return this.s; } // Paper - OBFHELPER
|
+ public boolean canProvidePower() { return this.h; } // Paper - OBFHELPER
|
||||||
+ public void setCanProvidePower(boolean value) { this.s = value; } // Paper - OBFHELPER
|
+ public void setCanProvidePower(boolean value) { this.h = value; } // Paper - OBFHELPER
|
||||||
private boolean s = true;
|
private boolean h = true;
|
||||||
+ private Set<BlockPosition> getBlocksNeedingUpdate() { return this.t; } // Paper - OBFHELPER
|
+ private Set<BlockPosition> getBlocksNeedingUpdate() { return this.i; } // Paper - OBFHELPER
|
||||||
private final Set<BlockPosition> t = Sets.newHashSet();
|
private final Set<BlockPosition> i = Sets.newHashSet();
|
||||||
|
|
||||||
public BlockRedstoneWire(Block.Info block_info) {
|
public BlockRedstoneWire(Block.Info block_info) {
|
||||||
@@ -0,0 +0,0 @@ public class BlockRedstoneWire extends Block {
|
@@ -0,0 +0,0 @@ public class BlockRedstoneWire extends Block {
|
||||||
return iblockdata1.q() || iblockdata1.getBlock() == Blocks.GLOWSTONE;
|
return Block.d(iblockdata1, iworldreader, blockposition1, EnumDirection.UP) || iblockdata1.getBlock() == Blocks.HOPPER;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start - Optimize redstone
|
+ // Paper start - Optimize redstone
|
||||||
@@ -1093,10 +1093,10 @@ index 2e30270bb7..72d2617071 100644
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
private IBlockData a(World world, BlockPosition blockposition, IBlockData iblockdata) {
|
private IBlockData a(World world, BlockPosition blockposition, IBlockData iblockdata) {
|
||||||
iblockdata = this.b(world, blockposition, iblockdata);
|
iblockdata = this.b(world, blockposition, iblockdata);
|
||||||
List<BlockPosition> list = Lists.newArrayList(this.t);
|
List<BlockPosition> list = Lists.newArrayList(this.i);
|
||||||
@@ -0,0 +0,0 @@ public class BlockRedstoneWire extends Block {
|
@@ -0,0 +0,0 @@ public class BlockRedstoneWire extends Block {
|
||||||
|
@Override
|
||||||
public void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1) {
|
public void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) {
|
||||||
if (iblockdata1.getBlock() != iblockdata.getBlock() && !world.isClientSide) {
|
if (iblockdata1.getBlock() != iblockdata.getBlock() && !world.isClientSide) {
|
||||||
- this.a(world, blockposition, iblockdata);
|
- this.a(world, blockposition, iblockdata);
|
||||||
+ this.updateSurroundingRedstone(world, blockposition, iblockdata, null); // Paper - Optimize redstone
|
+ this.updateSurroundingRedstone(world, blockposition, iblockdata, null); // Paper - Optimize redstone
|
||||||
@@ -1113,19 +1113,19 @@ index 2e30270bb7..72d2617071 100644
|
|||||||
|
|
||||||
EnumDirection enumdirection1;
|
EnumDirection enumdirection1;
|
||||||
@@ -0,0 +0,0 @@ public class BlockRedstoneWire extends Block {
|
@@ -0,0 +0,0 @@ public class BlockRedstoneWire extends Block {
|
||||||
public void doPhysics(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1) {
|
public void doPhysics(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1, boolean flag) {
|
||||||
if (!world.isClientSide) {
|
if (!world.isClientSide) {
|
||||||
if (iblockdata.canPlace(world, blockposition)) {
|
if (iblockdata.canPlace(world, blockposition)) {
|
||||||
- this.a(world, blockposition, iblockdata);
|
- this.a(world, blockposition, iblockdata);
|
||||||
+ this.updateSurroundingRedstone(world, blockposition, iblockdata, blockposition1); // Paper - Optimize redstone
|
+ this.updateSurroundingRedstone(world, blockposition, iblockdata, blockposition1); // Paper - Optimize redstone
|
||||||
} else {
|
} else {
|
||||||
iblockdata.a(world, blockposition, 0);
|
c(iblockdata, world, blockposition);
|
||||||
world.setAir(blockposition);
|
world.a(blockposition, false);
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 027bb64acc..645af17a58 100644
|
index c917c39b9..17401ea28 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
@@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1133,12 +1133,12 @@ index 027bb64acc..645af17a58 100644
|
|||||||
public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) {
|
public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) {
|
||||||
if (!this.isClientSide) {
|
if (!this.isClientSide) {
|
||||||
IBlockData iblockdata = this.getType(blockposition);
|
IBlockData iblockdata = this.getType(blockposition);
|
||||||
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
@@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||||
return this.getBlockFacePower(blockposition.down(), EnumDirection.DOWN) > 0 ? true : (this.getBlockFacePower(blockposition.up(), EnumDirection.UP) > 0 ? true : (this.getBlockFacePower(blockposition.north(), EnumDirection.NORTH) > 0 ? true : (this.getBlockFacePower(blockposition.south(), EnumDirection.SOUTH) > 0 ? true : (this.getBlockFacePower(blockposition.west(), EnumDirection.WEST) > 0 ? true : this.getBlockFacePower(blockposition.east(), EnumDirection.EAST) > 0))));
|
return this.getBlockFacePower(blockposition.down(), EnumDirection.DOWN) > 0 ? true : (this.getBlockFacePower(blockposition.up(), EnumDirection.UP) > 0 ? true : (this.getBlockFacePower(blockposition.north(), EnumDirection.NORTH) > 0 ? true : (this.getBlockFacePower(blockposition.south(), EnumDirection.SOUTH) > 0 ? true : (this.getBlockFacePower(blockposition.west(), EnumDirection.WEST) > 0 ? true : this.getBlockFacePower(blockposition.east(), EnumDirection.EAST) > 0))));
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public int isBlockIndirectlyGettingPowered(BlockPosition pos) { return u(pos); } // Paper - OBFHELPER
|
+ public int isBlockIndirectlyGettingPowered(BlockPosition pos) { return r(pos); } // Paper - OBFHELPER
|
||||||
public int u(BlockPosition blockposition) {
|
public int r(BlockPosition blockposition) {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
EnumDirection[] aenumdirection = World.a;
|
EnumDirection[] aenumdirection = World.a;
|
||||||
--
|
--
|
@@ -5,20 +5,20 @@ Subject: [PATCH] Reset players airTicks on respawn
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index de45e3c7a8..f745ed8fee 100644
|
index 464e1d2d9..4bdeba399 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- public int bf() {
|
- public int bo() {
|
||||||
+ public int getMaxAirTicks() { return bf(); } public int bf() { // Paper - OBF HELPER
|
+ public int getMaxAirTicks() { return bo(); } public int bo() {
|
||||||
return 300;
|
return 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
index f1b7353cf8..5b1bbc7724 100644
|
index 8d18c51c9..c71e4dfbe 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
+++ b/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 {
|
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
|
@@ -17,7 +17,7 @@ will always work as intended in the past, those without will create implementati
|
|||||||
based inventories.
|
based inventories.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java
|
||||||
index 23389743d5..d25928e094 100644
|
index 9957ed040..ae280dd40 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java
|
||||||
@@ -0,0 +0,0 @@ public final class CraftInventoryCreator {
|
@@ -0,0 +0,0 @@ public final class CraftInventoryCreator {
|
||||||
|
@@ -20,12 +20,12 @@ think of no reason to use it.
|
|||||||
Fixes GH-1571
|
Fixes GH-1571
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java
|
diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java
|
||||||
index 458d1561d0..c2bcbbbab9 100644
|
index 9de03a24c..4165c6d11 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntitySign.java
|
--- a/src/main/java/net/minecraft/server/TileEntitySign.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TileEntitySign.java
|
+++ b/src/main/java/net/minecraft/server/TileEntitySign.java
|
||||||
@@ -0,0 +0,0 @@ public class TileEntitySign extends TileEntity implements ICommandListener {
|
@@ -0,0 +0,0 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||||
private EntityHuman g;
|
private final String[] k = new String[4];
|
||||||
private final String[] h = new String[4];
|
private EnumColor l;
|
||||||
|
|
||||||
+ // Paper start - Strip invalid unicode from signs on load
|
+ // Paper start - Strip invalid unicode from signs on load
|
||||||
+ private static final boolean keepInvalidUnicode = Boolean.getBoolean("Paper.keepInvalidUnicode"); // Allow people to keep their bad unicode if they really want it
|
+ private static final boolean keepInvalidUnicode = Boolean.getBoolean("Paper.keepInvalidUnicode"); // Allow people to keep their bad unicode if they really want it
|
||||||
@@ -34,11 +34,12 @@ index 458d1561d0..c2bcbbbab9 100644
|
|||||||
+
|
+
|
||||||
public TileEntitySign() {
|
public TileEntitySign() {
|
||||||
super(TileEntityTypes.SIGN);
|
super(TileEntityTypes.SIGN);
|
||||||
}
|
this.l = EnumColor.BLACK;
|
||||||
@@ -0,0 +0,0 @@ public class TileEntitySign extends TileEntity implements ICommandListener {
|
@@ -0,0 +0,0 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||||
}
|
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
|
nbttagcompound.setString("Color", this.l.b());
|
||||||
|
+
|
||||||
+ // Paper start - Only remove private area unicode once
|
+ // Paper start - Only remove private area unicode once
|
||||||
+ if (this.privateUnicodeRemoved) {
|
+ if (this.privateUnicodeRemoved) {
|
||||||
+ nbttagcompound.setBoolean("Paper.RemovedPrivateUnicode", true);
|
+ nbttagcompound.setBoolean("Paper.RemovedPrivateUnicode", true);
|
||||||
@@ -48,9 +49,9 @@ index 458d1561d0..c2bcbbbab9 100644
|
|||||||
return nbttagcompound;
|
return nbttagcompound;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -0,0 +0,0 @@ public class TileEntitySign extends TileEntity implements ICommandListener {
|
@@ -0,0 +0,0 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||||
this.isEditable = false;
|
|
||||||
super.load(nbttagcompound);
|
super.load(nbttagcompound);
|
||||||
|
this.l = EnumColor.a(nbttagcompound.getString("Color"), EnumColor.BLACK);
|
||||||
|
|
||||||
+ // Paper start - Keep track, only do it once per sign
|
+ // Paper start - Keep track, only do it once per sign
|
||||||
+ this.privateUnicodeRemoved = nbttagcompound.getBoolean("Paper.RemovedPrivateUnicode");
|
+ this.privateUnicodeRemoved = nbttagcompound.getBoolean("Paper.RemovedPrivateUnicode");
|
||||||
@@ -60,7 +61,7 @@ index 458d1561d0..c2bcbbbab9 100644
|
|||||||
// CraftBukkit start - Add an option to convert signs correctly
|
// CraftBukkit start - Add an option to convert signs correctly
|
||||||
// This is done with a flag instead of all the time because
|
// This is done with a flag instead of all the time because
|
||||||
// we have no way to tell whether a sign is from 1.7.10 or 1.8
|
// we have no way to tell whether a sign is from 1.7.10 or 1.8
|
||||||
@@ -0,0 +0,0 @@ public class TileEntitySign extends TileEntity implements ICommandListener {
|
@@ -0,0 +0,0 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||||
s = "\"\"";
|
s = "\"\"";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,8 +81,8 @@ index 458d1561d0..c2bcbbbab9 100644
|
|||||||
try {
|
try {
|
||||||
//IChatBaseComponent ichatbasecomponent = IChatBaseComponent.ChatSerializer.a(s); // Paper - move down - the old format might throw a json error
|
//IChatBaseComponent ichatbasecomponent = IChatBaseComponent.ChatSerializer.a(s); // Paper - move down - the old format might throw a json error
|
||||||
|
|
||||||
@@ -0,0 +0,0 @@ public class TileEntitySign extends TileEntity implements ICommandListener {
|
@@ -0,0 +0,0 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||||
this.h[i] = null;
|
this.k[i] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ if (ranUnicodeRemoval) this.privateUnicodeRemoved = true; // Paper - Flag to write NBT
|
+ if (ranUnicodeRemoval) this.privateUnicodeRemoved = true; // Paper - Flag to write NBT
|
||||||
|
@@ -6,10 +6,10 @@ Subject: [PATCH] Use Vanilla Minecart Speeds
|
|||||||
CraftBukkit changed the values on flying speed, restore back to vanilla
|
CraftBukkit changed the values on flying speed, restore back to vanilla
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||||
index 0f531e7d42..8e773edc54 100644
|
index 6fc332dbf..828a8711d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
+++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||||
@@ -0,0 +0,0 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
|
@@ -0,0 +0,0 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||||
private double derailedX = 0.5;
|
private double derailedX = 0.5;
|
||||||
private double derailedY = 0.5;
|
private double derailedY = 0.5;
|
||||||
private double derailedZ = 0.5;
|
private double derailedZ = 0.5;
|
||||||
|
@@ -4,17 +4,17 @@ Date: Tue, 23 Oct 2018 23:14:38 -0400
|
|||||||
Subject: [PATCH] Use more reasonable thread count default for bootstrap
|
Subject: [PATCH] Use more reasonable thread count default for bootstrap
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/DataConverterRegistry.java b/src/main/java/net/minecraft/server/DataConverterRegistry.java
|
diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java
|
||||||
index ee40bccf63..db9af361d6 100644
|
index 706040212..d5d8f7eb8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DataConverterRegistry.java
|
--- a/src/main/java/net/minecraft/server/SystemUtils.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DataConverterRegistry.java
|
+++ b/src/main/java/net/minecraft/server/SystemUtils.java
|
||||||
@@ -0,0 +0,0 @@ public class DataConverterRegistry {
|
@@ -0,0 +0,0 @@ public class SystemUtils {
|
||||||
|
}
|
||||||
|
|
||||||
a(datafixerbuilder);
|
private static ExecutorService k() {
|
||||||
// CraftBukkit start
|
- int i = MathHelper.clamp(Runtime.getRuntime().availableProcessors() - 1, 1, 7);
|
||||||
- ForkJoinPool pool = new ForkJoinPool(Integer.getInteger("net.minecraft.server.DataConverterRegistry.bootstrapThreads", Math.min(Runtime.getRuntime().availableProcessors(), 2)));
|
+ int i = Math.min(6, Math.max(Runtime.getRuntime().availableProcessors() - 2, 2)); // Paper - use more reasonable default - 2 is hard minimum to avoid using unlimited threads
|
||||||
+ ForkJoinPool pool = new ForkJoinPool(Integer.getInteger("net.minecraft.server.DataConverterRegistry.bootstrapThreads", Math.min(6, Math.max(Runtime.getRuntime().availableProcessors() - 2, 2)))); // Paper - use more reasonable default - 2 is hard minimum to avoid using unlimited threads
|
Object object;
|
||||||
DataFixer fixer = datafixerbuilder.build(pool);
|
|
||||||
pool.shutdown();
|
if (i <= 0) {
|
||||||
return fixer;
|
|
||||||
--
|
--
|
@@ -20,7 +20,7 @@ this is going to be the best soultion all around.
|
|||||||
Improvements/suggestions welcome!
|
Improvements/suggestions welcome!
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index f745ed8fee..a678dc89c8 100644
|
index 4bdeba399..dec531ab7 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
@@ -72,55 +72,58 @@ index f745ed8fee..a678dc89c8 100644
|
|||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return false;
|
return false;
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||||
index 4bbf577523..f5d9b4abc2 100644
|
index f17c1c54b..e811a2917 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||||
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving {
|
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving {
|
||||||
return -0.35D;
|
return -0.35D;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- @Override
|
||||||
- public void stopRiding() {
|
- public void stopRiding() {
|
||||||
- super.stopRiding();
|
- super.stopRiding();
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ public void stopRiding() { stopRiding(false); }
|
+ @Override public void stopRiding() { stopRiding(false); }
|
||||||
+ public void stopRiding(boolean suppressCancellation) {
|
+ @Override public void stopRiding(boolean suppressCancellation) {
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+ super.stopRiding(suppressCancellation); // Paper - suppress
|
+ super.stopRiding(suppressCancellation); // Paper - suppress
|
||||||
this.k = 0;
|
this.j = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index 14f1029687..4d5459d24f 100644
|
index bd8385cd5..868b44a4b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||||
return ((Byte) this.datawatcher.get(EntityLiving.aw) & 4) != 0;
|
return ((Byte) this.datawatcher.get(EntityLiving.ar) & 4) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- @Override
|
||||||
- public void stopRiding() {
|
- public void stopRiding() {
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ public void stopRiding() { stopRiding(false); }
|
+ @Override public void stopRiding() { stopRiding(false); }
|
||||||
+ public void stopRiding(boolean suppressCancellation) {
|
+ @Override public void stopRiding(boolean suppressCancellation) {
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
Entity entity = this.getVehicle();
|
Entity entity = this.getVehicle();
|
||||||
|
|
||||||
- super.stopRiding();
|
- super.stopRiding();
|
||||||
+ super.stopRiding(suppressCancellation); // Paper - suppress
|
+ super.stopRiding(suppressCancellation); // Paper - suppress
|
||||||
if (entity != null && entity != this.getVehicle() && !this.world.isClientSide) {
|
if (entity != null && entity != this.getVehicle() && !this.world.isClientSide) {
|
||||||
this.A(entity);
|
this.B(entity);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
index 5b1bbc7724..57c6455bd8 100644
|
index c71e4dfbe..71ad35f71 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
+++ b/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 {
|
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- @Override
|
||||||
- public void stopRiding() {
|
- public void stopRiding() {
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ public void stopRiding() { stopRiding(false); }
|
+ @Override public void stopRiding() { stopRiding(false); }
|
||||||
+ public void stopRiding(boolean suppressCancellation) {
|
+ @Override public void stopRiding(boolean suppressCancellation) {
|
||||||
+ // paper end
|
+ // paper end
|
||||||
Entity entity = this.getVehicle();
|
Entity entity = this.getVehicle();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user