It compiles
This commit is contained in:
parent
0f78e95250
commit
f6d820f077
187 changed files with 1699 additions and 875 deletions
|
@ -182,10 +182,41 @@ index 35cca76fb7c7aa736e64185b44016e65cfaef6cd..4f6f6f51f9807bafa88482c0fe776c8b
|
|||
private byte type;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/EnumProtocol.java b/src/main/java/net/minecraft/network/EnumProtocol.java
|
||||
index ab08336043d4f558434ed1f38d25cc555ace1ac0..539084d087bc6bd38d333066d3f8238cf2b08900 100644
|
||||
index ab08336043d4f558434ed1f38d25cc555ace1ac0..a892521db1197369bf6363bd2f5da24bf53643ab 100644
|
||||
--- a/src/main/java/net/minecraft/network/EnumProtocol.java
|
||||
+++ b/src/main/java/net/minecraft/network/EnumProtocol.java
|
||||
@@ -163,7 +163,8 @@ import org.apache.logging.log4j.LogManager;
|
||||
@@ -12,6 +12,8 @@ import javax.annotation.Nullable;
|
||||
import net.minecraft.SystemUtils;
|
||||
import net.minecraft.network.protocol.EnumProtocolDirection;
|
||||
import net.minecraft.network.protocol.Packet;
|
||||
+import net.minecraft.network.protocol.game.PacketListenerPlayIn;
|
||||
+import net.minecraft.network.protocol.game.PacketListenerPlayOut;
|
||||
import net.minecraft.network.protocol.game.PacketPlayInAbilities;
|
||||
import net.minecraft.network.protocol.game.PacketPlayInAdvancements;
|
||||
import net.minecraft.network.protocol.game.PacketPlayInArmAnimation;
|
||||
@@ -146,24 +148,30 @@ import net.minecraft.network.protocol.game.PacketPlayOutWindowItems;
|
||||
import net.minecraft.network.protocol.game.PacketPlayOutWorldBorder;
|
||||
import net.minecraft.network.protocol.game.PacketPlayOutWorldEvent;
|
||||
import net.minecraft.network.protocol.game.PacketPlayOutWorldParticles;
|
||||
+import net.minecraft.network.protocol.handshake.PacketHandshakingInListener;
|
||||
import net.minecraft.network.protocol.handshake.PacketHandshakingInSetProtocol;
|
||||
import net.minecraft.network.protocol.login.PacketLoginInCustomPayload;
|
||||
import net.minecraft.network.protocol.login.PacketLoginInEncryptionBegin;
|
||||
+import net.minecraft.network.protocol.login.PacketLoginInListener;
|
||||
import net.minecraft.network.protocol.login.PacketLoginInStart;
|
||||
import net.minecraft.network.protocol.login.PacketLoginOutCustomPayload;
|
||||
import net.minecraft.network.protocol.login.PacketLoginOutDisconnect;
|
||||
import net.minecraft.network.protocol.login.PacketLoginOutEncryptionBegin;
|
||||
+import net.minecraft.network.protocol.login.PacketLoginOutListener;
|
||||
import net.minecraft.network.protocol.login.PacketLoginOutSetCompression;
|
||||
import net.minecraft.network.protocol.login.PacketLoginOutSuccess;
|
||||
+import net.minecraft.network.protocol.status.PacketStatusInListener;
|
||||
import net.minecraft.network.protocol.status.PacketStatusInPing;
|
||||
import net.minecraft.network.protocol.status.PacketStatusInStart;
|
||||
+import net.minecraft.network.protocol.status.PacketStatusOutListener;
|
||||
import net.minecraft.network.protocol.status.PacketStatusOutPong;
|
||||
import net.minecraft.network.protocol.status.PacketStatusOutServerInfo;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
public enum EnumProtocol {
|
||||
|
||||
|
@ -195,7 +226,7 @@ index ab08336043d4f558434ed1f38d25cc555ace1ac0..539084d087bc6bd38d333066d3f8238c
|
|||
|
||||
private static final EnumProtocol[] e = new EnumProtocol[4];
|
||||
private static final Map<Class<? extends Packet<?>>, EnumProtocol> f = Maps.newHashMap();
|
||||
@@ -248,7 +249,7 @@ public enum EnumProtocol {
|
||||
@@ -248,7 +256,7 @@ public enum EnumProtocol {
|
||||
private final List<Supplier<? extends Packet<T>>> b;
|
||||
|
||||
private a() {
|
||||
|
@ -205,7 +236,7 @@ index ab08336043d4f558434ed1f38d25cc555ace1ac0..539084d087bc6bd38d333066d3f8238c
|
|||
});
|
||||
this.b = Lists.newArrayList();
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index e4fae57da4ee232a818e608912f021694bcea0f2..76d880e05bbc1534343a105dd7121bddd729b8a2 100644
|
||||
index e4fae57da4ee232a818e608912f021694bcea0f2..078631631616874741b0e0662e51b3faadcddcec 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1665,9 +1665,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
@ -216,7 +247,7 @@ index e4fae57da4ee232a818e608912f021694bcea0f2..76d880e05bbc1534343a105dd7121bdd
|
|||
+ return stream.<ResourcePackLoader>map(resourcepackrepository::a).filter(Objects::nonNull).map(ResourcePackLoader::d).collect(ImmutableList.toImmutableList()); // CraftBukkit - decompile error // Paper - decompile error
|
||||
}, this).thenCompose((immutablelist) -> {
|
||||
- return DataPackResources.a(immutablelist, this.j() ? CommandDispatcher.ServerType.DEDICATED : CommandDispatcher.ServerType.INTEGRATED, this.h(), this.executorService, this);
|
||||
+ return DataPackResources.a((List<IResourcePack>) immutablelist, this.j() ? CommandDispatcher.ServerType.DEDICATED : CommandDispatcher.ServerType.INTEGRATED, this.h(), this.executorService, this); // Paper - decompile error
|
||||
+ return DataPackResources.a(immutablelist, this.j() ? CommandDispatcher.ServerType.DEDICATED : CommandDispatcher.ServerType.INTEGRATED, this.h(), this.executorService, this); // Paper - decompile error
|
||||
}).thenAcceptAsync((datapackresources) -> {
|
||||
this.dataPackResources.close();
|
||||
this.dataPackResources = datapackresources;
|
||||
|
|
|
@ -3009,7 +3009,7 @@ index 0000000000000000000000000000000000000000..18b56b59fd6efd618e6ff6f9cf3a02f5
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 76d880e05bbc1534343a105dd7121bddd729b8a2..08443ca31ead7c484f0faeef57305c28d74c0e3f 100644
|
||||
index 078631631616874741b0e0662e51b3faadcddcec..8203192a94da26e8bfd6cf9999a2b2e8d26b1acf 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -874,6 +874,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
@ -3023,7 +3023,7 @@ index 76d880e05bbc1534343a105dd7121bddd729b8a2..08443ca31ead7c484f0faeef57305c28
|
|||
LOGGER.info("Saving usercache.json");
|
||||
this.getUserCache().b();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
index 7fd6893c30fbb34367181620aa159ed79b803455..3055ef62a054d91a74552f83f7afdfe08c7880db 100644
|
||||
index 7fd6893c30fbb34367181620aa159ed79b803455..0b5bcb60472c778574702a5ac26a6d02d54bfeac 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
@@ -42,6 +42,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.DefinedStruct
|
||||
|
@ -3057,7 +3057,7 @@ index 7fd6893c30fbb34367181620aa159ed79b803455..3055ef62a054d91a74552f83f7afdfe0
|
|||
+ return x & 3 | ((z & 3) << 2);
|
||||
+ }
|
||||
+
|
||||
+ void addLoadedChunk(Chunk chunk) {
|
||||
+ public void addLoadedChunk(Chunk chunk) {
|
||||
+ this.loadedChunkMapSeqLock.acquireWrite();
|
||||
+ try {
|
||||
+ this.loadedChunkMap.put(chunk.coordinateKey, chunk);
|
||||
|
@ -3072,7 +3072,7 @@ index 7fd6893c30fbb34367181620aa159ed79b803455..3055ef62a054d91a74552f83f7afdfe0
|
|||
+ this.lastLoadedChunks[cacheKey] = chunk;
|
||||
+ }
|
||||
+
|
||||
+ void removeLoadedChunk(Chunk chunk) {
|
||||
+ public void removeLoadedChunk(Chunk chunk) {
|
||||
+ this.loadedChunkMapSeqLock.acquireWrite();
|
||||
+ try {
|
||||
+ this.loadedChunkMap.remove(chunk.coordinateKey);
|
||||
|
@ -3890,10 +3890,18 @@ index 5f8022745f709b6d542182d2ac94147aefdd3f0f..543b13c1e43135c044f834c2a6231e17
|
|||
public IBlockData getType(BlockPosition blockposition) {
|
||||
return Blocks.AIR.getBlockData();
|
||||
diff --git a/src/main/java/net/minecraft/world/level/ChunkCache.java b/src/main/java/net/minecraft/world/level/ChunkCache.java
|
||||
index 8541e87a34612e8bc86cf5c291164e091641d1af..5694c6225fd2b79c61ed004c4a696e75bbd53716 100644
|
||||
index 8541e87a34612e8bc86cf5c291164e091641d1af..7a760ef0264c9041c38bdfb8fd31333052c26139 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/ChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/ChunkCache.java
|
||||
@@ -23,7 +23,7 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess {
|
||||
@@ -4,6 +4,7 @@ import java.util.function.Predicate;
|
||||
import java.util.stream.Stream;
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraft.core.BlockPosition;
|
||||
+import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.entity.TileEntity;
|
||||
@@ -23,7 +24,7 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess {
|
||||
protected final int b;
|
||||
protected final IChunkAccess[][] c;
|
||||
protected boolean d;
|
||||
|
@ -3902,7 +3910,7 @@ index 8541e87a34612e8bc86cf5c291164e091641d1af..5694c6225fd2b79c61ed004c4a696e75
|
|||
|
||||
public ChunkCache(World world, BlockPosition blockposition, BlockPosition blockposition1) {
|
||||
this.e = world;
|
||||
@@ -42,7 +42,7 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess {
|
||||
@@ -42,7 +43,7 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess {
|
||||
|
||||
for (k = this.a; k <= i; ++k) {
|
||||
for (l = this.b; l <= j; ++l) {
|
||||
|
@ -3911,7 +3919,7 @@ index 8541e87a34612e8bc86cf5c291164e091641d1af..5694c6225fd2b79c61ed004c4a696e75
|
|||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess {
|
||||
@@ -67,7 +68,7 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess {
|
||||
int k = i - this.a;
|
||||
int l = j - this.b;
|
||||
|
||||
|
@ -3920,7 +3928,7 @@ index 8541e87a34612e8bc86cf5c291164e091641d1af..5694c6225fd2b79c61ed004c4a696e75
|
|||
IChunkAccess ichunkaccess = this.c[k][l];
|
||||
|
||||
return (IChunkAccess) (ichunkaccess != null ? ichunkaccess : new ChunkEmpty(this.e, new ChunkCoordIntPair(i, j)));
|
||||
@@ -86,6 +86,29 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess {
|
||||
@@ -86,6 +87,29 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess {
|
||||
return this.a(i, j);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ This enables us a fast reference to the entities current chunk instead
|
|||
of having to look it up by hashmap lookups.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index ec553e7d7595ef3652bfa3325a07483bb3c32245..9af9d9463e9b50f8a627ffd79dcd3716c506f7e7 100644
|
||||
index ec553e7d7595ef3652bfa3325a07483bb3c32245..2bea2f4748cadf479dd4f89792ef5ffdd88e9cab 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -261,7 +261,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
|
@ -24,7 +24,7 @@ index ec553e7d7595ef3652bfa3325a07483bb3c32245..9af9d9463e9b50f8a627ffd79dcd3716
|
|||
}
|
||||
|
||||
// Paper start
|
||||
+ java.lang.ref.WeakReference<net.minecraft.world.level.chunk.Chunk> currentChunk = null;
|
||||
+ public java.lang.ref.WeakReference<net.minecraft.world.level.chunk.Chunk> currentChunk = null;
|
||||
+
|
||||
+ public void setCurrentChunk(net.minecraft.world.level.chunk.Chunk chunk) {
|
||||
+ this.currentChunk = chunk != null ? new java.lang.ref.WeakReference<>(chunk) : null;
|
||||
|
|
|
@ -5,10 +5,22 @@ Subject: [PATCH] Remove invalid mob spawner tile entities
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
index ac576d268b23148089d404cb22d8c2f9d1a79d6e..0312d68f0f64fa9e5816fe12a09430208ae2b8ce 100644
|
||||
index ac576d268b23148089d404cb22d8c2f9d1a79d6e..a2d80c2c8e4f080f60746548f75631c5946ba8e2 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
@@ -648,6 +648,10 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -40,9 +40,11 @@ import net.minecraft.world.level.TickListChunk;
|
||||
import net.minecraft.world.level.TickListEmpty;
|
||||
import net.minecraft.world.level.World;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
+import net.minecraft.world.level.block.BlockMobSpawner;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.ITileEntity;
|
||||
import net.minecraft.world.level.block.entity.TileEntity;
|
||||
+import net.minecraft.world.level.block.entity.TileEntityMobSpawner;
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import net.minecraft.world.level.levelgen.ChunkProviderDebug;
|
||||
import net.minecraft.world.level.levelgen.HeightMap;
|
||||
@@ -648,6 +650,10 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
|
|
|
@ -44,10 +44,18 @@ index 60e7dc1910ae9214d84d65b011cfec278b6b32ae..b229faad99120c67b089f7680d800fbe
|
|||
protected static final VoxelShape f = Block.a(1.0D, 0.0D, 1.0D, 15.0D, 14.0D, 16.0D);
|
||||
protected static final VoxelShape g = Block.a(0.0D, 0.0D, 1.0D, 15.0D, 14.0D, 15.0D);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java
|
||||
index eed95b370d1d624ffc6b7a35357b7028ec58c584..aafd1f7c6c811f9eb2796d865e327f374be9b461 100644
|
||||
index eed95b370d1d624ffc6b7a35357b7028ec58c584..51167d776c710decb0107bebcb35bdf43103772b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java
|
||||
@@ -33,7 +33,7 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
||||
@@ -8,6 +8,7 @@ import net.minecraft.core.NonNullList;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.chat.ChatMessage;
|
||||
import net.minecraft.network.chat.IChatBaseComponent;
|
||||
+import net.minecraft.server.MCUtil;
|
||||
import net.minecraft.sounds.SoundCategory;
|
||||
import net.minecraft.sounds.SoundEffect;
|
||||
import net.minecraft.sounds.SoundEffects;
|
||||
@@ -33,7 +34,7 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
||||
import org.bukkit.entity.HumanEntity;
|
||||
// CraftBukkit end
|
||||
|
||||
|
@ -56,7 +64,7 @@ index eed95b370d1d624ffc6b7a35357b7028ec58c584..aafd1f7c6c811f9eb2796d865e327f37
|
|||
|
||||
private NonNullList<ItemStack> items;
|
||||
protected float a;
|
||||
@@ -111,14 +111,20 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
@@ -111,14 +112,20 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
return nbttagcompound;
|
||||
}
|
||||
|
||||
|
@ -79,7 +87,7 @@ index eed95b370d1d624ffc6b7a35357b7028ec58c584..aafd1f7c6c811f9eb2796d865e327f37
|
|||
this.b = this.a;
|
||||
float f = 0.1F;
|
||||
|
||||
@@ -132,8 +138,11 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
@@ -132,8 +139,11 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
if (this.viewingCount > 0 && this.a == 0.0F) {
|
||||
this.playOpenSound(SoundEffects.BLOCK_CHEST_OPEN);
|
||||
}
|
||||
|
@ -92,7 +100,7 @@ index eed95b370d1d624ffc6b7a35357b7028ec58c584..aafd1f7c6c811f9eb2796d865e327f37
|
|||
float f1 = this.a;
|
||||
|
||||
if (this.viewingCount > 0) {
|
||||
@@ -149,8 +158,11 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
@@ -149,8 +159,11 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
float f2 = 0.5F;
|
||||
|
||||
if (this.a < 0.5F && f1 >= 0.5F) {
|
||||
|
@ -105,7 +113,7 @@ index eed95b370d1d624ffc6b7a35357b7028ec58c584..aafd1f7c6c811f9eb2796d865e327f37
|
|||
|
||||
if (this.a < 0.0F) {
|
||||
this.a = 0.0F;
|
||||
@@ -189,6 +201,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
@@ -189,6 +202,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
}
|
||||
|
||||
public void playOpenSound(SoundEffect soundeffect) {
|
||||
|
@ -113,7 +121,7 @@ index eed95b370d1d624ffc6b7a35357b7028ec58c584..aafd1f7c6c811f9eb2796d865e327f37
|
|||
BlockPropertyChestType blockpropertychesttype = (BlockPropertyChestType) this.getBlock().get(BlockChest.c);
|
||||
|
||||
if (blockpropertychesttype != BlockPropertyChestType.LEFT) {
|
||||
@@ -227,6 +240,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
@@ -227,6 +241,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
|
||||
++this.viewingCount;
|
||||
if (this.world == null) return; // CraftBukkit
|
||||
|
@ -121,7 +129,7 @@ index eed95b370d1d624ffc6b7a35357b7028ec58c584..aafd1f7c6c811f9eb2796d865e327f37
|
|||
|
||||
// CraftBukkit start - Call redstone event
|
||||
if (this.getBlock().getBlock() == Blocks.TRAPPED_CHEST) {
|
||||
@@ -249,6 +263,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
@@ -249,6 +264,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
--this.viewingCount;
|
||||
|
||||
// CraftBukkit start - Call redstone event
|
||||
|
@ -130,10 +138,15 @@ index eed95b370d1d624ffc6b7a35357b7028ec58c584..aafd1f7c6c811f9eb2796d865e327f37
|
|||
int newPower = Math.max(0, Math.min(15, this.viewingCount));
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityEnderChest.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityEnderChest.java
|
||||
index 930f1bd091d9754f7ca5d9e36cdf49b2be03eb23..385aed0f8bd9992e0c30d8fca5be4f49bc321183 100644
|
||||
index 930f1bd091d9754f7ca5d9e36cdf49b2be03eb23..2bc4213c70be47ca8bbc24898cc92e43f4228821 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityEnderChest.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityEnderChest.java
|
||||
@@ -5,7 +5,7 @@ import net.minecraft.sounds.SoundEffects;
|
||||
@@ -1,11 +1,12 @@
|
||||
package net.minecraft.world.level.block.entity;
|
||||
|
||||
+import net.minecraft.server.MCUtil;
|
||||
import net.minecraft.sounds.SoundCategory;
|
||||
import net.minecraft.sounds.SoundEffects;
|
||||
import net.minecraft.world.entity.player.EntityHuman;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
||||
|
@ -142,7 +155,7 @@ index 930f1bd091d9754f7ca5d9e36cdf49b2be03eb23..385aed0f8bd9992e0c30d8fca5be4f49
|
|||
|
||||
public float a;
|
||||
public float b;
|
||||
@@ -16,18 +16,28 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
||||
@@ -16,18 +17,28 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
||||
super(TileEntityTypes.ENDER_CHEST);
|
||||
}
|
||||
|
||||
|
@ -172,7 +185,7 @@ index 930f1bd091d9754f7ca5d9e36cdf49b2be03eb23..385aed0f8bd9992e0c30d8fca5be4f49
|
|||
|
||||
if (this.c > 0 && this.a == 0.0F) {
|
||||
double d1 = (double) i + 0.5D;
|
||||
@@ -35,8 +45,17 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
||||
@@ -35,8 +46,17 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
||||
d0 = (double) k + 0.5D;
|
||||
this.world.playSound((EntityHuman) null, d1, (double) j + 0.5D, d0, SoundEffects.BLOCK_ENDER_CHEST_OPEN, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
|
||||
}
|
||||
|
@ -191,7 +204,7 @@ index 930f1bd091d9754f7ca5d9e36cdf49b2be03eb23..385aed0f8bd9992e0c30d8fca5be4f49
|
|||
float f1 = this.a;
|
||||
|
||||
if (this.c > 0) {
|
||||
@@ -52,11 +71,14 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
||||
@@ -52,11 +72,14 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
||||
float f2 = 0.5F;
|
||||
|
||||
if (this.a < 0.5F && f1 >= 0.5F) {
|
||||
|
@ -207,7 +220,7 @@ index 930f1bd091d9754f7ca5d9e36cdf49b2be03eb23..385aed0f8bd9992e0c30d8fca5be4f49
|
|||
|
||||
if (this.a < 0.0F) {
|
||||
this.a = 0.0F;
|
||||
@@ -84,11 +106,13 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
||||
@@ -84,11 +107,13 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
||||
public void d() {
|
||||
++this.c;
|
||||
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.c);
|
||||
|
|
|
@ -168,7 +168,7 @@ index 33469b719d679c65d4bcb8366008e6e107eb3a0b..01cb0c8dd9875986e0c08371e876f0db
|
|||
return;
|
||||
// Paper end
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
index 0312d68f0f64fa9e5816fe12a09430208ae2b8ce..4f86aa618ab0b497b1ad46cc9a4443c6874d388b 100644
|
||||
index a2d80c2c8e4f080f60746548f75631c5946ba8e2..4b3de29b1a6e9d75b28962073c62bbe8d666165f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -178,7 +178,7 @@ index 0312d68f0f64fa9e5816fe12a09430208ae2b8ce..4f86aa618ab0b497b1ad46cc9a4443c6
|
|||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
|
||||
@@ -653,10 +654,15 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -655,10 +656,15 @@ public class Chunk implements IChunkAccess {
|
||||
this.tileEntities.remove(blockposition);
|
||||
// Paper end
|
||||
} else {
|
||||
|
@ -188,8 +188,8 @@ index 0312d68f0f64fa9e5816fe12a09430208ae2b8ce..4f86aa618ab0b497b1ad46cc9a4443c6
|
|||
- new Exception().printStackTrace();
|
||||
+ // Paper start
|
||||
+ ServerInternalException e = new ServerInternalException(
|
||||
+ "Attempted to place a tile entity (" + tileentity + ") at " + tileentity.position.getX() + ","
|
||||
+ + tileentity.position.getY() + "," + tileentity.position.getZ()
|
||||
+ "Attempted to place a tile entity (" + tileentity + ") at " + tileentity.getPosition().getX() + ","
|
||||
+ + tileentity.getPosition().getY() + "," + tileentity.getPosition().getZ()
|
||||
+ + " (" + getType(blockposition) + ") where there was no entity tile!\n" +
|
||||
+ "Chunk coordinates: " + (this.loc.x * 16) + "," + (this.loc.z * 16));
|
||||
+ e.printStackTrace();
|
||||
|
|
|
@ -33,7 +33,7 @@ index 25fdd55a7548cfaa45a541ad77f22f33c33e7471..4b56683336fdab06804efdc8ca1f7c13
|
|||
this.a = i;
|
||||
this.b = j;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
|
||||
index 067f5e46ad2f28ab119db77b19c4897bed9b3d80..07b5ff3ae319776bc1d85d113007a9afbad1c29a 100644
|
||||
index a570998e4ef6c3ff83403881bf1d24c8cbcfcf67..a22be13b097052b2a88707c9436b88c84298e46b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/World.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/World.java
|
||||
@@ -239,7 +239,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
@ -46,10 +46,10 @@ index 067f5e46ad2f28ab119db77b19c4897bed9b3d80..07b5ff3ae319776bc1d85d113007a9af
|
|||
|
||||
public static boolean l(BlockPosition blockposition) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
index 4f86aa618ab0b497b1ad46cc9a4443c6874d388b..ace0566626338f02cbfcc8b40d29dc6a66ede58d 100644
|
||||
index 4b3de29b1a6e9d75b28962073c62bbe8d666165f..fdc491f978560c394eec22116572585f9bbdec9f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
@@ -346,12 +346,27 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -348,12 +348,27 @@ public class Chunk implements IChunkAccess {
|
||||
return this.sections;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener
|
|||
Saves on some object allocation and processing when no plugin listens to this
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 2c295e070a0418c7d3bc4a4a531df699acadb0ff..555b99c45e0785750c48b0db2bc0b8da98c52295 100644
|
||||
index fec2e723d2cdc4d0144f9f2292804a2d364769f9..8c389b06dbd47c44f01d6bdd8a6b283c75353043 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1282,6 +1282,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
@ -52,10 +52,18 @@ index a22be13b097052b2a88707c9436b88c84298e46b..9236e480d21340d4295caa16dae34363
|
|||
this.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BlockPlant.java b/src/main/java/net/minecraft/world/level/block/BlockPlant.java
|
||||
index 33a5c5a4dc1478ab211dbb2e09df87570b06644f..81fbdda5e87b07259db206316cb4b423d9acdc3c 100644
|
||||
index 33a5c5a4dc1478ab211dbb2e09df87570b06644f..97dfe5c5e3ea1d9691de87ffbf4b1a29a83a65b4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BlockPlant.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BlockPlant.java
|
||||
@@ -23,7 +23,7 @@ public class BlockPlant extends Block {
|
||||
@@ -2,6 +2,7 @@ package net.minecraft.world.level.block;
|
||||
|
||||
import net.minecraft.core.BlockPosition;
|
||||
import net.minecraft.core.EnumDirection;
|
||||
+import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.world.level.GeneratorAccess;
|
||||
import net.minecraft.world.level.IBlockAccess;
|
||||
import net.minecraft.world.level.IWorldReader;
|
||||
@@ -23,7 +24,7 @@ public class BlockPlant extends Block {
|
||||
public IBlockData updateState(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) {
|
||||
// CraftBukkit start
|
||||
if (!iblockdata.canPlace(generatoraccess, blockposition)) {
|
||||
|
@ -65,10 +73,18 @@ index 33a5c5a4dc1478ab211dbb2e09df87570b06644f..81fbdda5e87b07259db206316cb4b423
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BlockTallPlant.java b/src/main/java/net/minecraft/world/level/block/BlockTallPlant.java
|
||||
index ca22187625f7ac6c43b663fd4d66cbf0c943c655..7c34cc7c0b74a336d0f0e705deab6d0f86e2e5f8 100644
|
||||
index ca22187625f7ac6c43b663fd4d66cbf0c943c655..1a5d29ecc9edc52bac14ed5d05ef5376fd5b8a9c 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BlockTallPlant.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BlockTallPlant.java
|
||||
@@ -83,7 +83,7 @@ public class BlockTallPlant extends BlockPlant {
|
||||
@@ -3,6 +3,7 @@ package net.minecraft.world.level.block;
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraft.core.BlockPosition;
|
||||
import net.minecraft.core.EnumDirection;
|
||||
+import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.world.entity.EntityLiving;
|
||||
import net.minecraft.world.entity.player.EntityHuman;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
@@ -83,7 +84,7 @@ public class BlockTallPlant extends BlockPlant {
|
||||
|
||||
protected static void b(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman) {
|
||||
// CraftBukkit start
|
||||
|
|
|
@ -30,10 +30,10 @@ index cd64fb9d0c6d123e1c86cb33f12cd9cefc9f80d0..74ba5dbb83c13ce1721619b755036a78
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
index ace0566626338f02cbfcc8b40d29dc6a66ede58d..c24315a329b3076a022fdf2aa7459e7117323e20 100644
|
||||
index fdc491f978560c394eec22116572585f9bbdec9f..b6898cd6e6117fef65198db32b98a64c806811d4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
@@ -1020,7 +1020,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -1022,7 +1022,7 @@ public class Chunk implements IChunkAccess {
|
||||
|
||||
@Override
|
||||
public long getInhabitedTime() {
|
||||
|
|
|
@ -19,10 +19,18 @@ index 942e03578836524ba746bc37699677eb06cc7803..703d06b2b29f1500301d82df78dc3771
|
|||
|
||||
private int u() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java b/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java
|
||||
index 8848a7552a0ef3944560a71f71620c6bd0f08c10..8c699279a3553da2888669c64269a1dfd8152e22 100644
|
||||
index 8848a7552a0ef3944560a71f71620c6bd0f08c10..58225877ce4f2533c19d34e143ae374dc289bce5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java
|
||||
@@ -28,7 +28,7 @@ import net.minecraft.world.phys.Vec3D;
|
||||
@@ -10,6 +10,7 @@ import net.minecraft.core.BaseBlockPosition;
|
||||
import net.minecraft.core.BlockPosition;
|
||||
import net.minecraft.core.IPosition;
|
||||
import net.minecraft.network.protocol.game.PacketDebug;
|
||||
+import net.minecraft.server.MCUtil;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityInsentient;
|
||||
@@ -28,7 +29,7 @@ import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
public abstract class NavigationAbstract {
|
||||
|
||||
|
@ -31,7 +39,7 @@ index 8848a7552a0ef3944560a71f71620c6bd0f08c10..8c699279a3553da2888669c64269a1df
|
|||
protected final World b;
|
||||
@Nullable
|
||||
protected PathEntity c;
|
||||
@@ -115,16 +115,26 @@ public abstract class NavigationAbstract {
|
||||
@@ -115,16 +116,26 @@ public abstract class NavigationAbstract {
|
||||
|
||||
@Nullable
|
||||
public PathEntity a(BlockPosition blockposition, int i) {
|
||||
|
@ -60,7 +68,7 @@ index 8848a7552a0ef3944560a71f71620c6bd0f08c10..8c699279a3553da2888669c64269a1df
|
|||
if (set.isEmpty()) {
|
||||
return null;
|
||||
} else if (this.a.locY() < 0.0D) {
|
||||
@@ -134,6 +144,23 @@ public abstract class NavigationAbstract {
|
||||
@@ -134,6 +145,23 @@ public abstract class NavigationAbstract {
|
||||
} else if (this.c != null && !this.c.c() && set.contains(this.p)) {
|
||||
return this.c;
|
||||
} else {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Do not load chunks for Pathfinding
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java b/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java
|
||||
index 8c699279a3553da2888669c64269a1dfd8152e22..c50d792c3ef3277ecab229e866f052854edac19d 100644
|
||||
index 58225877ce4f2533c19d34e143ae374dc289bce5..d71a6e5991629ce59c8529d7cc8064960e385236 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java
|
||||
@@ -47,7 +47,7 @@ public abstract class NavigationAbstract {
|
||||
@@ -48,7 +48,7 @@ public abstract class NavigationAbstract {
|
||||
private BlockPosition p;
|
||||
private int q;
|
||||
private float r;
|
||||
|
|
|
@ -20,10 +20,18 @@ index 74ba5dbb83c13ce1721619b755036a7864a1fb90..db2dddd12f54e6d15916c4cee6236765
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BlockDirtSnowSpreadable.java b/src/main/java/net/minecraft/world/level/block/BlockDirtSnowSpreadable.java
|
||||
index a98392f06e66959ec1b75df8d2ecf3b5267980af..b8b0ac69a4114936cfe86ab90f95bba5bf125069 100644
|
||||
index a98392f06e66959ec1b75df8d2ecf3b5267980af..712596420af83e6e1b9d147ae2fd8d8a1f36e1b9 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BlockDirtSnowSpreadable.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BlockDirtSnowSpreadable.java
|
||||
@@ -41,6 +41,7 @@ public abstract class BlockDirtSnowSpreadable extends BlockDirtSnow {
|
||||
@@ -3,6 +3,7 @@ package net.minecraft.world.level.block;
|
||||
import java.util.Random;
|
||||
import net.minecraft.core.BlockPosition;
|
||||
import net.minecraft.core.EnumDirection;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.tags.Tag;
|
||||
import net.minecraft.tags.TagsFluid;
|
||||
@@ -41,6 +42,7 @@ public abstract class BlockDirtSnowSpreadable extends BlockDirtSnow {
|
||||
|
||||
@Override
|
||||
public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||
|
|
|
@ -32,10 +32,18 @@ index bc40f2cbe1645fd60c4cee106b90f17cd043d32d..c1bb5c325286119891e8d68ce8f7328c
|
|||
packetdataserializer.a(this.c);
|
||||
packetdataserializer.a(this.d);
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 555b99c45e0785750c48b0db2bc0b8da98c52295..bea6cd6cf4dceece74de9cbb12a094334d129c4a 100644
|
||||
index 8c389b06dbd47c44f01d6bdd8a6b283c75353043..19ca2ea39ca3a3c820141467388eca65a0b744d0 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -541,6 +541,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -151,6 +151,7 @@ import net.minecraft.world.phys.Vec2F;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
import net.minecraft.world.scores.PersistentScoreboard;
|
||||
import net.minecraft.world.scores.Scoreboard;
|
||||
+import net.minecraft.world.scores.ScoreboardTeam;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -541,6 +542,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
|
||||
}
|
||||
|
||||
|
@ -57,7 +65,7 @@ index 555b99c45e0785750c48b0db2bc0b8da98c52295..bea6cd6cf4dceece74de9cbb12a09433
|
|||
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
|
||||
this.serverConnection.acceptConnections();
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 152aa38788a21638aab7cfe2dc187671f1143bde..95ff827b1d5704d279d258bdfb43fd33ec7a9187 100644
|
||||
index 152aa38788a21638aab7cfe2dc187671f1143bde..f9e9e51b0b0dcbf2a8424c7c14bd2cbb0d899e82 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -86,6 +86,7 @@ import net.minecraft.world.level.storage.SavedFile;
|
||||
|
@ -72,7 +80,7 @@ index 152aa38788a21638aab7cfe2dc187671f1143bde..95ff827b1d5704d279d258bdfb43fd33
|
|||
// CraftBukkit start
|
||||
private CraftServer cserver;
|
||||
private final Map<String,EntityPlayer> playersByName = new java.util.HashMap<>();
|
||||
+ @Nullable String collideRuleTeamName; // Paper - Team name used for collideRule
|
||||
+ public @Nullable String collideRuleTeamName; // Paper - Team name used for collideRule
|
||||
|
||||
public PlayerList(MinecraftServer minecraftserver, IRegistryCustom.Dimension iregistrycustom_dimension, WorldNBTStorage worldnbtstorage, int i) {
|
||||
this.cserver = minecraftserver.server = new CraftServer((DedicatedServer) minecraftserver, this);
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] remove null possibility for getServer singleton
|
|||
to stop IDE complaining about potential NPE
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index bea6cd6cf4dceece74de9cbb12a094334d129c4a..3b2fcb4338d56a8e1dd2de799571db4e2a79ec9f 100644
|
||||
index 19ca2ea39ca3a3c820141467388eca65a0b744d0..3d20206c3817cc7bf1d0168c0b556b7505eebf93 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -179,6 +179,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot
|
||||
@@ -180,6 +180,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot
|
||||
|
||||
public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTask> implements IMojangStatistics, ICommandListener, AutoCloseable {
|
||||
|
||||
|
@ -17,7 +17,7 @@ index bea6cd6cf4dceece74de9cbb12a094334d129c4a..3b2fcb4338d56a8e1dd2de799571db4e
|
|||
public static final Logger LOGGER = LogManager.getLogger();
|
||||
public static final File b = new File("usercache.json");
|
||||
public static final WorldSettings c = new WorldSettings("Demo World", EnumGamemode.SURVIVAL, false, EnumDifficulty.NORMAL, false, new GameRules(), DataPackConfiguration.a);
|
||||
@@ -285,6 +286,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -286,6 +287,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
||||
public MinecraftServer(OptionSet options, DataPackConfiguration datapackconfiguration, Thread thread, IRegistryCustom.Dimension iregistrycustom_dimension, Convertable.ConversionSession convertable_conversionsession, SaveData savedata, ResourcePackRepository resourcepackrepository, Proxy proxy, DataFixer datafixer, DataPackResources datapackresources, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache, WorldLoadListenerFactory worldloadlistenerfactory) {
|
||||
super("Server");
|
||||
|
@ -25,7 +25,7 @@ index bea6cd6cf4dceece74de9cbb12a094334d129c4a..3b2fcb4338d56a8e1dd2de799571db4e
|
|||
this.m = new GameProfilerSwitcher(SystemUtils.a, this::ai);
|
||||
this.methodProfiler = GameProfilerDisabled.a;
|
||||
this.serverPing = new ServerPing();
|
||||
@@ -2152,7 +2154,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -2153,7 +2155,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
||||
@Deprecated
|
||||
public static MinecraftServer getServer() {
|
||||
|
|
|
@ -10,10 +10,10 @@ Additionally, move Saving of the User cache to be done async, incase
|
|||
the user never changed the default setting for Spigot's save on stop only.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 3b2fcb4338d56a8e1dd2de799571db4e2a79ec9f..c6ab645397911d984a28e40583bdb8f782a4f934 100644
|
||||
index 3d20206c3817cc7bf1d0168c0b556b7505eebf93..9ae25f9496355d3114c0032731c8dcb621d243dc 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -896,7 +896,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -897,7 +897,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
} catch (java.lang.InterruptedException ignored) {} // Paper
|
||||
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
|
||||
LOGGER.info("Saving usercache.json");
|
||||
|
@ -36,10 +36,18 @@ index faf4d00bf288359db806913c4d2964324e8706b7..8ae72e8c8325d9b03803f29fcdd83a0c
|
|||
|
||||
if (!NameReferencingFileConverter.e(this)) {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/UserCache.java b/src/main/java/net/minecraft/server/players/UserCache.java
|
||||
index 581e036f598b51a4e9f2dafd7e92c700c3e04407..9bb949ff4cbfc87ce179653939454a1e44dcdd77 100644
|
||||
index 581e036f598b51a4e9f2dafd7e92c700c3e04407..2de2d84a56183435d641ba857472276821a70ae0 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/UserCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/UserCache.java
|
||||
@@ -107,7 +107,7 @@ public class UserCache {
|
||||
@@ -35,6 +35,7 @@ import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.stream.Stream;
|
||||
import javax.annotation.Nullable;
|
||||
+import net.minecraft.server.MCUtil;
|
||||
import net.minecraft.world.entity.player.EntityHuman;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -107,7 +108,7 @@ public class UserCache {
|
||||
return UserCache.b;
|
||||
}
|
||||
|
||||
|
@ -48,7 +56,7 @@ index 581e036f598b51a4e9f2dafd7e92c700c3e04407..9bb949ff4cbfc87ce179653939454a1e
|
|||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
calendar.setTime(new Date());
|
||||
@@ -116,7 +116,7 @@ public class UserCache {
|
||||
@@ -116,7 +117,7 @@ public class UserCache {
|
||||
UserCache.UserCacheEntry usercache_usercacheentry = new UserCache.UserCacheEntry(gameprofile, date);
|
||||
|
||||
this.a(usercache_usercacheentry);
|
||||
|
@ -57,7 +65,7 @@ index 581e036f598b51a4e9f2dafd7e92c700c3e04407..9bb949ff4cbfc87ce179653939454a1e
|
|||
}
|
||||
|
||||
private long d() {
|
||||
@@ -124,7 +124,7 @@ public class UserCache {
|
||||
@@ -124,7 +125,7 @@ public class UserCache {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@ -66,7 +74,7 @@ index 581e036f598b51a4e9f2dafd7e92c700c3e04407..9bb949ff4cbfc87ce179653939454a1e
|
|||
String s1 = s.toLowerCase(Locale.ROOT);
|
||||
UserCache.UserCacheEntry usercache_usercacheentry = (UserCache.UserCacheEntry) this.c.get(s1);
|
||||
boolean flag = false;
|
||||
@@ -150,7 +150,7 @@ public class UserCache {
|
||||
@@ -150,7 +151,7 @@ public class UserCache {
|
||||
}
|
||||
|
||||
if (flag && !org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) { // Spigot - skip saving if disabled
|
||||
|
@ -75,7 +83,7 @@ index 581e036f598b51a4e9f2dafd7e92c700c3e04407..9bb949ff4cbfc87ce179653939454a1e
|
|||
}
|
||||
|
||||
return gameprofile;
|
||||
@@ -232,7 +232,7 @@ public class UserCache {
|
||||
@@ -232,7 +233,7 @@ public class UserCache {
|
||||
return arraylist;
|
||||
}
|
||||
|
||||
|
@ -84,7 +92,7 @@ index 581e036f598b51a4e9f2dafd7e92c700c3e04407..9bb949ff4cbfc87ce179653939454a1e
|
|||
JsonArray jsonarray = new JsonArray();
|
||||
DateFormat dateformat = e();
|
||||
|
||||
@@ -240,6 +240,7 @@ public class UserCache {
|
||||
@@ -240,6 +241,7 @@ public class UserCache {
|
||||
jsonarray.add(a(usercache_usercacheentry, dateformat));
|
||||
});
|
||||
String s = this.f.toJson(jsonarray);
|
||||
|
@ -92,7 +100,7 @@ index 581e036f598b51a4e9f2dafd7e92c700c3e04407..9bb949ff4cbfc87ce179653939454a1e
|
|||
|
||||
try {
|
||||
BufferedWriter bufferedwriter = Files.newWriter(this.g, StandardCharsets.UTF_8);
|
||||
@@ -267,6 +268,14 @@ public class UserCache {
|
||||
@@ -267,6 +269,14 @@ public class UserCache {
|
||||
} catch (IOException ioexception) {
|
||||
;
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ index f5227aa761d326376d057eaadcdbef024ed30241..44b79c97d5cc7570683e1b7f025b4f3a
|
|||
private java.util.Map<EntityPlayer, Boolean> trackedPlayerMap = null;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 2b1b46bda48c0b137fe914c47a387e6e72a1be40..ee160558d84b24e1309262874a9d433bbe6593f3 100644
|
||||
index f942d75982409f7640f073f9c77f8939225c6939..88ffc594a2ee7f8718337883609ad4c082f85f50 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2766,6 +2766,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
|
@ -61,10 +61,25 @@ index 2b1b46bda48c0b137fe914c47a387e6e72a1be40..ee160558d84b24e1309262874a9d433b
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/EntityTNTPrimed.java b/src/main/java/net/minecraft/world/entity/item/EntityTNTPrimed.java
|
||||
index 535e7d7297d81026b8586d5049b72fa65519b464..ca954912c798a7f4f7c9903a53156075ab688e46 100644
|
||||
index 535e7d7297d81026b8586d5049b72fa65519b464..63b35feac07f01b200dd68c4836ceb419e951660 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/EntityTNTPrimed.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/EntityTNTPrimed.java
|
||||
@@ -96,7 +96,27 @@ public class EntityTNTPrimed extends Entity {
|
||||
@@ -4,10 +4,14 @@ import javax.annotation.Nullable;
|
||||
import net.minecraft.core.particles.Particles;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.protocol.Packet;
|
||||
+import net.minecraft.network.protocol.game.PacketPlayOutEntityTeleport;
|
||||
+import net.minecraft.network.protocol.game.PacketPlayOutEntityVelocity;
|
||||
import net.minecraft.network.protocol.game.PacketPlayOutSpawnEntity;
|
||||
import net.minecraft.network.syncher.DataWatcher;
|
||||
import net.minecraft.network.syncher.DataWatcherObject;
|
||||
import net.minecraft.network.syncher.DataWatcherRegistry;
|
||||
+import net.minecraft.server.level.PlayerChunkMap;
|
||||
+import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityLiving;
|
||||
import net.minecraft.world.entity.EntityPose;
|
||||
@@ -96,7 +100,27 @@ public class EntityTNTPrimed extends Entity {
|
||||
this.world.addParticle(Particles.SMOKE, this.locX(), this.locY() + 0.5D, this.locZ(), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
|
@ -93,7 +108,7 @@ index 535e7d7297d81026b8586d5049b72fa65519b464..ca954912c798a7f4f7c9903a53156075
|
|||
}
|
||||
|
||||
private void explode() {
|
||||
@@ -165,4 +185,11 @@ public class EntityTNTPrimed extends Entity {
|
||||
@@ -165,4 +189,11 @@ public class EntityTNTPrimed extends Entity {
|
||||
public Packet<?> P() {
|
||||
return new PacketPlayOutSpawnEntity(this);
|
||||
}
|
||||
|
|
|
@ -9,14 +9,14 @@ Subject: [PATCH] Fix Old Sign Conversion
|
|||
This causes Igloos and such to render broken signs. We fix this by ignoring sign conversion for Defined Structures
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntity.java
|
||||
index 58789a6e285c31947508deae37caefe7e182278c..fd6364dfc68c2eb9f560e7bc403dea874193828e 100644
|
||||
index 58789a6e285c31947508deae37caefe7e182278c..9b44ca96669ce423e5649f11743226dfdd9ce746 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntity.java
|
||||
@@ -34,6 +34,7 @@ public abstract class TileEntity implements net.minecraft.server.KeyedObject { /
|
||||
public CraftPersistentDataContainer persistentDataContainer;
|
||||
// CraftBukkit end
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
+ boolean isLoadingStructure = false; // Paper
|
||||
+ public boolean isLoadingStructure = false; // Paper
|
||||
private final TileEntityTypes<?> tileType; public TileEntityTypes getTileEntityType() { return tileType; } // Paper - OBFHELPER
|
||||
@Nullable
|
||||
protected World world;
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't lookup game profiles that have no UUID and no name
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/UserCache.java b/src/main/java/net/minecraft/server/players/UserCache.java
|
||||
index 9bb949ff4cbfc87ce179653939454a1e44dcdd77..85ca2a3b19d27a0dbe1c8dee6bd5b31ae11bbce2 100644
|
||||
index 2de2d84a56183435d641ba857472276821a70ae0..6c349128bdedc53003f043c9cb1210b4666aee33 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/UserCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/UserCache.java
|
||||
@@ -90,7 +90,7 @@ public class UserCache {
|
||||
@@ -91,7 +91,7 @@ public class UserCache {
|
||||
gameprofilerepository.findProfilesByNames(new String[]{s}, Agent.MINECRAFT, profilelookupcallback);
|
||||
GameProfile gameprofile = (GameProfile) atomicreference.get();
|
||||
|
||||
|
|
|
@ -19,10 +19,10 @@ index 6eca3f300020006f02dd36253b522db442e3cc33..622affa0dc3cc1eadaed400511f2ca2c
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
index c24315a329b3076a022fdf2aa7459e7117323e20..86872f4e65d7e0ca68237a42fe87f33ba7a92802 100644
|
||||
index b6898cd6e6117fef65198db32b98a64c806811d4..7918dd4ad3e8cbb905b3929062a70fb7961b7d68 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
@@ -677,6 +677,12 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -679,6 +679,12 @@ public class Chunk implements IChunkAccess {
|
||||
"Chunk coordinates: " + (this.loc.x * 16) + "," + (this.loc.z * 16));
|
||||
e.printStackTrace();
|
||||
ServerInternalException.reportInternalException(e);
|
||||
|
|
|
@ -27,10 +27,18 @@ index 9bd4a283a99f86c9a26f73e0bad0c3414d66ad55..5ecbe9135a71dd84e0722fa9c039c272
|
|||
this.a((MovingObjectPosition) object);
|
||||
this.impulse = true;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/EntityFireball.java b/src/main/java/net/minecraft/world/entity/projectile/EntityFireball.java
|
||||
index ed76aec99f46a7923d139e347779c24f512ac131..08b3499681eaf23a2f79f6dd9134ccfd86d888a4 100644
|
||||
index ed76aec99f46a7923d139e347779c24f512ac131..ede7b4dbf2dce7bac83c5e17eecfdaf0e8a84fe7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/EntityFireball.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/EntityFireball.java
|
||||
@@ -72,7 +72,16 @@ public abstract class EntityFireball extends IProjectile {
|
||||
@@ -13,6 +13,7 @@ import net.minecraft.world.entity.EntityLiving;
|
||||
import net.minecraft.world.entity.EntityTypes;
|
||||
import net.minecraft.world.level.World;
|
||||
import net.minecraft.world.phys.MovingObjectPosition;
|
||||
+import net.minecraft.world.phys.MovingObjectPositionEntity;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
|
||||
@@ -72,7 +73,16 @@ public abstract class EntityFireball extends IProjectile {
|
||||
|
||||
MovingObjectPosition movingobjectposition = ProjectileHelper.a((Entity) this, this::a);
|
||||
|
||||
|
@ -49,10 +57,18 @@ index ed76aec99f46a7923d139e347779c24f512ac131..08b3499681eaf23a2f79f6dd9134ccfd
|
|||
|
||||
// CraftBukkit start - Fire ProjectileHitEvent
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/EntityProjectile.java b/src/main/java/net/minecraft/world/entity/projectile/EntityProjectile.java
|
||||
index 829b4f28896bcb0eb6e48242bd00585eeaae62c2..7bf41d2c924531f7a28e906c64b8a4ccd3dffedb 100644
|
||||
index 829b4f28896bcb0eb6e48242bd00585eeaae62c2..3b379e83b79bd9b46dbdd4a48ac3842abc4dfbb8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/EntityProjectile.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/EntityProjectile.java
|
||||
@@ -57,7 +57,17 @@ public abstract class EntityProjectile extends IProjectile {
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.world.level.block.entity.TileEntityEndGateway;
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import net.minecraft.world.phys.MovingObjectPosition;
|
||||
import net.minecraft.world.phys.MovingObjectPositionBlock;
|
||||
+import net.minecraft.world.phys.MovingObjectPositionEntity;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
public abstract class EntityProjectile extends IProjectile {
|
||||
@@ -57,7 +58,17 @@ public abstract class EntityProjectile extends IProjectile {
|
||||
}
|
||||
|
||||
if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS && !flag) {
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Prevent Pathfinding out of World Border
|
|||
This prevents Entities from trying to run outside of the World Border
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java b/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java
|
||||
index c50d792c3ef3277ecab229e866f052854edac19d..1664d47a61f1c502ece7f32aecdce759172c9f85 100644
|
||||
index d71a6e5991629ce59c8529d7cc8064960e385236..d134333c736dc1ee1c722d680d7a9c22c1b265bd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java
|
||||
@@ -147,7 +147,7 @@ public abstract class NavigationAbstract {
|
||||
@@ -148,7 +148,7 @@ public abstract class NavigationAbstract {
|
||||
// Paper start - Pathfind event
|
||||
boolean copiedSet = false;
|
||||
for (BlockPosition possibleTarget : set) {
|
||||
|
|
|
@ -93,10 +93,18 @@ index 9153945c2e245b9a2a098bdf58b0dcab052084ff..a2950faa48021782f10db0673d12d178
|
|||
itemstack.subtract(1);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
||||
index 33162fd419ab9a7b650ca9d4270a0c03f06f19f6..ec8c32c7be51219d95a38ffb9291509f7d09bd7c 100644
|
||||
index 33162fd419ab9a7b650ca9d4270a0c03f06f19f6..73c2da316e41329114fcb3d30cb009d9cc7de7b9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
||||
@@ -78,4 +78,17 @@ public class CraftFirework extends CraftProjectile implements Firework {
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.bukkit.craftbukkit.entity;
|
||||
|
||||
import java.util.Random;
|
||||
+import net.minecraft.world.entity.EntityLiving;
|
||||
import net.minecraft.world.entity.projectile.EntityFireworks;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Items;
|
||||
@@ -78,4 +79,17 @@ public class CraftFirework extends CraftProjectile implements Firework {
|
||||
public void setShotAtAngle(boolean shotAtAngle) {
|
||||
getHandle().getDataWatcher().set(EntityFireworks.SHOT_AT_ANGLE, shotAtAngle);
|
||||
}
|
||||
|
@ -109,7 +117,7 @@ index 33162fd419ab9a7b650ca9d4270a0c03f06f19f6..ec8c32c7be51219d95a38ffb9291509f
|
|||
+
|
||||
+ @Override
|
||||
+ public org.bukkit.entity.LivingEntity getBoostedEntity() {
|
||||
+ net.minecraft.server.EntityLiving boostedEntity = getHandle().ridingEntity;
|
||||
+ EntityLiving boostedEntity = getHandle().ridingEntity;
|
||||
+ return boostedEntity != null ? (org.bukkit.entity.LivingEntity) boostedEntity.getBukkitEntity() : null;
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
|
|
@ -6,10 +6,18 @@ Subject: [PATCH] PlayerTeleportEndGatewayEvent
|
|||
Allows you to access the Gateway being used in a teleport event
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityEndGateway.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityEndGateway.java
|
||||
index 0c5d9600eadc0a550cc2d5e7b4ee665c030faa89..8f2db48201925f4a5dac5dfc19bb2b96438959e1 100644
|
||||
index 0c5d9600eadc0a550cc2d5e7b4ee665c030faa89..2808cd0b100bd65a730aba315ab47a59a4621b30 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityEndGateway.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityEndGateway.java
|
||||
@@ -180,7 +180,7 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
|
||||
@@ -10,6 +10,7 @@ import net.minecraft.data.worldgen.BiomeDecoratorGroups;
|
||||
import net.minecraft.nbt.GameProfileSerializer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.protocol.game.PacketPlayOutTileEntityData;
|
||||
+import net.minecraft.server.MCUtil;
|
||||
import net.minecraft.server.level.EntityPlayer;
|
||||
import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.util.MathHelper;
|
||||
@@ -180,7 +181,7 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
|
||||
location.setPitch(player.getLocation().getPitch());
|
||||
location.setYaw(player.getLocation().getYaw());
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size()
|
|||
which creates copy of the collections.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 8b68c1b680e0b7ecb21b9de782dbc2864e7b5dfe..af8593d117359c75ff8c635a93499d84e25eb854 100644
|
||||
index 5c488c8a40c648c5c432d38d95d3e00fde2cdb75..642efd930dc6cfad1d9436df97f151ea69b24b0c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -282,6 +282,48 @@ public class CraftWorld implements World {
|
||||
|
@ -17,7 +17,7 @@ index 8b68c1b680e0b7ecb21b9de782dbc2864e7b5dfe..af8593d117359c75ff8c635a93499d84
|
|||
+ // Paper start - Provide fast information methods
|
||||
+ public int getEntityCount() {
|
||||
+ int ret = 0;
|
||||
+ for (net.minecraft.server.Entity entity : world.entitiesById.values()) {
|
||||
+ for (net.minecraft.world.entity.Entity entity : world.entitiesById.values()) {
|
||||
+ if (entity.isChunkLoaded()) {
|
||||
+ ++ret;
|
||||
+ }
|
||||
|
@ -28,8 +28,8 @@ index 8b68c1b680e0b7ecb21b9de782dbc2864e7b5dfe..af8593d117359c75ff8c635a93499d84
|
|||
+ // We don't use the full world tile entity list, so we must iterate chunks
|
||||
+ Long2ObjectLinkedOpenHashMap<PlayerChunk> chunks = world.getChunkProvider().playerChunkMap.visibleChunks;
|
||||
+ int size = 0;
|
||||
+ for (net.minecraft.server.PlayerChunk playerchunk : chunks.values()) {
|
||||
+ net.minecraft.server.Chunk chunk = playerchunk.getChunk();
|
||||
+ for (PlayerChunk playerchunk : chunks.values()) {
|
||||
+ net.minecraft.world.level.chunk.Chunk chunk = playerchunk.getChunk();
|
||||
+ if (chunk == null) {
|
||||
+ continue;
|
||||
+ }
|
||||
|
|
|
@ -30,10 +30,10 @@ will have plugins and worlds saving to the disk has a high potential to result
|
|||
in corruption/dataloss.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c6ab645397911d984a28e40583bdb8f782a4f934..42ff9c57a6107c0cf22a204cf7cabf374bbdc868 100644
|
||||
index 9ae25f9496355d3114c0032731c8dcb621d243dc..7637e17e8a811214931c2df3dab50651a4cbcde6 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -200,6 +200,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -201,6 +201,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
public final Map<ResourceKey<World>, WorldServer> worldServer;
|
||||
private PlayerList playerList;
|
||||
private volatile boolean isRunning;
|
||||
|
@ -41,7 +41,7 @@ index c6ab645397911d984a28e40583bdb8f782a4f934..42ff9c57a6107c0cf22a204cf7cabf37
|
|||
private boolean isStopped;
|
||||
private int ticks;
|
||||
protected final Proxy proxy;
|
||||
@@ -849,7 +850,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -850,7 +851,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
if (this.playerList != null) {
|
||||
MinecraftServer.LOGGER.info("Saving players");
|
||||
this.playerList.savePlayers();
|
||||
|
@ -50,7 +50,7 @@ index c6ab645397911d984a28e40583bdb8f782a4f934..42ff9c57a6107c0cf22a204cf7cabf37
|
|||
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
|
||||
}
|
||||
|
||||
@@ -914,8 +915,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -915,8 +916,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
return this.isRunning;
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ index c6ab645397911d984a28e40583bdb8f782a4f934..42ff9c57a6107c0cf22a204cf7cabf37
|
|||
if (flag) {
|
||||
try {
|
||||
this.serverThread.join();
|
||||
@@ -925,6 +931,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -926,6 +932,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ index c6ab645397911d984a28e40583bdb8f782a4f934..42ff9c57a6107c0cf22a204cf7cabf37
|
|||
// Spigot Start
|
||||
private static double calcTps(double avg, double exp, double tps)
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index d7cf89f4603779ce9a2e9a6f837a81684f209826..488e33cfc4887e602c897c9a94c0d824af7672ff 100644
|
||||
index eb5c22d8af3a3cfadd581d641010942caa6bed54..6c80f328016b6cd30c77b5a5b1e2f6be0b3cd2f0 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1158,9 +1158,15 @@ public abstract class PlayerList {
|
||||
|
|
|
@ -144,10 +144,10 @@ index 0000000000000000000000000000000000000000..685deaa0e5d1ddc13e3a7c0471b1cfcf
|
|||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 42ff9c57a6107c0cf22a204cf7cabf374bbdc868..5b796a6e5f34c38e15d9ce288dfd9bf498cc328e 100644
|
||||
index 7637e17e8a811214931c2df3dab50651a4cbcde6..d181a41c1724ee6e84f5239649ab74df158d5f24 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -159,7 +159,7 @@ import org.apache.logging.log4j.Logger;
|
||||
@@ -160,7 +160,7 @@ import org.apache.logging.log4j.Logger;
|
||||
import com.mojang.serialization.DynamicOps;
|
||||
import com.mojang.serialization.Lifecycle;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
@ -156,7 +156,7 @@ index 42ff9c57a6107c0cf22a204cf7cabf374bbdc868..5b796a6e5f34c38e15d9ce288dfd9bf4
|
|||
import joptsimple.OptionSet;
|
||||
import net.minecraft.nbt.DynamicOpsNBT;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
@@ -254,7 +254,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -255,7 +255,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
public OptionSet options;
|
||||
public org.bukkit.command.ConsoleCommandSender console;
|
||||
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
|
||||
|
@ -165,7 +165,7 @@ index 42ff9c57a6107c0cf22a204cf7cabf374bbdc868..5b796a6e5f34c38e15d9ce288dfd9bf4
|
|||
public static int currentTick = 0; // Paper - Further improve tick loop
|
||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
@@ -323,7 +323,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -324,7 +324,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.options = options;
|
||||
this.datapackconfiguration = datapackconfiguration;
|
||||
this.vanillaCommandDispatcher = datapackresources.commandDispatcher; // CraftBukkit
|
||||
|
@ -175,7 +175,7 @@ index 42ff9c57a6107c0cf22a204cf7cabf374bbdc868..5b796a6e5f34c38e15d9ce288dfd9bf4
|
|||
if (System.console() == null && System.getProperty("jline.terminal") == null) {
|
||||
System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
|
||||
Main.useJline = false;
|
||||
@@ -344,6 +346,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -345,6 +347,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
LOGGER.warn((String) null, ex);
|
||||
}
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ index 42ff9c57a6107c0cf22a204cf7cabf374bbdc868..5b796a6e5f34c38e15d9ce288dfd9bf4
|
|||
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -1087,7 +1091,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1088,7 +1092,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
org.spigotmc.WatchdogThread.doStop(); // Spigot
|
||||
// CraftBukkit start - Restore terminal to original settings
|
||||
try {
|
||||
|
@ -193,7 +193,7 @@ index 42ff9c57a6107c0cf22a204cf7cabf374bbdc868..5b796a6e5f34c38e15d9ce288dfd9bf4
|
|||
} catch (Exception ignored) {
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -1458,7 +1462,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1459,7 +1463,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
||||
@Override
|
||||
public void sendMessage(IChatBaseComponent ichatbasecomponent, UUID uuid) {
|
||||
|
@ -245,7 +245,7 @@ index 8ae72e8c8325d9b03803f29fcdd83a0ce8d34450..a0804c4df6f047cf913ae70970219617
|
|||
System.setOut(IoBuilder.forLogger(logger).setLevel(Level.INFO).buildPrintStream());
|
||||
System.setErr(IoBuilder.forLogger(logger).setLevel(Level.WARN).buildPrintStream());
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 488e33cfc4887e602c897c9a94c0d824af7672ff..9db65b9d8f66ff83dcf32274fec98a425e7353d8 100644
|
||||
index 6c80f328016b6cd30c77b5a5b1e2f6be0b3cd2f0..a892bcf08dddac90f01caec81229259e1070c3ea 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -150,8 +150,7 @@ public abstract class PlayerList {
|
||||
|
|
|
@ -473,10 +473,10 @@ index 89db31061fcc3420bc8e668533a4051cdbd12253..191a74bd9b894f9d64d0a55747cb17e0
|
|||
GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository();
|
||||
UserCache usercache = new UserCache(gameprofilerepository, new File(file, MinecraftServer.b.getName()));
|
||||
diff --git a/src/main/java/net/minecraft/server/players/UserCache.java b/src/main/java/net/minecraft/server/players/UserCache.java
|
||||
index 85ca2a3b19d27a0dbe1c8dee6bd5b31ae11bbce2..bc3deb1d9710c744388ce6e89a6f5f4f3f05238d 100644
|
||||
index 6c349128bdedc53003f043c9cb1210b4666aee33..e3801a4a13d0bac7816a1350d3799a9815481c4b 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/UserCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/UserCache.java
|
||||
@@ -43,7 +43,7 @@ public class UserCache {
|
||||
@@ -44,7 +44,7 @@ public class UserCache {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
private static boolean b;
|
||||
|
@ -485,7 +485,7 @@ index 85ca2a3b19d27a0dbe1c8dee6bd5b31ae11bbce2..bc3deb1d9710c744388ce6e89a6f5f4f
|
|||
private final Map<UUID, UserCache.UserCacheEntry> d = Maps.newConcurrentMap();
|
||||
private final GameProfileRepository e;
|
||||
private final Gson f = (new GsonBuilder()).create();
|
||||
@@ -107,6 +107,7 @@ public class UserCache {
|
||||
@@ -108,6 +108,7 @@ public class UserCache {
|
||||
return UserCache.b;
|
||||
}
|
||||
|
||||
|
@ -493,7 +493,7 @@ index 85ca2a3b19d27a0dbe1c8dee6bd5b31ae11bbce2..bc3deb1d9710c744388ce6e89a6f5f4f
|
|||
public synchronized void a(GameProfile gameprofile) { // Paper - synchronize
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
@@ -156,6 +157,13 @@ public class UserCache {
|
||||
@@ -157,6 +158,13 @@ public class UserCache {
|
||||
return gameprofile;
|
||||
}
|
||||
|
||||
|
@ -507,7 +507,7 @@ index 85ca2a3b19d27a0dbe1c8dee6bd5b31ae11bbce2..bc3deb1d9710c744388ce6e89a6f5f4f
|
|||
@Nullable
|
||||
public GameProfile getProfile(UUID uuid) {
|
||||
UserCache.UserCacheEntry usercache_usercacheentry = (UserCache.UserCacheEntry) this.d.get(uuid);
|
||||
@@ -338,7 +346,7 @@ public class UserCache {
|
||||
@@ -339,7 +347,7 @@ public class UserCache {
|
||||
|
||||
static class UserCacheEntry {
|
||||
|
||||
|
|
|
@ -6,10 +6,18 @@ Subject: [PATCH] PlayerPickupExperienceEvent
|
|||
Allows plugins to cancel a player picking up an experience orb
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityExperienceOrb.java b/src/main/java/net/minecraft/world/entity/EntityExperienceOrb.java
|
||||
index f4da22b33c704e675510b4b1a3aa7c180088be29..1fd4bd03463a76e838d1aaa8e6f16f7a42f96fa7 100644
|
||||
index f4da22b33c704e675510b4b1a3aa7c180088be29..e3dfb018b06c0139594ddbb88fab2ca8d43ab12f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityExperienceOrb.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityExperienceOrb.java
|
||||
@@ -232,7 +232,7 @@ public class EntityExperienceOrb extends Entity {
|
||||
@@ -5,6 +5,7 @@ import net.minecraft.core.BlockPosition;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.protocol.Packet;
|
||||
import net.minecraft.network.protocol.game.PacketPlayOutSpawnEntityExperienceOrb;
|
||||
+import net.minecraft.server.level.EntityPlayer;
|
||||
import net.minecraft.sounds.SoundEffects;
|
||||
import net.minecraft.tags.Tag;
|
||||
import net.minecraft.tags.TagsFluid;
|
||||
@@ -232,7 +233,7 @@ public class EntityExperienceOrb extends Entity {
|
||||
@Override
|
||||
public void pickup(EntityHuman entityhuman) {
|
||||
if (!this.world.isClientSide) {
|
||||
|
|
|
@ -10,10 +10,10 @@ of giving the player experience points.
|
|||
Both an API To standalone mend, and apply mending logic to .giveExp has been added.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityExperienceOrb.java b/src/main/java/net/minecraft/world/entity/EntityExperienceOrb.java
|
||||
index 1fd4bd03463a76e838d1aaa8e6f16f7a42f96fa7..dc257a7cafc4b728aa5c99ca332143bb05896d7e 100644
|
||||
index e3dfb018b06c0139594ddbb88fab2ca8d43ab12f..3387a19044b3ee2a1ef549c328c8bc354a5b6d23 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityExperienceOrb.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityExperienceOrb.java
|
||||
@@ -264,10 +264,12 @@ public class EntityExperienceOrb extends Entity {
|
||||
@@ -265,10 +265,12 @@ public class EntityExperienceOrb extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,10 +42,28 @@ index d313b02f41e4f4a90676cbb37afce4e92dd4d664..72afbf8f537770540e90a2880ea81de1
|
|||
return true;
|
||||
});
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index cf9ae60db30ef09bb4c89935a42632e562b6d61e..f8780db8f376ee71a35ebe1c2ab84a6117d0d74e 100644
|
||||
index cf9ae60db30ef09bb4c89935a42632e562b6d61e..4766a78a0562e5ae6e7d4850bd7b5d71425c3a0c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1180,8 +1180,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -58,13 +58,17 @@ import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.server.network.PlayerConnection;
|
||||
import net.minecraft.server.players.WhiteListEntry;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
+import net.minecraft.world.entity.EntityExperienceOrb;
|
||||
import net.minecraft.world.entity.EntityLiving;
|
||||
+import net.minecraft.world.entity.EntityTypes;
|
||||
import net.minecraft.world.entity.ai.attributes.AttributeMapBase;
|
||||
import net.minecraft.world.entity.ai.attributes.AttributeModifiable;
|
||||
import net.minecraft.world.entity.ai.attributes.GenericAttributes;
|
||||
import net.minecraft.world.entity.player.EntityHuman;
|
||||
import net.minecraft.world.inventory.Container;
|
||||
import net.minecraft.world.item.EnumColor;
|
||||
+import net.minecraft.world.item.enchantment.EnchantmentManager;
|
||||
+import net.minecraft.world.item.enchantment.Enchantments;
|
||||
import net.minecraft.world.level.EnumGamemode;
|
||||
import net.minecraft.world.level.block.entity.TileEntitySign;
|
||||
import net.minecraft.world.level.saveddata.maps.MapIcon;
|
||||
@@ -1180,8 +1184,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return GameMode.getByValue(getHandle().playerInteractManager.getGameMode().getId());
|
||||
}
|
||||
|
||||
|
@ -55,10 +73,10 @@ index cf9ae60db30ef09bb4c89935a42632e562b6d61e..f8780db8f376ee71a35ebe1c2ab84a61
|
|||
+ public int applyMending(int amount) {
|
||||
+ EntityPlayer handle = getHandle();
|
||||
+ // Logic copied from EntityExperienceOrb and remapped to unobfuscated methods/properties
|
||||
+ net.minecraft.server.ItemStack itemstack = net.minecraft.server.EnchantmentManager.getRandomEquippedItemWithEnchant(net.minecraft.server.Enchantments.MENDING, handle);
|
||||
+ net.minecraft.world.item.ItemStack itemstack = EnchantmentManager.getRandomEquippedItemWithEnchant(Enchantments.MENDING, handle);
|
||||
+ if (!itemstack.isEmpty() && itemstack.getItem().usesDurability()) {
|
||||
+
|
||||
+ net.minecraft.server.EntityExperienceOrb orb = net.minecraft.server.EntityTypes.EXPERIENCE_ORB.create(handle.world);
|
||||
+ EntityExperienceOrb orb = EntityTypes.EXPERIENCE_ORB.create(handle.world);
|
||||
+ orb.value = amount;
|
||||
+ orb.spawnReason = org.bukkit.entity.ExperienceOrb.SpawnReason.CUSTOM;
|
||||
+ orb.setPositionRaw(handle.locX(), handle.locY(), handle.locZ());
|
||||
|
|
|
@ -69,10 +69,18 @@ index 41f1aecbf6b506231a1b3b525fe0ce23b35c7840..6c01e460d3a1ff7f865ebc34dfd28d55
|
|||
entityliving.getBehaviorController().a(MemoryModuleType.GOLEM_DETECTED_RECENTLY, true, 600L);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
|
||||
index adce6f17a5dd33004f8a67cd55d195de029e0263..d1afbfc4458c76a35b9be124f1e09c3b82501798 100644
|
||||
index adce6f17a5dd33004f8a67cd55d195de029e0263..534efe39beee393d11705b8f0b13ce4ca727c3eb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
|
||||
@@ -936,6 +936,21 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
@@ -30,6 +30,7 @@ import net.minecraft.network.protocol.game.PacketDebug;
|
||||
import net.minecraft.network.syncher.DataWatcher;
|
||||
import net.minecraft.network.syncher.DataWatcherObject;
|
||||
import net.minecraft.network.syncher.DataWatcherRegistry;
|
||||
+import net.minecraft.server.MCUtil;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.sounds.SoundEffect;
|
||||
@@ -936,6 +937,21 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
BlockPosition blockposition1 = this.a(blockposition, d0, d1);
|
||||
|
||||
if (blockposition1 != null) {
|
||||
|
@ -95,10 +103,18 @@ index adce6f17a5dd33004f8a67cd55d195de029e0263..d1afbfc4458c76a35b9be124f1e09c3b
|
|||
|
||||
if (entityirongolem != null) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java b/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java
|
||||
index 883c724fbb86a84ee903b5e7127f14726fe4cf24..79339bcbe15e5b3a409148245c68bbff3a59f59f 100644
|
||||
index 883c724fbb86a84ee903b5e7127f14726fe4cf24..d4b8126f12fdf7d9b4f882d3ed7d8da544ed9e8a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java
|
||||
@@ -125,6 +125,27 @@ public abstract class MobSpawnerAbstract {
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.core.particles.Particles;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.resources.MinecraftKey;
|
||||
+import net.minecraft.server.MCUtil;
|
||||
import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.util.UtilColor;
|
||||
import net.minecraft.util.WeightedRandom;
|
||||
@@ -125,6 +126,27 @@ public abstract class MobSpawnerAbstract {
|
||||
WorldServer worldserver = (WorldServer) world;
|
||||
|
||||
if (EntityPositionTypes.a((EntityTypes) optional.get(), worldserver, EnumMobSpawn.SPAWNER, new BlockPosition(d3, d4, d5), world.getRandom())) {
|
||||
|
@ -127,10 +143,18 @@ index 883c724fbb86a84ee903b5e7127f14726fe4cf24..79339bcbe15e5b3a409148245c68bbff
|
|||
entity1.setPositionRotation(d3, d4, d5, entity1.yaw, entity1.pitch);
|
||||
return entity1;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/SpawnerCreature.java b/src/main/java/net/minecraft/world/level/SpawnerCreature.java
|
||||
index fd0595fd584046326eccacdf0a6afe40c5e84eed..9a039ce12879baf8088c2ccaf0af61109efb7d74 100644
|
||||
index fd0595fd584046326eccacdf0a6afe40c5e84eed..1969d1002b3182338614a2be0519fcdc385b7a44 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/SpawnerCreature.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/SpawnerCreature.java
|
||||
@@ -216,9 +216,16 @@ public final class SpawnerCreature {
|
||||
@@ -15,6 +15,7 @@ import net.minecraft.core.EnumDirection;
|
||||
import net.minecraft.core.IPosition;
|
||||
import net.minecraft.core.IRegistry;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
+import net.minecraft.server.MCUtil;
|
||||
import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.tags.Tag;
|
||||
import net.minecraft.tags.TagsBlock;
|
||||
@@ -216,9 +217,16 @@ public final class SpawnerCreature {
|
||||
j1 = biomesettingsmobs_c.d + worldserver.random.nextInt(1 + biomesettingsmobs_c.e - biomesettingsmobs_c.d);
|
||||
}
|
||||
|
||||
|
@ -148,7 +172,7 @@ index fd0595fd584046326eccacdf0a6afe40c5e84eed..9a039ce12879baf8088c2ccaf0af6110
|
|||
if (entityinsentient == null) {
|
||||
return;
|
||||
}
|
||||
@@ -271,8 +278,24 @@ public final class SpawnerCreature {
|
||||
@@ -271,8 +279,24 @@ public final class SpawnerCreature {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,10 +13,26 @@ Update adjacent blocks of doors, double plants, pistons and beds
|
|||
when cancelling interaction.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/PlayerInteractManager.java b/src/main/java/net/minecraft/server/level/PlayerInteractManager.java
|
||||
index 51157a9223f3da22d1110cfa211a502de59fb8a1..13e02b8d73164bc36e8d29edf8b0b2cb51fe3080 100644
|
||||
index 51157a9223f3da22d1110cfa211a502de59fb8a1..cea19f4aafb3d81bf0dfcdac9103c03786fd5fc2 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/PlayerInteractManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/PlayerInteractManager.java
|
||||
@@ -179,6 +179,11 @@ public class PlayerInteractManager {
|
||||
@@ -6,6 +6,7 @@ import net.minecraft.core.BlockPosition;
|
||||
import net.minecraft.core.EnumDirection;
|
||||
import net.minecraft.network.protocol.game.PacketPlayInBlockDig;
|
||||
import net.minecraft.network.protocol.game.PacketPlayOutBlockBreak;
|
||||
+import net.minecraft.network.protocol.game.PacketPlayOutCloseWindow;
|
||||
import net.minecraft.network.protocol.game.PacketPlayOutPlayerInfo;
|
||||
import net.minecraft.world.EnumHand;
|
||||
import net.minecraft.world.EnumInteractionResult;
|
||||
@@ -18,6 +19,7 @@ import net.minecraft.world.level.EnumGamemode;
|
||||
import net.minecraft.world.level.World;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.BlockCommand;
|
||||
+import net.minecraft.world.level.block.BlockFlowerPot;
|
||||
import net.minecraft.world.level.block.BlockJigsaw;
|
||||
import net.minecraft.world.level.block.BlockStructure;
|
||||
import net.minecraft.world.level.block.entity.TileEntity;
|
||||
@@ -179,6 +181,11 @@ public class PlayerInteractManager {
|
||||
PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.LEFT_CLICK_BLOCK, blockposition, enumdirection, this.player.inventory.getItemInHand(), EnumHand.MAIN_HAND);
|
||||
if (event.isCancelled()) {
|
||||
// Let the client know the block still exists
|
||||
|
@ -28,7 +44,7 @@ index 51157a9223f3da22d1110cfa211a502de59fb8a1..13e02b8d73164bc36e8d29edf8b0b2cb
|
|||
this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition));
|
||||
// Update any tile entity data for this block
|
||||
TileEntity tileentity = this.world.getTileEntity(blockposition);
|
||||
@@ -483,13 +488,32 @@ public class PlayerInteractManager {
|
||||
@@ -483,13 +490,32 @@ public class PlayerInteractManager {
|
||||
interactItemStack = itemstack.cloneItemStack();
|
||||
|
||||
if (event.useInteractedBlock() == Event.Result.DENY) {
|
||||
|
|
|
@ -223,7 +223,7 @@ index 005ae7a75dfb19152abb606da29acad07c85e499..b9e36a83837913cd3e5abe598f695ba7
|
|||
this.c = agameprofile;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 5b796a6e5f34c38e15d9ce288dfd9bf498cc328e..d69b6783572b44c9b8d49d0853a8282e14e64476 100644
|
||||
index d181a41c1724ee6e84f5239649ab74df158d5f24..9672619d3f206a5290d459b300ecdf53b7b70d91 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2,6 +2,9 @@ package net.minecraft.server;
|
||||
|
@ -236,7 +236,7 @@ index 5b796a6e5f34c38e15d9ce288dfd9bf498cc328e..d69b6783572b44c9b8d49d0853a8282e
|
|||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -1228,7 +1231,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1229,7 +1232,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
if (i - this.T >= 5000000000L) {
|
||||
this.T = i;
|
||||
this.serverPing.setPlayerSample(new ServerPing.ServerPingPlayerSample(this.getMaxPlayers(), this.getPlayerCount()));
|
||||
|
|
|
@ -48,10 +48,18 @@ index 18b0020d184e46c8957e82100681c8c66b1c3b62..41dd46c6ef95f7dc41d9ca36a5f0b85f
|
|||
private final ItemCooldown bM;
|
||||
@Nullable
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index f8780db8f376ee71a35ebe1c2ab84a6117d0d74e..87d00559fb54ed93a374ce827d2d99b4a11c73d7 100644
|
||||
index 4766a78a0562e5ae6e7d4850bd7b5d71425c3a0c..e6adf5ab609076bf1c25061429ed9aba1df1d9cb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1308,8 +1308,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -70,6 +70,7 @@ import net.minecraft.world.item.EnumColor;
|
||||
import net.minecraft.world.item.enchantment.EnchantmentManager;
|
||||
import net.minecraft.world.item.enchantment.Enchantments;
|
||||
import net.minecraft.world.level.EnumGamemode;
|
||||
+import net.minecraft.world.level.biome.BiomeManager;
|
||||
import net.minecraft.world.level.block.entity.TileEntitySign;
|
||||
import net.minecraft.world.level.saveddata.maps.MapIcon;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
@@ -1312,8 +1313,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
hiddenPlayers.put(player.getUniqueId(), hidingPlugins);
|
||||
|
||||
// Remove this player from the hidden player's EntityTrackerEntry
|
||||
|
@ -66,7 +74,7 @@ index f8780db8f376ee71a35ebe1c2ab84a6117d0d74e..87d00559fb54ed93a374ce827d2d99b4
|
|||
PlayerChunkMap.EntityTracker entry = tracker.trackedEntities.get(other.getId());
|
||||
if (entry != null) {
|
||||
entry.clear(getHandle());
|
||||
@@ -1350,8 +1355,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1354,8 +1360,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
hiddenPlayers.remove(player.getUniqueId());
|
||||
|
||||
|
@ -81,7 +89,7 @@ index f8780db8f376ee71a35ebe1c2ab84a6117d0d74e..87d00559fb54ed93a374ce827d2d99b4
|
|||
|
||||
getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, other));
|
||||
|
||||
@@ -1360,6 +1370,50 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1364,6 +1375,50 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
entry.updatePlayer(getHandle());
|
||||
}
|
||||
}
|
||||
|
@ -118,7 +126,7 @@ index f8780db8f376ee71a35ebe1c2ab84a6117d0d74e..87d00559fb54ed93a374ce827d2d99b4
|
|||
+
|
||||
+ //Respawn the player then update their position and selected slot
|
||||
+ WorldServer worldserver = handle.getWorldServer();
|
||||
+ connection.sendPacket(new net.minecraft.network.protocol.game.PacketPlayOutRespawn(worldserver.getDimensionManager(), worldserver.getDimensionKey(), net.minecraft.server.BiomeManager.a(worldserver.getSeed()), handle.playerInteractManager.getGameMode(), handle.playerInteractManager.c(), worldserver.isDebugWorld(), worldserver.isFlatWorld(), true));
|
||||
+ connection.sendPacket(new net.minecraft.network.protocol.game.PacketPlayOutRespawn(worldserver.getDimensionManager(), worldserver.getDimensionKey(), BiomeManager.a(worldserver.getSeed()), handle.playerInteractManager.getGameMode(), handle.playerInteractManager.c(), worldserver.isDebugWorld(), worldserver.isFlatWorld(), true));
|
||||
+ handle.updateAbilities();
|
||||
+ connection.sendPacket(new net.minecraft.network.protocol.game.PacketPlayOutPosition(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch(), new HashSet<>(), 0));
|
||||
+ net.minecraft.server.MinecraftServer.getServer().getPlayerList().updateClient(handle);
|
||||
|
|
|
@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs.
|
|||
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
|
||||
index cddba4763f11ad51807693a07484511c473ffadf..785682d7b932693ff0c437563c9f53f32136e75e 100644
|
||||
index e6adf5ab609076bf1c25061429ed9aba1df1d9cb..871c0e0b0c6df68c0f8c87828a01fe006d0646fb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -141,6 +141,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -146,6 +146,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
// Paper start
|
||||
private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus;
|
||||
private String resourcePackHash;
|
||||
|
@ -20,7 +20,7 @@ index cddba4763f11ad51807693a07484511c473ffadf..785682d7b932693ff0c437563c9f53f3
|
|||
// Paper end
|
||||
|
||||
public CraftPlayer(CraftServer server, EntityPlayer entity) {
|
||||
@@ -1576,7 +1577,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1581,7 +1582,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public void addChannel(String channel) {
|
||||
|
|
|
@ -5,10 +5,18 @@ Subject: [PATCH] Add method to open already placed sign
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index f209e6d8fa20ceb7db71a6bb1685fd79b13f0738..d53cbcb6bba9d2526dbecb118735443c839c67d2 100644
|
||||
index 8661f97ac885daca068057c1fcc4eed54c6d7f14..db7ad5a94d449f58a5749115776e61f448ff2f52 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -603,6 +603,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -30,6 +30,7 @@ import net.minecraft.world.level.block.BlockWorkbench;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.entity.TileEntity;
|
||||
import net.minecraft.world.level.block.entity.TileEntityContainer;
|
||||
+import net.minecraft.world.level.block.entity.TileEntitySign;
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
@@ -603,6 +604,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,7 +25,7 @@ index f209e6d8fa20ceb7db71a6bb1685fd79b13f0738..d53cbcb6bba9d2526dbecb118735443c
|
|||
+ public void openSign(org.bukkit.block.Sign sign) {
|
||||
+ org.apache.commons.lang.Validate.isTrue(sign.getWorld().equals(this.getWorld()), "Sign must be in the same world as player is in");
|
||||
+ org.bukkit.craftbukkit.block.CraftSign craftSign = (org.bukkit.craftbukkit.block.CraftSign) sign;
|
||||
+ net.minecraft.server.TileEntitySign teSign = craftSign.getTileEntity();
|
||||
+ TileEntitySign teSign = craftSign.getTileEntity();
|
||||
+ // Make sign editable temporarily, will be set back to false in PlayerConnection later
|
||||
+ teSign.isEditable = true;
|
||||
+ getHandle().openSign(teSign);
|
||||
|
|
|
@ -8,7 +8,7 @@ This API has more capabilities than .dropItem with the Consumer function
|
|||
Item can be set inside of the Consumer pre spawn function.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 6e2f73cac222044256e97bc2c07f5581d63de1a2..e2dd76d0bc5db5dd07d8574135b8d64b40e2c34a 100644
|
||||
index 9b64aad8834d9e9047331415bd4fc18800eac734..d41bf389bf64d8548ea6eda67429404dc9f19ede 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1521,6 +1521,10 @@ public class CraftWorld implements World {
|
||||
|
@ -17,7 +17,7 @@ index 6e2f73cac222044256e97bc2c07f5581d63de1a2..e2dd76d0bc5db5dd07d8574135b8d64b
|
|||
entity.setPositionRotation(x, y, z, yaw, pitch);
|
||||
+ // Paper start
|
||||
+ } else if (org.bukkit.entity.Item.class.isAssignableFrom(clazz)) {
|
||||
+ entity = new EntityItem(world, x, y, z, new net.minecraft.server.ItemStack(net.minecraft.server.Item.getItemOf(net.minecraft.server.Blocks.DIRT)));
|
||||
+ entity = new EntityItem(world, x, y, z, new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Item.getItemOf(net.minecraft.world.level.block.Blocks.DIRT)));
|
||||
+ // Paper end
|
||||
} else if (FallingBlock.class.isAssignableFrom(clazz)) {
|
||||
entity = new EntityFallingBlock(world, x, y, z, world.getType(new BlockPosition(x, y, z)));
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Implement EntityTeleportEndGatewayEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityEndGateway.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityEndGateway.java
|
||||
index 8f2db48201925f4a5dac5dfc19bb2b96438959e1..1d90cb32560a9102ebe43dfa9806b407d0ee1bd1 100644
|
||||
index 2808cd0b100bd65a730aba315ab47a59a4621b30..b7548d0b3938d95328fc86db4000190532eaa8f5 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityEndGateway.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityEndGateway.java
|
||||
@@ -193,9 +193,20 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
|
||||
@@ -194,9 +194,20 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
|
||||
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Implement World.getEntity(UUID) API
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index ad80ebd9d69b4d86078a7c3daa274f115f172794..d8d8a8e10911424ba6ce8a80c58f172fbe0b44af 100644
|
||||
index 6167c284b08636452519cbff43d2807ea0575bd5..1bb6ed364cdde01fe54553cfad8ec4256789620b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1310,6 +1310,15 @@ public class CraftWorld implements World {
|
||||
|
@ -16,7 +16,7 @@ index ad80ebd9d69b4d86078a7c3daa274f115f172794..d8d8a8e10911424ba6ce8a80c58f172f
|
|||
+ @Override
|
||||
+ public Entity getEntity(UUID uuid) {
|
||||
+ Validate.notNull(uuid, "UUID cannot be null");
|
||||
+ net.minecraft.server.Entity entity = world.getEntity(uuid);
|
||||
+ net.minecraft.world.entity.Entity entity = world.getEntity(uuid);
|
||||
+ return entity == null ? null : entity.getBukkitEntity();
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
|
|
@ -112,7 +112,7 @@ index 415f34109019e68638f76fefa52bd8d40c449e12..c4f14fabc83a9cb13f8f82b651119e0a
|
|||
this.player.o();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 738a69a1a5765897fb3ca3b4ceb07cddade0d27f..349bd74e7e4d1dea9587e55cb6afc1968628ca01 100644
|
||||
index ae877ea38a63ef8d0bd9855e9b9279475bb6c465..95cadb09b5a154d7dfe8144fab6c403547672287 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -494,7 +494,7 @@ public abstract class PlayerList {
|
||||
|
@ -152,10 +152,10 @@ index 3c49d7acd4ad0717886adf6c469e8a49a58e859b..b6effe1037f3ae59e6faa5f5d039b6ad
|
|||
this.activeContainer = this.defaultContainer;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index a3396a19ba60daeb7240f23831e4bc28631098cc..2ca9d061ec951fb0563959620f0e99590e3038af 100644
|
||||
index db7ad5a94d449f58a5749115776e61f448ff2f52..e8f8a07f256e01c5792199bf47f3cc1f0f3d1610 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -372,7 +372,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -373,7 +373,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
if (((EntityPlayer) getHandle()).playerConnection == null) return;
|
||||
if (getHandle().activeContainer != getHandle().defaultContainer) {
|
||||
// fire INVENTORY_CLOSE if one already open
|
||||
|
@ -164,7 +164,7 @@ index a3396a19ba60daeb7240f23831e4bc28631098cc..2ca9d061ec951fb0563959620f0e9959
|
|||
}
|
||||
EntityPlayer player = (EntityPlayer) getHandle();
|
||||
Container container;
|
||||
@@ -442,8 +442,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -443,8 +443,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
|
@ -180,10 +180,10 @@ index a3396a19ba60daeb7240f23831e4bc28631098cc..2ca9d061ec951fb0563959620f0e9959
|
|||
@Override
|
||||
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
|
||||
index 89476782c71a0c54ff140a501a97fdfc4c8f4b81..b4c763d2935aad0038128a61ed09c4904975f0ef 100644
|
||||
index 871c0e0b0c6df68c0f8c87828a01fe006d0646fb..32228b4eddaadabbae46ebbc5eb3404acf73fb29 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -895,7 +895,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -900,7 +900,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
// Close any foreign inventory
|
||||
if (getHandle().activeContainer != getHandle().defaultContainer) {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Vanished players don't have rights
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 36ac9ba19b3bbcab40b5d4339ba9c297d4b5a65b..e243aa01d59c3e1b6c813922bcf6e04db0693d20 100644
|
||||
index c88eea18e2e219f242c53ffb4e28cfc6d7bf318a..3a46a5001cda7402a97ac8552650cf64e7881fad 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -184,7 +184,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
|
@ -18,10 +18,18 @@ index 36ac9ba19b3bbcab40b5d4339ba9c297d4b5a65b..e243aa01d59c3e1b6c813922bcf6e04d
|
|||
protected int j;
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/IProjectile.java b/src/main/java/net/minecraft/world/entity/projectile/IProjectile.java
|
||||
index 65cea9282467cb362ac6e9e0bb03c5d36085ee43..8967cf1e0238941370412109eff2ccf19f86b727 100644
|
||||
index 65cea9282467cb362ac6e9e0bb03c5d36085ee43..65cee640040bdd1229149409ff046b765ee08c34 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/IProjectile.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/IProjectile.java
|
||||
@@ -140,8 +140,14 @@ public abstract class IProjectile extends Entity {
|
||||
@@ -4,6 +4,7 @@ import java.util.Iterator;
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
+import net.minecraft.server.level.EntityPlayer;
|
||||
import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
@@ -140,8 +141,14 @@ public abstract class IProjectile extends Entity {
|
||||
protected boolean a(Entity entity) {
|
||||
if (!entity.isSpectator() && entity.isAlive() && entity.isInteractable()) {
|
||||
Entity entity1 = this.getShooter();
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Mark chunk dirty anytime entities change to guarantee it
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
index 86872f4e65d7e0ca68237a42fe87f33ba7a92802..bae9ba25136d66f59b03f0ad3d6ac1f915097ae2 100644
|
||||
index 7918dd4ad3e8cbb905b3929062a70fb7961b7d68..f56ff8e727c74870229d4d146b13534863f620d6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
@@ -558,6 +558,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -560,6 +560,7 @@ public class Chunk implements IChunkAccess {
|
||||
entity.chunkZ = this.loc.z;
|
||||
this.entities.add(entity); // Paper - per chunk entity list
|
||||
this.entitySlices[k].add(entity);
|
||||
|
@ -17,7 +17,7 @@ index 86872f4e65d7e0ca68237a42fe87f33ba7a92802..bae9ba25136d66f59b03f0ad3d6ac1f9
|
|||
}
|
||||
|
||||
@Override
|
||||
@@ -586,6 +587,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -588,6 +589,7 @@ public class Chunk implements IChunkAccess {
|
||||
return;
|
||||
}
|
||||
entityCounts.decrement(entity.getMinecraftKeyString());
|
||||
|
|
|
@ -9,22 +9,31 @@ This should hopefully avoid duplicate entities ever being created
|
|||
if the entity was to end up in 2 different chunk slices
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index e243aa01d59c3e1b6c813922bcf6e04db0693d20..6c6171175b1f9cd4471162d070f668263f900dc0 100644
|
||||
index 3a46a5001cda7402a97ac8552650cf64e7881fad..102c2bb98a99cdbfcdf1297341dbba91434ee0e3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -157,6 +157,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
}
|
||||
};
|
||||
+ List<Entity> entitySlice = null;
|
||||
+ public List<Entity> entitySlice = null;
|
||||
// Paper end
|
||||
|
||||
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
index bae9ba25136d66f59b03f0ad3d6ac1f915097ae2..1fa3e4418d14bd761ffbca6ea5dd80f6251caf16 100644
|
||||
index f56ff8e727c74870229d4d146b13534863f620d6..e4accac8f2e8daa58f9b0c279ffcad9347448bb0 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
@@ -549,6 +549,25 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -26,6 +26,8 @@ import net.minecraft.ReportedException;
|
||||
import net.minecraft.core.BlockPosition;
|
||||
import net.minecraft.core.IRegistry;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+import net.minecraft.server.level.ChunkProviderServer;
|
||||
import net.minecraft.server.level.PlayerChunk;
|
||||
import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.util.EntitySlice;
|
||||
@@ -551,6 +553,25 @@ public class Chunk implements IChunkAccess {
|
||||
if (k >= this.entitySlices.length) {
|
||||
k = this.entitySlices.length - 1;
|
||||
}
|
||||
|
@ -50,7 +59,7 @@ index bae9ba25136d66f59b03f0ad3d6ac1f915097ae2..1fa3e4418d14bd761ffbca6ea5dd80f6
|
|||
|
||||
if (!entity.inChunk || entity.getCurrentChunk() != this) entityCounts.increment(entity.getMinecraftKeyString()); // Paper
|
||||
entity.inChunk = true;
|
||||
@@ -558,6 +577,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -560,6 +581,7 @@ public class Chunk implements IChunkAccess {
|
||||
entity.chunkZ = this.loc.z;
|
||||
this.entities.add(entity); // Paper - per chunk entity list
|
||||
this.entitySlices[k].add(entity);
|
||||
|
@ -58,7 +67,7 @@ index bae9ba25136d66f59b03f0ad3d6ac1f915097ae2..1fa3e4418d14bd761ffbca6ea5dd80f6
|
|||
this.markDirty(); // Paper
|
||||
}
|
||||
|
||||
@@ -583,6 +603,10 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -585,6 +607,10 @@ public class Chunk implements IChunkAccess {
|
||||
|
||||
// Paper start
|
||||
if (entity.currentChunk != null && entity.currentChunk.get() == this) entity.setCurrentChunk(null);
|
||||
|
|
|
@ -18,7 +18,7 @@ an invalid entity.
|
|||
This should reduce log occurrences of dupe uuid messages.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
index 70b837ef82dfe46eb24625b96f9bdbe2e7f2cc2d..b121d404f3afb69fa1d0eae727c1dba92eadb0e5 100644
|
||||
index 04b708e776f277985340f329dc8cb3c16a6100a7..c59bcb6e19b712e007c7bf66bf70a4ffa3c6c2cd 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
@@ -1155,6 +1155,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
@ -56,10 +56,18 @@ index 70b837ef82dfe46eb24625b96f9bdbe2e7f2cc2d..b121d404f3afb69fa1d0eae727c1dba9
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
|
||||
index f301c7ba4b17b92c6cf2fcee6da1e67081dad4fa..1711c40e163a1148e2f7be58d4c020c61bef8bb2 100644
|
||||
index f301c7ba4b17b92c6cf2fcee6da1e67081dad4fa..69bc9dc18bab157851d8080a672504598e8572a8 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
|
||||
@@ -349,6 +349,7 @@ public class ChunkRegionLoader {
|
||||
@@ -26,6 +26,7 @@ import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.nbt.NBTTagLongArray;
|
||||
import net.minecraft.nbt.NBTTagShort;
|
||||
import net.minecraft.server.level.ChunkProviderServer;
|
||||
+import net.minecraft.server.level.EntityPlayer;
|
||||
import net.minecraft.server.level.LightEngineThreaded;
|
||||
import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
@@ -349,6 +350,7 @@ public class ChunkRegionLoader {
|
||||
nbttagcompound1.set("TileEntities", nbttaglist1);
|
||||
NBTTagList nbttaglist2 = new NBTTagList();
|
||||
|
||||
|
@ -67,7 +75,7 @@ index f301c7ba4b17b92c6cf2fcee6da1e67081dad4fa..1711c40e163a1148e2f7be58d4c020c6
|
|||
if (ichunkaccess.getChunkStatus().getType() == ChunkStatus.Type.LEVELCHUNK) {
|
||||
Chunk chunk = (Chunk) ichunkaccess;
|
||||
|
||||
@@ -366,13 +367,28 @@ public class ChunkRegionLoader {
|
||||
@@ -366,13 +368,28 @@ public class ChunkRegionLoader {
|
||||
while (iterator1.hasNext()) {
|
||||
Entity entity = (Entity) iterator1.next();
|
||||
NBTTagCompound nbttagcompound4 = new NBTTagCompound();
|
||||
|
@ -97,7 +105,7 @@ index f301c7ba4b17b92c6cf2fcee6da1e67081dad4fa..1711c40e163a1148e2f7be58d4c020c6
|
|||
} else {
|
||||
ProtoChunk protochunk = (ProtoChunk) ichunkaccess;
|
||||
|
||||
@@ -431,6 +447,19 @@ public class ChunkRegionLoader {
|
||||
@@ -431,6 +448,19 @@ public class ChunkRegionLoader {
|
||||
nbttagcompound1.set("Structures", a(chunkcoordintpair, ichunkaccess.h(), ichunkaccess.v()));
|
||||
return nbttagcompound;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ index c59bcb6e19b712e007c7bf66bf70a4ffa3c6c2cd..8452b4f62689b231d38f4608c2d72b41
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 6c6171175b1f9cd4471162d070f668263f900dc0..a7115fb1fc6fadb38c7cc9f23629473a7173982e 100644
|
||||
index 102c2bb98a99cdbfcdf1297341dbba91434ee0e3..046b191e771ed9be337e095214a67febd768e5f6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -276,6 +276,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
|
@ -55,10 +55,10 @@ index 6c6171175b1f9cd4471162d070f668263f900dc0..a7115fb1fc6fadb38c7cc9f23629473a
|
|||
public float getBukkitYaw() {
|
||||
return this.yaw;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
index 1fa3e4418d14bd761ffbca6ea5dd80f6251caf16..246a4b69e1b4ee6affa9564d50f261fac2f269d0 100644
|
||||
index e4accac8f2e8daa58f9b0c279ffcad9347448bb0..79ff96f18c53f3d1ce4a00be2e2d8fe68f77bf54 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
@@ -859,6 +859,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -863,6 +863,7 @@ public class Chunk implements IChunkAccess {
|
||||
|
||||
for (int i1 = 0; i1 < l; ++i1) {
|
||||
Entity entity1 = (Entity) list1.get(i1);
|
||||
|
@ -66,7 +66,7 @@ index 1fa3e4418d14bd761ffbca6ea5dd80f6251caf16..246a4b69e1b4ee6affa9564d50f261fa
|
|||
|
||||
if (entity1.getBoundingBox().c(axisalignedbb) && entity1 != entity) {
|
||||
if (predicate == null || predicate.test(entity1)) {
|
||||
@@ -896,6 +897,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -900,6 +901,7 @@ public class Chunk implements IChunkAccess {
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
T entity = (T) iterator.next(); // CraftBukkit - decompile error
|
||||
|
@ -74,7 +74,7 @@ index 1fa3e4418d14bd761ffbca6ea5dd80f6251caf16..246a4b69e1b4ee6affa9564d50f261fa
|
|||
|
||||
if ((entitytypes == null || entity.getEntityType() == entitytypes) && entity.getBoundingBox().c(axisalignedbb) && predicate.test(entity)) {
|
||||
list.add(entity);
|
||||
@@ -918,6 +920,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -922,6 +924,7 @@ public class Chunk implements IChunkAccess {
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
T t0 = (T) iterator.next(); // CraftBukkit - decompile error
|
||||
|
@ -83,7 +83,7 @@ index 1fa3e4418d14bd761ffbca6ea5dd80f6251caf16..246a4b69e1b4ee6affa9564d50f261fa
|
|||
if (oclass.isInstance(t0) && t0.getBoundingBox().c(axisalignedbb) && (predicate == null || predicate.test(t0))) { // Spigot - instance check
|
||||
list.add(t0);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 71916f826ecd6203207cd5e2f9e51120fe539661..2869a121ff5477bf12b1e078e413be8e0dce1ff3 100644
|
||||
index 1bb6ed364cdde01fe54553cfad8ec4256789620b..24c80cf3820622297046abaa13205814b8178195 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1046,6 +1046,7 @@ public class CraftWorld implements World {
|
||||
|
|
|
@ -20,10 +20,18 @@ index 829013f57128cc6c92a45098c6883f2305cf4ea5..e97d25339b37a70f91022dcb021bbe82
|
|||
return (this.disabledSlots & 1 << enumitemslot.getSlotFlag()) != 0 || enumitemslot.a() == EnumItemSlot.Function.HAND && !this.hasArms();
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
||||
index 6f922e4cbb095439fcd76ee0d0c08bc4160b8107..226d3a242c602a3e4d16b6eab11d938a1e3e84ba 100644
|
||||
index 6f922e4cbb095439fcd76ee0d0c08bc4160b8107..103f935d9b7a2cbe9639528c587d8ac2e5f14d07 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
||||
@@ -239,5 +239,78 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.bukkit.craftbukkit.entity;
|
||||
|
||||
import net.minecraft.core.Vector3f;
|
||||
+import net.minecraft.world.entity.EnumItemSlot;
|
||||
import net.minecraft.world.entity.decoration.EntityArmorStand;
|
||||
import org.bukkit.craftbukkit.CraftEquipmentSlot;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
@@ -239,5 +240,78 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
|
||||
public void setCanMove(boolean move) {
|
||||
getHandle().canMove = move;
|
||||
}
|
||||
|
@ -76,7 +84,7 @@ index 6f922e4cbb095439fcd76ee0d0c08bc4160b8107..226d3a242c602a3e4d16b6eab11d938a
|
|||
+ int disabled = 0;
|
||||
+ for (org.bukkit.inventory.EquipmentSlot slot : slots) {
|
||||
+ if (slot == org.bukkit.inventory.EquipmentSlot.OFF_HAND) continue;
|
||||
+ net.minecraft.server.EnumItemSlot nmsSlot = org.bukkit.craftbukkit.CraftEquipmentSlot.getNMS(slot);
|
||||
+ EnumItemSlot nmsSlot = org.bukkit.craftbukkit.CraftEquipmentSlot.getNMS(slot);
|
||||
+ disabled += (1 << nmsSlot.getSlotFlag()) + (1 << (nmsSlot.getSlotFlag() + 8)) + (1 << (nmsSlot.getSlotFlag() + 16));
|
||||
+ }
|
||||
+ getHandle().disabledSlots = disabled;
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] MC-135506: Experience should save as Integers
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityExperienceOrb.java b/src/main/java/net/minecraft/world/entity/EntityExperienceOrb.java
|
||||
index dc257a7cafc4b728aa5c99ca332143bb05896d7e..c1fa9437015a554ee875d4d2948dfcc2c8353f12 100644
|
||||
index 3387a19044b3ee2a1ef549c328c8bc354a5b6d23..a7551e95185895a290be70d501496279eaf884ae 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityExperienceOrb.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityExperienceOrb.java
|
||||
@@ -217,7 +217,7 @@ public class EntityExperienceOrb extends Entity {
|
||||
@@ -218,7 +218,7 @@ public class EntityExperienceOrb extends Entity {
|
||||
public void saveData(NBTTagCompound nbttagcompound) {
|
||||
nbttagcompound.setShort("Health", (short) this.e);
|
||||
nbttagcompound.setShort("Age", (short) this.c);
|
||||
|
@ -17,7 +17,7 @@ index dc257a7cafc4b728aa5c99ca332143bb05896d7e..c1fa9437015a554ee875d4d2948dfcc2
|
|||
this.savePaperNBT(nbttagcompound); // Paper
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ public class EntityExperienceOrb extends Entity {
|
||||
@@ -226,7 +226,7 @@ public class EntityExperienceOrb extends Entity {
|
||||
public void loadData(NBTTagCompound nbttagcompound) {
|
||||
this.e = nbttagcompound.getShort("Health");
|
||||
this.c = nbttagcompound.getShort("Age");
|
||||
|
|
|
@ -12,10 +12,18 @@ This allows the client to render multiple skull textures from the same user,
|
|||
for when different skins were used when skull was made.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/PacketDataSerializer.java b/src/main/java/net/minecraft/network/PacketDataSerializer.java
|
||||
index df459918c14589155a574730205cb35d463b8079..4fc06bc5ef630b07fc8462cf835e6f92b151e6c6 100644
|
||||
index df459918c14589155a574730205cb35d463b8079..5a1187b001004afe22d208bc5d7c288e796e16a6 100644
|
||||
--- a/src/main/java/net/minecraft/network/PacketDataSerializer.java
|
||||
+++ b/src/main/java/net/minecraft/network/PacketDataSerializer.java
|
||||
@@ -311,9 +311,18 @@ public class PacketDataSerializer extends ByteBuf {
|
||||
@@ -37,6 +37,7 @@ import net.minecraft.network.chat.IChatBaseComponent;
|
||||
import net.minecraft.resources.MinecraftKey;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
+import net.minecraft.world.level.block.entity.TileEntitySkull;
|
||||
import net.minecraft.world.phys.MovingObjectPositionBlock;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -311,9 +312,18 @@ public class PacketDataSerializer extends ByteBuf {
|
||||
if (item.usesDurability() || item.n()) {
|
||||
// Spigot start - filter
|
||||
itemstack = itemstack.cloneItemStack();
|
||||
|
@ -35,7 +43,7 @@ index df459918c14589155a574730205cb35d463b8079..4fc06bc5ef630b07fc8462cf835e6f92
|
|||
}
|
||||
|
||||
this.a(nbttagcompound);
|
||||
@@ -333,7 +342,16 @@ public class PacketDataSerializer extends ByteBuf {
|
||||
@@ -333,7 +343,16 @@ public class PacketDataSerializer extends ByteBuf {
|
||||
itemstack.setTag(this.l());
|
||||
// CraftBukkit start
|
||||
if (itemstack.getTag() != null) {
|
||||
|
@ -74,7 +82,7 @@ index b6b55d5baa5e8a6b69a3e4865c06bc8a4d61a4f3..152118729b1a95dcae05d32aa4289034
|
|||
this.g.add(nbttagcompound);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index c525afbc7d73488db2cae1501cdbe80ec05aeb7c..de171e18fbc6cc5ee06e75f4a3c60fd4c710d8bb 100644
|
||||
index c525afbc7d73488db2cae1501cdbe80ec05aeb7c..ce5d8463763dd39e1225d9dec0514b1754df5411 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -114,7 +114,7 @@ public final class ItemStack {
|
||||
|
@ -82,12 +90,12 @@ index c525afbc7d73488db2cae1501cdbe80ec05aeb7c..de171e18fbc6cc5ee06e75f4a3c60fd4
|
|||
@Deprecated
|
||||
private Item item;
|
||||
- private NBTTagCompound tag;
|
||||
+ NBTTagCompound tag; // Paper -> package private
|
||||
+ public NBTTagCompound tag; // Paper private -> public
|
||||
private boolean j;
|
||||
private Entity k;
|
||||
private ShapeDetectorBlock l;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntitySkull.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntitySkull.java
|
||||
index 06ab45e0927403beb6b5e11d2b5ea93d4786f1d3..0c95465cdc29418063a960033fe80de6932c8aa8 100644
|
||||
index 06ab45e0927403beb6b5e11d2b5ea93d4786f1d3..1d1d708d1cbebb5a3ee50d5f46d9d953f22447dc 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntitySkull.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntitySkull.java
|
||||
@@ -8,6 +8,7 @@ import java.util.UUID;
|
||||
|
@ -115,7 +123,7 @@ index 06ab45e0927403beb6b5e11d2b5ea93d4786f1d3..0c95465cdc29418063a960033fe80de6
|
|||
+ return cmp;
|
||||
+ }
|
||||
+
|
||||
+ static void sanitizeUUID(NBTTagCompound owner) {
|
||||
+ public static void sanitizeUUID(NBTTagCompound owner) {
|
||||
+ NBTTagCompound properties = owner.getCompound("Properties");
|
||||
+ NBTTagList list = null;
|
||||
+ if (!properties.isEmpty()) {
|
||||
|
|
|
@ -36,10 +36,10 @@ index bd508025b771424c942fd856c31d520b6f548082..62621562137cba4804f0465c58d25ca2
|
|||
public static int tabSpamLimit = 500;
|
||||
private static void tabSpamLimiters() {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index d69b6783572b44c9b8d49d0853a8282e14e64476..aa5abee5dd7dc601f3f738f11faf434d90e493a4 100644
|
||||
index 9672619d3f206a5290d459b300ecdf53b7b70d91..8166ad11642bb1b4b11722a5a09e773a2e749c47 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1007,6 +1007,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1008,6 +1008,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.a(this.serverPing);
|
||||
|
||||
// Spigot start
|
||||
|
|
|
@ -137,10 +137,10 @@ index e97d25339b37a70f91022dcb021bbe82fb8f5eda..8d35240405d7f7245f3c7b0b611973d5
|
|||
this.datawatcher.set(EntityArmorStand.bh, vector3f);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
||||
index 226d3a242c602a3e4d16b6eab11d938a1e3e84ba..e87f293cf26d7ce2a8c385936d09be9b41968cea 100644
|
||||
index 103f935d9b7a2cbe9639528c587d8ac2e5f14d07..348993f3839f984be65daaf87f3510865e8e4670 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
||||
@@ -312,5 +312,16 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
|
||||
@@ -313,5 +313,16 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
|
||||
public boolean isSlotDisabled(org.bukkit.inventory.EquipmentSlot slot) {
|
||||
return getHandle().isSlotDisabled(org.bukkit.craftbukkit.CraftEquipmentSlot.getNMS(slot));
|
||||
}
|
||||
|
|
|
@ -20,10 +20,18 @@ index 5ab0e7183e48134b7a0f736462516b1a8a333b04..f280dbff4a09bc611a9ca565c6d697d0
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BlockFluids.java b/src/main/java/net/minecraft/world/level/block/BlockFluids.java
|
||||
index 0654c77ab059dea2ad06cb16d07950e153d3f15d..9fcdb06c7907554fc7cdf887a2c313c9f1d1659b 100644
|
||||
index 0654c77ab059dea2ad06cb16d07950e153d3f15d..0ed8d938b8fafdb03e01a00a201ba3f8597ac6e9 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BlockFluids.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BlockFluids.java
|
||||
@@ -100,11 +100,28 @@ public class BlockFluids extends Block implements IFluidSource {
|
||||
@@ -23,6 +23,7 @@ import net.minecraft.world.level.material.Fluid;
|
||||
import net.minecraft.world.level.material.FluidType;
|
||||
import net.minecraft.world.level.material.FluidTypeFlowing;
|
||||
import net.minecraft.world.level.material.FluidTypes;
|
||||
+import net.minecraft.world.level.material.Material;
|
||||
import net.minecraft.world.level.pathfinder.PathMode;
|
||||
import net.minecraft.world.level.storage.loot.LootTableInfo;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
@@ -100,11 +101,28 @@ public class BlockFluids extends Block implements IFluidSource {
|
||||
@Override
|
||||
public void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) {
|
||||
if (this.a(world, blockposition, iblockdata)) {
|
||||
|
@ -53,7 +61,7 @@ index 0654c77ab059dea2ad06cb16d07950e153d3f15d..9fcdb06c7907554fc7cdf887a2c313c9
|
|||
@Override
|
||||
public IBlockData updateState(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) {
|
||||
if (iblockdata.getFluid().isSource() || iblockdata1.getFluid().isSource()) {
|
||||
@@ -117,7 +134,7 @@ public class BlockFluids extends Block implements IFluidSource {
|
||||
@@ -117,7 +135,7 @@ public class BlockFluids extends Block implements IFluidSource {
|
||||
@Override
|
||||
public void doPhysics(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1, boolean flag) {
|
||||
if (this.a(world, blockposition, iblockdata)) {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add PhantomPreSpawnEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java b/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java
|
||||
index 6053894c5250e9a1a0c4aa2d681127dfd652b34f..bdb0a9541b4f167b95578034ec15e7051a7721be 100644
|
||||
index 6053894c5250e9a1a0c4aa2d681127dfd652b34f..6c498d4345df35a411d155799ac56e47c9c48114 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java
|
||||
@@ -161,6 +161,11 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
|
@ -32,7 +32,7 @@ index 6053894c5250e9a1a0c4aa2d681127dfd652b34f..bdb0a9541b4f167b95578034ec15e705
|
|||
}
|
||||
|
||||
@Override
|
||||
@@ -216,6 +226,14 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -216,6 +226,15 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
return entitysize.a(f);
|
||||
}
|
||||
|
||||
|
@ -42,16 +42,25 @@ index 6053894c5250e9a1a0c4aa2d681127dfd652b34f..bdb0a9541b4f167b95578034ec15e705
|
|||
+ public java.util.UUID getSpawningEntity() {
|
||||
+ return spawningEntity;
|
||||
+ }
|
||||
+ public void setSpawningEntity(java.util.UUID entity) { this.spawningEntity = entity; }
|
||||
+ // Paper end
|
||||
+
|
||||
class b extends PathfinderGoal {
|
||||
|
||||
private final PathfinderTargetCondition b;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/MobSpawnerPhantom.java b/src/main/java/net/minecraft/world/level/levelgen/MobSpawnerPhantom.java
|
||||
index cfc32acee1e456a0fda12a5faa4035e29d0c3d5e..afbcabca5180e26e85af820ad4ca2de1163b55a1 100644
|
||||
index cfc32acee1e456a0fda12a5faa4035e29d0c3d5e..96a5a6569387a25b15a06aaab3bd9d033547e875 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/MobSpawnerPhantom.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/MobSpawnerPhantom.java
|
||||
@@ -73,8 +73,17 @@ public class MobSpawnerPhantom implements MobSpawner {
|
||||
@@ -4,6 +4,7 @@ import java.util.Iterator;
|
||||
import java.util.Random;
|
||||
import net.minecraft.core.BlockPosition;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
+import net.minecraft.server.MCUtil;
|
||||
import net.minecraft.server.level.EntityPlayer;
|
||||
import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.stats.ServerStatisticManager;
|
||||
@@ -73,8 +74,17 @@ public class MobSpawnerPhantom implements MobSpawner {
|
||||
int k = 1 + random.nextInt(difficultydamagescaler.a().a() + 1);
|
||||
|
||||
for (int l = 0; l < k; ++l) {
|
||||
|
@ -66,7 +75,7 @@ index cfc32acee1e456a0fda12a5faa4035e29d0c3d5e..afbcabca5180e26e85af820ad4ca2de1
|
|||
+ // Paper end
|
||||
EntityPhantom entityphantom = (EntityPhantom) EntityTypes.PHANTOM.a((World) worldserver);
|
||||
-
|
||||
+ entityphantom.spawningEntity = entityhuman.uniqueID; // Paper
|
||||
+ entityphantom.setSpawningEntity(entityhuman.getUniqueID()); // Paper
|
||||
entityphantom.setPositionRotation(blockposition1, 0.0F, 0.0F);
|
||||
groupdataentity = entityphantom.prepare(worldserver, difficultydamagescaler, EnumMobSpawn.NATURAL, groupdataentity, (NBTTagCompound) null);
|
||||
worldserver.addAllEntities(entityphantom, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit
|
||||
|
|
|
@ -17,10 +17,10 @@ index b6effe1037f3ae59e6faa5f5d039b6ad54bca5d4..87374174dcbf9e7ee448a1cdd9a35285
|
|||
return (float) (1.0D / this.b(GenericAttributes.ATTACK_SPEED) * 20.0D);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index b4c763d2935aad0038128a61ed09c4904975f0ef..330ea2ea346867fc9005352e87cca892a1d33e03 100644
|
||||
index 32228b4eddaadabbae46ebbc5eb3404acf73fb29..9d3e01f7ad743dbe60685e9b111308ed06a0b4b7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2181,6 +2181,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2186,6 +2186,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
connection.sendPacket(new net.minecraft.network.protocol.game.PacketPlayOutOpenBook(net.minecraft.world.EnumHand.MAIN_HAND));
|
||||
connection.sendPacket(new net.minecraft.network.protocol.game.PacketPlayOutSetSlot(0, slot, inventory.getItemInHand()));
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ index f6f79ed9c38206cc6a4feb5504e854a476868aec..7d2b947b3c2b255c01241f2c4a6d7377
|
|||
int i = this.f ? 300 : 100;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index a7115fb1fc6fadb38c7cc9f23629473a7173982e..2fc25a13a554174d2b5f415c910c4a26e37b30e1 100644
|
||||
index 046b191e771ed9be337e095214a67febd768e5f6..b6b4eb9ac883cfdfab5f114767fb5cfb29445730 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1538,6 +1538,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
|
@ -325,10 +325,10 @@ index 8d35240405d7f7245f3c7b0b611973d58fa4384f..69361caebf0d3caa5195b519a1669170
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 330ea2ea346867fc9005352e87cca892a1d33e03..91da1f4d933b991c73e04e077722382d02487e07 100644
|
||||
index 9d3e01f7ad743dbe60685e9b111308ed06a0b4b7..2334a9a95ab0e2395744343a5a1e3d26c88b7dc3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1836,7 +1836,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1841,7 +1841,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public void sendHealthUpdate() {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Allow chests to be placed with NBT data
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index de171e18fbc6cc5ee06e75f4a3c60fd4c710d8bb..5da20483ed352ac6d9695287f840ed643a2bf302 100644
|
||||
index ce5d8463763dd39e1225d9dec0514b1754df5411..30db766c54db08a472caef82fdcc7cf1b7855fbf 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -298,6 +298,7 @@ public final class ItemStack {
|
||||
|
@ -17,10 +17,10 @@ index de171e18fbc6cc5ee06e75f4a3c60fd4c710d8bb..5da20483ed352ac6d9695287f840ed64
|
|||
for (BlockState blockstate : blocks) {
|
||||
blockstate.update(true, false);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java
|
||||
index aafd1f7c6c811f9eb2796d865e327f374be9b461..d4f019e98fbadfadee981ae8e7a5f121ba8fe1e8 100644
|
||||
index 51167d776c710decb0107bebcb35bdf43103772b..111f62d0e5b40e945793b8f504f2c035c0884a6a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java
|
||||
@@ -326,7 +326,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic
|
||||
@@ -327,7 +327,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic
|
||||
// CraftBukkit start
|
||||
@Override
|
||||
public boolean isFilteredNBT() {
|
||||
|
|
|
@ -153,10 +153,10 @@ index 0000000000000000000000000000000000000000..9a3edd114c4736b1843844c6ca49da7a
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java b/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java
|
||||
index 1664d47a61f1c502ece7f32aecdce759172c9f85..ab469f1698b4f0e36c0d077472f1adea36f95ce9 100644
|
||||
index d134333c736dc1ee1c722d680d7a9c22c1b265bd..06d05b511d623d0247d44989bee85b383a8fb52f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java
|
||||
@@ -99,7 +99,7 @@ public abstract class NavigationAbstract {
|
||||
@@ -100,7 +100,7 @@ public abstract class NavigationAbstract {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@ -165,7 +165,7 @@ index 1664d47a61f1c502ece7f32aecdce759172c9f85..ab469f1698b4f0e36c0d077472f1adea
|
|||
return this.a(new BlockPosition(d0, d1, d2), i);
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ public abstract class NavigationAbstract {
|
||||
@@ -125,7 +125,7 @@ public abstract class NavigationAbstract {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@ -174,7 +174,7 @@ index 1664d47a61f1c502ece7f32aecdce759172c9f85..ab469f1698b4f0e36c0d077472f1adea
|
|||
return this.a(ImmutableSet.of(entity.getChunkCoordinates()), entity, 16, true, i); // Paper
|
||||
}
|
||||
|
||||
@@ -189,6 +189,7 @@ public abstract class NavigationAbstract {
|
||||
@@ -190,6 +190,7 @@ public abstract class NavigationAbstract {
|
||||
return pathentity != null && this.a(pathentity, d0);
|
||||
}
|
||||
|
||||
|
@ -182,7 +182,7 @@ index 1664d47a61f1c502ece7f32aecdce759172c9f85..ab469f1698b4f0e36c0d077472f1adea
|
|||
public boolean a(@Nullable PathEntity pathentity, double d0) {
|
||||
if (pathentity == null) {
|
||||
this.c = null;
|
||||
@@ -216,7 +217,7 @@ public abstract class NavigationAbstract {
|
||||
@@ -217,7 +218,7 @@ public abstract class NavigationAbstract {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ index 1664d47a61f1c502ece7f32aecdce759172c9f85..ab469f1698b4f0e36c0d077472f1adea
|
|||
public PathEntity k() {
|
||||
return this.c;
|
||||
}
|
||||
@@ -340,6 +341,7 @@ public abstract class NavigationAbstract {
|
||||
@@ -341,6 +342,7 @@ public abstract class NavigationAbstract {
|
||||
return !this.m();
|
||||
}
|
||||
|
||||
|
|
|
@ -32,10 +32,25 @@ index 7e53d8b787c42f8592140f7de8974bc63e5149b2..d72b800e5f03422d0b2518980b1955ec
|
|||
this.s = this::l;
|
||||
if (this.i.canRead() && this.i.peek() == '#') {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 7f790c484fec77e1d1f1dc6abe0daa19d009ae46..2b0c4c278c2d189e4040440763138068f5e3aca1 100644
|
||||
index 7f790c484fec77e1d1f1dc6abe0daa19d009ae46..8f8dccd6fb2e49d65383d6e8f3fc5ffbabd2b7a5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -84,6 +84,12 @@ import org.bukkit.persistence.PersistentDataContainer;
|
||||
@@ -39,12 +39,14 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
+import net.minecraft.commands.arguments.blocks.ArgumentBlock;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTCompressedStreamTools;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.nbt.NBTTagString;
|
||||
import net.minecraft.network.chat.ChatComponentText;
|
||||
+import net.minecraft.resources.MinecraftKey;
|
||||
import net.minecraft.world.entity.EnumItemSlot;
|
||||
import net.minecraft.world.item.ItemBlock;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
@@ -84,6 +86,12 @@ import org.bukkit.persistence.PersistentDataContainer;
|
||||
import static org.spigotmc.ValidateUtils.*;
|
||||
// Spigot end
|
||||
|
||||
|
@ -48,7 +63,7 @@ index 7f790c484fec77e1d1f1dc6abe0daa19d009ae46..2b0c4c278c2d189e4040440763138068
|
|||
/**
|
||||
* Children must include the following:
|
||||
*
|
||||
@@ -267,6 +273,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -267,6 +275,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@Specific(Specific.To.NBT)
|
||||
static final ItemMetaKey BLOCK_DATA = new ItemMetaKey("BlockStateTag");
|
||||
static final ItemMetaKey BUKKIT_CUSTOM_TAG = new ItemMetaKey("PublicBukkitValues");
|
||||
|
@ -59,7 +74,7 @@ index 7f790c484fec77e1d1f1dc6abe0daa19d009ae46..2b0c4c278c2d189e4040440763138068
|
|||
|
||||
// We store the raw original JSON representation of all text data. See SPIGOT-5063, SPIGOT-5656, SPIGOT-5304
|
||||
private String displayName;
|
||||
@@ -280,6 +290,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -280,6 +292,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
private int hideFlag;
|
||||
private boolean unbreakable;
|
||||
private int damage;
|
||||
|
@ -70,7 +85,7 @@ index 7f790c484fec77e1d1f1dc6abe0daa19d009ae46..2b0c4c278c2d189e4040440763138068
|
|||
|
||||
private static final Set<String> HANDLED_TAGS = Sets.newHashSet();
|
||||
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
||||
@@ -317,6 +331,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -317,6 +333,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
this.hideFlag = meta.hideFlag;
|
||||
this.unbreakable = meta.unbreakable;
|
||||
this.damage = meta.damage;
|
||||
|
@ -86,7 +101,7 @@ index 7f790c484fec77e1d1f1dc6abe0daa19d009ae46..2b0c4c278c2d189e4040440763138068
|
|||
this.unhandledTags.putAll(meta.unhandledTags);
|
||||
this.persistentDataContainer.putAll(meta.persistentDataContainer.getRaw());
|
||||
|
||||
@@ -380,6 +403,31 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -380,6 +405,31 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
persistentDataContainer.put(key, compound.get(key));
|
||||
}
|
||||
}
|
||||
|
@ -118,7 +133,7 @@ index 7f790c484fec77e1d1f1dc6abe0daa19d009ae46..2b0c4c278c2d189e4040440763138068
|
|||
|
||||
Set<String> keys = tag.getKeys();
|
||||
for (String key : keys) {
|
||||
@@ -518,6 +566,34 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -518,6 +568,34 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
setDamage(damage);
|
||||
}
|
||||
|
||||
|
@ -153,7 +168,7 @@ index 7f790c484fec77e1d1f1dc6abe0daa19d009ae46..2b0c4c278c2d189e4040440763138068
|
|||
String internal = SerializableMeta.getString(map, "internal", true);
|
||||
if (internal != null) {
|
||||
ByteArrayInputStream buf = new ByteArrayInputStream(Base64.decodeBase64(internal));
|
||||
@@ -646,6 +722,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -646,6 +724,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
if (hasDamage()) {
|
||||
itemTag.setInt(DAMAGE.NBT, damage);
|
||||
}
|
||||
|
@ -177,7 +192,7 @@ index 7f790c484fec77e1d1f1dc6abe0daa19d009ae46..2b0c4c278c2d189e4040440763138068
|
|||
|
||||
for (Map.Entry<String, NBTBase> e : unhandledTags.entrySet()) {
|
||||
itemTag.set(e.getKey(), e.getValue());
|
||||
@@ -662,6 +755,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -662,6 +757,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -199,7 +214,7 @@ index 7f790c484fec77e1d1f1dc6abe0daa19d009ae46..2b0c4c278c2d189e4040440763138068
|
|||
NBTTagList createStringList(List<String> list) {
|
||||
if (list == null) {
|
||||
return null;
|
||||
@@ -745,7 +853,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -745,7 +855,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
|
||||
@Overridden
|
||||
boolean isEmpty() {
|
||||
|
@ -208,7 +223,7 @@ index 7f790c484fec77e1d1f1dc6abe0daa19d009ae46..2b0c4c278c2d189e4040440763138068
|
|||
}
|
||||
|
||||
// Paper start
|
||||
@@ -1169,7 +1277,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -1169,7 +1279,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
&& (this.hideFlag == that.hideFlag)
|
||||
&& (this.isUnbreakable() == that.isUnbreakable())
|
||||
&& (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage())
|
||||
|
@ -221,7 +236,7 @@ index 7f790c484fec77e1d1f1dc6abe0daa19d009ae46..2b0c4c278c2d189e4040440763138068
|
|||
}
|
||||
|
||||
/**
|
||||
@@ -1204,6 +1316,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -1204,6 +1318,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
hash = 61 * hash + (hasDamage() ? this.damage : 0);
|
||||
hash = 61 * hash + (hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0);
|
||||
hash = 61 * hash + version;
|
||||
|
@ -232,7 +247,7 @@ index 7f790c484fec77e1d1f1dc6abe0daa19d009ae46..2b0c4c278c2d189e4040440763138068
|
|||
return hash;
|
||||
}
|
||||
|
||||
@@ -1228,6 +1344,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -1228,6 +1346,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
clone.unbreakable = this.unbreakable;
|
||||
clone.damage = this.damage;
|
||||
clone.version = this.version;
|
||||
|
@ -247,7 +262,7 @@ index 7f790c484fec77e1d1f1dc6abe0daa19d009ae46..2b0c4c278c2d189e4040440763138068
|
|||
return clone;
|
||||
} catch (CloneNotSupportedException e) {
|
||||
throw new Error(e);
|
||||
@@ -1285,6 +1409,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -1285,6 +1411,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
builder.put(DAMAGE.BUKKIT, damage);
|
||||
}
|
||||
|
||||
|
@ -272,7 +287,7 @@ index 7f790c484fec77e1d1f1dc6abe0daa19d009ae46..2b0c4c278c2d189e4040440763138068
|
|||
final Map<String, NBTBase> internalTags = new HashMap<String, NBTBase>(unhandledTags);
|
||||
serializeInternal(internalTags);
|
||||
if (!internalTags.isEmpty()) {
|
||||
@@ -1449,6 +1591,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -1449,6 +1593,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
CraftMetaArmorStand.SHOW_ARMS.NBT,
|
||||
CraftMetaArmorStand.SMALL.NBT,
|
||||
CraftMetaArmorStand.MARKER.NBT,
|
||||
|
@ -281,7 +296,7 @@ index 7f790c484fec77e1d1f1dc6abe0daa19d009ae46..2b0c4c278c2d189e4040440763138068
|
|||
// Paper end
|
||||
CraftMetaCompass.LODESTONE_DIMENSION.NBT,
|
||||
CraftMetaCompass.LODESTONE_POS.NBT,
|
||||
@@ -1476,4 +1620,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -1476,4 +1622,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
@ -377,7 +392,7 @@ index 7f790c484fec77e1d1f1dc6abe0daa19d009ae46..2b0c4c278c2d189e4040440763138068
|
|||
+
|
||||
+ private @Nullable Namespaced deserializeNamespaced(String raw) {
|
||||
+ boolean isTag = raw.length() > 0 && raw.codePointAt(0) == '#';
|
||||
+ net.minecraft.server.ArgumentBlock blockParser = new net.minecraft.server.ArgumentBlock(new com.mojang.brigadier.StringReader(raw), true);
|
||||
+ ArgumentBlock blockParser = new ArgumentBlock(new com.mojang.brigadier.StringReader(raw), true);
|
||||
+ try {
|
||||
+ blockParser = blockParser.parse(false);
|
||||
+ } catch (com.mojang.brigadier.exceptions.CommandSyntaxException e) {
|
||||
|
@ -385,7 +400,7 @@ index 7f790c484fec77e1d1f1dc6abe0daa19d009ae46..2b0c4c278c2d189e4040440763138068
|
|||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ net.minecraft.server.MinecraftKey key;
|
||||
+ MinecraftKey key;
|
||||
+ if (isTag) {
|
||||
+ key = blockParser.getTagKey();
|
||||
+ } else {
|
||||
|
|
|
@ -52,10 +52,18 @@ index b5c7b39a49afae1089a293b9b06bdd94deed1f64..61a62c093b24c43064f116630d850961
|
|||
return ichunkaccess == null ? false : ichunkaccess.getType(blockposition).a(this.g) && ichunkaccess.getType(blockposition.up()).isAir() && ichunkaccess.getType(blockposition.up(2)).isAir();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/util/RandomPositionGenerator.java b/src/main/java/net/minecraft/world/entity/ai/util/RandomPositionGenerator.java
|
||||
index 129ea3857969ddb99e15ae817ee3eec67b4c3ccf..c389414e2bbef96ec2e5e887fd105028b72e586d 100644
|
||||
index 129ea3857969ddb99e15ae817ee3eec67b4c3ccf..f9c40c8223109a9a40e7e7523c8f1f2e5aeddba1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/util/RandomPositionGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/util/RandomPositionGenerator.java
|
||||
@@ -128,6 +128,7 @@ public class RandomPositionGenerator {
|
||||
@@ -13,6 +13,7 @@ import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.entity.EntityCreature;
|
||||
import net.minecraft.world.entity.ai.navigation.NavigationAbstract;
|
||||
import net.minecraft.world.level.IBlockAccess;
|
||||
+import net.minecraft.world.level.material.Fluid;
|
||||
import net.minecraft.world.level.pathfinder.PathType;
|
||||
import net.minecraft.world.level.pathfinder.PathfinderNormal;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
@@ -128,6 +129,7 @@ public class RandomPositionGenerator {
|
||||
}
|
||||
|
||||
blockposition2 = new BlockPosition((double) k1 + entitycreature.locX(), (double) l1 + entitycreature.locY(), (double) i2 + entitycreature.locZ());
|
||||
|
@ -63,7 +71,7 @@ index 129ea3857969ddb99e15ae817ee3eec67b4c3ccf..c389414e2bbef96ec2e5e887fd105028
|
|||
if (blockposition2.getY() >= 0 && blockposition2.getY() <= entitycreature.world.getBuildHeight() && (!flag3 || entitycreature.a(blockposition2)) && (!flag2 || navigationabstract.a(blockposition2))) {
|
||||
if (flag1) {
|
||||
blockposition2 = a(blockposition2, random.nextInt(l + 1) + i1, entitycreature.world.getBuildHeight(), (blockposition3) -> {
|
||||
@@ -135,7 +136,8 @@ public class RandomPositionGenerator {
|
||||
@@ -135,7 +137,8 @@ public class RandomPositionGenerator {
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Prevent mob spawning from loading/generating chunks
|
|||
also prevents if out of world border bounds
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/SpawnerCreature.java b/src/main/java/net/minecraft/world/level/SpawnerCreature.java
|
||||
index 9a039ce12879baf8088c2ccaf0af61109efb7d74..28b3a74d139820f91775d3377d79675d308aff65 100644
|
||||
index 1969d1002b3182338614a2be0519fcdc385b7a44..5307488fa48ffa91446dd4457de1ce6a8f61da61 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/SpawnerCreature.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/SpawnerCreature.java
|
||||
@@ -175,9 +175,9 @@ public final class SpawnerCreature {
|
||||
@@ -176,9 +176,9 @@ public final class SpawnerCreature {
|
||||
StructureManager structuremanager = worldserver.getStructureManager();
|
||||
ChunkGenerator chunkgenerator = worldserver.getChunkProvider().getChunkGenerator();
|
||||
int i = blockposition.getY();
|
||||
|
@ -21,7 +21,7 @@ index 9a039ce12879baf8088c2ccaf0af61109efb7d74..28b3a74d139820f91775d3377d79675d
|
|||
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();
|
||||
int j = 0;
|
||||
int k = 0;
|
||||
@@ -206,7 +206,7 @@ public final class SpawnerCreature {
|
||||
@@ -207,7 +207,7 @@ public final class SpawnerCreature {
|
||||
if (entityhuman != null) {
|
||||
double d2 = entityhuman.h(d0, (double) i, d1);
|
||||
|
||||
|
|
|
@ -9,10 +9,10 @@ SpawnerSpawnEvent gets called instead of the CreatureSpawnEvent for
|
|||
spawners.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java b/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java
|
||||
index 79339bcbe15e5b3a409148245c68bbff3a59f59f..0a23fc173cca32b9e910e6c8c638b0b51a94cac2 100644
|
||||
index d4b8126f12fdf7d9b4f882d3ed7d8da544ed9e8a..867478484c0ba4ff467b96e458689937299b981d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java
|
||||
@@ -131,11 +131,11 @@ public abstract class MobSpawnerAbstract {
|
||||
@@ -132,11 +132,11 @@ public abstract class MobSpawnerAbstract {
|
||||
|
||||
org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(key);
|
||||
if (type != null) {
|
||||
|
|
|
@ -46,10 +46,18 @@ index cd7dc7d90efddb8a1bb50cd964b43d18cf9c83d1..35d1444c5b75d9a3a6cface5dd70aea0
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/CommandBlockListenerAbstract.java b/src/main/java/net/minecraft/world/level/CommandBlockListenerAbstract.java
|
||||
index 94adf4d3b3a367e2a7fa383f1da6fb3b02b35c85..0f966c5defdda58fd7d31072b625f16928cddeb7 100644
|
||||
index 94adf4d3b3a367e2a7fa383f1da6fb3b02b35c85..3fcdff3649c725580456dfc965d6c83bd5afe3da 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/CommandBlockListenerAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/CommandBlockListenerAbstract.java
|
||||
@@ -72,7 +72,7 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener {
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.commands.ICommandListener;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.chat.ChatComponentText;
|
||||
import net.minecraft.network.chat.IChatBaseComponent;
|
||||
+import net.minecraft.server.MCUtil;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.util.UtilColor;
|
||||
@@ -72,7 +73,7 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener {
|
||||
this.command = nbttagcompound.getString("Command");
|
||||
this.successCount = nbttagcompound.getInt("SuccessCount");
|
||||
if (nbttagcompound.hasKeyOfType("CustomName", 8)) {
|
||||
|
@ -59,10 +67,18 @@ index 94adf4d3b3a367e2a7fa383f1da6fb3b02b35c85..0f966c5defdda58fd7d31072b625f169
|
|||
|
||||
if (nbttagcompound.hasKeyOfType("TrackOutput", 1)) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityBanner.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityBanner.java
|
||||
index fd8d39d04f39ea8aa389deb66ca0ddaa3e282c40..e2d3ade6565b10ebed3c001f4a1c5bbb3a7f0b12 100644
|
||||
index fd8d39d04f39ea8aa389deb66ca0ddaa3e282c40..45958ffedca64e08e347ae65033700c0d798beb5 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityBanner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityBanner.java
|
||||
@@ -70,7 +70,7 @@ public class TileEntityBanner extends TileEntity implements INamableTileEntity {
|
||||
@@ -9,6 +9,7 @@ import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.chat.ChatMessage;
|
||||
import net.minecraft.network.chat.IChatBaseComponent;
|
||||
import net.minecraft.network.protocol.game.PacketPlayOutTileEntityData;
|
||||
+import net.minecraft.server.MCUtil;
|
||||
import net.minecraft.world.INamableTileEntity;
|
||||
import net.minecraft.world.item.EnumColor;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
@@ -70,7 +71,7 @@ public class TileEntityBanner extends TileEntity implements INamableTileEntity {
|
||||
public void load(IBlockData iblockdata, NBTTagCompound nbttagcompound) {
|
||||
super.load(iblockdata, nbttagcompound);
|
||||
if (nbttagcompound.hasKeyOfType("CustomName", 8)) {
|
||||
|
@ -72,10 +88,18 @@ index fd8d39d04f39ea8aa389deb66ca0ddaa3e282c40..e2d3ade6565b10ebed3c001f4a1c5bbb
|
|||
|
||||
if (this.hasWorld()) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityContainer.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityContainer.java
|
||||
index 19739ad1fb01c767288da2667a48909e4c1c36cc..5841422beb972f28fb9e9d10bcf711b2c20a4bb0 100644
|
||||
index 19739ad1fb01c767288da2667a48909e4c1c36cc..fb7a1a854efcf42f0351ef521aff67d5fcc4ab27 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityContainer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityContainer.java
|
||||
@@ -30,7 +30,7 @@ public abstract class TileEntityContainer extends TileEntity implements IInvento
|
||||
@@ -4,6 +4,7 @@ import javax.annotation.Nullable;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.chat.ChatMessage;
|
||||
import net.minecraft.network.chat.IChatBaseComponent;
|
||||
+import net.minecraft.server.MCUtil;
|
||||
import net.minecraft.sounds.SoundCategory;
|
||||
import net.minecraft.sounds.SoundEffects;
|
||||
import net.minecraft.world.ChestLock;
|
||||
@@ -30,7 +31,7 @@ public abstract class TileEntityContainer extends TileEntity implements IInvento
|
||||
super.load(iblockdata, nbttagcompound);
|
||||
this.chestLock = ChestLock.b(nbttagcompound);
|
||||
if (nbttagcompound.hasKeyOfType("CustomName", 8)) {
|
||||
|
|
|
@ -18,10 +18,18 @@ index 62276550627bfe453794a2b3101426fe05a585ff..6a156a488bc073b3b60f4d1081e3f2ab
|
|||
private final int i;
|
||||
private final int j;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityTurtle.java b/src/main/java/net/minecraft/world/entity/animal/EntityTurtle.java
|
||||
index bf224c97854daa379c61affff6a0ac9524c2c35d..38588e59f26dd1f3a43fc229195e4fb8484e3705 100644
|
||||
index bf224c97854daa379c61affff6a0ac9524c2c35d..09a6310af6712d36c20167256b60dc3235e76021 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/EntityTurtle.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/EntityTurtle.java
|
||||
@@ -93,7 +93,7 @@ public class EntityTurtle extends EntityAnimal {
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.syncher.DataWatcher;
|
||||
import net.minecraft.network.syncher.DataWatcherObject;
|
||||
import net.minecraft.network.syncher.DataWatcherRegistry;
|
||||
+import net.minecraft.server.MCUtil;
|
||||
import net.minecraft.server.level.EntityPlayer;
|
||||
import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.sounds.SoundCategory;
|
||||
@@ -93,7 +94,7 @@ public class EntityTurtle extends EntityAnimal {
|
||||
this.datawatcher.set(EntityTurtle.bp, blockposition);
|
||||
}
|
||||
|
||||
|
@ -30,7 +38,7 @@ index bf224c97854daa379c61affff6a0ac9524c2c35d..38588e59f26dd1f3a43fc229195e4fb8
|
|||
return (BlockPosition) this.datawatcher.get(EntityTurtle.bp);
|
||||
}
|
||||
|
||||
@@ -109,31 +109,37 @@ public class EntityTurtle extends EntityAnimal {
|
||||
@@ -109,31 +110,37 @@ public class EntityTurtle extends EntityAnimal {
|
||||
return (Boolean) this.datawatcher.get(EntityTurtle.bq);
|
||||
}
|
||||
|
||||
|
@ -69,7 +77,7 @@ index bf224c97854daa379c61affff6a0ac9524c2c35d..38588e59f26dd1f3a43fc229195e4fb8
|
|||
private void w(boolean flag) {
|
||||
this.datawatcher.set(EntityTurtle.bu, flag);
|
||||
}
|
||||
@@ -500,14 +506,17 @@ public class EntityTurtle extends EntityAnimal {
|
||||
@@ -500,14 +507,17 @@ public class EntityTurtle extends EntityAnimal {
|
||||
|
||||
if (!this.g.isInWater() && this.l()) {
|
||||
if (this.g.bv < 1) {
|
||||
|
@ -90,7 +98,7 @@ index bf224c97854daa379c61affff6a0ac9524c2c35d..38588e59f26dd1f3a43fc229195e4fb8
|
|||
}
|
||||
// CraftBukkit end
|
||||
this.g.setHasEgg(false);
|
||||
@@ -636,7 +645,7 @@ public class EntityTurtle extends EntityAnimal {
|
||||
@@ -636,7 +646,7 @@ public class EntityTurtle extends EntityAnimal {
|
||||
|
||||
@Override
|
||||
public boolean a() {
|
||||
|
|
|
@ -11,10 +11,10 @@ If the projectile fails to find the shooter in the current world, check
|
|||
other worlds.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/IProjectile.java b/src/main/java/net/minecraft/world/entity/projectile/IProjectile.java
|
||||
index 8967cf1e0238941370412109eff2ccf19f86b727..1ff55a1b6c1faae95a83cd8fc12a2045ad479145 100644
|
||||
index 65cee640040bdd1229149409ff046b765ee08c34..a33f3924a95b86c2337c455f30de9bb257cb8db4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/IProjectile.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/IProjectile.java
|
||||
@@ -40,7 +40,18 @@ public abstract class IProjectile extends Entity {
|
||||
@@ -41,7 +41,18 @@ public abstract class IProjectile extends Entity {
|
||||
|
||||
@Nullable
|
||||
public Entity getShooter() {
|
||||
|
|
|
@ -127,10 +127,10 @@ index 0000000000000000000000000000000000000000..e6afaa41df086b1eb3950ce870c91dd5
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/network/PacketDataSerializer.java b/src/main/java/net/minecraft/network/PacketDataSerializer.java
|
||||
index 4fc06bc5ef630b07fc8462cf835e6f92b151e6c6..eb00eb2b7bee2b9f85efef0ee5ed1605f4cabef8 100644
|
||||
index 5a1187b001004afe22d208bc5d7c288e796e16a6..579eb1260c7266cd41025cff177de4fb00ac0cec 100644
|
||||
--- a/src/main/java/net/minecraft/network/PacketDataSerializer.java
|
||||
+++ b/src/main/java/net/minecraft/network/PacketDataSerializer.java
|
||||
@@ -191,6 +191,7 @@ public class PacketDataSerializer extends ByteBuf {
|
||||
@@ -192,6 +192,7 @@ public class PacketDataSerializer extends ByteBuf {
|
||||
return this.d(oenum.ordinal());
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ index 4fc06bc5ef630b07fc8462cf835e6f92b151e6c6..eb00eb2b7bee2b9f85efef0ee5ed1605
|
|||
public int i() {
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
@@ -231,6 +232,7 @@ public class PacketDataSerializer extends ByteBuf {
|
||||
@@ -232,6 +233,7 @@ public class PacketDataSerializer extends ByteBuf {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ index 4fc06bc5ef630b07fc8462cf835e6f92b151e6c6..eb00eb2b7bee2b9f85efef0ee5ed1605
|
|||
public UUID k() {
|
||||
return new UUID(this.readLong(), this.readLong());
|
||||
}
|
||||
@@ -358,6 +360,7 @@ public class PacketDataSerializer extends ByteBuf {
|
||||
@@ -359,6 +361,7 @@ public class PacketDataSerializer extends ByteBuf {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -75,10 +75,10 @@ index 68ce7605bd63ea280b96db8230463d2afb0a6cb1..46d82c1548088b8305f758699388edf0
|
|||
c(throwable);
|
||||
if (throwable instanceof CompletionException) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index aa5abee5dd7dc601f3f738f11faf434d90e493a4..38ddb77c4b979cd22e4ec83ca109955d11739f1f 100644
|
||||
index 8166ad11642bb1b4b11722a5a09e773a2e749c47..021adb8a6b8c9e05c03391d0f8edfa71b3c0c246 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -284,6 +284,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -285,6 +285,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
S s0 = function.apply(thread); // CraftBukkit - decompile error
|
||||
|
||||
atomicreference.set(s0);
|
||||
|
|
|
@ -8,10 +8,10 @@ the updates per world, so that we can re-use the same packet
|
|||
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
|
||||
index 38ddb77c4b979cd22e4ec83ca109955d11739f1f..3ce1204184656d7500509f8600cec0a4b6089a3f 100644
|
||||
index 021adb8a6b8c9e05c03391d0f8edfa71b3c0c246..dd207a5138c4933c281255f4135f42b8fb0351d2 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1304,12 +1304,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1305,12 +1305,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
||||
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
|
||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't allow digging into unloaded chunks
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/PlayerInteractManager.java b/src/main/java/net/minecraft/server/level/PlayerInteractManager.java
|
||||
index 13e02b8d73164bc36e8d29edf8b0b2cb51fe3080..0d32d7e9fc6bf6a05f3975fe225022a9e176e47b 100644
|
||||
index cea19f4aafb3d81bf0dfcdac9103c03786fd5fc2..e7f762dc131ae40e36ff5e70b0394e0d5abdcee8 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/PlayerInteractManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/PlayerInteractManager.java
|
||||
@@ -111,8 +111,8 @@ public class PlayerInteractManager {
|
||||
@@ -113,8 +113,8 @@ public class PlayerInteractManager {
|
||||
IBlockData iblockdata;
|
||||
|
||||
if (this.j) {
|
||||
|
@ -19,7 +19,7 @@ index 13e02b8d73164bc36e8d29edf8b0b2cb51fe3080..0d32d7e9fc6bf6a05f3975fe225022a9
|
|||
this.j = false;
|
||||
} else {
|
||||
float f = this.a(iblockdata, this.k, this.l);
|
||||
@@ -123,7 +123,13 @@ public class PlayerInteractManager {
|
||||
@@ -125,7 +125,13 @@ public class PlayerInteractManager {
|
||||
}
|
||||
}
|
||||
} else if (this.f) {
|
||||
|
@ -34,7 +34,7 @@ index 13e02b8d73164bc36e8d29edf8b0b2cb51fe3080..0d32d7e9fc6bf6a05f3975fe225022a9
|
|||
if (iblockdata.isAir()) {
|
||||
this.world.a(this.player.getId(), this.h, -1);
|
||||
this.m = -1;
|
||||
@@ -287,10 +293,12 @@ public class PlayerInteractManager {
|
||||
@@ -289,10 +295,12 @@ public class PlayerInteractManager {
|
||||
this.player.playerConnection.sendPacket(new PacketPlayOutBlockBreak(blockposition, this.world.getType(blockposition), packetplayinblockdig_enumplayerdigtype, true, "stopped destroying"));
|
||||
} else if (packetplayinblockdig_enumplayerdigtype == PacketPlayInBlockDig.EnumPlayerDigType.ABORT_DESTROY_BLOCK) {
|
||||
this.f = false;
|
||||
|
|
|
@ -28,7 +28,7 @@ index bea8dd578cfd5532dd1b679a4ee4e6c74a416bba..e3cc64e837fa9b9c1f1d95037b1a59f1
|
|||
public boolean queueHealthUpdatePacket = false;
|
||||
public net.minecraft.network.protocol.game.PacketPlayOutUpdateHealth queuedHealthUpdatePacket;
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 3aaa6313a33865b9823aa38e5d0cce7edce04592..3ef632928bf93a8af5eccada3b1cc76354ed5617 100644
|
||||
index 1faae8a451c25cc8e37ef1907206a4f721477b13..e58784539bb1cc66581317c7167ae3326d5622ec 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -168,6 +168,7 @@ public abstract class PlayerList {
|
||||
|
@ -106,10 +106,10 @@ index 9b8d7b176e288fa715177196e7aff92900d8567a..1e741158bbcc0991259436bec549b32d
|
|||
public Location getBedSpawnLocation() {
|
||||
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
|
||||
index 91da1f4d933b991c73e04e077722382d02487e07..cd3987ec7569f4a2de1f66fc73b1ca6c19fa82aa 100644
|
||||
index 2334a9a95ab0e2395744343a5a1e3d26c88b7dc3..c2ebf264d9d150541aeb2d89f24853c2f887cde5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -142,6 +142,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -147,6 +147,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus;
|
||||
private String resourcePackHash;
|
||||
private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit
|
||||
|
@ -117,7 +117,7 @@ index 91da1f4d933b991c73e04e077722382d02487e07..cd3987ec7569f4a2de1f66fc73b1ca6c
|
|||
// Paper end
|
||||
|
||||
public CraftPlayer(CraftServer server, EntityPlayer entity) {
|
||||
@@ -1480,6 +1481,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1485,6 +1486,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
this.firstPlayed = firstPlayed;
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ index 91da1f4d933b991c73e04e077722382d02487e07..cd3987ec7569f4a2de1f66fc73b1ca6c
|
|||
public void readExtraData(NBTTagCompound nbttagcompound) {
|
||||
hasPlayedBefore = true;
|
||||
if (nbttagcompound.hasKey("bukkit")) {
|
||||
@@ -1502,6 +1515,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1507,6 +1520,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public void setExtraData(NBTTagCompound nbttagcompound) {
|
||||
|
@ -145,7 +145,7 @@ index 91da1f4d933b991c73e04e077722382d02487e07..cd3987ec7569f4a2de1f66fc73b1ca6c
|
|||
if (!nbttagcompound.hasKey("bukkit")) {
|
||||
nbttagcompound.set("bukkit", new NBTTagCompound());
|
||||
}
|
||||
@@ -1516,6 +1531,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1521,6 +1536,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
data.setLong("firstPlayed", getFirstPlayed());
|
||||
data.setLong("lastPlayed", System.currentTimeMillis());
|
||||
data.setString("lastKnownName", handle.getName());
|
||||
|
|
|
@ -12,10 +12,10 @@ 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.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 9666192e7e5a25e482af9c575300239fcc5b8a19..fffe522058144da31149e59a06263914865983ec 100644
|
||||
index c2ebf264d9d150541aeb2d89f24853c2f887cde5..e645a3386df6334e99d80ec6961399461c9545a9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2226,6 +2226,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2231,6 +2231,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
public void resetCooldown() {
|
||||
getHandle().resetAttackCooldown();
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ and then catch exceptions and close if they fire.
|
|||
Part of this commit was authored by: Spottedleaf
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/NetworkManager.java b/src/main/java/net/minecraft/network/NetworkManager.java
|
||||
index 6d40ade5a52383ed86d28d272c3dc83dbdcbd218..8e591f75b2c80fdb7e012574e9d7c348f1ffc90d 100644
|
||||
index 6d40ade5a52383ed86d28d272c3dc83dbdcbd218..ab70eeaeca222de7de7cab1b3db14b2c4761c3c3 100644
|
||||
--- a/src/main/java/net/minecraft/network/NetworkManager.java
|
||||
+++ b/src/main/java/net/minecraft/network/NetworkManager.java
|
||||
@@ -25,8 +25,15 @@ import net.minecraft.network.chat.ChatMessage;
|
||||
|
@ -52,9 +52,9 @@ index 6d40ade5a52383ed86d28d272c3dc83dbdcbd218..8e591f75b2c80fdb7e012574e9d7c348
|
|||
public java.net.InetSocketAddress virtualHost;
|
||||
private static boolean enableExplicitFlush = Boolean.getBoolean("paper.explicit-flush");
|
||||
+ // Optimize network
|
||||
+ boolean isPending = true;
|
||||
+ boolean queueImmunity = false;
|
||||
+ EnumProtocol protocol;
|
||||
+ public boolean isPending = true;
|
||||
+ public boolean queueImmunity = false;
|
||||
+ public EnumProtocol protocol;
|
||||
// Paper end
|
||||
|
||||
public NetworkManager(EnumProtocolDirection enumprotocoldirection) {
|
||||
|
@ -71,7 +71,7 @@ index 6d40ade5a52383ed86d28d272c3dc83dbdcbd218..8e591f75b2c80fdb7e012574e9d7c348
|
|||
this.packetListener = packetlistener;
|
||||
}
|
||||
+ // Paper start
|
||||
+ EntityPlayer getPlayer() {
|
||||
+ public EntityPlayer getPlayer() {
|
||||
+ if (packetListener instanceof PlayerConnection) {
|
||||
+ return ((PlayerConnection) packetListener).player;
|
||||
+ } else {
|
||||
|
|
|
@ -22,7 +22,7 @@ index ab18969083e89eb2016c6a6bffc06f4e83c9f753..53359f5ca7a1098f78e683ebad142d5b
|
|||
if (entity.valid) {
|
||||
MinecraftServer.LOGGER.error("Attempted Double World add on " + entity, new Throwable());
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index aebde5e6ec24aff073dfd4eae1ce5a008134658a..ea6c5c9305994e64831c5444666c22a96f9d36da 100644
|
||||
index fa288b099b17adafc085fb0fc5da6e810d078952..33b5825d753029e98ea7a11a4758280eddd2584c 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -335,7 +335,7 @@ public abstract class PlayerList {
|
||||
|
@ -35,7 +35,7 @@ index aebde5e6ec24aff073dfd4eae1ce5a008134658a..ea6c5c9305994e64831c5444666c22a9
|
|||
});
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 36e9a33d22fc2572e23e457adf62bd2bcebd10d3..37b9915e6c25458e9ec2d0beb40be51991276b8d 100644
|
||||
index e9b535622d6c33083c575ee4691598014dba0e2c..cbdd75feb7250e771111184b1fac7c4a6bf6e575 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -63,6 +63,8 @@ import net.minecraft.world.EnumHand;
|
||||
|
@ -50,7 +50,7 @@ index 36e9a33d22fc2572e23e457adf62bd2bcebd10d3..37b9915e6c25458e9ec2d0beb40be519
|
|||
@@ -158,6 +160,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
};
|
||||
List<Entity> entitySlice = null;
|
||||
public List<Entity> entitySlice = null;
|
||||
+ public org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason;
|
||||
// Paper end
|
||||
|
||||
|
@ -93,10 +93,10 @@ index 36e9a33d22fc2572e23e457adf62bd2bcebd10d3..37b9915e6c25458e9ec2d0beb40be519
|
|||
|
||||
} catch (Throwable throwable) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java b/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java
|
||||
index 0a23fc173cca32b9e910e6c8c638b0b51a94cac2..ca753267a06643b6f7224140950aa7f47cea64ad 100644
|
||||
index 867478484c0ba4ff467b96e458689937299b981d..34bcee4ff55ba118ba393e94b3c25ee2b84feaa2 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java
|
||||
@@ -182,6 +182,7 @@ public abstract class MobSpawnerAbstract {
|
||||
@@ -183,6 +183,7 @@ public abstract class MobSpawnerAbstract {
|
||||
// Spigot End
|
||||
}
|
||||
entity.spawnedViaMobSpawner = true; // Paper
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Server Tick Events
|
|||
Fires event at start and end of a server tick
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 3ce1204184656d7500509f8600cec0a4b6089a3f..c864749646d26199e4c938f1fa6bbee4a3b942dd 100644
|
||||
index dd207a5138c4933c281255f4135f42b8fb0351d2..f07579d5b2450e7f972e0a942287ea1205740722 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1227,6 +1227,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1228,6 +1228,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
});
|
||||
isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
|
||||
// Paper end
|
||||
|
@ -17,7 +17,7 @@ index 3ce1204184656d7500509f8600cec0a4b6089a3f..c864749646d26199e4c938f1fa6bbee4
|
|||
|
||||
++this.ticks;
|
||||
this.b(booleansupplier);
|
||||
@@ -1270,6 +1271,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1271,6 +1272,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ index b6b9a471426ddf911a1f6bf38543c0304bfc31f6..12ac3608736b45447afe6b0d35ead144
|
|||
|
||||
if (i >= -30000000 && j >= -30000000 && i < 30000000 && j < 30000000) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 317d08c49b980f8785d0d098c993e2ac03200e14..ed5f6ec979a2f1124c2fbb37c3be1d42994dc4da 100644
|
||||
index 8bfb7a5bf6aa2ee568ceee3d2e4efe9dd57d9c1b..294a06c998a84523f8a2a0702aa6a9048d204722 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -343,6 +343,29 @@ public class CraftWorld implements World {
|
||||
|
@ -37,13 +37,13 @@ index 317d08c49b980f8785d0d098c993e2ac03200e14..ed5f6ec979a2f1124c2fbb37c3be1d42
|
|||
+ throw new UnsupportedOperationException(); // TODO
|
||||
+ //return this.world.getHighestBlockY(HeightMap.Type.LIGHT_BLOCKING, x, z);
|
||||
+ case ANY:
|
||||
+ return this.world.getHighestBlockY(net.minecraft.server.HeightMap.Type.WORLD_SURFACE, x, z);
|
||||
+ return this.world.getHighestBlockY(net.minecraft.world.level.levelgen.HeightMap.Type.WORLD_SURFACE, x, z);
|
||||
+ case SOLID:
|
||||
+ return this.world.getHighestBlockY(net.minecraft.server.HeightMap.Type.OCEAN_FLOOR, x, z);
|
||||
+ return this.world.getHighestBlockY(net.minecraft.world.level.levelgen.HeightMap.Type.OCEAN_FLOOR, x, z);
|
||||
+ case SOLID_OR_LIQUID:
|
||||
+ return this.world.getHighestBlockY(net.minecraft.server.HeightMap.Type.MOTION_BLOCKING, x, z);
|
||||
+ return this.world.getHighestBlockY(net.minecraft.world.level.levelgen.HeightMap.Type.MOTION_BLOCKING, x, z);
|
||||
+ case SOLID_OR_LIQUID_NO_LEAVES:
|
||||
+ return this.world.getHighestBlockY(net.minecraft.server.HeightMap.Type.MOTION_BLOCKING_NO_LEAVES, x, z);
|
||||
+ return this.world.getHighestBlockY(net.minecraft.world.level.levelgen.HeightMap.Type.MOTION_BLOCKING_NO_LEAVES, x, z);
|
||||
+ default:
|
||||
+ throw new UnsupportedOperationException();
|
||||
+ }
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Mob Spawner API Enhancements
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java b/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java
|
||||
index ca753267a06643b6f7224140950aa7f47cea64ad..bd4c7dbfad80b65c1350e93bb8303bf145dc99c1 100644
|
||||
index 34bcee4ff55ba118ba393e94b3c25ee2b84feaa2..5538404456dfee42257fad9040fcc0fefdfc5fab 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java
|
||||
@@ -64,6 +64,7 @@ public abstract class MobSpawnerAbstract {
|
||||
@@ -65,6 +65,7 @@ public abstract class MobSpawnerAbstract {
|
||||
this.mobs.clear(); // CraftBukkit - SPIGOT-3496, MC-92282
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ index ca753267a06643b6f7224140950aa7f47cea64ad..bd4c7dbfad80b65c1350e93bb8303bf1
|
|||
private boolean h() {
|
||||
BlockPosition blockposition = this.b();
|
||||
|
||||
@@ -220,6 +221,7 @@ public abstract class MobSpawnerAbstract {
|
||||
@@ -221,6 +222,7 @@ public abstract class MobSpawnerAbstract {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ index ca753267a06643b6f7224140950aa7f47cea64ad..bd4c7dbfad80b65c1350e93bb8303bf1
|
|||
private void i() {
|
||||
if (this.maxSpawnDelay <= this.minSpawnDelay) {
|
||||
this.spawnDelay = this.minSpawnDelay;
|
||||
@@ -237,7 +239,13 @@ public abstract class MobSpawnerAbstract {
|
||||
@@ -238,7 +240,13 @@ public abstract class MobSpawnerAbstract {
|
||||
}
|
||||
|
||||
public void a(NBTTagCompound nbttagcompound) {
|
||||
|
@ -38,7 +38,7 @@ index ca753267a06643b6f7224140950aa7f47cea64ad..bd4c7dbfad80b65c1350e93bb8303bf1
|
|||
this.mobs.clear();
|
||||
if (nbttagcompound.hasKeyOfType("SpawnPotentials", 9)) {
|
||||
NBTTagList nbttaglist = nbttagcompound.getList("SpawnPotentials", 10);
|
||||
@@ -252,10 +260,15 @@ public abstract class MobSpawnerAbstract {
|
||||
@@ -253,10 +261,15 @@ public abstract class MobSpawnerAbstract {
|
||||
} else if (!this.mobs.isEmpty()) {
|
||||
this.setSpawnData((MobSpawnerData) WeightedRandom.a(this.a().random, this.mobs));
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ index ca753267a06643b6f7224140950aa7f47cea64ad..bd4c7dbfad80b65c1350e93bb8303bf1
|
|||
this.spawnCount = nbttagcompound.getShort("SpawnCount");
|
||||
}
|
||||
|
||||
@@ -280,9 +293,20 @@ public abstract class MobSpawnerAbstract {
|
||||
@@ -281,9 +294,20 @@ public abstract class MobSpawnerAbstract {
|
||||
if (minecraftkey == null) {
|
||||
return nbttagcompound;
|
||||
} else {
|
||||
|
|
|
@ -40,10 +40,10 @@ index 145767e8b0fc4105a0afa47af17dcdbb75e952bc..174eb12722872182b2d9b54841e5bb57
|
|||
double deltaZ = this.locZ() - player.locZ();
|
||||
double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 0b01a688617a198f510738e783546f1c72240151..3b7be01513f9851b50585fca2e7e2f21e03ca253 100644
|
||||
index e645a3386df6334e99d80ec6961399461c9545a9..43e4ade73619d430be7ee93687e98ef5a27cb329 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2235,6 +2235,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2240,6 +2240,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
super.remove();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,10 +16,10 @@ handling that should have been handled synchronously will be handled
|
|||
synchronously when the server gets shut down.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c864749646d26199e4c938f1fa6bbee4a3b942dd..00dbb5382aa6efec0038a45049716cd44c1f4c79 100644
|
||||
index f07579d5b2450e7f972e0a942287ea1205740722..b704401da2832601dd45d3c29e950cb52033a3fd 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2180,7 +2180,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -2181,7 +2181,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
// CraftBukkit start
|
||||
@Override
|
||||
public boolean isMainThread() {
|
||||
|
|
|
@ -217,7 +217,7 @@ index edae7ff7d181a5d28e083e714112dc3188b2461f..44611304d5bf222900866319a02a333e
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 37b9915e6c25458e9ec2d0beb40be51991276b8d..63268bc3e04ef334a750f83a8e39acc0919f7906 100644
|
||||
index cbdd75feb7250e771111184b1fac7c4a6bf6e575..5acf61ece9ca38a262387fd0395bd464312501fd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2799,6 +2799,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
|
@ -229,10 +229,10 @@ index 37b9915e6c25458e9ec2d0beb40be51991276b8d..63268bc3e04ef334a750f83a8e39acc0
|
|||
this.uniqueID = uuid;
|
||||
this.ae = this.uniqueID.toString();
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
index 246a4b69e1b4ee6affa9564d50f261fac2f269d0..5539ee8552c4bcfa718a63dbd4c25bd232048bff 100644
|
||||
index 79ff96f18c53f3d1ce4a00be2e2d8fe68f77bf54..3f926ed8e2b2c9dbf1e2493870af7eff3b6db019 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
@@ -538,6 +538,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -542,6 +542,7 @@ public class Chunk implements IChunkAccess {
|
||||
if (i != this.loc.x || j != this.loc.z) {
|
||||
Chunk.LOGGER.warn("Wrong location! ({}, {}) should be ({}, {}), {}", i, j, this.loc.x, this.loc.z, entity);
|
||||
entity.dead = true;
|
||||
|
|
|
@ -21,10 +21,10 @@ index 38d25a12c6a52d8a83214e2a0f43a218cf15ceac..ffe9b1a63d78925e1d77b9e730aef42f
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 00dbb5382aa6efec0038a45049716cd44c1f4c79..e4b7bd30117e0a3af50ec28aada604df837ebb02 100644
|
||||
index b704401da2832601dd45d3c29e950cb52033a3fd..90eb5d8ed7698b5e19d38cec647c1bcbc15532f4 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -706,35 +706,36 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -707,35 +707,36 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
||||
// CraftBukkit start
|
||||
public void loadSpawn(WorldLoadListener worldloadlistener, WorldServer worldserver) {
|
||||
|
@ -221,7 +221,7 @@ index 872d00de41533ab7f4b43874de6c1747022e2ac5..ca81664d884e80e5cb1eb376a2c2ef1e
|
|||
@Override
|
||||
public void a(ChunkCoordIntPair chunkcoordintpair) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 6dd09a5fc5f9706c4eb2e6f7ef25162d98efc156..7080dc890e959e1cce9aec63c1de8ac413b4b2e9 100644
|
||||
index 02b7be844f723fd0e0d5f547ba8ff31a14f448a7..9e47e9cfa5bf1819e6d6779c52828e4472e4eed0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1973,15 +1973,21 @@ public class CraftWorld implements World {
|
||||
|
|
|
@ -5,10 +5,18 @@ Subject: [PATCH] Catch exceptions from dispenser entity spawns
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/dispenser/IDispenseBehavior.java b/src/main/java/net/minecraft/core/dispenser/IDispenseBehavior.java
|
||||
index ffce5baaca6fd5b5e73ed898d12a4fee02c24515..d8a8a57c2228376347d46de8821ae0e8321861e3 100644
|
||||
index ffce5baaca6fd5b5e73ed898d12a4fee02c24515..158075319bd49ac78ea994639cdad21aeacdf86f 100644
|
||||
--- a/src/main/java/net/minecraft/core/dispenser/IDispenseBehavior.java
|
||||
+++ b/src/main/java/net/minecraft/core/dispenser/IDispenseBehavior.java
|
||||
@@ -236,7 +236,14 @@ public interface IDispenseBehavior {
|
||||
@@ -8,6 +8,7 @@ import net.minecraft.core.BlockPosition;
|
||||
import net.minecraft.core.EnumDirection;
|
||||
import net.minecraft.core.IPosition;
|
||||
import net.minecraft.core.ISourceBlock;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.EntityPlayer;
|
||||
import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.sounds.SoundCategory;
|
||||
@@ -236,7 +237,14 @@ public interface IDispenseBehavior {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ This patch also adds a chunk status cache on region files (note that
|
|||
its only purpose is to cache the status on DISK)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
index b80c3bd702141ca4a88078386845d731b3ecc539..c6acc429fd0a599c1c1ab676054d9e3f720fbd39 100644
|
||||
index 94af98e250fe7ef37c16d432c05c6f2b68625fe1..f2d48659fdb9f030dbeec12ed820062d4d066e48 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
@@ -52,7 +52,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
@ -42,6 +42,15 @@ index b80c3bd702141ca4a88078386845d731b3ecc539..c6acc429fd0a599c1c1ab676054d9e3f
|
|||
// Paper end
|
||||
|
||||
@Nullable
|
||||
@@ -768,7 +783,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
return this.p;
|
||||
}
|
||||
|
||||
- final class a extends IAsyncTaskHandler<Runnable> {
|
||||
+ public final class a extends IAsyncTaskHandler<Runnable> { // Paper - package -> public
|
||||
|
||||
private a(World world) {
|
||||
super("Chunk source main thread executor for " + world.getDimensionKey().a());
|
||||
diff --git a/src/main/java/net/minecraft/server/level/PlayerChunk.java b/src/main/java/net/minecraft/server/level/PlayerChunk.java
|
||||
index 9891cf98f8c740f84f9135ee8176e67abb648b3a..6bced8533df49d7bfdb32dfa0caad9d788ffc2c8 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/PlayerChunk.java
|
||||
|
@ -165,10 +174,10 @@ index 5e4c162654349f884becc10e8fbae4ded6889deb..711308cf84a816f09d116a7414f9cbee
|
|||
return (ChunkStatus) IRegistry.CHUNK_STATUS.get(MinecraftKey.a(s));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
|
||||
index 1711c40e163a1148e2f7be58d4c020c61bef8bb2..839d3d08a2d1ff6714645517906598a87075687b 100644
|
||||
index 69bc9dc18bab157851d8080a672504598e8572a8..98bc26c7ae01884eb53766e72fc7cbabbf065e6e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
|
||||
@@ -461,6 +461,17 @@ public class ChunkRegionLoader {
|
||||
@@ -462,6 +462,17 @@ public class ChunkRegionLoader {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
@ -285,7 +294,7 @@ index ab9f4d40fd1126a3d7ba5b16fdc6ab09de4a7fdb..55e7e983d2c760a8052d7b3ddbdc8447
|
|||
} catch (Throwable throwable1) {
|
||||
throwable = throwable1;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 7080dc890e959e1cce9aec63c1de8ac413b4b2e9..a0654c41ce981a12dc20e1ecaf13f1f2d150029f 100644
|
||||
index 9e47e9cfa5bf1819e6d6779c52828e4472e4eed0..bf1ebb108149f519ae29a2277020398c898d2bc3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -19,6 +19,7 @@ import java.util.Objects;
|
||||
|
@ -311,7 +320,7 @@ index 7080dc890e959e1cce9aec63c1de8ac413b4b2e9..a0654c41ce981a12dc20e1ecaf13f1f2
|
|||
+ chunk = world.getChunkProvider().playerChunkMap.getUnloadingChunk(x, z);
|
||||
+ }
|
||||
+ if (chunk != null) {
|
||||
+ return chunk instanceof ProtoChunkExtension || chunk instanceof net.minecraft.server.Chunk;
|
||||
+ return chunk instanceof ProtoChunkExtension || chunk instanceof net.minecraft.world.level.chunk.Chunk;
|
||||
+ }
|
||||
try {
|
||||
- return world.getChunkProvider().getChunkAtIfCachedImmediately(x, z) != null || world.getChunkProvider().playerChunkMap.read(new ChunkCoordIntPair(x, z)) != null; // Paper (TODO check if the first part can be removed)
|
||||
|
|
|
@ -29,10 +29,10 @@ index ffe9b1a63d78925e1d77b9e730aef42fed6d58fa..1278d09f70c1e97607ef20d87a178dc2
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index e4b7bd30117e0a3af50ec28aada604df837ebb02..1d8695ac6692194c9a1cfd46c9d735120ca75245 100644
|
||||
index 90eb5d8ed7698b5e19d38cec647c1bcbc15532f4..78fc9046c64f612dfc56431ce6ea0e1cc7d66f15 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -261,6 +261,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -262,6 +262,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
public static int currentTick = 0; // Paper - Further improve tick loop
|
||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
|
@ -40,7 +40,7 @@ index e4b7bd30117e0a3af50ec28aada604df837ebb02..1d8695ac6692194c9a1cfd46c9d73512
|
|||
public CommandDispatcher vanillaCommandDispatcher;
|
||||
private boolean forceTicks;
|
||||
// CraftBukkit end
|
||||
@@ -1246,14 +1247,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1247,14 +1248,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.serverPing.b().a(agameprofile);
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ index e4b7bd30117e0a3af50ec28aada604df837ebb02..1d8695ac6692194c9a1cfd46c9d73512
|
|||
this.methodProfiler.enter("snooper");
|
||||
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.ticks > 100) { // Spigot
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
index c6acc429fd0a599c1c1ab676054d9e3f720fbd39..2a3c2f4f6d581cff82e0cb69fd6e6fb75435e953 100644
|
||||
index f2d48659fdb9f030dbeec12ed820062d4d066e48..5122afbd51c87c27efa82d7d9393f252efa848d4 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
@@ -557,6 +557,15 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
@ -309,10 +309,10 @@ index 16441006736abdea0120570557348be4919c82ad..5da94d3c2498c84da81f41c37249159d
|
|||
if (this.dragonBattle != null) {
|
||||
this.worldDataServer.a(this.dragonBattle.a()); // CraftBukkit
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
index 5539ee8552c4bcfa718a63dbd4c25bd232048bff..f036cc45e7b1f3aedd8c63293b9b5436968a42c3 100644
|
||||
index 3f926ed8e2b2c9dbf1e2493870af7eff3b6db019..2690c44eaae193a259fe195c95e59d07d5e1cc5a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
@@ -77,7 +77,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -81,7 +81,7 @@ public class Chunk implements IChunkAccess {
|
||||
private TickList<Block> o;
|
||||
private TickList<FluidType> p;
|
||||
private boolean q;
|
||||
|
|
|
@ -1160,10 +1160,10 @@ index 1f32ab230d650bb5f652efbacdd5e4b90dc4de89..71c2792d7eede35485cc36ac929cf295
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/PlayerInteractManager.java b/src/main/java/net/minecraft/server/level/PlayerInteractManager.java
|
||||
index 0d32d7e9fc6bf6a05f3975fe225022a9e176e47b..3dcfb2326af92eb7a9cd16fd4725b3ae9acee17b 100644
|
||||
index e7f762dc131ae40e36ff5e70b0394e0d5abdcee8..37e436c28c3c71c73fb0e7bf06a417739a318e47 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/PlayerInteractManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/PlayerInteractManager.java
|
||||
@@ -306,6 +306,8 @@ public class PlayerInteractManager {
|
||||
@@ -308,6 +308,8 @@ public class PlayerInteractManager {
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1227,10 +1227,10 @@ index 12ac3608736b45447afe6b0d35ead1441390be5e..15da3511a9e57c320f4cf409852bee07
|
|||
if (iblockdata1 == null) {
|
||||
// CraftBukkit start - remove blockstate if failed (or the same)
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
index f036cc45e7b1f3aedd8c63293b9b5436968a42c3..9b75e5ea8987421523e0324a83db317f150d3f48 100644
|
||||
index 2690c44eaae193a259fe195c95e59d07d5e1cc5a..3fdce0e6fa34eb4b1eafc618068a3fb06abd5ec1 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
@@ -461,7 +461,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -465,7 +465,7 @@ public class Chunk implements IChunkAccess {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -1240,10 +1240,18 @@ index f036cc45e7b1f3aedd8c63293b9b5436968a42c3..9b75e5ea8987421523e0324a83db317f
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkEmpty.java b/src/main/java/net/minecraft/world/level/chunk/ChunkEmpty.java
|
||||
index 89efd0b68b04457e1cd617dcc8bb1a6ea1c4717c..a8f4c1468759fe44c28957e0e733dee741aa502f 100644
|
||||
index 89efd0b68b04457e1cd617dcc8bb1a6ea1c4717c..9fb8d20e9e1a8cc716c32a100b1d70e90f385eca 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkEmpty.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkEmpty.java
|
||||
@@ -28,7 +28,7 @@ public class ChunkEmpty extends Chunk {
|
||||
@@ -8,6 +8,7 @@ import net.minecraft.SystemUtils;
|
||||
import net.minecraft.core.BlockPosition;
|
||||
import net.minecraft.core.IRegistry;
|
||||
import net.minecraft.data.worldgen.biome.BiomeRegistry;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.PlayerChunk;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.level.ChunkCoordIntPair;
|
||||
@@ -28,7 +29,7 @@ public class ChunkEmpty extends Chunk {
|
||||
});
|
||||
|
||||
public ChunkEmpty(World world, ChunkCoordIntPair chunkcoordintpair) {
|
||||
|
@ -1489,10 +1497,10 @@ index 9351e6ba541d440c485b6e4a3209170c5756e31e..7a82d43d51d80a3054e0871bf4b9aa76
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
|
||||
index 839d3d08a2d1ff6714645517906598a87075687b..2853f9e06064a5c0fe2b0e5df75223d1275eae20 100644
|
||||
index 98bc26c7ae01884eb53766e72fc7cbabbf065e6e..c652897aae99c48c6cc020b5d64f6a8b02beecb5 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
|
||||
@@ -100,7 +100,7 @@ public class ChunkRegionLoader {
|
||||
@@ -101,7 +101,7 @@ public class ChunkRegionLoader {
|
||||
byte b0 = nbttagcompound2.getByte("Y");
|
||||
|
||||
if (nbttagcompound2.hasKeyOfType("Palette", 9) && nbttagcompound2.hasKeyOfType("BlockStates", 12)) {
|
||||
|
@ -1501,7 +1509,7 @@ index 839d3d08a2d1ff6714645517906598a87075687b..2853f9e06064a5c0fe2b0e5df75223d1
|
|||
|
||||
chunksection.getBlocks().a(nbttagcompound2.getList("Palette", 10), nbttagcompound2.getLongArray("BlockStates"));
|
||||
chunksection.recalcBlockCounts();
|
||||
@@ -164,7 +164,7 @@ public class ChunkRegionLoader {
|
||||
@@ -165,7 +165,7 @@ public class ChunkRegionLoader {
|
||||
// CraftBukkit end
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -38,10 +38,10 @@ index c45493e88bf7e8811be2759ff9ac19e3fe9d938a..384cb363eed794551bee6b0ec11ba1be
|
|||
public EngineMode engineMode;
|
||||
public int maxChunkSectionIndex;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/SpawnerCreature.java b/src/main/java/net/minecraft/world/level/SpawnerCreature.java
|
||||
index 28b3a74d139820f91775d3377d79675d308aff65..166609e03474946882791dbebafe7121a3727854 100644
|
||||
index 5307488fa48ffa91446dd4457de1ce6a8f61da61..d30a3de84dc75a57680052904337af02b6b80636 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/SpawnerCreature.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/SpawnerCreature.java
|
||||
@@ -80,6 +80,13 @@ public final class SpawnerCreature {
|
||||
@@ -81,6 +81,13 @@ public final class SpawnerCreature {
|
||||
EnumCreatureType enumcreaturetype = entity.getEntityType().e();
|
||||
|
||||
if (enumcreaturetype != EnumCreatureType.MISC) {
|
||||
|
|
|
@ -39,10 +39,10 @@ index 384cb363eed794551bee6b0ec11ba1be92a3d7ac..1ee2cced100626e48eb36ee14f84b925
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/IProjectile.java b/src/main/java/net/minecraft/world/entity/projectile/IProjectile.java
|
||||
index 1ff55a1b6c1faae95a83cd8fc12a2045ad479145..0e3c646dca1fa1fa895c3aece037367a9b2cf378 100644
|
||||
index a33f3924a95b86c2337c455f30de9bb257cb8db4..37b1febb45b900dfe4b225152e66bc4be83df220 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/IProjectile.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/IProjectile.java
|
||||
@@ -125,7 +125,7 @@ public abstract class IProjectile extends Entity {
|
||||
@@ -126,7 +126,7 @@ public abstract class IProjectile extends Entity {
|
||||
this.shoot((double) f5, (double) f6, (double) f7, f3, f4);
|
||||
Vec3D vec3d = entity.getMot();
|
||||
|
||||
|
|
|
@ -26,10 +26,24 @@ index cb5cda5e6497edeb801ef712f9bd8823cb055750..1a6f8aec32af85717f5d56e0b00a02cd
|
|||
return entity instanceof IInventory && entity.isAlive();
|
||||
};
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
index 9b75e5ea8987421523e0324a83db317f150d3f48..46467230aac994e2b3864b7a1eddc701c4ade91c 100644
|
||||
index 3fdce0e6fa34eb4b1eafc618068a3fb06abd5ec1..e7bb33125a25b9e5a68013b15d7b5b6b6769ab9b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
@@ -119,6 +119,10 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -32,10 +32,13 @@ import net.minecraft.server.level.PlayerChunk;
|
||||
import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.util.EntitySlice;
|
||||
import net.minecraft.util.MathHelper;
|
||||
+import net.minecraft.world.IInventory;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityTypes;
|
||||
+import net.minecraft.world.entity.IEntitySelector;
|
||||
import net.minecraft.world.entity.boss.EntityComplexPart;
|
||||
import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon;
|
||||
+import net.minecraft.world.entity.item.EntityItem;
|
||||
import net.minecraft.world.level.ChunkCoordIntPair;
|
||||
import net.minecraft.world.level.GeneratorAccess;
|
||||
import net.minecraft.world.level.TickList;
|
||||
@@ -123,6 +126,10 @@ public class Chunk implements IChunkAccess {
|
||||
return removed;
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +54,7 @@ index 9b75e5ea8987421523e0324a83db317f150d3f48..46467230aac994e2b3864b7a1eddc701
|
|||
// Paper end
|
||||
|
||||
public Chunk(World world, ChunkCoordIntPair chunkcoordintpair, BiomeStorage biomestorage, ChunkConverter chunkconverter, TickList<Block> ticklist, TickList<FluidType> ticklist1, long i, @Nullable ChunkSection[] achunksection, @Nullable Consumer<Chunk> consumer) {
|
||||
@@ -578,6 +582,13 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -582,6 +589,13 @@ public class Chunk implements IChunkAccess {
|
||||
entity.chunkZ = this.loc.z;
|
||||
this.entities.add(entity); // Paper - per chunk entity list
|
||||
this.entitySlices[k].add(entity);
|
||||
|
@ -54,7 +68,7 @@ index 9b75e5ea8987421523e0324a83db317f150d3f48..46467230aac994e2b3864b7a1eddc701
|
|||
entity.entitySlice = this.entitySlices[k]; // Paper
|
||||
this.markDirty(); // Paper
|
||||
}
|
||||
@@ -611,6 +622,11 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -615,6 +629,11 @@ public class Chunk implements IChunkAccess {
|
||||
if (!this.entitySlices[i].remove(entity)) {
|
||||
return;
|
||||
}
|
||||
|
@ -66,7 +80,7 @@ index 9b75e5ea8987421523e0324a83db317f150d3f48..46467230aac994e2b3864b7a1eddc701
|
|||
entityCounts.decrement(entity.getMinecraftKeyString());
|
||||
this.markDirty(); // Paper
|
||||
// Paper end
|
||||
@@ -896,6 +912,14 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -900,6 +919,14 @@ public class Chunk implements IChunkAccess {
|
||||
for (int k = i; k <= j; ++k) {
|
||||
Iterator iterator = this.entitySlices[k].iterator(); // Spigot
|
||||
|
||||
|
@ -81,7 +95,7 @@ index 9b75e5ea8987421523e0324a83db317f150d3f48..46467230aac994e2b3864b7a1eddc701
|
|||
while (iterator.hasNext()) {
|
||||
T entity = (T) iterator.next(); // CraftBukkit - decompile error
|
||||
if (entity.shouldBeRemoved) continue; // Paper
|
||||
@@ -916,9 +940,29 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -920,9 +947,29 @@ public class Chunk implements IChunkAccess {
|
||||
i = MathHelper.clamp(i, 0, this.entitySlices.length - 1);
|
||||
j = MathHelper.clamp(j, 0, this.entitySlices.length - 1);
|
||||
|
||||
|
|
|
@ -2340,10 +2340,10 @@ index 191a74bd9b894f9d64d0a55747cb17e07ceef597..949e374d1e3bdbe31b160ad5ab6c0153
|
|||
DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, datapackconfiguration1, thread, iregistrycustom_dimension, convertable_conversionsession, resourcepackrepository, datapackresources, null, dedicatedserversettings, DataConverterRegistry.a(), minecraftsessionservice, gameprofilerepository, usercache, WorldLoadListenerLogger::new);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 1d8695ac6692194c9a1cfd46c9d735120ca75245..eafee14262ac8abb482bdd0fa52a8a33bf4a0f87 100644
|
||||
index 78fc9046c64f612dfc56431ce6ea0e1cc7d66f15..d2b81e14f8f58f5746a5577e23357d26f22e74fe 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -910,7 +910,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -911,7 +911,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.getUserCache().b(false); // Paper
|
||||
}
|
||||
// Spigot end
|
||||
|
@ -2353,7 +2353,7 @@ index 1d8695ac6692194c9a1cfd46c9d735120ca75245..eafee14262ac8abb482bdd0fa52a8a33
|
|||
|
||||
public String getServerIp() {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
index 2a3c2f4f6d581cff82e0cb69fd6e6fb75435e953..df71f8c42ac488153257614b58202bb5d7083251 100644
|
||||
index 5122afbd51c87c27efa82d7d9393f252efa848d4..1e74299bb3a368dcbc813408804d25cf58a75b0b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
@@ -38,6 +38,7 @@ import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||
|
@ -3386,7 +3386,7 @@ index 37d31b49dbbbf834daf29e50daffd9852bfaaf03..2e86be5be969ebf672ef3844e1367583
|
|||
return this.a == null ? new NibbleArray() : new NibbleArray((byte[]) this.a.clone());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
|
||||
index 2853f9e06064a5c0fe2b0e5df75223d1275eae20..42dc430d948dbab38ad1a1788aaff840f28bc8e8 100644
|
||||
index c652897aae99c48c6cc020b5d64f6a8b02beecb5..c95fcdf47db8bfe59a83c0d28f4744b4d8540ef8 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
|
||||
@@ -6,6 +6,7 @@ import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
|
||||
|
@ -3397,7 +3397,7 @@ index 2853f9e06064a5c0fe2b0e5df75223d1275eae20..42dc430d948dbab38ad1a1788aaff840
|
|||
import java.util.Arrays;
|
||||
import java.util.BitSet;
|
||||
import java.util.EnumSet;
|
||||
@@ -65,7 +66,29 @@ public class ChunkRegionLoader {
|
||||
@@ -66,7 +67,29 @@ public class ChunkRegionLoader {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
|
||||
|
@ -3427,7 +3427,7 @@ index 2853f9e06064a5c0fe2b0e5df75223d1275eae20..42dc430d948dbab38ad1a1788aaff840
|
|||
ChunkGenerator chunkgenerator = worldserver.getChunkProvider().getChunkGenerator();
|
||||
WorldChunkManager worldchunkmanager = chunkgenerator.getWorldChunkManager();
|
||||
NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("Level");
|
||||
@@ -92,7 +115,9 @@ public class ChunkRegionLoader {
|
||||
@@ -93,7 +116,9 @@ public class ChunkRegionLoader {
|
||||
LightEngine lightengine = chunkproviderserver.getLightEngine();
|
||||
|
||||
if (flag) {
|
||||
|
@ -3438,7 +3438,7 @@ index 2853f9e06064a5c0fe2b0e5df75223d1275eae20..42dc430d948dbab38ad1a1788aaff840
|
|||
}
|
||||
|
||||
for (int i = 0; i < nbttaglist.size(); ++i) {
|
||||
@@ -108,16 +133,28 @@ public class ChunkRegionLoader {
|
||||
@@ -109,16 +134,28 @@ public class ChunkRegionLoader {
|
||||
achunksection[b0] = chunksection;
|
||||
}
|
||||
|
||||
|
@ -3470,7 +3470,7 @@ index 2853f9e06064a5c0fe2b0e5df75223d1275eae20..42dc430d948dbab38ad1a1788aaff840
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -226,7 +263,7 @@ public class ChunkRegionLoader {
|
||||
@@ -227,7 +264,7 @@ public class ChunkRegionLoader {
|
||||
}
|
||||
|
||||
if (chunkstatus_type == ChunkStatus.Type.LEVELCHUNK) {
|
||||
|
@ -3479,7 +3479,7 @@ index 2853f9e06064a5c0fe2b0e5df75223d1275eae20..42dc430d948dbab38ad1a1788aaff840
|
|||
} else {
|
||||
ProtoChunk protochunk1 = (ProtoChunk) object;
|
||||
|
||||
@@ -265,11 +302,83 @@ public class ChunkRegionLoader {
|
||||
@@ -266,11 +303,83 @@ public class ChunkRegionLoader {
|
||||
protochunk1.a(worldgenstage_features, BitSet.valueOf(nbttagcompound5.getByteArray(s1)));
|
||||
}
|
||||
|
||||
|
@ -3564,7 +3564,7 @@ index 2853f9e06064a5c0fe2b0e5df75223d1275eae20..42dc430d948dbab38ad1a1788aaff840
|
|||
ChunkCoordIntPair chunkcoordintpair = ichunkaccess.getPos();
|
||||
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
|
||||
@@ -278,7 +387,7 @@ public class ChunkRegionLoader {
|
||||
@@ -279,7 +388,7 @@ public class ChunkRegionLoader {
|
||||
nbttagcompound.set("Level", nbttagcompound1);
|
||||
nbttagcompound1.setInt("xPos", chunkcoordintpair.x);
|
||||
nbttagcompound1.setInt("zPos", chunkcoordintpair.z);
|
||||
|
@ -3573,7 +3573,7 @@ index 2853f9e06064a5c0fe2b0e5df75223d1275eae20..42dc430d948dbab38ad1a1788aaff840
|
|||
nbttagcompound1.setLong("InhabitedTime", ichunkaccess.getInhabitedTime());
|
||||
nbttagcompound1.setString("Status", ichunkaccess.getChunkStatus().d());
|
||||
ChunkConverter chunkconverter = ichunkaccess.p();
|
||||
@@ -294,14 +403,22 @@ public class ChunkRegionLoader {
|
||||
@@ -295,14 +404,22 @@ public class ChunkRegionLoader {
|
||||
|
||||
NBTTagCompound nbttagcompound2;
|
||||
|
||||
|
@ -3600,7 +3600,7 @@ index 2853f9e06064a5c0fe2b0e5df75223d1275eae20..42dc430d948dbab38ad1a1788aaff840
|
|||
if (chunksection != Chunk.a || nibblearray != null || nibblearray1 != null) {
|
||||
nbttagcompound2 = new NBTTagCompound();
|
||||
nbttagcompound2.setByte("Y", (byte) (i & 255));
|
||||
@@ -368,7 +485,7 @@ public class ChunkRegionLoader {
|
||||
@@ -369,7 +486,7 @@ public class ChunkRegionLoader {
|
||||
Entity entity = (Entity) iterator1.next();
|
||||
NBTTagCompound nbttagcompound4 = new NBTTagCompound();
|
||||
// Paper start
|
||||
|
@ -3609,7 +3609,7 @@ index 2853f9e06064a5c0fe2b0e5df75223d1275eae20..42dc430d948dbab38ad1a1788aaff840
|
|||
toUpdate.add(entity);
|
||||
continue;
|
||||
}
|
||||
@@ -411,24 +528,32 @@ public class ChunkRegionLoader {
|
||||
@@ -412,24 +529,32 @@ public class ChunkRegionLoader {
|
||||
}
|
||||
|
||||
nbttagcompound1.set("Entities", nbttaglist2);
|
||||
|
@ -4052,7 +4052,7 @@ index 8ad97a8a2189553da88810380b1c240079eacc93..d3b9a9e4695655860c72db5f21884726
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index a0654c41ce981a12dc20e1ecaf13f1f2d150029f..ff6aff979ffaa740a5141ef6dc929fb3368bc194 100644
|
||||
index bf1ebb108149f519ae29a2277020398c898d2bc3..7169cb3eb857a0725822bb7561693453f1600cdc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -563,22 +563,23 @@ public class CraftWorld implements World {
|
||||
|
@ -4123,22 +4123,40 @@ index a0654c41ce981a12dc20e1ecaf13f1f2d150029f..ff6aff979ffaa740a5141ef6dc929fb3
|
|||
// Spigot start
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 93bbf63e9d38f32d5528c7693633d4b65655bb9d..27b90388cc21ffdccaabc8072ead1bd29f3e88c6 100644
|
||||
index 93bbf63e9d38f32d5528c7693633d4b65655bb9d..266b2cbd6bfaf10743929a1eeb9732a5d1fb4c62 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -508,6 +508,28 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -12,6 +12,9 @@ import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.chat.IChatBaseComponent;
|
||||
import net.minecraft.server.level.EntityPlayer;
|
||||
+import net.minecraft.server.level.PlayerChunk;
|
||||
+import net.minecraft.server.level.PlayerChunkMap;
|
||||
+import net.minecraft.server.level.TicketType;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityAreaEffectCloud;
|
||||
@@ -144,6 +147,7 @@ import net.minecraft.world.entity.vehicle.EntityMinecartHopper;
|
||||
import net.minecraft.world.entity.vehicle.EntityMinecartMobSpawner;
|
||||
import net.minecraft.world.entity.vehicle.EntityMinecartRideable;
|
||||
import net.minecraft.world.entity.vehicle.EntityMinecartTNT;
|
||||
+import net.minecraft.world.level.ChunkCoordIntPair;
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
import org.bukkit.Chunk; // Paper
|
||||
import org.bukkit.EntityEffect;
|
||||
@@ -508,6 +512,28 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
entity.setHeadRotation(yaw);
|
||||
}
|
||||
|
||||
+ @Override// Paper start
|
||||
+ public java.util.concurrent.CompletableFuture<Boolean> teleportAsync(Location loc, @javax.annotation.Nonnull org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause) {
|
||||
+ net.minecraft.server.PlayerChunkMap playerChunkMap = ((CraftWorld) loc.getWorld()).getHandle().getChunkProvider().playerChunkMap;
|
||||
+ PlayerChunkMap playerChunkMap = ((CraftWorld) loc.getWorld()).getHandle().getChunkProvider().playerChunkMap;
|
||||
+ java.util.concurrent.CompletableFuture<Boolean> future = new java.util.concurrent.CompletableFuture<>();
|
||||
+
|
||||
+ loc.getWorld().getChunkAtAsyncUrgently(loc).thenCompose(chunk -> {
|
||||
+ net.minecraft.server.ChunkCoordIntPair pair = new net.minecraft.server.ChunkCoordIntPair(chunk.getX(), chunk.getZ());
|
||||
+ ((CraftWorld) loc.getWorld()).getHandle().getChunkProvider().addTicketAtLevel(net.minecraft.server.TicketType.POST_TELEPORT, pair, 31, 0);
|
||||
+ net.minecraft.server.PlayerChunk updatingChunk = playerChunkMap.getUpdatingChunk(pair.pair());
|
||||
+ ChunkCoordIntPair pair = new ChunkCoordIntPair(chunk.getX(), chunk.getZ());
|
||||
+ ((CraftWorld) loc.getWorld()).getHandle().getChunkProvider().addTicketAtLevel(TicketType.POST_TELEPORT, pair, 31, 0);
|
||||
+ PlayerChunk updatingChunk = playerChunkMap.getUpdatingChunk(pair.pair());
|
||||
+ if (updatingChunk != null) {
|
||||
+ return updatingChunk.getEntityTickingFuture();
|
||||
+ } else {
|
||||
|
|
|
@ -7,10 +7,10 @@ If the Bukkit generator already has a spawn, use it immediately instead
|
|||
of spending time generating one that we won't use
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index eafee14262ac8abb482bdd0fa52a8a33bf4a0f87..ede36b4c4d806bee62fd46d2e1ba595c9cd515ce 100644
|
||||
index d2b81e14f8f58f5746a5577e23357d26f22e74fe..705dad5092cb5f7355eeac9af395093d0a7a2212 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -618,12 +618,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -619,12 +619,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
} else if (flag1) {
|
||||
iworlddataserver.setSpawn(BlockPosition.ZERO.up(), 0.0F);
|
||||
} else {
|
||||
|
@ -24,7 +24,7 @@ index eafee14262ac8abb482bdd0fa52a8a33bf4a0f87..ede36b4c4d806bee62fd46d2e1ba595c
|
|||
// CraftBukkit start
|
||||
if (worldserver.generator != null) {
|
||||
Random rand = new Random(worldserver.getSeed());
|
||||
@@ -639,6 +634,15 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -640,6 +635,15 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
|
|
@ -544,7 +544,7 @@ index 0000000000000000000000000000000000000000..4f13d3ff8391793a99f067189f854078
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
index 2530c5ddfc8469329b411ad5c98ed718a3771890..4998fad49755c08e20ebfb1dc97b558e1cf10b50 100644
|
||||
index 662d7f418e8acc9503ebf43e09410e7bd50f6bb3..372e5268783a84effa8f9f06c3f85b182e209cb8 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
@@ -767,7 +767,22 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
@ -671,10 +671,18 @@ index 1355c074353611669c947cb0f06c67be0ab418aa..9d2955f05aadd4bbc6dcfec068a55d7f
|
|||
return this.bg;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/SpawnerCreature.java b/src/main/java/net/minecraft/world/level/SpawnerCreature.java
|
||||
index 166609e03474946882791dbebafe7121a3727854..66350a00f728901a7eef1c376c79a4cde2e9ed4b 100644
|
||||
index d30a3de84dc75a57680052904337af02b6b80636..24771c3522ea74ac12058591137eafc21adf3762 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/SpawnerCreature.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/SpawnerCreature.java
|
||||
@@ -61,6 +61,11 @@ public final class SpawnerCreature {
|
||||
@@ -16,6 +16,7 @@ import net.minecraft.core.IPosition;
|
||||
import net.minecraft.core.IRegistry;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.server.MCUtil;
|
||||
+import net.minecraft.server.level.EntityPlayer;
|
||||
import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.tags.Tag;
|
||||
import net.minecraft.tags.TagsBlock;
|
||||
@@ -62,6 +63,11 @@ public final class SpawnerCreature {
|
||||
});
|
||||
|
||||
public static SpawnerCreature.d a(int i, Iterable<Entity> iterable, SpawnerCreature.b spawnercreature_b) {
|
||||
|
@ -686,7 +694,7 @@ index 166609e03474946882791dbebafe7121a3727854..66350a00f728901a7eef1c376c79a4cd
|
|||
SpawnerCreatureProbabilities spawnercreatureprobabilities = new SpawnerCreatureProbabilities();
|
||||
Object2IntOpenHashMap<EnumCreatureType> object2intopenhashmap = new Object2IntOpenHashMap();
|
||||
Iterator iterator = iterable.iterator();
|
||||
@@ -98,6 +103,11 @@ public final class SpawnerCreature {
|
||||
@@ -99,6 +105,11 @@ public final class SpawnerCreature {
|
||||
}
|
||||
|
||||
object2intopenhashmap.addTo(enumcreaturetype, 1);
|
||||
|
@ -698,7 +706,7 @@ index 166609e03474946882791dbebafe7121a3727854..66350a00f728901a7eef1c376c79a4cd
|
|||
});
|
||||
}
|
||||
}
|
||||
@@ -156,13 +166,31 @@ public final class SpawnerCreature {
|
||||
@@ -157,13 +168,31 @@ public final class SpawnerCreature {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -733,7 +741,7 @@ index 166609e03474946882791dbebafe7121a3727854..66350a00f728901a7eef1c376c79a4cd
|
|||
}
|
||||
}
|
||||
|
||||
@@ -171,22 +199,34 @@ public final class SpawnerCreature {
|
||||
@@ -172,22 +201,34 @@ public final class SpawnerCreature {
|
||||
}
|
||||
|
||||
public static void a(EnumCreatureType enumcreaturetype, WorldServer worldserver, Chunk chunk, SpawnerCreature.c spawnercreature_c, SpawnerCreature.a spawnercreature_a) {
|
||||
|
@ -770,7 +778,7 @@ index 166609e03474946882791dbebafe7121a3727854..66350a00f728901a7eef1c376c79a4cd
|
|||
int k = 0;
|
||||
|
||||
while (k < 3) {
|
||||
@@ -226,7 +266,7 @@ public final class SpawnerCreature {
|
||||
@@ -227,7 +268,7 @@ public final class SpawnerCreature {
|
||||
// Paper start
|
||||
Boolean doSpawning = a(worldserver, enumcreaturetype, structuremanager, chunkgenerator, biomesettingsmobs_c, blockposition_mutableblockposition, d2);
|
||||
if (doSpawning == null) {
|
||||
|
@ -779,7 +787,7 @@ index 166609e03474946882791dbebafe7121a3727854..66350a00f728901a7eef1c376c79a4cd
|
|||
}
|
||||
if (doSpawning && spawnercreature_c.test(biomesettingsmobs_c.c, blockposition_mutableblockposition, ichunkaccess)) {
|
||||
// Paper end
|
||||
@@ -234,7 +274,7 @@ public final class SpawnerCreature {
|
||||
@@ -235,7 +276,7 @@ public final class SpawnerCreature {
|
||||
|
||||
|
||||
if (entityinsentient == null) {
|
||||
|
@ -788,7 +796,7 @@ index 166609e03474946882791dbebafe7121a3727854..66350a00f728901a7eef1c376c79a4cd
|
|||
}
|
||||
|
||||
entityinsentient.setPositionRotation(d0, (double) i, d1, worldserver.random.nextFloat() * 360.0F, 0.0F);
|
||||
@@ -243,13 +283,18 @@ public final class SpawnerCreature {
|
||||
@@ -244,13 +285,18 @@ public final class SpawnerCreature {
|
||||
// CraftBukkit start
|
||||
worldserver.addAllEntities(entityinsentient, SpawnReason.NATURAL);
|
||||
if (!entityinsentient.dead) {
|
||||
|
@ -810,7 +818,7 @@ index 166609e03474946882791dbebafe7121a3727854..66350a00f728901a7eef1c376c79a4cd
|
|||
}
|
||||
|
||||
if (entityinsentient.c(k1)) {
|
||||
@@ -271,6 +316,7 @@ public final class SpawnerCreature {
|
||||
@@ -272,6 +318,7 @@ public final class SpawnerCreature {
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -818,7 +826,7 @@ index 166609e03474946882791dbebafe7121a3727854..66350a00f728901a7eef1c376c79a4cd
|
|||
}
|
||||
|
||||
private static boolean a(WorldServer worldserver, IChunkAccess ichunkaccess, BlockPosition.MutableBlockPosition blockposition_mutableblockposition, double d0) {
|
||||
@@ -511,8 +557,8 @@ public final class SpawnerCreature {
|
||||
@@ -512,8 +559,8 @@ public final class SpawnerCreature {
|
||||
|
||||
public static class d {
|
||||
|
||||
|
@ -829,7 +837,7 @@ index 166609e03474946882791dbebafe7121a3727854..66350a00f728901a7eef1c376c79a4cd
|
|||
private final SpawnerCreatureProbabilities c;
|
||||
private final Object2IntMap<EnumCreatureType> d;
|
||||
@Nullable
|
||||
@@ -573,7 +619,7 @@ public final class SpawnerCreature {
|
||||
@@ -574,7 +621,7 @@ public final class SpawnerCreature {
|
||||
|
||||
// CraftBukkit start
|
||||
private boolean a(EnumCreatureType enumcreaturetype, int limit) {
|
||||
|
|
|
@ -113,10 +113,24 @@ index 5349282b9a5b43c4c3539e1677971463e2ca5a17..9896d77381e7fadf1ef2619210713e19
|
|||
return InteractionResultWrapper.a(itemstack, world.s_());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemExpBottle.java b/src/main/java/net/minecraft/world/item/ItemExpBottle.java
|
||||
index 3f41fe5bf1a0cc283d6a72824779026fdad75708..6a12b87847f9d5a37299c81f8082cf9eceb4e5c4 100644
|
||||
index 3f41fe5bf1a0cc283d6a72824779026fdad75708..cf36ec4769dc316e3ed16262043cb78cbba340ab 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemExpBottle.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemExpBottle.java
|
||||
@@ -24,19 +24,38 @@ public class ItemExpBottle extends Item {
|
||||
@@ -1,10 +1,13 @@
|
||||
package net.minecraft.world.item;
|
||||
|
||||
+import net.minecraft.server.level.EntityPlayer;
|
||||
import net.minecraft.sounds.SoundCategory;
|
||||
import net.minecraft.sounds.SoundEffects;
|
||||
import net.minecraft.stats.StatisticList;
|
||||
import net.minecraft.world.EnumHand;
|
||||
+import net.minecraft.world.EnumInteractionResult;
|
||||
import net.minecraft.world.InteractionResultWrapper;
|
||||
+import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.player.EntityHuman;
|
||||
import net.minecraft.world.entity.projectile.EntityThrownExpBottle;
|
||||
import net.minecraft.world.level.World;
|
||||
@@ -24,19 +27,38 @@ public class ItemExpBottle extends Item {
|
||||
public InteractionResultWrapper<ItemStack> a(World world, EntityHuman entityhuman, EnumHand enumhand) {
|
||||
ItemStack itemstack = entityhuman.b(enumhand);
|
||||
|
||||
|
@ -158,10 +172,18 @@ index 3f41fe5bf1a0cc283d6a72824779026fdad75708..6a12b87847f9d5a37299c81f8082cf9e
|
|||
return InteractionResultWrapper.a(itemstack, world.s_());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemFireworks.java b/src/main/java/net/minecraft/world/item/ItemFireworks.java
|
||||
index 79e9be800385b94c4493bd8970620d76bfbd65ae..3cb52eb8c76c5d9aeed90798156cb2710773185a 100644
|
||||
index 79e9be800385b94c4493bd8970620d76bfbd65ae..e7f958d137257da912ce9b83db017b4423959943 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemFireworks.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemFireworks.java
|
||||
@@ -29,8 +29,12 @@ public class ItemFireworks extends Item {
|
||||
@@ -3,6 +3,7 @@ package net.minecraft.world.item;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import net.minecraft.core.EnumDirection;
|
||||
+import net.minecraft.server.level.EntityPlayer;
|
||||
import net.minecraft.world.EnumHand;
|
||||
import net.minecraft.world.EnumInteractionResult;
|
||||
import net.minecraft.world.InteractionResultWrapper;
|
||||
@@ -29,8 +30,12 @@ public class ItemFireworks extends Item {
|
||||
EntityFireworks entityfireworks = new EntityFireworks(world, itemactioncontext.getEntity(), vec3d.x + (double) enumdirection.getAdjacentX() * 0.15D, vec3d.y + (double) enumdirection.getAdjacentY() * 0.15D, vec3d.z + (double) enumdirection.getAdjacentZ() * 0.15D, itemstack);
|
||||
entityfireworks.spawningEntity = itemactioncontext.getEntity().getUniqueID(); // Paper
|
||||
|
||||
|
@ -177,10 +199,18 @@ index 79e9be800385b94c4493bd8970620d76bfbd65ae..3cb52eb8c76c5d9aeed90798156cb271
|
|||
|
||||
return EnumInteractionResult.a(world.isClientSide);
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemLingeringPotion.java b/src/main/java/net/minecraft/world/item/ItemLingeringPotion.java
|
||||
index a75f374f0639e8143772aa863666afe25d2020cf..5ac094d7cb7bd5f376b6aabbc09b2f024f8bfb18 100644
|
||||
index a75f374f0639e8143772aa863666afe25d2020cf..0e073a8c23d24afb8b0198a9cfd8dc7d0b9d0a6b 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemLingeringPotion.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemLingeringPotion.java
|
||||
@@ -15,7 +15,12 @@ public class ItemLingeringPotion extends ItemPotionThrowable {
|
||||
@@ -3,6 +3,7 @@ package net.minecraft.world.item;
|
||||
import net.minecraft.sounds.SoundCategory;
|
||||
import net.minecraft.sounds.SoundEffects;
|
||||
import net.minecraft.world.EnumHand;
|
||||
+import net.minecraft.world.EnumInteractionResult;
|
||||
import net.minecraft.world.InteractionResultWrapper;
|
||||
import net.minecraft.world.entity.player.EntityHuman;
|
||||
import net.minecraft.world.level.World;
|
||||
@@ -15,7 +16,12 @@ public class ItemLingeringPotion extends ItemPotionThrowable {
|
||||
|
||||
@Override
|
||||
public InteractionResultWrapper<ItemStack> a(World world, EntityHuman entityhuman, EnumHand enumhand) {
|
||||
|
@ -196,10 +226,20 @@ index a75f374f0639e8143772aa863666afe25d2020cf..5ac094d7cb7bd5f376b6aabbc09b2f02
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemPotionThrowable.java b/src/main/java/net/minecraft/world/item/ItemPotionThrowable.java
|
||||
index d050243946ad7023d5dd3958d7056cddcaf185a4..2b795ee9cfb98addc7fabe3363284bf6a493237e 100644
|
||||
index d050243946ad7023d5dd3958d7056cddcaf185a4..27c61fc4e61b0d76565ca6893514b3c73247c954 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemPotionThrowable.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemPotionThrowable.java
|
||||
@@ -22,13 +22,31 @@ public class ItemPotionThrowable extends ItemPotion {
|
||||
@@ -1,7 +1,9 @@
|
||||
package net.minecraft.world.item;
|
||||
|
||||
+import net.minecraft.server.level.EntityPlayer;
|
||||
import net.minecraft.stats.StatisticList;
|
||||
import net.minecraft.world.EnumHand;
|
||||
+import net.minecraft.world.EnumInteractionResult;
|
||||
import net.minecraft.world.InteractionResultWrapper;
|
||||
import net.minecraft.world.entity.player.EntityHuman;
|
||||
import net.minecraft.world.entity.projectile.EntityPotion;
|
||||
@@ -22,13 +24,31 @@ public class ItemPotionThrowable extends ItemPotion {
|
||||
|
||||
entitypotion.setItem(itemstack);
|
||||
entitypotion.a(entityhuman, entityhuman.pitch, entityhuman.yaw, -20.0F, 0.5F, 1.0F);
|
||||
|
@ -262,10 +302,18 @@ index e5200b2a7d6d5c2d549e585ed157ec5217edae8e..8a1d59cb1ea5a8959c52272aa762ec35
|
|||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemSplashPotion.java b/src/main/java/net/minecraft/world/item/ItemSplashPotion.java
|
||||
index 98f29fac4bf087ad15f1cc7e85b408e22ec07efd..052e7056271bc21fceaf4fa78e9e833ac5c0cad9 100644
|
||||
index 98f29fac4bf087ad15f1cc7e85b408e22ec07efd..971491a461ccb7a707c6ca1a5b7c16d8823a7a80 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemSplashPotion.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemSplashPotion.java
|
||||
@@ -15,7 +15,12 @@ public class ItemSplashPotion extends ItemPotionThrowable {
|
||||
@@ -3,6 +3,7 @@ package net.minecraft.world.item;
|
||||
import net.minecraft.sounds.SoundCategory;
|
||||
import net.minecraft.sounds.SoundEffects;
|
||||
import net.minecraft.world.EnumHand;
|
||||
+import net.minecraft.world.EnumInteractionResult;
|
||||
import net.minecraft.world.InteractionResultWrapper;
|
||||
import net.minecraft.world.entity.player.EntityHuman;
|
||||
import net.minecraft.world.level.World;
|
||||
@@ -15,7 +16,12 @@ public class ItemSplashPotion extends ItemPotionThrowable {
|
||||
|
||||
@Override
|
||||
public InteractionResultWrapper<ItemStack> a(World world, EntityHuman entityhuman, EnumHand enumhand) {
|
||||
|
|
|
@ -31,10 +31,19 @@ index 4f0a2cbdd6d42e3e4721345e21bf0ef33ec48e1e..44f21c3f7af17e9d39777a48c6715a22
|
|||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/targeting/PathfinderTargetCondition.java b/src/main/java/net/minecraft/world/entity/ai/targeting/PathfinderTargetCondition.java
|
||||
index 0de32bcf24a94efe5af922b877d4cdc3578e0cbd..3853eaee9c2447f0e5e414a6f01ef6d207acd479 100644
|
||||
index 0de32bcf24a94efe5af922b877d4cdc3578e0cbd..e6988f7ea428f1503e3db63876b13e57f898ee30 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/targeting/PathfinderTargetCondition.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/targeting/PathfinderTargetCondition.java
|
||||
@@ -82,7 +82,7 @@ public class PathfinderTargetCondition {
|
||||
@@ -4,6 +4,8 @@ import java.util.function.Predicate;
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraft.world.entity.EntityInsentient;
|
||||
import net.minecraft.world.entity.EntityLiving;
|
||||
+import net.minecraft.world.entity.ai.attributes.AttributeModifiable;
|
||||
+import net.minecraft.world.entity.ai.attributes.GenericAttributes;
|
||||
|
||||
public class PathfinderTargetCondition {
|
||||
|
||||
@@ -82,7 +84,7 @@ public class PathfinderTargetCondition {
|
||||
|
||||
if (this.b > 0.0D) {
|
||||
double d0 = this.g ? entityliving1.A(entityliving) : 1.0D;
|
||||
|
@ -43,7 +52,7 @@ index 0de32bcf24a94efe5af922b877d4cdc3578e0cbd..3853eaee9c2447f0e5e414a6f01ef6d2
|
|||
double d2 = entityliving.h(entityliving1.locX(), entityliving1.locY(), entityliving1.locZ());
|
||||
|
||||
if (d2 > d1 * d1) {
|
||||
@@ -98,4 +98,18 @@ public class PathfinderTargetCondition {
|
||||
@@ -98,4 +100,18 @@ public class PathfinderTargetCondition {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,10 +31,18 @@ index edda2121f8c1046478beaa77030ebb36d403b334..7fbd501d70dccf869a4454e2789a5d68
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index ede36b4c4d806bee62fd46d2e1ba595c9cd515ce..ef6559190c336822149560d2f2748b2c90dfad86 100644
|
||||
index 705dad5092cb5f7355eeac9af395093d0a7a2212..bf6fbb8e80eb64bdfdf29347b794f01ace31cec0 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1350,6 +1350,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -128,6 +128,7 @@ import net.minecraft.world.level.WorldSettings;
|
||||
import net.minecraft.world.level.biome.BiomeManager;
|
||||
import net.minecraft.world.level.biome.WorldChunkManager;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
+import net.minecraft.world.level.block.entity.TileEntityHopper;
|
||||
import net.minecraft.world.level.border.IWorldBorderListener;
|
||||
import net.minecraft.world.level.border.WorldBorder;
|
||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||
@@ -1351,6 +1352,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
while (iterator.hasNext()) {
|
||||
WorldServer worldserver = (WorldServer) iterator.next();
|
||||
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
|
||||
|
@ -43,7 +51,7 @@ index ede36b4c4d806bee62fd46d2e1ba595c9cd515ce..ef6559190c336822149560d2f2748b2c
|
|||
this.methodProfiler.a(() -> {
|
||||
return worldserver + " " + worldserver.getDimensionKey().a();
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 5da20483ed352ac6d9695287f840ed643a2bf302..8a2ff2ef17aba806a63be3aaebfa779dac96831d 100644
|
||||
index 30db766c54db08a472caef82fdcc7cf1b7855fbf..661f400ae4f5cebef5d1743819529ecf647b6681 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -540,11 +540,12 @@ public final class ItemStack {
|
||||
|
@ -108,7 +116,7 @@ index d0943ae1f372784716195666212ff83e6ee4873e..1db7b7bfe98658d0b20800a4178556f8
|
|||
+ double A(); default double getZ() { return this.A(); } // Paper - OBFHELPER
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntity.java
|
||||
index 3ff9e389fcf15044c2740fb884c9438428d7a681..9088fd324207f2abc9ba04cf510b519f4fbb8cc9 100644
|
||||
index 48daa039ffa8ccb7b6f3ca47bdc56394addf9254..f1e586754396439dfb70a4d63e3b8b34fb36ebf4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntity.java
|
||||
@@ -77,6 +77,7 @@ public abstract class TileEntity implements net.minecraft.server.KeyedObject { /
|
||||
|
@ -128,7 +136,7 @@ index 3ff9e389fcf15044c2740fb884c9438428d7a681..9088fd324207f2abc9ba04cf510b519f
|
|||
this.world.b(this.position, this);
|
||||
if (!this.c.isAir()) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java
|
||||
index 5fe715e8dbe9d925170acce6e0f18312d9f998f2..66cbb46088c6938ebe1d3771b3312112dd1a7160 100644
|
||||
index 5fe715e8dbe9d925170acce6e0f18312d9f998f2..537dc52e5ff3325555ee6049bc7f277952983b76 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java
|
||||
@@ -196,6 +196,160 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
|
||||
|
@ -138,7 +146,7 @@ index 5fe715e8dbe9d925170acce6e0f18312d9f998f2..66cbb46088c6938ebe1d3771b3312112
|
|||
+ // Paper start - Optimize Hoppers
|
||||
+ private static boolean skipPullModeEventFire = false;
|
||||
+ private static boolean skipPushModeEventFire = false;
|
||||
+ static boolean skipHopperEvents = false;
|
||||
+ public static boolean skipHopperEvents = false;
|
||||
+
|
||||
+ private boolean hopperPush(IInventory iinventory, EnumDirection enumdirection) {
|
||||
+ skipPushModeEventFire = skipHopperEvents;
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Guard against serializing mismatching chunk coordinate
|
|||
Should help if something dumb happens
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
|
||||
index 42dc430d948dbab38ad1a1788aaff840f28bc8e8..358b3c396e8201fa5f82778179e8a300b4aed908 100644
|
||||
index c95fcdf47db8bfe59a83c0d28f4744b4d8540ef8..e16e046d165330326ed220c9c440a637007f3137 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java
|
||||
@@ -66,6 +66,13 @@ public class ChunkRegionLoader {
|
||||
@@ -67,6 +67,13 @@ public class ChunkRegionLoader {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
|
||||
|
@ -23,7 +23,7 @@ index 42dc430d948dbab38ad1a1788aaff840f28bc8e8..358b3c396e8201fa5f82778179e8a300
|
|||
// Paper start
|
||||
public static final class InProgressChunkHolder {
|
||||
|
||||
@@ -91,8 +98,8 @@ public class ChunkRegionLoader {
|
||||
@@ -92,8 +99,8 @@ public class ChunkRegionLoader {
|
||||
// Paper end
|
||||
ChunkGenerator chunkgenerator = worldserver.getChunkProvider().getChunkGenerator();
|
||||
WorldChunkManager worldchunkmanager = chunkgenerator.getWorldChunkManager();
|
||||
|
@ -35,10 +35,18 @@ index 42dc430d948dbab38ad1a1788aaff840f28bc8e8..358b3c396e8201fa5f82778179e8a300
|
|||
if (!Objects.equals(chunkcoordintpair, chunkcoordintpair1)) {
|
||||
ChunkRegionLoader.LOGGER.error("Chunk file at {} is in the wrong location; relocating. (Expected {}, got {})", chunkcoordintpair, chunkcoordintpair, chunkcoordintpair1);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/IChunkLoader.java b/src/main/java/net/minecraft/world/level/chunk/storage/IChunkLoader.java
|
||||
index 65c2bbeb4d77b9accbfa0e26504fdec3f581fa6a..2de8ac694296f78a0e1dea716f52f50b0de6487e 100644
|
||||
index 01ae13385dd0208c9f34da8b3897b571f86305d0..890362d28ab9cb760c73fe5014e144fb08ada6b8 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/IChunkLoader.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/IChunkLoader.java
|
||||
@@ -123,6 +123,13 @@ public class IChunkLoader implements AutoCloseable {
|
||||
@@ -13,6 +13,7 @@ import net.minecraft.SharedConstants;
|
||||
import net.minecraft.nbt.GameProfileSerializer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
+import net.minecraft.server.level.PlayerChunkMap;
|
||||
import net.minecraft.util.datafix.DataFixTypes;
|
||||
import net.minecraft.world.level.ChunkCoordIntPair;
|
||||
import net.minecraft.world.level.World;
|
||||
@@ -123,6 +124,13 @@ public class IChunkLoader implements AutoCloseable {
|
||||
|
||||
public void a(ChunkCoordIntPair chunkcoordintpair, NBTTagCompound nbttagcompound) throws IOException { write(chunkcoordintpair, nbttagcompound); } // Paper OBFHELPER
|
||||
public void write(ChunkCoordIntPair chunkcoordintpair, NBTTagCompound nbttagcompound) throws IOException { // Paper - OBFHELPER - (Switched around for safety)
|
||||
|
|
|
@ -9,10 +9,10 @@ dispensed. The resulting item would have size == 0 and therefore
|
|||
be convertered to air, hence why the effects disappeared.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/dispenser/IDispenseBehavior.java b/src/main/java/net/minecraft/core/dispenser/IDispenseBehavior.java
|
||||
index d8a8a57c2228376347d46de8821ae0e8321861e3..879a7e9310855084fe011f30135e6bfa4de98a1e 100644
|
||||
index 158075319bd49ac78ea994639cdad21aeacdf86f..93093c05da53e5ddc59fac179081af2e0893706d 100644
|
||||
--- a/src/main/java/net/minecraft/core/dispenser/IDispenseBehavior.java
|
||||
+++ b/src/main/java/net/minecraft/core/dispenser/IDispenseBehavior.java
|
||||
@@ -425,7 +425,7 @@ public interface IDispenseBehavior {
|
||||
@@ -426,7 +426,7 @@ public interface IDispenseBehavior {
|
||||
}
|
||||
|
||||
itemstack1 = CraftItemStack.asNMSCopy(event.getItem());
|
||||
|
|
|
@ -105,7 +105,7 @@ index f11617dc37771f65d574cd14ae9cea09103d11e1..c4adf5d3c2389d3344e179562eee6817
|
|||
}
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 63268bc3e04ef334a750f83a8e39acc0919f7906..664ccd8fc43cbf1c9417670d14c937314379ccf9 100644
|
||||
index 5acf61ece9ca38a262387fd0395bd464312501fd..bc136276cad4e87d8658072b2f62f608670f39ca 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -68,6 +68,7 @@ import net.minecraft.world.entity.animal.EntityFish;
|
||||
|
@ -351,10 +351,10 @@ index 8b09aaa30dd753fd34bea155890bdd9e5cb180f5..2005cb484ba6b5929ad81d3d120521f2
|
|||
return this.bB != null;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
|
||||
index d1afbfc4458c76a35b9be124f1e09c3b82501798..02dbb98a1b211d6b3184405ec81f6f58fcef79f3 100644
|
||||
index 534efe39beee393d11705b8f0b13ce4ca727c3eb..07f87ee8f5df9d7a40001dd28f50457344308a03 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
|
||||
@@ -212,17 +212,29 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
@@ -213,17 +213,29 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
@Override
|
||||
public void inactiveTick() {
|
||||
// SPIGOT-3874, SPIGOT-3894, SPIGOT-3846, SPIGOT-5286 :(
|
||||
|
@ -388,7 +388,7 @@ index d1afbfc4458c76a35b9be124f1e09c3b82501798..02dbb98a1b211d6b3184405ec81f6f58
|
|||
this.world.getMethodProfiler().exit();
|
||||
if (this.bF) {
|
||||
this.bF = false;
|
||||
@@ -246,7 +258,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
@@ -247,7 +259,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
this.bv = null;
|
||||
}
|
||||
|
||||
|
@ -397,7 +397,7 @@ index d1afbfc4458c76a35b9be124f1e09c3b82501798..02dbb98a1b211d6b3184405ec81f6f58
|
|||
Raid raid = ((WorldServer) this.world).b_(this.getChunkCoordinates());
|
||||
|
||||
if (raid != null && raid.v() && !raid.a()) {
|
||||
@@ -257,6 +269,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
@@ -258,6 +270,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
if (this.getVillagerData().getProfession() == VillagerProfession.NONE && this.eN()) {
|
||||
this.eT();
|
||||
}
|
||||
|
@ -405,7 +405,7 @@ index d1afbfc4458c76a35b9be124f1e09c3b82501798..02dbb98a1b211d6b3184405ec81f6f58
|
|||
|
||||
super.mobTick();
|
||||
}
|
||||
@@ -893,6 +906,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
@@ -894,6 +907,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -222,7 +222,7 @@ index c4adf5d3c2389d3344e179562eee6817cd4fb298..f666b281926876636672e76a7a5e6386
|
|||
|
||||
protected BlockPosition a(BlockPosition blockposition) {
|
||||
diff --git a/src/main/java/net/minecraft/util/DataBits.java b/src/main/java/net/minecraft/util/DataBits.java
|
||||
index c4f3b680512fb15cea01ad12d0a00c6e60bf34b7..679abdd669206e1984ef8e1b43312d2fe3121931 100644
|
||||
index c4f3b680512fb15cea01ad12d0a00c6e60bf34b7..cfa444cf384920d446c6dc14b23e5158fc28df3b 100644
|
||||
--- a/src/main/java/net/minecraft/util/DataBits.java
|
||||
+++ b/src/main/java/net/minecraft/util/DataBits.java
|
||||
@@ -112,4 +112,32 @@ public class DataBits {
|
||||
|
@ -251,7 +251,7 @@ index c4f3b680512fb15cea01ad12d0a00c6e60bf34b7..679abdd669206e1984ef8e1b43312d2f
|
|||
+ }
|
||||
+
|
||||
+ @FunctionalInterface
|
||||
+ static interface DataBitConsumer {
|
||||
+ public static interface DataBitConsumer {
|
||||
+
|
||||
+ void accept(int location, int data);
|
||||
+
|
||||
|
@ -259,10 +259,10 @@ index c4f3b680512fb15cea01ad12d0a00c6e60bf34b7..679abdd669206e1984ef8e1b43312d2f
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityTurtle.java b/src/main/java/net/minecraft/world/entity/animal/EntityTurtle.java
|
||||
index 38588e59f26dd1f3a43fc229195e4fb8484e3705..6fa8176530af23903f8e6ad33ab63f1bc9e2e302 100644
|
||||
index 09a6310af6712d36c20167256b60dc3235e76021..ecec8a3c4d4b5d491f79ad60d7ce5a118f30b3db 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/EntityTurtle.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/EntityTurtle.java
|
||||
@@ -90,7 +90,7 @@ public class EntityTurtle extends EntityAnimal {
|
||||
@@ -91,7 +91,7 @@ public class EntityTurtle extends EntityAnimal {
|
||||
}
|
||||
|
||||
public void setHomePos(BlockPosition blockposition) {
|
||||
|
@ -296,10 +296,10 @@ index c4680142bf23d30169555abe7db78d85811e042b..cc41dcd85760b57bb8076b37e9a907d1
|
|||
|
||||
public boolean isSavingDisabled() {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
index 46467230aac994e2b3864b7a1eddc701c4ade91c..09d157bd2795b7e4374778cbd1e554de70f397bd 100644
|
||||
index e7bb33125a25b9e5a68013b15d7b5b6b6769ab9b..fc55e89260fdec2c5045e8f00e091191980ff1f2 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
@@ -633,8 +633,8 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -640,8 +640,8 @@ public class Chunk implements IChunkAccess {
|
||||
this.entities.remove(entity); // Paper
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ index 7fbd501d70dccf869a4454e2789a5d68f2e15754..9e4591ddc4b755f4ff5a6f1078b51cb1
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index cc50c0025a98ed1192fdc2e507c63c747e796dc6..19322c00422ac53de9903b3492994ce6e3c3bef4 100644
|
||||
index d676eaad8179cdeae410038e58ddafe0fe541ccc..68fdb01c3f11c3b060d3d621099d67f6b29431d6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -278,6 +278,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
|
@ -49,10 +49,18 @@ index cc50c0025a98ed1192fdc2e507c63c747e796dc6..19322c00422ac53de9903b3492994ce6
|
|||
String spawnReasonName = nbttagcompound.getString("Paper.SpawnReason");
|
||||
try {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BlockPortal.java b/src/main/java/net/minecraft/world/level/block/BlockPortal.java
|
||||
index e115ff86987c69f5e3571af5d7f034f24a3f6bba..4cfa3108996eb879d39337a7b23307a6dbcb97a7 100644
|
||||
index e115ff86987c69f5e3571af5d7f034f24a3f6bba..5f797260eff317409a5039b88b01ad79ee2fdd91 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BlockPortal.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BlockPortal.java
|
||||
@@ -62,6 +62,8 @@ public class BlockPortal extends Block {
|
||||
@@ -7,6 +7,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.chat.IChatBaseComponent;
|
||||
import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
+import net.minecraft.world.entity.EntityInsentient;
|
||||
import net.minecraft.world.entity.EntityTypes;
|
||||
import net.minecraft.world.entity.EnumMobSpawn;
|
||||
import net.minecraft.world.entity.player.EntityHuman;
|
||||
@@ -62,6 +63,8 @@ public class BlockPortal extends Block {
|
||||
|
||||
if (entity != null) {
|
||||
entity.resetPortalCooldown();
|
||||
|
|
|
@ -396,10 +396,10 @@ index 46d82c1548088b8305f758699388edf0d5d4d050..397194b3e90c9df39cfae17b401c7ac8
|
|||
consumer.accept(t0);
|
||||
return t0;
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index ef6559190c336822149560d2f2748b2c90dfad86..928a801493003e3ab034f65ac501f5b7e1cb6c75 100644
|
||||
index bf6fbb8e80eb64bdfdf29347b794f01ace31cec0..039c76a07bae4eec407e06adf077d1887919e9d8 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -215,7 +215,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -217,7 +217,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
private String motd;
|
||||
private int F;
|
||||
private int G;
|
||||
|
|
|
@ -8,10 +8,10 @@ faster on its own, however removing the try catch makes it
|
|||
easier to inline due to code size
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
index 09d157bd2795b7e4374778cbd1e554de70f397bd..bd56cac7ce01942704d566c2cd8c1775fe643e25 100644
|
||||
index fc55e89260fdec2c5045e8f00e091191980ff1f2..bb2ff043f0d159fa18769c31b08683ee12037c58 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
@@ -424,17 +424,20 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -431,17 +431,20 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
|
||||
public Fluid a(int i, int j, int k) {
|
||||
|
@ -39,7 +39,7 @@ index 09d157bd2795b7e4374778cbd1e554de70f397bd..bd56cac7ce01942704d566c2cd8c1775
|
|||
CrashReport crashreport = CrashReport.a(throwable, "Getting fluid state");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Block being got");
|
||||
|
||||
@@ -443,6 +446,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -450,6 +453,7 @@ public class Chunk implements IChunkAccess {
|
||||
});
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
|
|
@ -901,7 +901,7 @@ index 8c0aeb51f5e230fd6109e750732eb54559bc9637..1fb931d4c0720a5e496030e25c865771
|
|||
return this.b(baseblockposition.getX(), baseblockposition.getY(), baseblockposition.getZ());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
index 2f172f38f817f48fe2e62235c3859b91e60bc0df..911b733d32400a6f963a20f10de3802e70dd8823 100644
|
||||
index 0c8864eeae6e3b449514f52d95c17f2e4a304f0e..a444f6214b90f7707be2265f4b2ab12632986c53 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
@@ -21,6 +21,7 @@ import net.minecraft.SystemUtils;
|
||||
|
@ -1072,10 +1072,18 @@ index 37b7dd82a227a88b720c13a813dd7e8caf803e03..8eb3084def3aa8776d32f8a3c942c95d
|
|||
public String toString() {
|
||||
return this.e + ": " + this.a + ", " + this.b + ", " + this.c + ", " + this.f;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/TickListChunk.java b/src/main/java/net/minecraft/world/level/TickListChunk.java
|
||||
index c3cb513d0d107ecb43e98960b25054626aa6a03f..d7f532388b65161f8dcced02aebba6b0615d57d1 100644
|
||||
index c3cb513d0d107ecb43e98960b25054626aa6a03f..fd293e11ec62a41a53c1e5238cb1219349d446d4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/TickListChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/TickListChunk.java
|
||||
@@ -61,6 +61,8 @@ public class TickListChunk<T> implements TickList<T> {
|
||||
@@ -9,6 +9,7 @@ import net.minecraft.core.BlockPosition;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.resources.MinecraftKey;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
|
||||
public class TickListChunk<T> implements TickList<T> {
|
||||
|
||||
@@ -61,6 +62,8 @@ public class TickListChunk<T> implements TickList<T> {
|
||||
return nbttaglist;
|
||||
}
|
||||
|
||||
|
@ -1084,7 +1092,7 @@ index c3cb513d0d107ecb43e98960b25054626aa6a03f..d7f532388b65161f8dcced02aebba6b0
|
|||
public static <T> TickListChunk<T> a(NBTTagList nbttaglist, Function<T, MinecraftKey> function, Function<MinecraftKey, T> function1) {
|
||||
List<TickListChunk.a<T>> list = Lists.newArrayList();
|
||||
|
||||
@@ -71,7 +73,14 @@ public class TickListChunk<T> implements TickList<T> {
|
||||
@@ -71,7 +74,14 @@ public class TickListChunk<T> implements TickList<T> {
|
||||
if (t0 != null) {
|
||||
BlockPosition blockposition = new BlockPosition(nbttagcompound.getInt("x"), nbttagcompound.getInt("y"), nbttagcompound.getInt("z"));
|
||||
|
||||
|
|
|
@ -60,10 +60,20 @@ index c1a694c4a773a41cdefca6b154711f7fc0a7fcaa..00d79ccf9c65acadc030ab1796cff459
|
|||
return this.a(t0, Counter.DEFAULT);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/MobSpawnerPatrol.java b/src/main/java/net/minecraft/world/level/levelgen/MobSpawnerPatrol.java
|
||||
index cba98adb7f2711fb97c7e4120d962f46a59682e7..d50377425088b98730684c82ae2c6e2fe5b2fd57 100644
|
||||
index cba98adb7f2711fb97c7e4120d962f46a59682e7..111c4c1fad2f1839a8c6b7c277cf801236ae1685 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/MobSpawnerPatrol.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/MobSpawnerPatrol.java
|
||||
@@ -20,13 +20,13 @@ import net.minecraft.world.level.block.state.IBlockData;
|
||||
@@ -3,7 +3,9 @@ package net.minecraft.world.level.levelgen;
|
||||
import java.util.Random;
|
||||
import net.minecraft.core.BlockPosition;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
+import net.minecraft.server.level.EntityPlayer;
|
||||
import net.minecraft.server.level.WorldServer;
|
||||
+import net.minecraft.stats.StatisticList;
|
||||
import net.minecraft.world.entity.EntityTypes;
|
||||
import net.minecraft.world.entity.EnumMobSpawn;
|
||||
import net.minecraft.world.entity.GroupDataEntity;
|
||||
@@ -20,13 +22,13 @@ import net.minecraft.world.level.block.state.IBlockData;
|
||||
|
||||
public class MobSpawnerPatrol implements MobSpawner {
|
||||
|
||||
|
@ -79,7 +89,7 @@ index cba98adb7f2711fb97c7e4120d962f46a59682e7..d50377425088b98730684c82ae2c6e2f
|
|||
if (!flag) {
|
||||
return 0;
|
||||
} else if (!worldserver.getGameRules().getBoolean(GameRules.DO_PATROL_SPAWNING)) {
|
||||
@@ -34,23 +34,51 @@ public class MobSpawnerPatrol implements MobSpawner {
|
||||
@@ -34,23 +36,51 @@ public class MobSpawnerPatrol implements MobSpawner {
|
||||
} else {
|
||||
Random random = worldserver.random;
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ movement will load only the chunk the player enters anyways and avoids loading
|
|||
massive amounts of surrounding chunks due to large AABB lookups.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 1f74fddfc6d9d9ae38fd35f83fa668e38591b222..f7a44104c09e4b2ebd5e1a3d7a08267c865c405d 100644
|
||||
index c5116a9c596074a33c98d29bb1e9cf22a8ad53bf..84c2bc0bac4f388094693859ab7b6ced5e315c27 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -61,6 +61,7 @@ import net.minecraft.server.ScoreboardServer;
|
||||
|
@ -42,7 +42,7 @@ index 1f74fddfc6d9d9ae38fd35f83fa668e38591b222..f7a44104c09e4b2ebd5e1a3d7a08267c
|
|||
entityplayer1.setPosition(entityplayer1.locX(), entityplayer1.locY() + 1.0D, entityplayer1.locZ());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 44886357da22f0e7f74b1739028ae0c7a81dd525..1824dac8f3015e4b86685374ad98b1650c319479 100644
|
||||
index f95aa9b4cc53c1e3258b7b32249ec1c3ef4ae2f1..7bce3722fb00194f5a913c0b9866b73cfc74611d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -169,6 +169,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
|
@ -68,10 +68,20 @@ index fcf6cc86e3b5d9afe3ab3b3fba2ec13846ed0b4c..fcb3e2f9dea97138e0fd4cd2eb11b547
|
|||
|
||||
Stream<VoxelShape> c(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Predicate<Entity> predicate);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/VoxelShapeSpliterator.java b/src/main/java/net/minecraft/world/level/VoxelShapeSpliterator.java
|
||||
index fa3421c9cd8531618827627e9c524a8df77c4c58..1fe6aba0884755be3382d38cebfdd1916bd9180e 100644
|
||||
index fa3421c9cd8531618827627e9c524a8df77c4c58..d0cc8677f2be422722160fee9b71894b5ddd3186 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/VoxelShapeSpliterator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/VoxelShapeSpliterator.java
|
||||
@@ -21,13 +21,13 @@ import net.minecraft.world.phys.shapes.VoxelShapes;
|
||||
@@ -7,6 +7,9 @@ import java.util.function.Consumer;
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraft.core.BlockPosition;
|
||||
import net.minecraft.core.CursorPosition;
|
||||
+import net.minecraft.server.MCUtil;
|
||||
+import net.minecraft.server.level.EntityPlayer;
|
||||
+import net.minecraft.server.level.RegionLimitedWorldAccess;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
@@ -21,13 +24,13 @@ import net.minecraft.world.phys.shapes.VoxelShapes;
|
||||
public class VoxelShapeSpliterator extends AbstractSpliterator<VoxelShape> {
|
||||
|
||||
@Nullable
|
||||
|
@ -88,7 +98,7 @@ index fa3421c9cd8531618827627e9c524a8df77c4c58..1fe6aba0884755be3382d38cebfdd191
|
|||
private boolean h;
|
||||
private final BiPredicate<IBlockData, BlockPosition> i;
|
||||
|
||||
@@ -64,23 +64,37 @@ public class VoxelShapeSpliterator extends AbstractSpliterator<VoxelShape> {
|
||||
@@ -64,23 +67,37 @@ public class VoxelShapeSpliterator extends AbstractSpliterator<VoxelShape> {
|
||||
boolean a(Consumer<? super VoxelShape> consumer) {
|
||||
while (true) {
|
||||
if (this.d.a()) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue