mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 06:30:46 +01:00
Restore Use-getChunkIfLoadedImmediately-in-places.patch
This commit is contained in:
parent
486c9d94f3
commit
3591f1ff6b
23 changed files with 149 additions and 74 deletions
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add CraftMagicNumbers.isSupportedApiVersion()
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 21bfdf9e7..ab5c6e92e 100644
|
||||
index 21bfdf9e71..ab5c6e92ea 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -0,0 +0,0 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add option to disable pillager patrols
|
|||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index c0af1aaf3..dbc645ebb 100644
|
||||
index c0af1aaf3b..dbc645ebbe 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
|
@ -19,7 +19,7 @@ index c0af1aaf3..dbc645ebb 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MobSpawnerPatrol.java b/src/main/java/net/minecraft/server/MobSpawnerPatrol.java
|
||||
index 59161143b..f155179ad 100644
|
||||
index 59161143b3..f155179ad4 100644
|
||||
--- a/src/main/java/net/minecraft/server/MobSpawnerPatrol.java
|
||||
+++ b/src/main/java/net/minecraft/server/MobSpawnerPatrol.java
|
||||
@@ -0,0 +0,0 @@ public class MobSpawnerPatrol {
|
||||
|
|
|
@ -14,7 +14,7 @@ to the object directly on the Entity/TileEntity object we can directly grab.
|
|||
Use that local value instead to reduce lookups in many hot places.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 985f30372..67159b8a8 100644
|
||||
index 0baa884bbf..373ea71e64 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
@ -52,7 +52,7 @@ index 985f30372..67159b8a8 100644
|
|||
|
||||
chunk.setTileEntity(tileentity1.getPosition(), tileentity1);
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 83fb8737a..c473c7d16 100644
|
||||
index 3739a95c5a..1e00908671 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -0,0 +0,0 @@ public class WorldServer extends World {
|
||||
|
|
|
@ -7,7 +7,7 @@ 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/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 59b2fc629..3283fb49e 100644
|
||||
index 9aaa28e6cd..219861a2d8 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -0,0 +0,0 @@ public class WorldServer extends World {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Expose the internal current tick
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 18b76ed0f..f3da3a82d 100644
|
||||
index 18b76ed0f7..f3da3a82d9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -7,7 +7,7 @@ Fixes an AssertionError when setting the player's item in hand to null or a new
|
|||
Fixes GH-2718
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index e3c562a63..80219f2df 100644
|
||||
index e3c562a63b..80219f2df1 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -19,7 +19,7 @@ index e3c562a63..80219f2df 100644
|
|||
if (enumhand == EnumHand.MAIN_HAND) {
|
||||
return this.getEquipment(EnumItemSlot.MAINHAND);
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 8c54022e0..c559a7b95 100644
|
||||
index f6fbba36f4..a1ce2d2e07 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
|
|
|
@ -7,7 +7,7 @@ The problem was we were checking isExpired() on the entry, but if it
|
|||
was expired at that point, then it would be null.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 68e089a4b..f702619aa 100644
|
||||
index 68e089a4b6..f702619aa2 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||
|
|
|
@ -9,7 +9,7 @@ We can use an entity valid check since this method is invoked for
|
|||
each inventory iteraction (thanks to CB) and on player tick (vanilla).
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ContainerHorse.java b/src/main/java/net/minecraft/server/ContainerHorse.java
|
||||
index c95ce0124..18e1ae7f0 100644
|
||||
index c95ce0124d..18e1ae7f0a 100644
|
||||
--- a/src/main/java/net/minecraft/server/ContainerHorse.java
|
||||
+++ b/src/main/java/net/minecraft/server/ContainerHorse.java
|
||||
@@ -0,0 +0,0 @@ public class ContainerHorse extends Container {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix nether portal creation
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java
|
||||
index 60330f753..c22dbbfbe 100644
|
||||
index 60330f753f..c22dbbfbe8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java
|
||||
@@ -0,0 +0,0 @@ public class BlockStateListPopulator extends DummyGeneratorAccess {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix spawn radius being treated as 0
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 30380c8db..d379bacac 100644
|
||||
index f130c5ddc4..ed6f1b1a3e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Fix spawning of hanging entities that are not ItemFrames and
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 739968a69..a97439102 100644
|
||||
index 739968a69b..a974391025 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix stuck in sneak when changing worlds (MC-10657)
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 1b0ef1442..30380c8db 100644
|
||||
index 7fbd390426..f130c5ddc4 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
@ -18,7 +18,7 @@ index 1b0ef1442..30380c8db 100644
|
|||
PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver.getWorld());
|
||||
this.world.getServer().getPluginManager().callEvent(changeEvent);
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index f702619aa..7b79ee4fe 100644
|
||||
index f702619aa2..7b79ee4fe5 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix zero-tick instant grow farms MC-113809
|
|||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 33e251c87..c0af1aaf3 100644
|
||||
index 33e251c87f..c0af1aaf3b 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
|
@ -21,7 +21,7 @@ index 33e251c87..c0af1aaf3 100644
|
|||
public Map<Material, Integer> altItemDespawnRateMap;
|
||||
private void altItemDespawnRate() {
|
||||
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
||||
index 46490a943..54a61283e 100644
|
||||
index 46490a9430..54a61283e6 100644
|
||||
--- a/src/main/java/net/minecraft/server/Block.java
|
||||
+++ b/src/main/java/net/minecraft/server/Block.java
|
||||
@@ -0,0 +0,0 @@ public class Block implements IMaterial {
|
||||
|
@ -33,7 +33,7 @@ index 46490a943..54a61283e 100644
|
|||
private final boolean i;
|
||||
private final boolean j;
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockBamboo.java b/src/main/java/net/minecraft/server/BlockBamboo.java
|
||||
index c482aad3e..02c548dd9 100644
|
||||
index c482aad3e3..02c548dd9c 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockBamboo.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockBamboo.java
|
||||
@@ -0,0 +0,0 @@ public class BlockBamboo extends Block implements IBlockFragilePlantElement {
|
||||
|
@ -45,7 +45,7 @@ index c482aad3e..02c548dd9 100644
|
|||
int i = this.b(worldserver, blockposition) + 1;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java
|
||||
index e0974e256..3524fcb92 100644
|
||||
index e0974e256f..3524fcb927 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockCactus.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockCactus.java
|
||||
@@ -0,0 +0,0 @@ public class BlockCactus extends Block {
|
||||
|
@ -57,7 +57,7 @@ index e0974e256..3524fcb92 100644
|
|||
|
||||
if (worldserver.isEmpty(blockposition1)) {
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockChorusFlower.java b/src/main/java/net/minecraft/server/BlockChorusFlower.java
|
||||
index d70b52cad..b624cf380 100644
|
||||
index d70b52cadf..b624cf3804 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockChorusFlower.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockChorusFlower.java
|
||||
@@ -0,0 +0,0 @@ public class BlockChorusFlower extends Block {
|
||||
|
@ -69,7 +69,7 @@ index d70b52cad..b624cf380 100644
|
|||
|
||||
if (worldserver.isEmpty(blockposition1) && blockposition1.getY() < 256) {
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java
|
||||
index 55b07444e..3bc3c5aa2 100644
|
||||
index 55b07444e1..3bc3c5aa29 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockReed.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockReed.java
|
||||
@@ -0,0 +0,0 @@ public class BlockReed extends Block {
|
||||
|
@ -81,7 +81,7 @@ index 55b07444e..3bc3c5aa2 100644
|
|||
|
||||
for (i = 1; worldserver.getType(blockposition.down(i)).getBlock() == this; ++i) {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 4da34b6dd..83fb8737a 100644
|
||||
index 919472370d..3739a95c5a 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -0,0 +0,0 @@ public class WorldServer extends World {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Generator Settings
|
|||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 02715539a..33e251c87 100644
|
||||
index 02715539ae..33e251c87f 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
|
@ -19,7 +19,7 @@ index 02715539a..33e251c87 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java b/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java
|
||||
index af81a8414..2268fbdd8 100644
|
||||
index af81a84142..2268fbdd87 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java
|
||||
@@ -0,0 +0,0 @@ public abstract class ChunkGeneratorAbstract<T extends GeneratorSettingsDefault>
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Implement alternative item-despawn-rate
|
|||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 0fc77ac28..3dfe54ad3 100644
|
||||
index 0fc77ac287..3dfe54ad3d 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -80,7 +80,7 @@ index 0fc77ac28..3dfe54ad3 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
||||
index a0d1e7fd2..e61af3f5e 100644
|
||||
index a0d1e7fd27..e61af3f5eb 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
||||
@@ -0,0 +0,0 @@ import java.util.Objects;
|
||||
|
|
|
@ -10,7 +10,7 @@ operation. This patch will reduce the load of plugins which for example
|
|||
implement custom moblimits and depend on Chunk.getEntities().
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
index 91f2066b1..9cff8b88b 100644
|
||||
index 91f2066b12..9cff8b88ba 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
@@ -0,0 +0,0 @@ public class CraftChunk implements Chunk {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] PlayerLaunchProjectileEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/InteractionResultWrapper.java b/src/main/java/net/minecraft/server/InteractionResultWrapper.java
|
||||
index a6b96456b..712bda122 100644
|
||||
index a6b96456bc..712bda1225 100644
|
||||
--- a/src/main/java/net/minecraft/server/InteractionResultWrapper.java
|
||||
+++ b/src/main/java/net/minecraft/server/InteractionResultWrapper.java
|
||||
@@ -0,0 +0,0 @@ public class InteractionResultWrapper<T> {
|
||||
|
@ -17,7 +17,7 @@ index a6b96456b..712bda122 100644
|
|||
return this.a;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemEgg.java b/src/main/java/net/minecraft/server/ItemEgg.java
|
||||
index 89d399c9f..15a536dab 100644
|
||||
index 89d399c9ff..15a536dab8 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemEgg.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemEgg.java
|
||||
@@ -0,0 +0,0 @@ public class ItemEgg extends Item {
|
||||
|
@ -55,7 +55,7 @@ index 89d399c9f..15a536dab 100644
|
|||
return InteractionResultWrapper.a(itemstack);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemEnderPearl.java b/src/main/java/net/minecraft/server/ItemEnderPearl.java
|
||||
index 315e01274..34ad0c119 100644
|
||||
index 315e012740..34ad0c1190 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemEnderPearl.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemEnderPearl.java
|
||||
@@ -0,0 +0,0 @@ public class ItemEnderPearl extends Item {
|
||||
|
@ -107,7 +107,7 @@ index 315e01274..34ad0c119 100644
|
|||
return InteractionResultWrapper.a(itemstack);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemExpBottle.java b/src/main/java/net/minecraft/server/ItemExpBottle.java
|
||||
index f83eb5c45..1bcf58292 100644
|
||||
index f83eb5c45e..1bcf582922 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemExpBottle.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemExpBottle.java
|
||||
@@ -0,0 +0,0 @@ public class ItemExpBottle extends Item {
|
||||
|
@ -152,7 +152,7 @@ index f83eb5c45..1bcf58292 100644
|
|||
return InteractionResultWrapper.a(itemstack);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemLingeringPotion.java b/src/main/java/net/minecraft/server/ItemLingeringPotion.java
|
||||
index c19b678cf..7672e31fc 100644
|
||||
index c19b678cfb..7672e31fc0 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemLingeringPotion.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemLingeringPotion.java
|
||||
@@ -0,0 +0,0 @@ public class ItemLingeringPotion extends ItemPotionThrowable {
|
||||
|
@ -170,7 +170,7 @@ index c19b678cf..7672e31fc 100644
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemPotionThrowable.java b/src/main/java/net/minecraft/server/ItemPotionThrowable.java
|
||||
index 8f8f31b26..72dcf109f 100644
|
||||
index 8f8f31b265..72dcf109f6 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemPotionThrowable.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemPotionThrowable.java
|
||||
@@ -0,0 +0,0 @@ public class ItemPotionThrowable extends ItemPotion {
|
||||
|
@ -207,7 +207,7 @@ index 8f8f31b26..72dcf109f 100644
|
|||
return InteractionResultWrapper.a(itemstack);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemSnowball.java b/src/main/java/net/minecraft/server/ItemSnowball.java
|
||||
index abbf2b788..4ad285696 100644
|
||||
index abbf2b7881..4ad2856961 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemSnowball.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemSnowball.java
|
||||
@@ -0,0 +0,0 @@ public class ItemSnowball extends Item {
|
||||
|
@ -244,7 +244,7 @@ index abbf2b788..4ad285696 100644
|
|||
/*
|
||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemSplashPotion.java b/src/main/java/net/minecraft/server/ItemSplashPotion.java
|
||||
index 18bd846ce..e71e933ff 100644
|
||||
index 18bd846cee..e71e933fff 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemSplashPotion.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemSplashPotion.java
|
||||
@@ -0,0 +0,0 @@ public class ItemSplashPotion extends ItemPotionThrowable {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Prevent TRAP while loading Fireballs
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFireballFireball.java b/src/main/java/net/minecraft/server/EntityFireballFireball.java
|
||||
index 3988e68d4..a16b756a0 100644
|
||||
index 3988e68d4f..a16b756a05 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFireballFireball.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFireballFireball.java
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityFireballFireball extends EntityFireball {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Prevent consuming the wrong itemstack
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 43b8a722d..e3c562a63 100644
|
||||
index 43b8a722d0..e3c562a63b 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
|
|
|
@ -11,7 +11,7 @@ it must be enabled by setting the startup flag -Dpaper.debug-sync-loads=true
|
|||
To get a debug log for sync loads, the command is /paper syncloadinfo
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
index 09efbf725..132397b3f 100644
|
||||
index 09efbf7250..132397b3f3 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -91,7 +91,7 @@ index 09efbf725..132397b3f 100644
|
|||
if (args.length < 2 || args[1].equals("*")) {
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java
|
||||
new file mode 100644
|
||||
index 000000000..59aec1032
|
||||
index 0000000000..59aec10329
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -268,7 +268,7 @@ index 000000000..59aec1032
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 277c2245d..8d7971ad8 100644
|
||||
index 1f6b1c4f16..58654f4538 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
@ -280,27 +280,10 @@ index 277c2245d..8d7971ad8 100644
|
|||
this.serverThreadQueue.awaitTasks(completablefuture::isDone);
|
||||
com.destroystokyo.paper.io.chunk.ChunkTaskManager.popChunkWait(); // Paper - async chunk debug
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index b81b37445..9d29fc8ca 100644
|
||||
index f701e079db..0baa884bbf 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
}
|
||||
|
||||
public boolean n(BlockPosition blockposition) {
|
||||
- return isOutsideWorld(blockposition) ? false : this.chunkProvider.b(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
||||
+ return isOutsideWorld(blockposition) ? false : this.isLoaded(blockposition); // Paper - reduce sync loads
|
||||
}
|
||||
|
||||
public boolean a(BlockPosition blockposition, Entity entity) {
|
||||
if (isOutsideWorld(blockposition)) {
|
||||
return false;
|
||||
} else {
|
||||
- IChunkAccess ichunkaccess = this.getChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4, ChunkStatus.FULL, false);
|
||||
+ IChunkAccess ichunkaccess = this.getChunkIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4); // Paper - reduce sync loads
|
||||
|
||||
return ichunkaccess == null ? false : ichunkaccess.getType(blockposition).a((IBlockAccess) this, blockposition, entity);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
||||
for (int i1 = i; i1 <= j; ++i1) {
|
||||
for (int j1 = k; j1 <= l; ++j1) {
|
||||
|
@ -309,7 +292,7 @@ index b81b37445..9d29fc8ca 100644
|
|||
|
||||
if (chunk != null) {
|
||||
chunk.a(entity, axisalignedbb, list, predicate);
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
||||
for (int i1 = i; i1 < j; ++i1) {
|
||||
for (int j1 = k; j1 < l; ++j1) {
|
||||
|
@ -318,7 +301,7 @@ index b81b37445..9d29fc8ca 100644
|
|||
|
||||
if (chunk != null) {
|
||||
chunk.a(entitytypes, axisalignedbb, list, predicate);
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
||||
for (int i1 = i; i1 < j; ++i1) {
|
||||
for (int j1 = k; j1 < l; ++j1) {
|
||||
|
@ -328,7 +311,7 @@ index b81b37445..9d29fc8ca 100644
|
|||
if (chunk != null) {
|
||||
chunk.a(oclass, axisalignedbb, list, predicate);
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 3a6745dcc..b7878201b 100644
|
||||
index 59b2fc6297..9aaa28e6cd 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -0,0 +0,0 @@ public class WorldServer extends World {
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Mon, 8 Jul 2019 00:13:36 -0700
|
||||
Subject: [PATCH] Use getChunkIfLoadedImmediately in places
|
||||
|
||||
This prevents us from hitting chunk loads for chunks at or less-than
|
||||
ticket level 33 (yes getChunkIfLoaded will actually perform a chunk
|
||||
load in that case).
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index f0d1a5b14d..8c88cf6370 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
|
||||
public boolean isChunkLoaded() {
|
||||
- return world.isChunkLoaded((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4);
|
||||
+ return world.getChunkIfLoadedImmediately((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4) != null; // Paper
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 8c54022e07..f6fbba36f4 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
speed = player.abilities.walkSpeed * 10f;
|
||||
}
|
||||
// Paper start - Prevent moving into unloaded chunks
|
||||
- if (player.world.paperConfig.preventMovingIntoUnloadedChunks && (this.player.locX() != toX || this.player.locZ() != toZ) && !worldserver.isChunkLoaded((int) Math.floor(toX) >> 4, (int) Math.floor(toZ) >> 4)) {
|
||||
+ if (player.world.paperConfig.preventMovingIntoUnloadedChunks && (this.player.locX() != toX || this.player.locZ() != toZ) && worldserver.getChunkIfLoadedImmediately((int) Math.floor(toX) >> 4, (int) Math.floor(toZ) >> 4) == null) { // Paper - use getIfLoadedImmediately
|
||||
this.internalTeleport(this.player.locX(), this.player.locY(), this.player.locZ(), this.player.yaw, this.player.pitch, Collections.emptySet());
|
||||
return;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 1262e0097f..f701e079db 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
}
|
||||
|
||||
public Chunk getChunkIfLoaded(int x, int z) {
|
||||
- return ((ChunkProviderServer) this.chunkProvider).getChunkAt(x, z, false);
|
||||
+ return ((ChunkProviderServer) this.chunkProvider).getChunkAtIfLoadedImmediately(x, z); // Paper
|
||||
}
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public boolean isChunkLoaded(int x, int z) {
|
||||
+ return getChunkIfLoaded(x, z) != null;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ // Paper end
|
||||
|
||||
protected World(WorldData worlddata, DimensionManager dimensionmanager, BiFunction<World, WorldProvider, IChunkProvider> bifunction, GameProfilerFiller gameprofilerfiller, boolean flag, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) {
|
||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
}
|
||||
|
||||
public boolean n(BlockPosition blockposition) {
|
||||
- return isOutsideWorld(blockposition) ? false : this.chunkProvider.b(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
||||
+ return isOutsideWorld(blockposition) ? false : isChunkLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4); // Paper
|
||||
}
|
||||
|
||||
public boolean a(BlockPosition blockposition, Entity entity) {
|
||||
if (isOutsideWorld(blockposition)) {
|
||||
return false;
|
||||
} else {
|
||||
- IChunkAccess ichunkaccess = this.getChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4, ChunkStatus.FULL, false);
|
||||
+ IChunkAccess ichunkaccess = this.getChunkIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4); // Paper
|
||||
|
||||
return ichunkaccess == null ? false : ichunkaccess.getType(blockposition).a((IBlockAccess) this, blockposition, entity);
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index f86404f83a..92601c581c 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -0,0 +0,0 @@ public class ActivationRange
|
||||
{
|
||||
for ( int j1 = k; j1 <= l; ++j1 )
|
||||
{
|
||||
- if ( world.getWorld().isChunkLoaded( i1, j1 ) )
|
||||
+ Chunk chunk = (Chunk) world.getChunkIfLoadedImmediately( i1, j1 );
|
||||
+ if ( chunk != null )
|
||||
{
|
||||
- activateChunkEntities( world.getChunkAt( i1, j1 ) );
|
||||
+ activateChunkEntities( chunk );
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] implement optional per player mob spawns
|
|||
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||
index 8de6c4816..e25544f11 100644
|
||||
index 8de6c4816c..e25544f116 100644
|
||||
--- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||
@@ -0,0 +0,0 @@ public class WorldTimingsHandler {
|
||||
|
@ -25,7 +25,7 @@ index 8de6c4816..e25544f11 100644
|
|||
poiUnload = Timings.ofSafe(name + "Chunk unload - POI");
|
||||
chunkUnload = Timings.ofSafe(name + "Chunk unload - Chunk");
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 3dfe54ad3..02715539a 100644
|
||||
index 3dfe54ad3d..02715539ae 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
|
@ -40,7 +40,7 @@ index 3dfe54ad3..02715539a 100644
|
|||
}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/util/PlayerMobDistanceMap.java b/src/main/java/com/destroystokyo/paper/util/PlayerMobDistanceMap.java
|
||||
new file mode 100644
|
||||
index 000000000..9ebd7ecb7
|
||||
index 0000000000..9ebd7ecb7a
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/util/PlayerMobDistanceMap.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -299,7 +299,7 @@ index 000000000..9ebd7ecb7
|
|||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/util/PooledHashSets.java b/src/main/java/com/destroystokyo/paper/util/PooledHashSets.java
|
||||
new file mode 100644
|
||||
index 000000000..4f13d3ff8
|
||||
index 0000000000..4f13d3ff83
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/util/PooledHashSets.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -545,7 +545,7 @@ index 000000000..4f13d3ff8
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 1f6b1c4f1..cbe4b23e1 100644
|
||||
index 58654f4538..8a35e2994d 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
@ -599,7 +599,7 @@ index 1f6b1c4f1..cbe4b23e1 100644
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 72938a2e2..1b0ef1442 100644
|
||||
index ba30730b5a..7fbd390426 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
@ -631,7 +631,7 @@ index 72938a2e2..1b0ef1442 100644
|
|||
return this.cs;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
index d49ad0308..2fb04e3e9 100644
|
||||
index d49ad03089..2fb04e3e93 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
@@ -0,0 +0,0 @@ public class EntityTypes<T extends Entity> {
|
||||
|
@ -643,7 +643,7 @@ index d49ad0308..2fb04e3e9 100644
|
|||
return this.bb;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index fce37d0d6..b37c1161d 100644
|
||||
index fce37d0d67..b37c1161d1 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
@ -682,7 +682,7 @@ index fce37d0d6..b37c1161d 100644
|
|||
|
||||
private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) {
|
||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
index fdac5bb3a..58bbf2f9d 100644
|
||||
index fdac5bb3a2..58bbf2f9d2 100644
|
||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
@@ -0,0 +0,0 @@ package net.minecraft.server;
|
||||
|
@ -755,7 +755,7 @@ index fdac5bb3a..58bbf2f9d 100644
|
|||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 3283fb49e..4da34b6dd 100644
|
||||
index 219861a2d8..919472370d 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -0,0 +0,0 @@ public class WorldServer extends World {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] only add passanger entities once from spawners
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
index b179893a1..b96f6461d 100644
|
||||
index b179893a17..b96f6461da 100644
|
||||
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
@@ -0,0 +0,0 @@ public abstract class MobSpawnerAbstract {
|
||||
|
|
Loading…
Reference in a new issue