fix allowPermanentBlockBreakExploits config

This commit is contained in:
Lulu13022002
2024-12-18 23:35:47 +01:00
parent c71ada60db
commit 5922e6334b
18 changed files with 31 additions and 50 deletions

View File

@ -786,14 +786,14 @@ index 7c0862c50b44555fb27ce7dc46f4ec95a3eb0022..774ca9e0b56fd175ae246051de762d0c
public void tick() {
super.tick();
diff --git a/net/minecraft/world/entity/vehicle/MinecartHopper.java b/net/minecraft/world/entity/vehicle/MinecartHopper.java
index c553cf0592dfa606dbbb1e6854d3377b9feb5efb..dec705ec57e4f63ef2ccaa87c5400c116aee9b35 100644
index c553cf0592dfa606dbbb1e6854d3377b9feb5efb..8341e7f01606fca90e69384c16fc19bb9e20d1b7 100644
--- a/net/minecraft/world/entity/vehicle/MinecartHopper.java
+++ b/net/minecraft/world/entity/vehicle/MinecartHopper.java
@@ -47,6 +47,7 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
if (flag != this.isEnabled()) {
this.setEnabled(flag);
}
+ this.immunize(); // Paper
+ this.immunize(); // Paper
}
public boolean isEnabled() {
@ -801,13 +801,13 @@ index c553cf0592dfa606dbbb1e6854d3377b9feb5efb..dec705ec57e4f63ef2ccaa87c5400c11
public boolean suckInItems() {
if (HopperBlockEntity.suckInItems(this.level(), this)) {
+ this.immunize(); // Paper
+ this.immunize(); // Paper
return true;
} else {
for (ItemEntity itemEntity : this.level()
.getEntitiesOfClass(ItemEntity.class, this.getBoundingBox().inflate(0.25, 0.0, 0.25), EntitySelector.ENTITY_STILL_ALIVE)) {
if (HopperBlockEntity.addItem(this, itemEntity)) {
+ this.immunize(); // Paper
+ this.immunize(); // Paper
return true;
}
}

View File

@ -7,7 +7,7 @@ Inline bit operations and reduce instruction count to make these hot
operations faster
diff --git a/net/minecraft/core/BlockPos.java b/net/minecraft/core/BlockPos.java
index 98f0b1cf19d7a035849a9a2fa25e2be3a4c5a980..0822a0faf7af9e746e7936ac17597b1f51e40a92 100644
index 98f0b1cf19d7a035849a9a2fa25e2be3a4c5a980..a81694a22e94cca6f7110f7d5b205d1303f4e071 100644
--- a/net/minecraft/core/BlockPos.java
+++ b/net/minecraft/core/BlockPos.java
@@ -51,15 +51,17 @@ public class BlockPos extends Vec3i {
@ -62,7 +62,7 @@ index 98f0b1cf19d7a035849a9a2fa25e2be3a4c5a980..0822a0faf7af9e746e7936ac17597b1f
public static int getZ(long packedPos) {
- return (int)(packedPos << 64 - Z_OFFSET - PACKED_HORIZONTAL_LENGTH >> 64 - PACKED_HORIZONTAL_LENGTH);
+ return (int) ((packedPos << 26) >> 38); // Paper - simplify/inline
+ return (int) ((packedPos << 26) >> 38); // Paper - simplify/inline
}
public static BlockPos of(long packedPos) {