diff --git a/gradle.properties b/gradle.properties index 86b63ed..2c0a27c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group=me.totalfreedom.scissors version=1.20-R0.1-SNAPSHOT mcVersion=1.20 -paperRef=04509f0234dfd4c05be002de1985ab4915c2092c +paperRef=e829a9d8f3a52a4803eaaa96a046c4a4876a262a org.gradle.caching=true org.gradle.parallel=true diff --git a/patches/server/0021-Add-custom-classes-used-by-Scissors.patch b/patches/server/0021-Add-custom-classes-used-by-Scissors.patch index 7f8af6c..80a2c98 100644 --- a/patches/server/0021-Add-custom-classes-used-by-Scissors.patch +++ b/patches/server/0021-Add-custom-classes-used-by-Scissors.patch @@ -121,7 +121,7 @@ index 0000000000000000000000000000000000000000..b724baaef8d565e41db1af6393d0890e +} diff --git a/src/main/java/me/totalfreedom/scissors/PositionUtility.java b/src/main/java/me/totalfreedom/scissors/PositionUtility.java new file mode 100644 -index 0000000000000000000000000000000000000000..9e33ad84e50c7e2491aa883f905323f3ad2b070c +index 0000000000000000000000000000000000000000..c54535042a7ac12fe46b3b37db8d7b116e9469d5 --- /dev/null +++ b/src/main/java/me/totalfreedom/scissors/PositionUtility.java @@ -0,0 +1,83 @@ @@ -175,7 +175,7 @@ index 0000000000000000000000000000000000000000..9e33ad84e50c7e2491aa883f905323f3 + + public static BlockPos getValidBlockPos(BlockPos blockPos, Entity entity) + { -+ final Level level = entity.level; ++ final Level level = entity.level(); + + try + { diff --git a/patches/server/0035-Fixes-out-of-bounds-HangingEntity-crash-exploit.patch b/patches/server/0035-Fixes-out-of-bounds-HangingEntity-crash-exploit.patch index 4d674ea..f3f5313 100644 --- a/patches/server/0035-Fixes-out-of-bounds-HangingEntity-crash-exploit.patch +++ b/patches/server/0035-Fixes-out-of-bounds-HangingEntity-crash-exploit.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fixes out of bounds HangingEntity crash exploit diff --git a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java -index 66cf0a6cd1525ecf2615809210a26d55f445d07d..b645a6cc8321c116dbee3990d2bbd83234110f13 100644 +index 66cf0a6cd1525ecf2615809210a26d55f445d07d..74fb79d4ea11f88f2c0de65b492a5fecc49684f1 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java +++ b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java @@ -270,6 +270,13 @@ public abstract class HangingEntity extends Entity { @@ -13,7 +13,7 @@ index 66cf0a6cd1525ecf2615809210a26d55f445d07d..b645a6cc8321c116dbee3990d2bbd832 BlockPos blockposition = new BlockPos(nbt.getInt("TileX"), nbt.getInt("TileY"), nbt.getInt("TileZ")); + // Scissors start - Fixes exploit where bad TileX, TileY, and TileZ coordinates can crash servers -+ if (level.isLoadedAndInBounds(blockposition)) ++ if (level().isLoadedAndInBounds(blockposition)) + { + this.pos = blockposition; + }