diff --git a/Origami b/Origami index 558f40c4..f9c8e06d 160000 --- a/Origami +++ b/Origami @@ -1 +1 @@ -Subproject commit 558f40c487e8abf3af219bde1a7c5ed269ff0dd4 +Subproject commit f9c8e06d94ae43801bf70e32f84ac668d9ead187 diff --git a/PATCHES.md b/PATCHES.md index 45a7bbf7..a821a8f6 100644 --- a/PATCHES.md +++ b/PATCHES.md @@ -27,7 +27,6 @@ # Patches | server | Add timings for Behavior | Phoenix616 | | | server | Add timings for Pathfinder | MrIvanPlays | | | server | Akarin Updated Save json list async | tsao chi | | -| server | Akarin updated Async Path Finding | tsao chi | Bud Gidiere | | server | Allow anvil colors | William Blake Galbreath | | | api | Allow inventory resizing | William Blake Galbreath | | | server | Allow leashing villagers | William Blake Galbreath | | @@ -76,12 +75,10 @@ # Patches | server | Modify POM | tr7zw | | | server | Modify default configs | tr7zw | | | server | Optimize BehaviorController | MrIvanPlays | | -| server | Optimize Hopper logic | tr7zw | | | server | Optimize TileEntity load/unload | tr7zw | | | server | Optimize Villagers | Aikar | MrIvanPlays | | server | Optimize inventory API item handling | Phoenix616 | | | server | Optimize player loops around weather | MrIvanPlays | | -| server | Optimize redstone algorithm | theosib | egg82 | | server | Option for simpler Villagers | tr7zw | | | server | Option to toggle milk curing bad omen | William Blake Galbreath | | | server | Origami Server Config | Phoenix616 | | diff --git a/Rainforest b/Rainforest index 32a65fe2..4378f471 160000 --- a/Rainforest +++ b/Rainforest @@ -1 +1 @@ -Subproject commit 32a65fe276d0ca98d8050d608d9edcf42a4b3bce +Subproject commit 4378f4710ed6a405e17879b9436be67b84188300 diff --git a/Tuinity b/Tuinity index c628aa4f..3dc7b9e3 160000 --- a/Tuinity +++ b/Tuinity @@ -1 +1 @@ -Subproject commit c628aa4fe1b7baa964252d777080be0f85b9f889 +Subproject commit 3dc7b9e37343f9a1537b476029bfb339f1360231 diff --git a/patches/Rainforest/server.txt b/patches/Rainforest/server.txt index a8d29631..4553c279 100644 --- a/patches/Rainforest/server.txt +++ b/patches/Rainforest/server.txt @@ -1 +1 @@ -Add-Rainforest-config&Apply-advancements-async&Add-more-dupe-options&Custom-brand-name&Optimize-redstone-algorithm \ No newline at end of file +Add-Rainforest-config&Apply-advancements-async&Add-more-dupe-options&Custom-brand-name \ No newline at end of file diff --git a/patches/server/0001-Yatopia-Server-Fixes.patch b/patches/server/0001-Yatopia-Server-Fixes.patch index c3726828..aece5460 100644 --- a/patches/server/0001-Yatopia-Server-Fixes.patch +++ b/patches/server/0001-Yatopia-Server-Fixes.patch @@ -456,10 +456,10 @@ index 4cc30faacb1ee173cbc546cc57ff4ce032024587..00000000000000000000000000000000 - - iblockdata.dropNaturally(world, blockposition, itemstack); diff --git a/src/main/java/net/minecraft/server/BlockBase.java b/src/main/java/net/minecraft/server/BlockBase.java -index 4641832a2d6d4b29a3a0e635f01f398900fd2589..f292bc8b78b965e455befe1809bfbadc90b52755 100644 +index 032f8029d73324dbcb28c1b872280f4e2930efc7..1d02880e5818d22c13d67d3f44844a2cca51c164 100644 --- a/src/main/java/net/minecraft/server/BlockBase.java +++ b/src/main/java/net/minecraft/server/BlockBase.java -@@ -715,9 +715,14 @@ public abstract class BlockBase { +@@ -721,9 +721,14 @@ public abstract class BlockBase { } this.b = block.c(iblockdata, BlockAccessAir.INSTANCE, BlockPosition.ZERO, VoxelShapeCollision.a()); @@ -735,18 +735,10 @@ index 8347faf8a7ee62d27cf5eb9f285695fddadfa624..00000000000000000000000000000000 - - AttributeDefaults.a(); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 4168c02e620be25f92fa22814fd7b3474a018e12..8aec423827ec300f06598e7dd6ea06decf62e1da 100644 +index da0c445bb2d687de173665486ef1bdb6f44b1c04..ff246cff8d2cad6e1eed483945f1db9b65cf1084 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -3,6 +3,7 @@ package net.minecraft.server; - import com.google.common.collect.Iterables; - import com.google.common.collect.Lists; - import com.google.common.collect.Sets; -+import com.proximyst.rainforest.RainforestConfig; - import it.unimi.dsi.fastutil.objects.Object2DoubleArrayMap; - import it.unimi.dsi.fastutil.objects.Object2DoubleMap; - import java.util.Arrays; -@@ -441,7 +442,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -442,7 +442,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public void setPosition(double d0, double d1, double d2) { this.setPositionRaw(d0, d1, d2); //this.a(this.size.a(d0, d1, d2)); // Paper - move into setPositionRaw @@ -755,7 +747,7 @@ index 4168c02e620be25f92fa22814fd7b3474a018e12..8aec423827ec300f06598e7dd6ea06de } protected void ae() { -@@ -524,7 +525,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -525,7 +525,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } this.justCreated = false; @@ -764,7 +756,7 @@ index 4168c02e620be25f92fa22814fd7b3474a018e12..8aec423827ec300f06598e7dd6ea06de } public void resetPortalCooldown() { -@@ -2375,7 +2376,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2376,7 +2376,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke WorldServer worldserver1 = minecraftserver.getWorldServer(resourcekey); if (true && !this.isPassenger() && this.portalTicks++ >= i) { // CraftBukkit @@ -773,7 +765,7 @@ index 4168c02e620be25f92fa22814fd7b3474a018e12..8aec423827ec300f06598e7dd6ea06de this.portalTicks = i; this.resetPortalCooldown(); // CraftBukkit start -@@ -2385,7 +2386,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2386,7 +2386,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.b(worldserver1); } // CraftBukkit end @@ -782,7 +774,7 @@ index 4168c02e620be25f92fa22814fd7b3474a018e12..8aec423827ec300f06598e7dd6ea06de } this.inPortal = false; -@@ -2768,14 +2769,14 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2769,14 +2769,14 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // Paper end if (this.world instanceof WorldServer && !this.dead) { @@ -799,14 +791,7 @@ index 4168c02e620be25f92fa22814fd7b3474a018e12..8aec423827ec300f06598e7dd6ea06de ShapeDetectorShape shapedetectorshape = (location == null) ? this.a(worldserver) : new ShapeDetectorShape(new Vec3D(location.getX(), location.getY(), location.getZ()), Vec3D.a, this.yaw, this.pitch, worldserver, null); // CraftBukkit if (shapedetectorshape == null) { -@@ -2802,16 +2803,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke - entity.bukkitEntity = this.getBukkitEntity(); - - if (this instanceof EntityInsentient) { -- ((EntityInsentient) this).unleash(true, true); // Paper drop lead -+ ((EntityInsentient) this).unleash(true, !RainforestConfig.allowRidableChestDuping); // Paper drop lead // Rainforest - } - // CraftBukkit end +@@ -2809,10 +2809,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } this.bM(); @@ -819,7 +804,7 @@ index 4168c02e620be25f92fa22814fd7b3474a018e12..8aec423827ec300f06598e7dd6ea06de return entity; } } else { -@@ -3046,7 +3047,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -3047,7 +3047,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke entity.a(entity1, Entity::teleportAndSync); } @@ -830,28 +815,20 @@ index 4168c02e620be25f92fa22814fd7b3474a018e12..8aec423827ec300f06598e7dd6ea06de diff --git a/src/main/java/net/minecraft/server/Entity.java.rej b/src/main/java/net/minecraft/server/Entity.java.rej deleted file mode 100644 -index 47a9acd713e774f141d718067d654f6b7ca10856..0000000000000000000000000000000000000000 +index 4383822bece27e6f165c3c6bdd20458f09da58f5..0000000000000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/Entity.java.rej +++ /dev/null -@@ -1,18 +0,0 @@ +@@ -1,10 +0,0 @@ -diff a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java (rejected hunks) --@@ -5,6 +5,7 @@ import co.aikar.timings.Timing; -- import com.google.common.collect.Iterables; -- import com.google.common.collect.Lists; -- import com.google.common.collect.Sets; --+import com.proximyst.rainforest.RainforestConfig; -- import it.unimi.dsi.fastutil.objects.Object2DoubleArrayMap; -- import it.unimi.dsi.fastutil.objects.Object2DoubleMap; -- import org.apache.logging.log4j.LogManager; --@@ -2696,7 +2698,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke -- entity.bukkitEntity = this.getBukkitEntity(); +-@@ -3015,7 +3015,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +- WorldServer worldserver = (WorldServer) this.world; - -- if (this instanceof EntityInsentient) { --- ((EntityInsentient)this).unleash(true, true); // Paper drop lead --+ ((EntityInsentient)this).unleash(true, !RainforestConfig.allowRidableChestDuping); // Paper drop lead // Rainforest -- } -- // CraftBukkit end -- } +- this.setPositionRotation(d0, d1, d2, this.yaw, this.pitch); +-- this.collectPassengers().forEach((entity) -> { // Akarin - remove stream +-+ for (Entity entity : this.collectPassengers()) {// Akarin - remove stream +- worldserver.chunkCheck(entity); +- entity.aE = true; +- Iterator iterator = entity.passengers.iterator(); diff --git a/src/main/java/net/minecraft/server/EntityEnderCrystal.java b/src/main/java/net/minecraft/server/EntityEnderCrystal.java index 1942fae27051af79b6eb1d790a219da100bf889e..edad9669c67cab0df88947fa86b467c26deaa5f0 100644 --- a/src/main/java/net/minecraft/server/EntityEnderCrystal.java @@ -865,33 +842,68 @@ index 1942fae27051af79b6eb1d790a219da100bf889e..edad9669c67cab0df88947fa86b467c2 if (phantom.hasLineOfSight(this)) { attackPhantom(phantom); break; -diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java -index 6b2c5e8d4640e19d33cbfe76d2399e6100890dbc..8b8ebffb89f11cfbc51b470e77171ea490a9aa18 100644 ---- a/src/main/java/net/minecraft/server/EntityEnderDragon.java -+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java -@@ -839,6 +839,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { - if (nbttagcompound.hasKey("DragonPhase")) { - this.bG.setControllerPhase(DragonControllerPhase.getById(nbttagcompound.getInt("DragonPhase"))); - } -+ if (!world.rainforestConfig.allowEnderDragonExpDuping) // Rainforest - this.deathAnimationTicks = nbttagcompound.getInt("Paper.DeathTick"); // Paper - - } diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java.rej b/src/main/java/net/minecraft/server/EntityEnderDragon.java.rej deleted file mode 100644 -index a8d2be07d45549cf7a8ac048b44284c4c0a96686..0000000000000000000000000000000000000000 +index 39583978bd58994a70718fd009ae8e57f7c60af8..0000000000000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java.rej +++ /dev/null -@@ -1,9 +0,0 @@ +@@ -1,13 +0,0 @@ -diff a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java (rejected hunks) --@@ -839,6 +839,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { -- if (nbttagcompound.hasKey("DragonPhase")) { -- this.bN.setControllerPhase(DragonControllerPhase.getById(nbttagcompound.getInt("DragonPhase"))); -- } --+ if (!world.rainforestConfig.allowEnderDragonExpDuping) // Rainforest -- this.deathAnimationTicks = nbttagcompound.getInt("Paper.DeathTick"); // Paper +-@@ -462,9 +462,9 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { +- TileEntity tileentity = nmsBlock.isTileEntity() ? this.world.getTileEntity(blockposition) : null; +- LootTableInfo.Builder loottableinfo_builder = (new LootTableInfo.Builder((WorldServer) this.world)).a(this.world.random).set(LootContextParameters.POSITION, blockposition).set(LootContextParameters.TOOL, ItemStack.b).set(LootContextParameters.EXPLOSION_RADIUS, 1.0F / event.getYield()).setOptional(LootContextParameters.BLOCK_ENTITY, tileentity); - +-- craftBlock.getNMS().a(loottableinfo_builder).forEach((itemstack) -> { +-+ for (ItemStack itemstack : craftBlock.getNMS().a(loottableinfo_builder)) { +- Block.a(world, blockposition, itemstack); +-- }); +-+ } +- craftBlock.getNMS().dropNaturally(world, blockposition, ItemStack.b); +- } +- // Paper start - TNTPrimeEvent +diff --git a/src/main/java/net/minecraft/server/EntityEnderSignal.java b/src/main/java/net/minecraft/server/EntityEnderSignal.java +index e3865a9b4c53656a1e9e1658c678ac6dfdfc55fc..de55acd1cda658a888e728b8aa7f3704a23a7fec 100644 +--- a/src/main/java/net/minecraft/server/EntityEnderSignal.java ++++ b/src/main/java/net/minecraft/server/EntityEnderSignal.java +@@ -19,6 +19,13 @@ public class EntityEnderSignal extends Entity { + this.setPosition(d0, d1, d2); + } + ++ // Purpur start ++ @Override ++ public boolean canSaveToDisk() { ++ return world != null && world.purpurConfig.saveProjectilesToDisk; ++ } ++ // Purpur end ++ + public void b(ItemStack itemstack) { + if (true || itemstack.getItem() != Items.ENDER_EYE || itemstack.hasTag()) { // CraftBukkit - always allow item changing + this.getDataWatcher().set(EntityEnderSignal.b, SystemUtils.a(itemstack.cloneItemStack(), (itemstack1) -> { // CraftBukkit - decompile error +diff --git a/src/main/java/net/minecraft/server/EntityEnderSignal.java.rej b/src/main/java/net/minecraft/server/EntityEnderSignal.java.rej +deleted file mode 100644 +index ee4313713c81fd342161fb0b749c5de8b2bff046..0000000000000000000000000000000000000000 +--- a/src/main/java/net/minecraft/server/EntityEnderSignal.java.rej ++++ /dev/null +@@ -1,19 +0,0 @@ +-diff a/src/main/java/net/minecraft/server/EntityEnderSignal.java b/src/main/java/net/minecraft/server/EntityEnderSignal.java (rejected hunks) +-@@ -19,9 +19,16 @@ public class EntityEnderSignal extends Entity { +- this.setPosition(d0, d1, d2); - } +- +-+ // Purpur start +-+ @Override +-+ public boolean canSaveToDisk() { +-+ return world != null && world.purpurConfig.saveProjectilesToDisk; +-+ } +-+ // Purpur end +-+ +- public void b(ItemStack itemstack) { +- if (itemstack.getItem() != Items.ENDER_EYE || itemstack.hasTag()) { +-- this.getDataWatcher().set(EntityEnderSignal.b, SystemUtils.a((Object) itemstack.cloneItemStack(), (itemstack1) -> { +-+ this.getDataWatcher().set(EntityEnderSignal.b, SystemUtils.a(itemstack.cloneItemStack(), (itemstack1) -> { // Purpur - decompile error +- itemstack1.setCount(1); +- })); +- } diff --git a/src/main/java/net/minecraft/server/EntityFox.java.rej b/src/main/java/net/minecraft/server/EntityFox.java.rej deleted file mode 100644 index c3c7738570d3670b50f144f145b61dcc2d35bb85..0000000000000000000000000000000000000000 @@ -1173,7 +1185,7 @@ index 7b2c459adc489702137944602627e0fc54af26e8..6b4fad730cc43bf2c70e499adbf9bf28 } diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 33a3c42dea777076327b6e8aa1ea5325e1852d13..4688e9ae108efc50a645b205972e0da30087a3a8 100644 +index 96c18ddf92fe5784e901dd2f25a059177a89ee35..b66125bcccb9cadc7aaa41627fc560785907e465 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -242,13 +242,13 @@ public abstract class EntityInsentient extends EntityLiving { @@ -1310,7 +1322,7 @@ index bccb7cd89241ca30549f5442a4ef9847cfdb67a9..00000000000000000000000000000000 - } - diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 1c96e59322ff83e8449e7e4ffa0358480313237d..f24f7f1230a380f46112e886fb5dff7c33edb2ce 100644 +index 102b5de835b15fb86c65948bdba0a5b3b7266844..32843a27ebe0235e4ef5a7c32c08bff9dad2abc2 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -365,7 +365,7 @@ public abstract class EntityLiving extends Entity { @@ -1629,27 +1641,27 @@ index d1016d22fbb2dd15042fd6ccdf2ee7848351e518..00000000000000000000000000000000 - - entitypigzombie.addEffect(new MobEffect(MobEffects.CONFUSION, 200, 0)); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index a8a7b605bb096734e34a0a0ae34bfc879426e367..3ca1cfe61474474ce3b9fefb5a008a2411b18aad 100644 +index 6e9d352de56280c66d6407e243fd3090736703a7..4a81cee4fff59f8db34623b677cff1d0c89fa92d 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -135,7 +135,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - this.playerInteractManager = playerinteractmanager; - this.server = minecraftserver; - this.serverStatisticManager = minecraftserver.getPlayerList().getStatisticManager(this); -- this.advancementDataPlayer = minecraftserver.getPlayerList().f(this); -+ this.advancementDataPlayerCompletableFuture = minecraftserver.getPlayerList().loadAdvancementDataPlayerAsync(this); // Paper - async advancements - this.G = 1.0F; - //this.c(worldserver); // Paper - don't move to spawn on login, only first join +@@ -765,11 +765,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + private void eV() { + AxisAlignedBB axisalignedbb = (new AxisAlignedBB(this.getChunkCoordinates())).grow(32.0D, 10.0D, 32.0D); -@@ -501,6 +501,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - CriterionTriggers.u.a(this, this.cf, this.ticksLived - this.cg); - } - -+ if (areAdvancementsLoaded()) // Paper - async advancements: don't tick advancements until they're loaded - this.advancementDataPlayer.b(this); +- this.world.b(EntityInsentient.class, axisalignedbb).stream().filter((entityinsentient) -> { +- return entityinsentient instanceof IEntityAngerable; +- }).forEach((entityinsentient) -> { +- ((IEntityAngerable) entityinsentient).b(this); +- }); ++ for (EntityInsentient entityinsentient : this.world.b(EntityInsentient.class, axisalignedbb)) { ++ if (entityinsentient instanceof IEntityAngerable) { ++ ((IEntityAngerable) entityinsentient).b(this); ++ } ++ } } -@@ -918,7 +919,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + @Override +@@ -920,7 +920,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { ShapeDetectorShape shapedetectorshape = this.a(worldserver); if (shapedetectorshape != null) { @@ -1658,7 +1670,7 @@ index a8a7b605bb096734e34a0a0ae34bfc879426e367..3ca1cfe61474474ce3b9fefb5a008a24 worldserver = shapedetectorshape.world; // CraftBukkit if (worldserver == null) { } else // CraftBukkit - empty to fall through to null to event if (resourcekey == DimensionManager.OVERWORLD && worldserver.getTypeKey() == DimensionManager.THE_NETHER) { // CraftBukkit -@@ -941,8 +942,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -943,8 +943,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { worldserver = ((CraftWorld) exit.getWorld()).getHandle(); // CraftBukkit end @@ -1669,7 +1681,7 @@ index a8a7b605bb096734e34a0a0ae34bfc879426e367..3ca1cfe61474474ce3b9fefb5a008a24 if (true) { // CraftBukkit this.worldChangeInvuln = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds -@@ -959,7 +960,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -961,7 +961,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { worldserver.addPlayerPortal(this); this.playerConnection.teleport(exit); // CraftBukkit - use internal teleport without event this.playerConnection.syncPosition(); // CraftBukkit - sync position after changing it (from PortalTravelAgent#findAndteleport) @@ -1680,28 +1692,28 @@ index a8a7b605bb096734e34a0a0ae34bfc879426e367..3ca1cfe61474474ce3b9fefb5a008a24 this.playerConnection.sendPacket(new PacketPlayOutAbilities(this.abilities)); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java.rej b/src/main/java/net/minecraft/server/EntityPlayer.java.rej deleted file mode 100644 -index 96d58c9dcfcd1715b5d970054710e51e678cc188..0000000000000000000000000000000000000000 +index f9b99b3e7e041b2b9d538de1afe0de30560a569e..0000000000000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/EntityPlayer.java.rej +++ /dev/null @@ -1,18 +0,0 @@ -diff a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java (rejected hunks) --@@ -130,7 +131,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { -- this.playerInteractManager = playerinteractmanager; -- this.server = minecraftserver; -- this.serverStatisticManager = minecraftserver.getPlayerList().getStatisticManager(this); --- this.advancementDataPlayer = minecraftserver.getPlayerList().f(this); --+ this.advancementDataPlayerCompletableFuture = minecraftserver.getPlayerList().loadAdvancementDataPlayerAsync(this); // Paper - async advancements -- this.G = 1.0F; -- //this.b(worldserver); // Paper - don't move to spawn on login, only first join +-@@ -756,11 +756,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +- private void eW() { +- AxisAlignedBB axisalignedbb = (new AxisAlignedBB(this.getChunkCoordinates())).grow(32.0D, 10.0D, 32.0D); - --@@ -494,6 +495,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { -- CriterionTriggers.u.a(this, this.cm, this.ticksLived - this.cn); -- } -- --+ if (areAdvancementsLoaded()) // Paper - async advancements: don't tick advancements until they're loaded -- this.advancementDataPlayer.b(this); +-- this.world.b(EntityInsentient.class, axisalignedbb).stream().filter((entityinsentient) -> { +-- return entityinsentient instanceof IEntityAngerable; +-- }).forEach((entityinsentient) -> { +-- ((IEntityAngerable) entityinsentient).b((EntityHuman) this); +-- }); +-+ for (EntityInsentient entityinsentient : this.world.b(EntityInsentient.class, axisalignedbb)) { +-+ if (entityinsentient instanceof IEntityAngerable) { +-+ ((IEntityAngerable) entityinsentient).b(this); +-+ } +-+ } - } - +- @Override diff --git a/src/main/java/net/minecraft/server/EntitySheep.java.rej b/src/main/java/net/minecraft/server/EntitySheep.java.rej deleted file mode 100644 index 1137eb4819b638cd04d630ec1692b67ec40c740f..0000000000000000000000000000000000000000 @@ -1838,7 +1850,7 @@ index a40eff6d66cb3518d1773856dfdf2da816c52470..00000000000000000000000000000000 - } - } diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index 9544defe124c8f423f0a444fba678aeb95e69f9f..2306c5ac8504bb8a52f73d3f952c8b4ca9b129a4 100644 +index 755931841fa5f9c9f4672a281623a8a3e9ecfe9c..3aee7b444ef16d4d30744efdee1f6b071ccaaecb 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -291,7 +291,7 @@ public class Explosion { @@ -2275,72 +2287,6 @@ index 759862aba781ec6f1ae0c9a76c4ab6352d603a4c..00000000000000000000000000000000 - // Paper end - - if (chunkHolder.protoChunk != null) {try (Timing ignored2 = this.world.timings.chunkLoadLevelTimer.startTimingIfSync()) { // Paper start - timings // Paper - chunk is created async -diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 69a14bc78261c58903398e22b09ab276c37c4bf2..1ccbc31ee11693f732e9b2450f3967ec9e99a042 100644 ---- a/src/main/java/net/minecraft/server/PlayerConnection.java -+++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2828,7 +2828,7 @@ public class PlayerConnection implements PacketListenerPlayIn { - // Paper end - - public final boolean isDisconnected() { -- return (!this.player.joining && !this.networkManager.isConnected()) || this.processedDisconnect; // Paper -+ return (!this.player.joining && !this.networkManager.isConnected()) || com.proximyst.rainforest.RainforestConfig.allowPlayerItemDuplication || this.processedDisconnect; // Paper // Rainforest - } - // CraftBukkit end - -diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java.rej b/src/main/java/net/minecraft/server/PlayerConnection.java.rej -deleted file mode 100644 -index 88fabfe2d407a400a95c0ae39482c30eddf17955..0000000000000000000000000000000000000000 ---- a/src/main/java/net/minecraft/server/PlayerConnection.java.rej -+++ /dev/null -@@ -1,18 +0,0 @@ --diff a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java (rejected hunks) --@@ -4,6 +4,7 @@ import com.google.common.primitives.Doubles; -- import com.google.common.primitives.Floats; -- import com.mojang.brigadier.ParseResults; -- import com.mojang.brigadier.StringReader; --+import com.proximyst.rainforest.RainforestConfig; -- import io.netty.util.concurrent.Future; -- import io.netty.util.concurrent.GenericFutureListener; -- import it.unimi.dsi.fastutil.ints.Int2ShortMap; --@@ -2774,7 +2775,7 @@ public class PlayerConnection implements PacketListenerPlayIn { -- } -- -- public final boolean isDisconnected() { --- return (!this.player.joining && !this.networkManager.isConnected()) || this.processedDisconnect; // Paper --+ return (!this.player.joining && !this.networkManager.isConnected()) || RainforestConfig.allowPlayerItemDuplication || this.processedDisconnect; // Paper // Rainforest -- } -- // CraftBukkit end -- -diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 07c54c58f7a9256e2f1c51d99ede36371955be25..2a15972c0a48153fba481b08351642ed36a9da12 100644 ---- a/src/main/java/net/minecraft/server/PlayerList.java -+++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -189,7 +189,7 @@ public abstract class PlayerList { - // Spigot - view distance - playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.F(), this.s, worldserver1.getDimensionManager(), worldserver1.getDimensionKey(), this.getMaxPlayers(), worldserver1.getChunkProvider().playerChunkMap.getLoadViewDistance(), flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld())); // Paper - no-tick view distance - entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit -- playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName()))); -+ playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(com.proximyst.rainforest.RainforestConfig.brandName))); // Rainforest - custom brand name - playerconnection.sendPacket(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked())); - playerconnection.sendPacket(new PacketPlayOutAbilities(entityplayer.abilities)); - playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex)); -diff --git a/src/main/java/net/minecraft/server/PlayerList.java.rej b/src/main/java/net/minecraft/server/PlayerList.java.rej -deleted file mode 100644 -index 7c9d7ae5f875ba36b13d6b9b76581be0df903b49..0000000000000000000000000000000000000000 ---- a/src/main/java/net/minecraft/server/PlayerList.java.rej -+++ /dev/null -@@ -1,10 +0,0 @@ --diff a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java (rejected hunks) --@@ -189,7 +189,7 @@ public abstract class PlayerList { -- // Spigot - view distance -- playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.E(), this.s, worldserver1.getTypeKey(), worldserver1.getDimensionKey(), this.getMaxPlayers(), worldserver1.getChunkProvider().playerChunkMap.getLoadViewDistance(), flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld())); // Paper - no-tick view distance -- entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit --- playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName()))); --+ playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(com.proximyst.rainforest.RainforestConfig.brandName))); // Rainforest - custom brand name -- playerconnection.sendPacket(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked())); -- playerconnection.sendPacket(new PacketPlayOutAbilities(entityplayer.abilities)); -- playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex)); diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java index 205f3f697e9c31674a4ac8db38467bb2e61cfe6b..e09fd73d9bbb59323a30dabdbfd9f3e1b8413541 100644 --- a/src/main/java/net/minecraft/server/PortalTravelAgent.java @@ -2474,10 +2420,10 @@ index 2ae4a20ca763c60c9661661d2ae558bd5b6f79a1..00000000000000000000000000000000 - IChunkAccess ichunkaccess = iworldreader.getChunkAt(chunkcoordintpair.x, chunkcoordintpair.z, ChunkStatus.STRUCTURE_STARTS, !(iworldreader instanceof World) || !((World) iworldreader).origamiConfig.onlyFindGeneratedFeatures); - if (ichunkaccess == null) { diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java -index 63ced11539767c22aac635280dc163b731ec6e5f..95bede605c6401af10f18b641cd12c9d8ec2f207 100644 +index c310444d6d952eab69250c43b30348dce6393f90..1042923536120e59ecbc015293744da2b7909018 100644 --- a/src/main/java/net/minecraft/server/TileEntityHopper.java +++ b/src/main/java/net/minecraft/server/TileEntityHopper.java -@@ -508,6 +508,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi +@@ -514,6 +514,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi entityitem = (EntityItem) iterator.next(); } while (!a((IInventory) ihopper, entityitem)); @@ -2529,7 +2475,7 @@ index bada470cba41cce9beb9eb04227b42c1d489d731..00000000000000000000000000000000 - private int c; - private TileEntityShulkerBox.AnimationPhase i; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ea37d6d4bf67ef807b4fd311d71559f75712b8d2..9b2c9b57bb8033c90584b3ed57c50dd1ee5ff3d6 100644 +index c95bc3bcf8d9545cb87f1b2130cfd393c2ed77b4..3c852d008737415337ef778d988d81ad633b201d 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -97,6 +97,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -2562,29 +2508,30 @@ index ea37d6d4bf67ef807b4fd311d71559f75712b8d2..9b2c9b57bb8033c90584b3ed57c50dd1 } /* -@@ -615,6 +619,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - - } - -+ public final void neighborChanged(BlockPosition pos, Block blockIn, BlockPosition fromPos) { a(pos, blockIn, fromPos); } // Paper - OBFHELPER - public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) { - if (!this.isClientSide) { - IBlockData iblockdata = this.getTypeIfLoaded(blockposition); // EMC diff --git a/src/main/java/net/minecraft/server/World.java.rej b/src/main/java/net/minecraft/server/World.java.rej deleted file mode 100644 -index c632cd030e36d8abfd92a14948e4893d885823ad..0000000000000000000000000000000000000000 +index 055f1e52a39a9a4c8406adc6f313f4ef67ee3d39..0000000000000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/World.java.rej +++ /dev/null -@@ -1,9 +0,0 @@ +@@ -1,18 +0,0 @@ -diff a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java (rejected hunks) --@@ -646,6 +646,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +-@@ -94,6 +95,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +- public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper +- public final ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray - -- } -- --+ public void neighborChanged(BlockPosition pos, Block blockIn, BlockPosition fromPos) { a(pos, blockIn, fromPos); } // Paper - OBFHELPER -- public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) { -- if (!this.isClientSide) { -- IBlockData iblockdata = this.getType(blockposition); +-+ public final RainforestWorldConfig rainforestConfig; // Rainforest +-+ +- public final co.aikar.timings.WorldTimingsHandler timings; // Paper +- public static BlockPosition lastPhysicsProblem; // Spigot +- private org.spigotmc.TickLimiter entityLimiter; +-@@ -125,6 +128,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +- this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((WorldDataServer) worlddatamutable).getName()); // Spigot +- this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig((((WorldDataServer)worlddatamutable).getName()), this.spigotConfig); // Paper +- this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray +-+ this.rainforestConfig = new RainforestWorldConfig((((WorldDataServer)worlddatamutable).getName()), this.paperConfig); // Rainforest +- this.generator = gen; +- this.world = new CraftWorld((WorldServer) this, gen, env); +- this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/net/minecraft/server/WorldDataServer.java b/src/main/java/net/minecraft/server/WorldDataServer.java index a7e623044aece1f46e2d039cd2dcf710120ac267..dbcee8f22389e8a1ce58539cd8839bcc4fc3c720 100644 --- a/src/main/java/net/minecraft/server/WorldDataServer.java @@ -2650,7 +2597,7 @@ index 3a35169eaf680c45fe42922eb5f0014fa422c31c..00000000000000000000000000000000 - } - // Spigot Start diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index c084fc4f386a4e341c6714851f0a06c9be533122..0d8cf0adc9d42b8909c3d6af754f1487cc46d6c4 100644 +index 302932f69213b9c0b60c8ace3efa27f1d1f900ed..6aaa3e6b7e0919b85fbfbb0b70a647a18aeebfd7 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -869,11 +869,11 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -3177,43 +3124,6 @@ index ad868f6f49e36bcb7d62d31bccb89404098a0cfc..510e82002ed6ada5c2f4b14e01021068 + } + // Purpur end } -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java.rej b/src/main/java/org/bukkit/craftbukkit/CraftServer.java.rej -deleted file mode 100644 -index a3c8dfd94f78b49341e5f5aba1735651096c9d70..0000000000000000000000000000000000000000 ---- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java.rej -+++ /dev/null -@@ -1,31 +0,0 @@ --diff a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java (rejected hunks) --@@ -848,6 +848,7 @@ public final class CraftServer implements Server { -- -- org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot -- com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper --+ com.proximyst.rainforest.RainforestConfig.init((File) console.options.valueOf("rainforest-settings")); // Rainforest -- for (WorldServer world : console.getWorlds()) { -- world.worldDataServer.setDifficulty(config.difficulty); -- world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals); --@@ -882,6 +883,7 @@ public final class CraftServer implements Server { -- } -- world.spigotConfig.init(); // Spigot -- world.paperConfig.init(); // Paper --+ world.rainforestConfig.init(); // Rainforest -- } -- -- Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper --@@ -2238,6 +2240,13 @@ public final class CraftServer implements Server { -- return com.destroystokyo.paper.PaperConfig.config; -- } -- --+ // Rainforest start --+ @Override --+ public YamlConfiguration getRainforestConfig() { --+ return com.proximyst.rainforest.RainforestConfig.config; --+ } --+ // Rainforest end --+ -- @Override -- public void restart() { -- org.spigotmc.RestartCommand.restart(); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java index b2e2fcad2637e73cd69e14ac186c37c628da2761..132ad379242d9aa2defc639f79764050b73c572d 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java @@ -3263,10 +3173,10 @@ index 916603085d652444027e4513b77293ece84a6c4f..00000000000000000000000000000000 - acceptsAll(asList("server-name"), "Name of the server") - .withRequiredArg() diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 744b2a00fa0743598cabb46c539ae65238cdc736..1a311092aaa5763396503bd7fd2464b2e41058fc 100644 +index 6aa384765c6629bc80315368ba1990aec35ef52f..254afa94b1c215ff8c7ff0724503d4c9b2f60bb6 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -670,8 +670,12 @@ public class CraftBlock implements Block { +@@ -682,8 +682,12 @@ public class CraftBlock implements Block { // Modelled off EntityHuman#hasBlock if (item == null || !iblockdata.isRequiresSpecialTool() || nms.canDestroySpecialBlock(iblockdata)) { diff --git a/patches/server/0006-Add-config-Yatopia-command-and-basic-settings.patch b/patches/server/0006-Add-config-Yatopia-command-and-basic-settings.patch index cb5a58da..33e85576 100644 --- a/patches/server/0006-Add-config-Yatopia-command-and-basic-settings.patch +++ b/patches/server/0006-Add-config-Yatopia-command-and-basic-settings.patch @@ -403,7 +403,7 @@ index a60634fc455e8a59399020689b70eb64b6824d12..cb4a89940cf02de5c3eefc5c746397a9 this.setAllowFlight(dedicatedserverproperties.allowFlight); this.setResourcePack(dedicatedserverproperties.resourcePack, this.aZ()); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index f24f7f1230a380f46112e886fb5dff7c33edb2ce..421b01b7ded3d8bc7b425ad3ae4b008fd3203093 100644 +index 32843a27ebe0235e4ef5a7c32c08bff9dad2abc2..a3fd38a37c74226a2dc00036d5890759fc2f7653 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -266,6 +266,7 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/server/0007-Per-entity-type-collision-settings.patch b/patches/server/0007-Per-entity-type-collision-settings.patch index d759e50b..4e2b9030 100644 --- a/patches/server/0007-Per-entity-type-collision-settings.patch +++ b/patches/server/0007-Per-entity-type-collision-settings.patch @@ -198,7 +198,7 @@ index 0000000000000000000000000000000000000000..e8211826a342d743b897d816d7ece2e8 + } +} diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 421b01b7ded3d8bc7b425ad3ae4b008fd3203093..eb38479737788c3a2b69fb3d2290d8b441f59b14 100644 +index a3fd38a37c74226a2dc00036d5890759fc2f7653..0e7b032c4bbec414e0f55f98557c2d23470ea1d1 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2849,7 +2849,7 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/server/0010-Player-saving-async-FileIO.patch b/patches/server/0010-Player-saving-async-FileIO.patch index 59b873df..34ff1f4a 100644 --- a/patches/server/0010-Player-saving-async-FileIO.patch +++ b/patches/server/0010-Player-saving-async-FileIO.patch @@ -77,10 +77,10 @@ index ce4ebc96c01f3dacf4e4d0569d86f52140440d43..a52c0391b171c8a57de75f87c534ce1e nbttagcompound.set("ShoulderEntityLeft", this.getShoulderEntityLeft()); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 2a15972c0a48153fba481b08351642ed36a9da12..75953420936f1c6e8de221c1331df4d6c2fc7af6 100644 +index 334fd6fe58f53ad8989ac4ddf523b156a8dd264d..8bec2ac5e78f28e879db69e1673b0cd90f5abc31 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1284,6 +1284,28 @@ public abstract class PlayerList { +@@ -1283,6 +1283,28 @@ public abstract class PlayerList { if (team != null) scoreboard.removeTeam(team); } // Paper end @@ -109,7 +109,7 @@ index 2a15972c0a48153fba481b08351642ed36a9da12..75953420936f1c6e8de221c1331df4d6 } // Paper end -@@ -1321,13 +1343,13 @@ public abstract class PlayerList { +@@ -1320,13 +1342,13 @@ public abstract class PlayerList { File file = this.server.a(SavedFile.STATS).toFile(); File file1 = new File(file, uuid + ".json"); diff --git a/patches/server/0011-Modify-default-configs.patch b/patches/server/0011-Modify-default-configs.patch index 41835ad2..c190a171 100644 --- a/patches/server/0011-Modify-default-configs.patch +++ b/patches/server/0011-Modify-default-configs.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Modify default configs diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index f65d3545039a2c471819ab5950c171ef6193cdb4..7e0a19acb9f2ea5c66adc03b5f8ce26ec3ff4d31 100644 +index 301cecb0f5e9fd9b4ba421103c42b580f3e6bf18..2a1197c168f2bc292c86e870f261f45e5d6953bc 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -201,7 +201,7 @@ public class PaperConfig { @@ -18,7 +18,7 @@ index f65d3545039a2c471819ab5950c171ef6193cdb4..7e0a19acb9f2ea5c66adc03b5f8ce26e TimingsManager.privacy = getBoolean("timings.server-name-privacy", false); TimingsManager.hiddenConfigs = getList("timings.hidden-config-entries", Lists.newArrayList("database", "settings.bungeecord-addresses")); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 9b96b1b326169e7963d828eb9d0612c3c8cb428a..dd9e0cfd92114c28eefd3ae77951376f93165a51 100644 +index fbfea9e981bdc90d679d315b5e75ba01d3d396a0..84827312d66da1028ba90a81eeae0411a96d1284 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -589,7 +589,7 @@ public class PaperWorldConfig { diff --git a/patches/server/0013-lithium-MixinBox.patch b/patches/server/0013-lithium-MixinBox.patch index deefeb60..ccc39953 100644 --- a/patches/server/0013-lithium-MixinBox.patch +++ b/patches/server/0013-lithium-MixinBox.patch @@ -7,10 +7,10 @@ Original code by JellySquid, licensed under GNU Lesser General Public License v3 you can find the original code on https://github.com/jellysquid3/lithium-fabric/tree/1.16.x/fabric (Yarn mappings) diff --git a/src/main/java/net/minecraft/server/AxisAlignedBB.java b/src/main/java/net/minecraft/server/AxisAlignedBB.java -index d54bf71409fe299671aa3f72315f18a188b0db9d..661331bc005ba1c6ba6c6a4df22e0205bfd2b660 100644 +index 6aa9f07336c23150ca72bdf3d45677e8d40ee4e9..e2d6b4ff007d5cef9bfbe2c989c2bb503c44508f 100644 --- a/src/main/java/net/minecraft/server/AxisAlignedBB.java +++ b/src/main/java/net/minecraft/server/AxisAlignedBB.java -@@ -155,12 +155,38 @@ public class AxisAlignedBB { +@@ -185,12 +185,38 @@ public class AxisAlignedBB { return new AxisAlignedBB(vec3d.x, vec3d.y, vec3d.z, vec3d.x + 1.0D, vec3d.y + 1.0D, vec3d.z + 1.0D); } @@ -20,8 +20,6 @@ index d54bf71409fe299671aa3f72315f18a188b0db9d..661331bc005ba1c6ba6c6a4df22e0205 + */ public double a(EnumDirection.EnumAxis enumdirection_enumaxis) { - return enumdirection_enumaxis.a(this.minX, this.minY, this.minZ); -- } -- + switch (enumdirection_enumaxis) { + case X: + return this.minX; @@ -32,8 +30,8 @@ index d54bf71409fe299671aa3f72315f18a188b0db9d..661331bc005ba1c6ba6c6a4df22e0205 + } + + throw new IllegalArgumentException(); -+ } -+ + } + + /** + * @reason Simplify the code to better help the JVM optimize it + * @author JellySquid diff --git a/patches/server/0014-lithium-enum_values.patch b/patches/server/0014-lithium-enum_values.patch index ff21d1ad..d55bc0fc 100644 --- a/patches/server/0014-lithium-enum_values.patch +++ b/patches/server/0014-lithium-enum_values.patch @@ -39,7 +39,7 @@ index 5d3bb5f393a1e0e4a2e8b9a466530a91279697a9..7f084e7f11a829c10d113c7fb39eec0b if (enumdirection2 != EnumDirection.DOWN && world.isBlockFacePowered(blockposition1.shift(enumdirection2), enumdirection2)) { return true; diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index eb38479737788c3a2b69fb3d2290d8b441f59b14..4715d9bdaeb0424aed723ef619eb39699936d708 100644 +index 0e7b032c4bbec414e0f55f98557c2d23470ea1d1..793e8d41f8f49ef68ddf21f39ddb0d2e31f5042a 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2568,10 +2568,12 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/server/0018-Item-stuck-sleep-config.patch b/patches/server/0018-Item-stuck-sleep-config.patch index bda6bf3f..45184e08 100644 --- a/patches/server/0018-Item-stuck-sleep-config.patch +++ b/patches/server/0018-Item-stuck-sleep-config.patch @@ -19,7 +19,7 @@ index fd33954eb91339a8568610f515ee164527d7406b..d70b6af62f7e9a0b49c38fae1170f0eb + } } diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 129bf6eaf288ef7c3d303194864c4c160a1b863f..c5aaa537f86d42473a7cdbd4d29f250031f67da9 100644 +index 77ff666b5d380c665fd22f5c08f61f8cc6d79141..16bce81823cd06f70c267c964546ad9b2625695d 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -82,7 +82,7 @@ public class EntityItem extends Entity { diff --git a/patches/server/0021-Optimize-TileEntity-load-unload.patch b/patches/server/0021-Optimize-TileEntity-load-unload.patch index 3550fbb5..709a1e57 100644 --- a/patches/server/0021-Optimize-TileEntity-load-unload.patch +++ b/patches/server/0021-Optimize-TileEntity-load-unload.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optimize TileEntity load/unload diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 9b2c9b57bb8033c90584b3ed57c50dd1ee5ff3d6..500c0af58c04ac0eeb9fb54aeb5ebfa0454982f4 100644 +index 3c852d008737415337ef778d988d81ad633b201d..a2cff1c7a556fdd47e06059bc152ff3b9dd77d07 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -43,9 +43,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/patches/server/0027-Fix-lead-fall-dmg-config.patch b/patches/server/0027-Fix-lead-fall-dmg-config.patch index a6396e56..5558d7a9 100644 --- a/patches/server/0027-Fix-lead-fall-dmg-config.patch +++ b/patches/server/0027-Fix-lead-fall-dmg-config.patch @@ -19,7 +19,7 @@ index 039255d795f0e00b2a40861aa05c38c11db425cd..729e6d5fa5d3abd77d07defb0dbd5b2c + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 8aec423827ec300f06598e7dd6ea06decf62e1da..6aa1d450bea7be80f3c883bc08edc647f1aee0cb 100644 +index ff246cff8d2cad6e1eed483945f1db9b65cf1084..ea752b4c6b0aa0c14f505668e2ac6c8c3aa91314 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1266,6 +1266,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/patches/server/0028-Optimize-player-loops-around-weather.patch b/patches/server/0028-Optimize-player-loops-around-weather.patch index 91f1066a..7aa1b797 100644 --- a/patches/server/0028-Optimize-player-loops-around-weather.patch +++ b/patches/server/0028-Optimize-player-loops-around-weather.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optimize player loops around weather diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 0d8cf0adc9d42b8909c3d6af754f1487cc46d6c4..31a97c4ccfa23ef0547c783e9ca9da656689ee7d 100644 +index 6aaa3e6b7e0919b85fbfbb0b70a647a18aeebfd7..d58d167217171e074c9f4e403991fded5565abfd 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -814,12 +814,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/patches/server/0035-lithium-collision-optimizations.patch b/patches/server/0035-lithium-collision-optimizations.patch index b038c473..f5c52170 100644 --- a/patches/server/0035-lithium-collision-optimizations.patch +++ b/patches/server/0035-lithium-collision-optimizations.patch @@ -831,7 +831,7 @@ index ac6e5e3309affc830d4db07fd9b8d809c3085033..37a3b26cdeb02acb8051f0a99313de79 } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 6aa1d450bea7be80f3c883bc08edc647f1aee0cb..f17b5c00c4d691ef7b4a233bd8ada6c4b0f05c0f 100644 +index ea752b4c6b0aa0c14f505668e2ac6c8c3aa91314..10b1fbddcfc124f320424a56b9e3712b5fd3aaf1 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -75,7 +75,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -1028,7 +1028,7 @@ index a0c696f951824bd1988cf9922dc3829c325f41b5..2711ce7a2b4f1868542088729bf4aa29 sum += size; } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 31a97c4ccfa23ef0547c783e9ca9da656689ee7d..214904925963188c037c01c226d5cf501dbeaa1c 100644 +index d58d167217171e074c9f4e403991fded5565abfd..db2666d2cb03b5f8c714249ab9ebffa783fde334 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -649,8 +649,14 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/patches/server/0036-lithium-VoxelShapesMixin.patch b/patches/server/0036-lithium-VoxelShapesMixin.patch index 20440085..469de7c4 100644 --- a/patches/server/0036-lithium-VoxelShapesMixin.patch +++ b/patches/server/0036-lithium-VoxelShapesMixin.patch @@ -33,10 +33,10 @@ index 700660dd93b3090334bb3033d5f5fdd6ab684744..fd34dffa63995c1fc277eac28eb1cd23 return this.a(EnumAxisCycle.a(enumdirection_enumaxis, EnumDirection.EnumAxis.X), axisalignedbb, d0); } diff --git a/src/main/java/net/minecraft/server/VoxelShapes.java b/src/main/java/net/minecraft/server/VoxelShapes.java -index 42068f11d0b097a4022cf9d83d5582c308ce7707..c542357cb5405373a7a3911d6b7bb2edc7c69951 100644 +index f9a1f5e92a7559a50dfb72d7455a8fc03dbad25f..ad53ee24717e4ceb857b8132bc9c147cf2317190 100644 --- a/src/main/java/net/minecraft/server/VoxelShapes.java +++ b/src/main/java/net/minecraft/server/VoxelShapes.java -@@ -277,6 +277,21 @@ public final class VoxelShapes { +@@ -276,6 +276,21 @@ public final class VoxelShapes { return 0.0D; } else { EnumAxisCycle enumaxiscycle1 = enumaxiscycle.a(); diff --git a/patches/server/0037-lithium-MixinChunkSection.patch b/patches/server/0037-lithium-MixinChunkSection.patch index 2d6c7ee8..e099da09 100644 --- a/patches/server/0037-lithium-MixinChunkSection.patch +++ b/patches/server/0037-lithium-MixinChunkSection.patch @@ -7,10 +7,10 @@ Original code by JellySquid, licensed under LGPLv3 you can find the original code on https://github.com/jellysquid3/lithium-fabric/ (Yarn mappings) diff --git a/src/main/java/net/minecraft/server/BlockBase.java b/src/main/java/net/minecraft/server/BlockBase.java -index f292bc8b78b965e455befe1809bfbadc90b52755..fe5ec1614ee8ff5e2c1ed21bd40902885ebe4975 100644 +index 1d02880e5818d22c13d67d3f44844a2cca51c164..4ece27e3e6885246bc8b54b9277e01211db4f989 100644 --- a/src/main/java/net/minecraft/server/BlockBase.java +++ b/src/main/java/net/minecraft/server/BlockBase.java -@@ -333,10 +333,11 @@ public abstract class BlockBase { +@@ -339,10 +339,11 @@ public abstract class BlockBase { // Paper end // Tuinity start - micro the hell out of this call @@ -24,7 +24,7 @@ index f292bc8b78b965e455befe1809bfbadc90b52755..fe5ec1614ee8ff5e2c1ed21bd4090288 // Tuinity end // Tuinity start -@@ -350,8 +351,6 @@ public abstract class BlockBase { +@@ -356,8 +357,6 @@ public abstract class BlockBase { if (!this.getBlock().o()) { this.a = new BlockBase.BlockData.Cache(this.p()); } @@ -33,7 +33,7 @@ index f292bc8b78b965e455befe1809bfbadc90b52755..fe5ec1614ee8ff5e2c1ed21bd4090288 } public Block getBlock() { -@@ -601,7 +600,25 @@ public abstract class BlockBase { +@@ -607,7 +606,25 @@ public abstract class BlockBase { } public IBlockData updateState(EnumDirection enumdirection, IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) { diff --git a/patches/server/0038-Fix-recipe-crash-portal-crashes.patch b/patches/server/0038-Fix-recipe-crash-portal-crashes.patch index c1026048..8d2b9796 100644 --- a/patches/server/0038-Fix-recipe-crash-portal-crashes.patch +++ b/patches/server/0038-Fix-recipe-crash-portal-crashes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix recipe crash & portal crashes diff --git a/src/main/java/net/minecraft/server/BlockPortalShape.java b/src/main/java/net/minecraft/server/BlockPortalShape.java -index b7635ab1625c5b2540e44aafc2b908749820f7e2..9031f138e75f51f1f4074bd1eea5e51c7216df29 100644 +index 6ef81aeb4c63bc6c23163796dbd977602ca2f540..36cdebaf353d077342224f06f9f7a2fd939d4e4c 100644 --- a/src/main/java/net/minecraft/server/BlockPortalShape.java +++ b/src/main/java/net/minecraft/server/BlockPortalShape.java -@@ -224,6 +224,7 @@ public class BlockPortalShape { +@@ -227,6 +227,7 @@ public class BlockPortalShape { public static ShapeDetectorShape a(WorldServer worldserver, BlockUtil.Rectangle blockutil_rectangle, EnumDirection.EnumAxis enumdirection_enumaxis, Vec3D vec3d, EntitySize entitysize, Vec3D vec3d1, float f, float f1, CraftPortalEvent portalEventInfo) { // CraftBukkit // PAIL rename toDetectorShape BlockPosition blockposition = blockutil_rectangle.origin; IBlockData iblockdata = worldserver.getType(blockposition); @@ -58,7 +58,7 @@ index 64adf87f2fe9921e49bf7a76170bb9908dfdaf19..de7d5ed8d6260ce5ee4164df29cdaf69 private > Map> b(Recipes recipes) { diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index ace50805bfebbf4c3485ba1de334d975830a7d3c..a12d7e868093f5c2892ba3c269f34a034b575051 100644 +index 3adb29f004d2fee36f3ee9b21ee5417e84b64837..dbb2fee9f48e99ccaa6382563227c722e04797e9 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -570,6 +570,7 @@ public final class ItemStack { diff --git a/patches/server/0039-Load-also-the-chunk-that-you-re-teleporting-to.patch b/patches/server/0039-Load-also-the-chunk-that-you-re-teleporting-to.patch index 6e2f99b4..ab1dfd8f 100644 --- a/patches/server/0039-Load-also-the-chunk-that-you-re-teleporting-to.patch +++ b/patches/server/0039-Load-also-the-chunk-that-you-re-teleporting-to.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Load also the chunk that you're teleporting to Fixes Tuinity-178 diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 214904925963188c037c01c226d5cf501dbeaa1c..6e8abf8ee08597c5d9283c345dfb2cbeb795df0d 100644 +index db2666d2cb03b5f8c714249ab9ebffa783fde334..adda64b92b7ea1a62d18ebe81c9a5bc5547f21e0 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -225,7 +225,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {