Compile fixes (#2732)

This commit is contained in:
MiniDigger | Martin 2019-12-12 19:45:00 +01:00
parent 3360d06f76
commit 8199a18b2b
28 changed files with 90 additions and 71 deletions

View File

@ -43,7 +43,7 @@ index b3edb69a9..87c6b77ce 100644
return i * 2; return i * 2;
} }
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 cade504af..c82de14eb 100644 index d47b982e7..6bdee24f8 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 {
@ -62,9 +62,7 @@ index cade504af..c82de14eb 100644
+ net.minecraft.server.EntityExperienceOrb orb = net.minecraft.server.EntityTypes.EXPERIENCE_ORB.create(handle.world); + net.minecraft.server.EntityExperienceOrb orb = net.minecraft.server.EntityTypes.EXPERIENCE_ORB.create(handle.world);
+ orb.value = amount; + orb.value = amount;
+ orb.spawnReason = org.bukkit.entity.ExperienceOrb.SpawnReason.CUSTOM; + orb.spawnReason = org.bukkit.entity.ExperienceOrb.SpawnReason.CUSTOM;
+ orb.locX = handle.locX; + orb.setPositionRaw(handle.locX(), handle.locY(), handle.locZ());
+ orb.locY = handle.locY;
+ orb.locZ = handle.locZ;
+ +
+ int i = Math.min(orb.xpToDur(amount), itemstack.getDamage()); + int i = Math.min(orb.xpToDur(amount), itemstack.getDamage());
+ org.bukkit.event.player.PlayerItemMendEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemMendEvent(handle, orb, itemstack, i); + org.bukkit.event.player.PlayerItemMendEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemMendEvent(handle, orb, itemstack, i);

View File

@ -16,7 +16,7 @@ intent to remove) and replace it with two new methods, clearly named and
documented as to their purpose. documented as to their purpose.
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 f41fd576d..1665a302a 100644 index 64992e139..ad600c318 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 {
@ -106,7 +106,7 @@ index c1ef1c950..3824180ee 100644
public Location getBedSpawnLocation() { public Location getBedSpawnLocation() {
NBTTagCompound data = getData(); NBTTagCompound data = getData();
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 ad70bd5ba..04fc8e233 100644 index 05f380023..67a960616 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 {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity
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 91b6d6878..ac85a5d23 100644 index 91b6d6878..1592a705f 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 {
@ -21,7 +21,7 @@ index 91b6d6878..ac85a5d23 100644
+ throw new IllegalArgumentException("maxDistance must be between 1-120"); + throw new IllegalArgumentException("maxDistance must be between 1-120");
+ } + }
+ +
+ Vec3D start = new Vec3D(locX, locY + getHeadHeight(), locZ); + Vec3D start = new Vec3D(locX(), locY() + getHeadHeight(), locZ());
+ org.bukkit.util.Vector dir = getBukkitEntity().getLocation().getDirection().multiply(maxDistance); + org.bukkit.util.Vector dir = getBukkitEntity().getLocation().getDirection().multiply(maxDistance);
+ Vec3D end = new Vec3D(start.x + dir.getX(), start.y + dir.getY(), start.z + dir.getZ()); + Vec3D end = new Vec3D(start.x + dir.getX(), start.y + dir.getY(), start.z + dir.getZ());
+ RayTrace raytrace = new RayTrace(start, end, RayTrace.BlockCollisionOption.OUTLINE, fluidCollisionOption, this); + RayTrace raytrace = new RayTrace(start, end, RayTrace.BlockCollisionOption.OUTLINE, fluidCollisionOption, this);

View File

@ -1440,7 +1440,7 @@ index e156804f7..96a785af2 100644
public void a() { public void a() {
this.o(); this.o();
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
index 47710067a..654474341 100644 index 47710067a..ef7ade797 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
@@ -0,0 +0,0 @@ @@ -0,0 +0,0 @@
@ -1491,21 +1491,25 @@ index 47710067a..654474341 100644
iterator = chunk.getTileEntities().entrySet().iterator(); iterator = chunk.getTileEntities().entrySet().iterator();
int totalSigns = 0; // Paper int totalSigns = 0; // Paper
@@ -0,0 +0,0 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> { @@ -0,0 +0,0 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
this.g.add(nbttagcompound);
} }
} }
+ chunk.world.chunkPacketBlockController.modifyBlocks(this, chunkPacketInfo, forceLoad, null); // Paper - Anti-Xray - Modify blocks
+ }
+ // Paper start - Async-Anti-Xray - Getter and Setter for the ready flag + // Paper start - Async-Anti-Xray - Getter and Setter for the ready flag
+ public boolean isReady() { + public boolean isReady() {
+ return this.ready; + return this.ready;
+ } }
+
+ public void setReady(boolean ready) { + public void setReady(boolean ready) {
+ this.ready = ready; + this.ready = ready;
} + }
+ // Paper end + // Paper end
+
@Override @Override
public void a(PacketDataSerializer packetdataserializer) throws IOException { public void a(PacketDataSerializer packetdataserializer) throws IOException {
this.a = packetdataserializer.readInt();
@@ -0,0 +0,0 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> { @@ -0,0 +0,0 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
public int writeChunk(PacketDataSerializer packetDataSerializer, Chunk chunk, int chunkSectionSelector) { return this.a(packetDataSerializer, chunk, chunkSectionSelector); } // Paper - OBFHELPER public int writeChunk(PacketDataSerializer packetDataSerializer, Chunk chunk, int chunkSectionSelector) { return this.a(packetDataSerializer, chunk, chunkSectionSelector); } // Paper - OBFHELPER
@ -1527,11 +1531,7 @@ index 47710067a..654474341 100644
+ chunksection.getBlocks().writeDataPaletteBlock(packetdataserializer, chunkPacketInfo, k); // Paper - Anti-Xray - Add chunk packet info + chunksection.getBlocks().writeDataPaletteBlock(packetdataserializer, chunkPacketInfo, k); // Paper - Anti-Xray - Add chunk packet info
} }
} }
+ chunk.world.chunkPacketBlockController.modifyBlocks(this, chunkPacketInfo, forceLoad, null); // Paper - Anti-Xray - Modify blocks
+ }
return j;
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index 43d9a5634..615d27863 100644 index 43d9a5634..615d27863 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java --- a/src/main/java/net/minecraft/server/PlayerChunk.java

View File

@ -6,14 +6,14 @@ Subject: [PATCH] Auto fix bad Y levels on player login
Bring down to a saner Y level if super high, as this can cause the server to crash Bring down to a saner Y level if super high, as this can cause the server to crash
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 a9827322c..3e958eaf8 100644 index a9827322c..2582f76d3 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 @Override
public void a(NBTTagCompound nbttagcompound) { public void a(NBTTagCompound nbttagcompound) {
super.a(nbttagcompound); super.a(nbttagcompound);
+ if (this.locY > 300) this.locY = 257; // Paper - bring down to a saner Y level if out of world + if (this.locY() > 300) this.setPositionRaw(locX(), 257, locZ()); // Paper - bring down to a saner Y level if out of world
if (nbttagcompound.hasKeyOfType("playerGameType", 99)) { if (nbttagcompound.hasKeyOfType("playerGameType", 99)) {
if (this.getMinecraftServer().getForceGamemode()) { if (this.getMinecraftServer().getForceGamemode()) {
this.playerInteractManager.setGameMode(this.getMinecraftServer().getGamemode()); this.playerInteractManager.setGameMode(this.getMinecraftServer().getGamemode());

View File

@ -12,7 +12,7 @@ Player we will look at limiting the scope of this change. It appears to
be unintentional in the few cases we've seen so far. be unintentional in the few cases we've seen so far.
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 04fc8e233..4b847ddd8 100644 index 67a960616..b176b2346 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 {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Cache user authenticator threads
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 3e958eaf8..bf74db31e 100644 index 2943918e4..caca40a0c 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 @@ import com.google.common.collect.Lists; @@ -0,0 +0,0 @@ import com.google.common.collect.Lists;

View File

@ -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 26096afbe..bdb73b68a 100644 index 51b3acadb..9b1758303 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 {

View File

@ -198,7 +198,7 @@ index 038b7b68d..9b2bafdbd 100644
public final ChunkGenerator<?> chunkGenerator; public final ChunkGenerator<?> chunkGenerator;
private final WorldServer world; private final WorldServer world;
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
index ec3732193..23d1935dd 100644 index d49e210a3..25a87c2d3 100644
--- a/src/main/java/net/minecraft/server/MCUtil.java --- a/src/main/java/net/minecraft/server/MCUtil.java
+++ b/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java
@@ -0,0 +0,0 @@ import com.destroystokyo.paper.block.TargetBlockInfo; @@ -0,0 +0,0 @@ import com.destroystokyo.paper.block.TargetBlockInfo;
@ -334,9 +334,9 @@ index ec3732193..23d1935dd 100644
+ JsonObject playerData = new JsonObject(); + JsonObject playerData = new JsonObject();
+ +
+ playerData.addProperty("name", player.getName()); + playerData.addProperty("name", player.getName());
+ playerData.addProperty("x", player.locX); + playerData.addProperty("x", player.locX());
+ playerData.addProperty("y", player.locY); + playerData.addProperty("y", player.locY());
+ playerData.addProperty("z", player.locZ); + playerData.addProperty("z", player.locZ());
+ +
+ playersData.add(playerData); + playersData.add(playerData);
+ +

View File

@ -23,7 +23,7 @@ index a73865739..098bd3fba 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java
index 1e1d02dc7..4c82fe335 100644 index 1e1d02dc7..e0974e256 100644
--- a/src/main/java/net/minecraft/server/BlockCactus.java --- a/src/main/java/net/minecraft/server/BlockCactus.java
+++ b/src/main/java/net/minecraft/server/BlockCactus.java +++ b/src/main/java/net/minecraft/server/BlockCactus.java
@@ -0,0 +0,0 @@ public class BlockCactus extends Block { @@ -0,0 +0,0 @@ public class BlockCactus extends Block {
@ -31,12 +31,12 @@ index 1e1d02dc7..4c82fe335 100644
} }
- if (i < 3) { - if (i < 3) {
+ if (i < world.paperConfig.cactusMaxHeight) { // Paper - Configurable growth height + if (i < worldserver.paperConfig.cactusMaxHeight) { // Paper - Configurable growth height
int j = (Integer) iblockdata.get(BlockCactus.AGE); int j = (Integer) iblockdata.get(BlockCactus.AGE);
if (j >= (byte) range(3, ((100.0F / worldserver.spigotConfig.cactusModifier) * 15) + 0.5F, 15)) { // Spigot if (j >= (byte) range(3, ((100.0F / worldserver.spigotConfig.cactusModifier) * 15) + 0.5F, 15)) { // Spigot
diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java
index 2106b0b49..baa2ed2b6 100644 index 2106b0b49..55b07444e 100644
--- a/src/main/java/net/minecraft/server/BlockReed.java --- a/src/main/java/net/minecraft/server/BlockReed.java
+++ b/src/main/java/net/minecraft/server/BlockReed.java +++ b/src/main/java/net/minecraft/server/BlockReed.java
@@ -0,0 +0,0 @@ public class BlockReed extends Block { @@ -0,0 +0,0 @@ public class BlockReed extends Block {
@ -44,7 +44,7 @@ index 2106b0b49..baa2ed2b6 100644
} }
- if (i < 3) { - if (i < 3) {
+ if (i < world.paperConfig.reedMaxHeight) { // Paper - Configurable growth height + if (i < worldserver.paperConfig.reedMaxHeight) { // Paper - Configurable growth height
int j = (Integer) iblockdata.get(BlockReed.AGE); int j = (Integer) iblockdata.get(BlockReed.AGE);
if (j >= (byte) range(3, ((100.0F / worldserver.spigotConfig.caneModifier) * 15) + 0.5F, 15)) { // Spigot if (j >= (byte) range(3, ((100.0F / worldserver.spigotConfig.caneModifier) * 15) + 0.5F, 15)) { // Spigot

View File

@ -36,7 +36,7 @@ index bf059dc86..2c36fc71c 100644
public EntityItem a(ItemStack itemstack, float f) { public EntityItem a(ItemStack itemstack, float f) {
if (itemstack.isEmpty()) { if (itemstack.isEmpty()) {
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index 20cb7dbaf..d835b9f85 100644 index 20cb7dbaf..0342c873a 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity { @@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity {
@ -45,7 +45,7 @@ index 20cb7dbaf..d835b9f85 100644
this.move(EnumMoveType.SELF, this.getMot()); this.move(EnumMoveType.SELF, this.getMot());
+ +
+ // Paper start - Configurable EntityFallingBlock height nerf + // Paper start - Configurable EntityFallingBlock height nerf
+ if (this.world.paperConfig.fallingBlockHeightNerf != 0 && this.locY > this.world.paperConfig.fallingBlockHeightNerf) { + if (this.world.paperConfig.fallingBlockHeightNerf != 0 && this.locY() > this.world.paperConfig.fallingBlockHeightNerf) {
+ if (this.dropItem && this.world.getGameRules().getBoolean(GameRules.DO_ENTITY_DROPS)) { + if (this.dropItem && this.world.getGameRules().getBoolean(GameRules.DO_ENTITY_DROPS)) {
+ this.a(block); + this.a(block);
+ } + }
@ -57,7 +57,7 @@ index 20cb7dbaf..d835b9f85 100644
blockposition = new BlockPosition(this); blockposition = new BlockPosition(this);
boolean flag = this.block.getBlock() instanceof BlockConcretePowder; boolean flag = this.block.getBlock() instanceof BlockConcretePowder;
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index d04212436..b92c8c47f 100644 index d04212436..33c51dced 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { @@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity {
@ -65,11 +65,24 @@ index d04212436..b92c8c47f 100644
this.move(EnumMoveType.SELF, this.getMot()); this.move(EnumMoveType.SELF, this.getMot());
+ // Paper start - Configurable TNT entity height nerf + // Paper start - Configurable TNT entity height nerf
+ if (this.world.paperConfig.entityTNTHeightNerf != 0 && this.locY > this.world.paperConfig.entityTNTHeightNerf) { + if (this.world.paperConfig.entityTNTHeightNerf != 0 && this.locY() > this.world.paperConfig.entityTNTHeightNerf) {
+ this.die(); + this.die();
+ } + }
+ // Paper end + // Paper end
this.setMot(this.getMot().a(0.98D)); this.setMot(this.getMot().a(0.98D));
if (this.onGround) { if (this.onGround) {
this.setMot(this.getMot().d(0.7D, -0.5D, 0.7D)); this.setMot(this.getMot().d(0.7D, -0.5D, 0.7D));
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index b26dff0a7..8d803dc68 100644
--- a/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 {
@Override
public void setStatistic(Statistic statistic, EntityType entityType, int newValue) {
- Validate.notNull(statistic, "Statistic cannot be null");
+ Validate.notNull(statistic, "TNStatistic cannot be null");
Validate.notNull(entityType, "EntityType cannot be null");
Validate.isTrue(newValue >= 0, "Value must be greater than or equal to 0");
Validate.isTrue(statistic.getType() == Type.ENTITY, "This statistic does not take an EntityType parameter");
-- --

View File

@ -27,7 +27,7 @@ index 007934d8c..78e48f478 100644
this.aB = 0; this.aB = 0;
} }
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 e45dd6cd4..9e0be10d7 100644 index 61dbb31e7..c6c392676 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 {

View File

@ -45,31 +45,31 @@ index c482aad3e..02c548dd9 100644
int i = this.b(worldserver, blockposition) + 1; int i = this.b(worldserver, blockposition) + 1;
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java
index 4c82fe335..728491dd9 100644 index 4c82fe335..44ce67eb8 100644
--- a/src/main/java/net/minecraft/server/BlockCactus.java --- a/src/main/java/net/minecraft/server/BlockCactus.java
+++ b/src/main/java/net/minecraft/server/BlockCactus.java +++ b/src/main/java/net/minecraft/server/BlockCactus.java
@@ -0,0 +0,0 @@ public class BlockCactus extends Block { @@ -0,0 +0,0 @@ public class BlockCactus extends Block {
if (!iblockdata.canPlace(worldserver, blockposition)) { if (!iblockdata.canPlace(worldserver, blockposition)) {
worldserver.b(blockposition, true); worldserver.b(blockposition, true);
} else { } else {
+ if (world.paperConfig.fixZeroTickInstantGrowFarms && !randomTick) return; // Paper - fix MC-113809 + if (worldserver.paperConfig.fixZeroTickInstantGrowFarms && !randomTick) return; // Paper - fix MC-113809
BlockPosition blockposition1 = blockposition.up(); BlockPosition blockposition1 = blockposition.up();
if (worldserver.isEmpty(blockposition1)) { if (worldserver.isEmpty(blockposition1)) {
diff --git a/src/main/java/net/minecraft/server/BlockChorusFlower.java b/src/main/java/net/minecraft/server/BlockChorusFlower.java diff --git a/src/main/java/net/minecraft/server/BlockChorusFlower.java b/src/main/java/net/minecraft/server/BlockChorusFlower.java
index d70b52cad..ff0ba15f8 100644 index d70b52cad..b624cf380 100644
--- a/src/main/java/net/minecraft/server/BlockChorusFlower.java --- a/src/main/java/net/minecraft/server/BlockChorusFlower.java
+++ b/src/main/java/net/minecraft/server/BlockChorusFlower.java +++ b/src/main/java/net/minecraft/server/BlockChorusFlower.java
@@ -0,0 +0,0 @@ public class BlockChorusFlower extends Block { @@ -0,0 +0,0 @@ public class BlockChorusFlower extends Block {
if (!iblockdata.canPlace(worldserver, blockposition)) { if (!iblockdata.canPlace(worldserver, blockposition)) {
worldserver.b(blockposition, true); worldserver.b(blockposition, true);
} else { } else {
+ if (world.paperConfig.fixZeroTickInstantGrowFarms && !randomTick) return; // Paper - fix MC-113809 + if (worldserver.paperConfig.fixZeroTickInstantGrowFarms && !randomTick) return; // Paper - fix MC-113809
BlockPosition blockposition1 = blockposition.up(); BlockPosition blockposition1 = blockposition.up();
if (worldserver.isEmpty(blockposition1) && blockposition1.getY() < 256) { if (worldserver.isEmpty(blockposition1) && blockposition1.getY() < 256) {
diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java
index baa2ed2b6..083b7ee59 100644 index 55b07444e..3bc3c5aa2 100644
--- a/src/main/java/net/minecraft/server/BlockReed.java --- a/src/main/java/net/minecraft/server/BlockReed.java
+++ b/src/main/java/net/minecraft/server/BlockReed.java +++ b/src/main/java/net/minecraft/server/BlockReed.java
@@ -0,0 +0,0 @@ public class BlockReed extends Block { @@ -0,0 +0,0 @@ public class BlockReed extends Block {

View File

@ -9,7 +9,7 @@ e.g. servers which allow and support the usage of mod packs.
provide an optional flag to disable this check, at your own risk. provide an optional flag to disable this check, at your own risk.
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 87b715d69..4dc79ca4e 100644 index e786641cc..b3a2b7fea 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 {

View File

@ -119,7 +119,7 @@ index 80717ad9a..53aac5bcc 100644
public void b(NBTTagCompound nbttagcompound) { public void b(NBTTagCompound nbttagcompound) {
super.b(nbttagcompound); super.b(nbttagcompound);
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 ac85a5d23..c6bd68919 100644 index 1592a705f..78e4fe67d 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 {
@ -279,7 +279,7 @@ index ac85a5d23..c6bd68919 100644
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 bb2a0b7e6..26096afbe 100644 index ca69f9038..139d19cde 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 {
@ -357,7 +357,7 @@ index 90fdf89c8..b761a41dc 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 9e0be10d7..ad70bd5ba 100644 index c6c392676..05f380023 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 {

View File

@ -34,7 +34,7 @@ index 3917980b7..007934d8c 100644
this.activeContainer = this.defaultContainer; this.activeContainer = this.defaultContainer;
} }
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 4e6601617..bb2a0b7e6 100644 index 6443e68f4..850c7cc1b 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 {
@ -155,7 +155,7 @@ index cd8ad2704..e169679c8 100644
@Override @Override
public boolean isBlocking() { public boolean isBlocking() {
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 4dc79ca4e..e45dd6cd4 100644 index b3a2b7fea..61dbb31e7 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 {

View File

@ -38,7 +38,7 @@ index e49318a19..fe3e78f36 100644
private void fixedInhabitedTime() { private void fixedInhabitedTime() {
if (PaperConfig.version < 16) { if (PaperConfig.version < 16) {
diff --git a/src/main/java/net/minecraft/server/EntityLightning.java b/src/main/java/net/minecraft/server/EntityLightning.java diff --git a/src/main/java/net/minecraft/server/EntityLightning.java b/src/main/java/net/minecraft/server/EntityLightning.java
index 7c518983a..0bd67395e 100644 index 7c518983a..bdb534deb 100644
--- a/src/main/java/net/minecraft/server/EntityLightning.java --- a/src/main/java/net/minecraft/server/EntityLightning.java
+++ b/src/main/java/net/minecraft/server/EntityLightning.java +++ b/src/main/java/net/minecraft/server/EntityLightning.java
@@ -0,0 +0,0 @@ public class EntityLightning extends Entity { @@ -0,0 +0,0 @@ public class EntityLightning extends Entity {
@ -48,7 +48,7 @@ index 7c518983a..0bd67395e 100644
+ // Paper start - Limit lightning strike effect distance + // Paper start - Limit lightning strike effect distance
+ if (distanceSquared <= this.world.paperConfig.sqrMaxLightningImpactSoundDistance) { + if (distanceSquared <= this.world.paperConfig.sqrMaxLightningImpactSoundDistance) {
+ player.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT, + player.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT,
+ SoundCategory.WEATHER, this.locX, this.locY, this.locZ, 2.0f, 0.5F + this.random.nextFloat() * 0.2F)); + SoundCategory.WEATHER, this.locX(), this.locY(), this.locZ(), 2.0f, 0.5F + this.random.nextFloat() * 0.2F));
+ } + }
+ +
+ if (world.paperConfig.sqrMaxThunderDistance != -1 && distanceSquared >= world.paperConfig.sqrMaxThunderDistance) { + if (world.paperConfig.sqrMaxThunderDistance != -1 && distanceSquared >= world.paperConfig.sqrMaxThunderDistance) {

View File

@ -473,7 +473,7 @@ index 06360cf7c..8e8fab497 100644
// CraftBukkit end // CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
new file mode 100644 new file mode 100644
index 000000000..c96f3ed17 index 000000000..628b73a12
--- /dev/null --- /dev/null
+++ b/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java
@@ -0,0 +0,0 @@ @@ -0,0 +0,0 @@
@ -660,7 +660,7 @@ index 000000000..c96f3ed17
+ * @return + * @return
+ */ + */
+ public static double distanceSq(Entity e1, Entity e2) { + public static double distanceSq(Entity e1, Entity e2) {
+ return distanceSq(e1.locX,e1.locY,e1.locZ, e2.locX,e2.locY,e2.locZ); + return distanceSq(e1.locX(),e1.locY(),e1.locZ(), e2.locX(),e2.locY(),e2.locZ());
+ } + }
+ +
+ /** + /**
@ -715,7 +715,7 @@ index 000000000..c96f3ed17
+ * @return + * @return
+ */ + */
+ public static Location toLocation(Entity entity) { + public static Location toLocation(Entity entity) {
+ return new Location(entity.getWorld().getWorld(), entity.locX, entity.locY, entity.locZ); + return new Location(entity.getWorld().getWorld(), entity.locX(), entity.locY(), entity.locZ());
+ } + }
+ +
+ public static org.bukkit.block.Block toBukkitBlock(World world, BlockPosition pos) { + public static org.bukkit.block.Block toBukkitBlock(World world, BlockPosition pos) {

View File

@ -49,7 +49,7 @@ index 2e56c7f57..e04b3f4e2 100644
} }
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 7625dca00..75193e87d 100644 index 346315acb..d3b2075f2 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { @@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity {
@ -70,7 +70,7 @@ index 7625dca00..75193e87d 100644
+ PacketPlayOutEntityTeleport positionPacket = new PacketPlayOutEntityTeleport(this); + PacketPlayOutEntityTeleport positionPacket = new PacketPlayOutEntityTeleport(this);
+ +
+ ete.trackedPlayers.stream() + ete.trackedPlayers.stream()
+ .filter(viewer -> (viewer.locX - this.locX) * (viewer.locY - this.locY) * (viewer.locZ - this.locZ) < 16 * 16) + .filter(viewer -> (viewer.locX() - this.locX()) * (viewer.locY() - this.locY()) * (viewer.locZ() - this.locZ()) < 16 * 16)
+ .forEach(viewer -> { + .forEach(viewer -> {
+ viewer.playerConnection.sendPacket(velocityPacket); + viewer.playerConnection.sendPacket(velocityPacket);
+ viewer.playerConnection.sendPacket(positionPacket); + viewer.playerConnection.sendPacket(positionPacket);

View File

@ -39,7 +39,7 @@ index 2e95069c1..8977c3516 100644
double deltaX = this.locX() - player.locX(); double deltaX = this.locX() - player.locX();
double deltaZ = this.locZ() - player.locZ(); double deltaZ = this.locZ() - player.locZ();
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 4b847ddd8..049ebf4c4 100644 index b176b2346..5603ed126 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 {

View File

@ -48,7 +48,7 @@ index 0614976b8..a985ae7ba 100644
uniqueId = i.getId(); uniqueId = i.getId();
// Paper end // Paper end
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 c82de14eb..87b715d69 100644 index 6bdee24f8..e786641cc 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 @@ @@ -0,0 +0,0 @@

View File

@ -47,7 +47,7 @@ index 258e96ba5..fe8bc7f75 100644
entity1.setPositionRotation(d3, d4, d5, entity1.yaw, entity1.pitch); entity1.setPositionRotation(d3, d4, d5, entity1.yaw, entity1.pitch);
return entity1; return entity1;
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index 02157d051..487114367 100644 index 02157d051..224443e03 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java --- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -0,0 +0,0 @@ public final class SpawnerCreature { @@ -0,0 +0,0 @@ public final class SpawnerCreature {
@ -69,7 +69,7 @@ index 02157d051..487114367 100644
+ org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(EntityTypes.getName(cls).getKey()); + org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(EntityTypes.getName(cls).getKey());
+ if (type != null) { + if (type != null) {
+ event = new com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent( + event = new com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent(
+ MCUtil.toLocation(world, blockposition_mutableblockposition), + MCUtil.toLocation(worldserver, blockposition_mutableblockposition),
+ type, SpawnReason.NATURAL + type, SpawnReason.NATURAL
+ ); + );
+ if (!event.callEvent()) { + if (!event.callEvent()) {

View File

@ -7,14 +7,14 @@ This causes the nether to spam unload/reload chunks, plus overall
bad behavior. bad behavior.
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java
index 2909f78f8..9cf7d0b9e 100644 index 2909f78f8..0ece78d4d 100644
--- a/src/main/java/net/minecraft/server/BlockFire.java --- a/src/main/java/net/minecraft/server/BlockFire.java
+++ b/src/main/java/net/minecraft/server/BlockFire.java +++ b/src/main/java/net/minecraft/server/BlockFire.java
@@ -0,0 +0,0 @@ public class BlockFire extends Block { @@ -0,0 +0,0 @@ public class BlockFire extends Block {
} }
blockposition_mutableblockposition.g(blockposition).e(l, j1, i1); blockposition_mutableblockposition.g(blockposition).e(l, j1, i1);
+ if (!world.isLoaded(blockposition_mutableblockposition)) continue; // Paper + if (!worldserver.isLoaded(blockposition_mutableblockposition)) continue; // Paper
int l1 = this.a((IWorldReader) worldserver, (BlockPosition) blockposition_mutableblockposition); int l1 = this.a((IWorldReader) worldserver, (BlockPosition) blockposition_mutableblockposition);
if (l1 > 0) { if (l1 > 0) {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Properly fix item duplication bug
Credit to prplz for figuring out the real issue Credit to prplz for figuring out the real issue
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 bf74db31e..4e6601617 100644 index caca40a0c..6443e68f4 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 {

View File

@ -5,13 +5,13 @@ Subject: [PATCH] Re-track players that dismount from other players
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 6595dca86..a9827322c 100644 index 6595dca86..ab8af05e7 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 {
if (!this.isSpectator()) { this.playerConnection.a(this.locX(), this.locY(), this.locZ(), this.yaw, this.pitch);
super.b(blockposition);
} }
+ // Paper start - "Fixes" an issue in which the vehicle player would not be notified that the passenger dismounted + // Paper start - "Fixes" an issue in which the vehicle player would not be notified that the passenger dismounted
+ if (entity instanceof EntityPlayer) { + if (entity instanceof EntityPlayer) {
+ // TODO verify this solution + // TODO verify this solution
@ -20,7 +20,15 @@ index 6595dca86..a9827322c 100644
+ worldServer.getChunkProvider().playerChunkMap.addEntity(this); + worldServer.getChunkProvider().playerChunkMap.addEntity(this);
+ } + }
+ // Paper end + // Paper end
} }
@Override
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
if (!this.isSpectator()) {
super.b(blockposition);
}
-
}
public void a(double d0, boolean flag) {
-- --

View File

@ -17,7 +17,7 @@ index 5d31068d7..365984bb8 100644
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 bdb73b68a..c15543a5c 100644 index 9b1758303..c467ca356 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 {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Workaround for vehicle tracking issue on disconnect
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 1665a302a..cc9e69651 100644 index 0f8e0e81e..ac032c0ed 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 {

View File

@ -601,7 +601,7 @@ index f138b112f..109c6ada8 100644
} }
} }
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 ca2398386..19ba79c65 100644 index fc3cb17e6..c9492ed37 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 {
@ -645,7 +645,7 @@ index d49ad0308..2fb04e3e9 100644
return this.bb; return this.bb;
} }
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index fc6436c4f..67a909859 100644 index fc6436c4f..9915c2443 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -669,8 +669,8 @@ index fc6436c4f..67a909859 100644
+ if (!this.world.paperConfig.perPlayerMobSpawns) { + if (!this.world.paperConfig.perPlayerMobSpawns) {
+ return; + return;
+ } + }
+ int chunkX = (int)Math.floor(entity.locX) >> 4; + int chunkX = (int)Math.floor(entity.locX()) >> 4;
+ int chunkZ = (int)Math.floor(entity.locZ) >> 4; + int chunkZ = (int)Math.floor(entity.locZ()) >> 4;
+ int index = entity.getEntityType().getEnumCreatureType().ordinal(); + int index = entity.getEntityType().getEnumCreatureType().ordinal();
+ +
+ for (EntityPlayer player : this.playerMobDistanceMap.getPlayersInRange(chunkX, chunkZ)) { + for (EntityPlayer player : this.playerMobDistanceMap.getPlayersInRange(chunkX, chunkZ)) {
@ -684,7 +684,7 @@ index fc6436c4f..67a909859 100644
private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) { private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) {
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index bcca7faed..57ce02a97 100644 index e168c528c..56dabbc15 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java --- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -0,0 +0,0 @@ package net.minecraft.server; @@ -0,0 +0,0 @@ package net.minecraft.server;