diff options
author | Nassim Jahnke <[email protected]> | 2024-01-26 19:41:41 +0100 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2024-01-26 19:41:41 +0100 |
commit | bd2fd615ceb7c65f6837317bc83bf9cbfc425b42 (patch) | |
tree | 5be8e9936d5b5f0fa34798dfb2c5a3d4b927180c | |
parent | b03f255532bba5a1398f03207756f42e5597ccb8 (diff) | |
download | Paper-bd2fd615ceb7c65f6837317bc83bf9cbfc425b42.tar.gz Paper-bd2fd615ceb7c65f6837317bc83bf9cbfc425b42.zip |
[ci skip] Fixup a few bad comments
-rw-r--r-- | patches/server/0020-Configurable-cactus-bamboo-and-reed-growth-height.patch (renamed from patches/server/0020-Configurable-cactus-bamboo-and-reed-growth-heights.patch) | 26 | ||||
-rw-r--r-- | patches/server/0084-Optimize-DataBits.patch | 4 | ||||
-rw-r--r-- | patches/server/0097-Faster-redstone-torch-rapid-clock-removal.patch | 4 | ||||
-rw-r--r-- | patches/server/0265-Add-option-to-prevent-players-from-moving-into-unloa.patch | 4 | ||||
-rw-r--r-- | patches/server/0903-Implement-PlayerFailMoveEvent.patch | 4 |
5 files changed, 21 insertions, 21 deletions
diff --git a/patches/server/0020-Configurable-cactus-bamboo-and-reed-growth-heights.patch b/patches/server/0020-Configurable-cactus-bamboo-and-reed-growth-height.patch index 0f70a2c9f8..f8a8322389 100644 --- a/patches/server/0020-Configurable-cactus-bamboo-and-reed-growth-heights.patch +++ b/patches/server/0020-Configurable-cactus-bamboo-and-reed-growth-height.patch @@ -1,13 +1,13 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Zach Brown <[email protected]> Date: Tue, 1 Mar 2016 13:02:51 -0600 -Subject: [PATCH] Configurable cactus bamboo and reed growth heights +Subject: [PATCH] Configurable cactus bamboo and reed growth height -Bamboo - Both the minimum fully-grown heights and the maximum are configurable +Bamboo - Both the minimum fully-grown height and the maximum are configurable - Machine_Maker diff --git a/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java b/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java -index bd72deadb59289ae90afc379ee61e8198ddaf4ed..b54c76ce5c9433765495a5dd0f2166c17ebd304d 100644 +index bd72deadb59289ae90afc379ee61e8198ddaf4ed..e8dc4ea90d74036dacb0785fcb9125df192a4c22 100644 --- a/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java @@ -137,7 +137,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock { @@ -15,7 +15,7 @@ index bd72deadb59289ae90afc379ee61e8198ddaf4ed..b54c76ce5c9433765495a5dd0f2166c1 int i = this.getHeightBelowUpToMax(world, pos) + 1; - if (i < 16) { -+ if (i < world.paperConfig().maxGrowthHeight.bamboo.max) { // Paper - Configurable cactus/bamboo/reed growth heights ++ if (i < world.paperConfig().maxGrowthHeight.bamboo.max) { // Paper - Configurable cactus/bamboo/reed growth height this.growBamboo(state, world, pos, random, i); } } @@ -24,7 +24,7 @@ index bd72deadb59289ae90afc379ee61e8198ddaf4ed..b54c76ce5c9433765495a5dd0f2166c1 int j = this.getHeightBelowUpToMax(world, pos); - return i + j + 1 < 16 && (Integer) world.getBlockState(pos.above(i)).getValue(BambooStalkBlock.STAGE) != 1; -+ return i + j + 1 < ((Level) world).paperConfig().maxGrowthHeight.bamboo.max && (Integer) world.getBlockState(pos.above(i)).getValue(BambooStalkBlock.STAGE) != 1; // Paper - Configurable cactus/bamboo/reed growth heights ++ return i + j + 1 < ((Level) world).paperConfig().maxGrowthHeight.bamboo.max && (Integer) world.getBlockState(pos.above(i)).getValue(BambooStalkBlock.STAGE) != 1; // Paper - Configurable cactus/bamboo/reed growth height } @Override @@ -33,7 +33,7 @@ index bd72deadb59289ae90afc379ee61e8198ddaf4ed..b54c76ce5c9433765495a5dd0f2166c1 BlockState iblockdata1 = world.getBlockState(blockposition1); - if (k >= 16 || !iblockdata1.is(Blocks.BAMBOO) || (Integer) iblockdata1.getValue(BambooStalkBlock.STAGE) == 1 || !world.isEmptyBlock(blockposition1.above())) { // CraftBukkit - If the BlockSpreadEvent was cancelled, we have no bamboo here -+ if (k >= world.paperConfig().maxGrowthHeight.bamboo.max || !iblockdata1.is(Blocks.BAMBOO) || (Integer) iblockdata1.getValue(BambooStalkBlock.STAGE) == 1 || !world.isEmptyBlock(blockposition1.above())) { // CraftBukkit - If the BlockSpreadEvent was cancelled, we have no bamboo here // Paper - Configurable cactus/bamboo/reed growth heights ++ if (k >= world.paperConfig().maxGrowthHeight.bamboo.max || !iblockdata1.is(Blocks.BAMBOO) || (Integer) iblockdata1.getValue(BambooStalkBlock.STAGE) == 1 || !world.isEmptyBlock(blockposition1.above())) { // CraftBukkit - If the BlockSpreadEvent was cancelled, we have no bamboo here // Paper - Configurable cactus/bamboo/reed growth height return; } @@ -42,7 +42,7 @@ index bd72deadb59289ae90afc379ee61e8198ddaf4ed..b54c76ce5c9433765495a5dd0f2166c1 int j = (Integer) state.getValue(BambooStalkBlock.AGE) != 1 && !iblockdata2.is(Blocks.BAMBOO) ? 0 : 1; - int k = (height < 11 || random.nextFloat() >= 0.25F) && height != 15 ? 0 : 1; -+ int k = (height < world.paperConfig().maxGrowthHeight.bamboo.min || random.nextFloat() >= 0.25F) && height != (world.paperConfig().maxGrowthHeight.bamboo.max - 1) ? 0 : 1; // Paper - Configurable cactus/bamboo/reed growth heights ++ int k = (height < world.paperConfig().maxGrowthHeight.bamboo.min || random.nextFloat() >= 0.25F) && height != (world.paperConfig().maxGrowthHeight.bamboo.max - 1) ? 0 : 1; // Paper - Configurable cactus/bamboo/reed growth height // CraftBukkit start if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, pos.above(), (BlockState) ((BlockState) ((BlockState) this.defaultBlockState().setValue(BambooStalkBlock.AGE, j)).setValue(BambooStalkBlock.LEAVES, blockpropertybamboosize)).setValue(BambooStalkBlock.STAGE, k), 3)) { @@ -51,7 +51,7 @@ index bd72deadb59289ae90afc379ee61e8198ddaf4ed..b54c76ce5c9433765495a5dd0f2166c1 int i; - for (i = 0; i < 16 && world.getBlockState(pos.above(i + 1)).is(Blocks.BAMBOO); ++i) { -+ for (i = 0; i < ((Level) world).paperConfig().maxGrowthHeight.bamboo.max && world.getBlockState(pos.above(i + 1)).is(Blocks.BAMBOO); ++i) { // Paper - Configurable cactus/bamboo/reed growth heights ++ for (i = 0; i < ((Level) world).paperConfig().maxGrowthHeight.bamboo.max && world.getBlockState(pos.above(i + 1)).is(Blocks.BAMBOO); ++i) { // Paper - Configurable cactus/bamboo/reed growth height ; } @@ -60,12 +60,12 @@ index bd72deadb59289ae90afc379ee61e8198ddaf4ed..b54c76ce5c9433765495a5dd0f2166c1 int i; - for (i = 0; i < 16 && world.getBlockState(pos.below(i + 1)).is(Blocks.BAMBOO); ++i) { -+ for (i = 0; i < ((Level) world).paperConfig().maxGrowthHeight.bamboo.max && world.getBlockState(pos.below(i + 1)).is(Blocks.BAMBOO); ++i) { // Paper - Configurable cactus/bamboo/reed growth heights ++ for (i = 0; i < ((Level) world).paperConfig().maxGrowthHeight.bamboo.max && world.getBlockState(pos.below(i + 1)).is(Blocks.BAMBOO); ++i) { // Paper - Configurable cactus/bamboo/reed growth height ; } diff --git a/src/main/java/net/minecraft/world/level/block/CactusBlock.java b/src/main/java/net/minecraft/world/level/block/CactusBlock.java -index fcd5b593c79aab42928cb1ddd0e6c1b03b7bafaf..43ecbeaced4d50910a59b24934908ff40d894770 100644 +index fcd5b593c79aab42928cb1ddd0e6c1b03b7bafaf..b3b21763079698b86ea27bb60ea12f078d101901 100644 --- a/src/main/java/net/minecraft/world/level/block/CactusBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CactusBlock.java @@ -61,7 +61,7 @@ public class CactusBlock extends Block { @@ -73,12 +73,12 @@ index fcd5b593c79aab42928cb1ddd0e6c1b03b7bafaf..43ecbeaced4d50910a59b24934908ff4 } - if (i < 3) { -+ if (i < world.paperConfig().maxGrowthHeight.cactus) { // Paper - Configurable cactus/bamboo/reed growth heightst ++ if (i < world.paperConfig().maxGrowthHeight.cactus) { // Paper - Configurable cactus/bamboo/reed growth heightt int j = (Integer) state.getValue(CactusBlock.AGE); int modifier = world.spigotConfig.cactusModifier; // Spigot - SPIGOT-7159: Better modifier resolution diff --git a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java -index 47d4fc5bcf2657078abc7a2637b6337fc0ea0977..e4a9ddf77d36f2d6df55c666c16677adb2e4fbe7 100644 +index 47d4fc5bcf2657078abc7a2637b6337fc0ea0977..0c052892e930e08fafac729d6bd238eaf261a474 100644 --- a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java @@ -59,7 +59,7 @@ public class SugarCaneBlock extends Block { @@ -86,7 +86,7 @@ index 47d4fc5bcf2657078abc7a2637b6337fc0ea0977..e4a9ddf77d36f2d6df55c666c16677ad } - if (i < 3) { -+ if (i < world.paperConfig().maxGrowthHeight.reeds) { // Paper - Configurable cactus/bamboo/reed growth heights ++ if (i < world.paperConfig().maxGrowthHeight.reeds) { // Paper - Configurable cactus/bamboo/reed growth height int j = (Integer) state.getValue(SugarCaneBlock.AGE); int modifier = world.spigotConfig.caneModifier; // Spigot - SPIGOT-7159: Better modifier resolution diff --git a/patches/server/0084-Optimize-DataBits.patch b/patches/server/0084-Optimize-DataBits.patch index 07da053cf1..26c1e4f903 100644 --- a/patches/server/0084-Optimize-DataBits.patch +++ b/patches/server/0084-Optimize-DataBits.patch @@ -11,7 +11,7 @@ After: http://i.imgur.com/nJ46crB.png Optimize redundant converting of static fields into an unsigned long each call by precomputing it in ctor diff --git a/src/main/java/net/minecraft/util/SimpleBitStorage.java b/src/main/java/net/minecraft/util/SimpleBitStorage.java -index f677cc252d5510a2365e73dc42bd266e56115e83..18d8f3114831310c5f10da43d4333849d4eb6cae 100644 +index f677cc252d5510a2365e73dc42bd266e56115e83..acd820b19aff4e093536cc47002a899498b3fd6b 100644 --- a/src/main/java/net/minecraft/util/SimpleBitStorage.java +++ b/src/main/java/net/minecraft/util/SimpleBitStorage.java @@ -11,8 +11,8 @@ public class SimpleBitStorage implements BitStorage { @@ -78,7 +78,7 @@ index f677cc252d5510a2365e73dc42bd266e56115e83..18d8f3114831310c5f10da43d4333849 - public int get(int index) { - Validate.inclusiveBetween(0L, (long)(this.size - 1), (long)index); + public final int get(int index) { // Paper - Perf: Optimize SimpleBitStorage -+ //Validate.inclusiveBetween(0L, (long)(this.size - 1), (long)index); - Perf: Optimize SimpleBitStorage ++ //Validate.inclusiveBetween(0L, (long)(this.size - 1), (long)index); // Paper - Perf: Optimize SimpleBitStorage int i = this.cellIndex(index); long l = this.data[i]; int j = (index - i * this.valuesPerLong) * this.bits; diff --git a/patches/server/0097-Faster-redstone-torch-rapid-clock-removal.patch b/patches/server/0097-Faster-redstone-torch-rapid-clock-removal.patch index 62bc01e41e..2379614dc4 100644 --- a/patches/server/0097-Faster-redstone-torch-rapid-clock-removal.patch +++ b/patches/server/0097-Faster-redstone-torch-rapid-clock-removal.patch @@ -18,7 +18,7 @@ index a617c69054523dda56b78f175fc8b9c134b60ae2..7c977fad2084a849266caf8e424d0e8e public CraftWorld getWorld() { return this.world; diff --git a/src/main/java/net/minecraft/world/level/block/RedstoneTorchBlock.java b/src/main/java/net/minecraft/world/level/block/RedstoneTorchBlock.java -index 68da47c3ec59518a4bbeb03c196ef0e7c6b5d049..1ec5f1e984b428b125f919576686c92538f34c8b 100644 +index 68da47c3ec59518a4bbeb03c196ef0e7c6b5d049..1dbfda52a4423fb031eecad24e5766f49ecf6050 100644 --- a/src/main/java/net/minecraft/world/level/block/RedstoneTorchBlock.java +++ b/src/main/java/net/minecraft/world/level/block/RedstoneTorchBlock.java @@ -24,7 +24,7 @@ public class RedstoneTorchBlock extends BaseTorchBlock { @@ -62,7 +62,7 @@ index 68da47c3ec59518a4bbeb03c196ef0e7c6b5d049..1ec5f1e984b428b125f919576686c925 + if (list == null) { + list = world.redstoneUpdateInfos = new java.util.ArrayDeque<>(); + } -+ ++ // Paper end - Faster redstone torch rapid clock removal if (addNew) { list.add(new RedstoneTorchBlock.Toggle(pos.immutable(), world.getGameTime())); diff --git a/patches/server/0265-Add-option-to-prevent-players-from-moving-into-unloa.patch b/patches/server/0265-Add-option-to-prevent-players-from-moving-into-unloa.patch index 4288d5cc98..db20ff0f7a 100644 --- a/patches/server/0265-Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/patches/server/0265-Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a93d34bee92a2d1b48ddfa7a764d4038fb7af787..cce8a2a7d7b510f4741b28de89f505647d5673e8 100644 +index a93d34bee92a2d1b48ddfa7a764d4038fb7af787..4e7b46ef3585b30bd8057e6fc2aa9611e829539b 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -475,9 +475,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -47,7 +47,7 @@ index a93d34bee92a2d1b48ddfa7a764d4038fb7af787..cce8a2a7d7b510f4741b28de89f50564 - double d1 = ServerGamePacketListenerImpl.clampVertical(packet.getY(this.player.getY())); - double d2 = ServerGamePacketListenerImpl.clampHorizontal(packet.getZ(this.player.getZ())); + double d0 = ServerGamePacketListenerImpl.clampHorizontal(packet.getX(this.player.getX())); final double toX = d0; // Paper - OBFHELPER -+ double d1 = ServerGamePacketListenerImpl.clampVertical(packet.getY(this.player.getY())); final double toY = d1; ++ double d1 = ServerGamePacketListenerImpl.clampVertical(packet.getY(this.player.getY())); final double toY = d1; // Paper - OBFHELPER + double d2 = ServerGamePacketListenerImpl.clampHorizontal(packet.getZ(this.player.getZ())); final double toZ = d2; // Paper - OBFHELPER float f = Mth.wrapDegrees(packet.getYRot(this.player.getYRot())); float f1 = Mth.wrapDegrees(packet.getXRot(this.player.getXRot())); diff --git a/patches/server/0903-Implement-PlayerFailMoveEvent.patch b/patches/server/0903-Implement-PlayerFailMoveEvent.patch index a0c95abbf9..e498a9c8b3 100644 --- a/patches/server/0903-Implement-PlayerFailMoveEvent.patch +++ b/patches/server/0903-Implement-PlayerFailMoveEvent.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Implement PlayerFailMoveEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 1e1c3fb7a5e078b870ea733b35b004737f3c1ced..498f2990b2d4f033b8e792bcef5af31bd5b60532 100644 +index e6fc3db8d2d2fca291f9161e6e9d8e22e43284f6..42dda7d490cf11f35011c0998565c43b38d242e0 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1272,8 +1272,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl double d0 = ServerGamePacketListenerImpl.clampHorizontal(packet.getX(this.player.getX())); final double toX = d0; // Paper - OBFHELPER - double d1 = ServerGamePacketListenerImpl.clampVertical(packet.getY(this.player.getY())); final double toY = d1; + double d1 = ServerGamePacketListenerImpl.clampVertical(packet.getY(this.player.getY())); final double toY = d1; // Paper - OBFHELPER double d2 = ServerGamePacketListenerImpl.clampHorizontal(packet.getZ(this.player.getZ())); final double toZ = d2; // Paper - OBFHELPER - float f = Mth.wrapDegrees(packet.getYRot(this.player.getYRot())); - float f1 = Mth.wrapDegrees(packet.getXRot(this.player.getXRot())); |