mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-30 08:06:01 +00:00
Fix compilation errors
This commit is contained in:
parent
cb210eb5a1
commit
7bebfce7df
@ -2,7 +2,7 @@ group=me.totalfreedom.scissors
|
|||||||
version=1.20-R0.1-SNAPSHOT
|
version=1.20-R0.1-SNAPSHOT
|
||||||
|
|
||||||
mcVersion=1.20
|
mcVersion=1.20
|
||||||
paperRef=04509f0234dfd4c05be002de1985ab4915c2092c
|
paperRef=e829a9d8f3a52a4803eaaa96a046c4a4876a262a
|
||||||
|
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
@ -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
|
diff --git a/src/main/java/me/totalfreedom/scissors/PositionUtility.java b/src/main/java/me/totalfreedom/scissors/PositionUtility.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..9e33ad84e50c7e2491aa883f905323f3ad2b070c
|
index 0000000000000000000000000000000000000000..c54535042a7ac12fe46b3b37db8d7b116e9469d5
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/me/totalfreedom/scissors/PositionUtility.java
|
+++ b/src/main/java/me/totalfreedom/scissors/PositionUtility.java
|
||||||
@@ -0,0 +1,83 @@
|
@@ -0,0 +1,83 @@
|
||||||
@ -175,7 +175,7 @@ index 0000000000000000000000000000000000000000..9e33ad84e50c7e2491aa883f905323f3
|
|||||||
+
|
+
|
||||||
+ public static BlockPos getValidBlockPos(BlockPos blockPos, Entity entity)
|
+ public static BlockPos getValidBlockPos(BlockPos blockPos, Entity entity)
|
||||||
+ {
|
+ {
|
||||||
+ final Level level = entity.level;
|
+ final Level level = entity.level();
|
||||||
+
|
+
|
||||||
+ try
|
+ try
|
||||||
+ {
|
+ {
|
||||||
|
@ -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
|
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
|
--- a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
|
||||||
+++ b/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 {
|
@@ -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"));
|
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
|
+ // 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;
|
+ this.pos = blockposition;
|
||||||
+ }
|
+ }
|
||||||
|
Loading…
Reference in New Issue
Block a user