mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-31 20:56:34 +00:00
Fix mergeInto not updating the entity handle for merged entities
This commit is contained in:
@@ -209,10 +209,10 @@ index 0aea28a20f775b5df2ae2f92e435c84152b4d4be..839ab14b901f7deae5c53626c16ff1e7
|
||||
this.guardEntityTick(this::tickNonPassenger, entity);
|
||||
gameprofilerfiller.pop();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 106e03e0eae24f47a49d2495e98cb30195b27013..c34e4077ba1c8768d3ed8f32a14df46a32009ab8 100644
|
||||
index 2946d081032f6d8481643b43420f23b9bd6184d6..ed536165683302e22d50cacc49f7c341c67018d9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -565,6 +565,119 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -565,6 +565,123 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return to.entityState() != null && to.entityState().isCurrentState(this);
|
||||
}
|
||||
// Sakura end - store entity data/state
|
||||
@@ -313,10 +313,14 @@ index 106e03e0eae24f47a49d2495e98cb30195b27013..c34e4077ba1c8768d3ed8f32a14df46a
|
||||
+ entity.mergeList.addAll(mergeList);
|
||||
+ entity.stacked += stacked;
|
||||
+
|
||||
+ mergeList.clear(); // clear the list to stop our tracking when merging
|
||||
+ stacked = 0; // prevent any possible duplication
|
||||
+ for (Entity mergedEntity : this.mergeList) {
|
||||
+ mergedEntity.updateEntityHandle(entity);
|
||||
+ }
|
||||
+
|
||||
+ this.discard(); // MERGE is appropriate here but plugins may not expect tnt or falling blocks to merge
|
||||
+ this.mergeList.clear(); // clear the list to stop our tracking when merging
|
||||
+ this.stacked = 0; // prevent any possible duplication
|
||||
+
|
||||
+ this.discard();
|
||||
+ this.updateEntityHandle(entity);
|
||||
+ }
|
||||
+
|
||||
@@ -325,14 +329,14 @@ index 106e03e0eae24f47a49d2495e98cb30195b27013..c34e4077ba1c8768d3ed8f32a14df46a
|
||||
+ //noinspection ConstantValue
|
||||
+ if (this.bukkitEntity != null) {
|
||||
+ this.bukkitEntity.setHandle(entity);
|
||||
+ this.bukkitEntity = entity.bukkitEntity;
|
||||
+ }
|
||||
+ this.bukkitEntity = entity.getBukkitEntity();
|
||||
+ }
|
||||
+ // Sakura end - cannon entity merging
|
||||
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
@@ -611,6 +724,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -611,6 +728,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.getEntityData().registrationLocked = true; // Spigot
|
||||
this.setPos(0.0D, 0.0D, 0.0D);
|
||||
this.eyeHeight = this.getEyeHeight(net.minecraft.world.entity.Pose.STANDING, this.dimensions);
|
||||
@@ -340,7 +344,7 @@ index 106e03e0eae24f47a49d2495e98cb30195b27013..c34e4077ba1c8768d3ed8f32a14df46a
|
||||
}
|
||||
|
||||
public boolean isColliding(BlockPos pos, BlockState state) {
|
||||
@@ -2317,6 +2431,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2317,6 +2435,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
nbt.putBoolean("Paper.FreezeLock", true);
|
||||
}
|
||||
// Paper end
|
||||
@@ -352,7 +356,7 @@ index 106e03e0eae24f47a49d2495e98cb30195b27013..c34e4077ba1c8768d3ed8f32a14df46a
|
||||
return nbt;
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
||||
@@ -2484,6 +2603,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2484,6 +2607,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
freezeLocked = nbt.getBoolean("Paper.FreezeLock");
|
||||
}
|
||||
// Paper end
|
||||
@@ -364,7 +368,7 @@ index 106e03e0eae24f47a49d2495e98cb30195b27013..c34e4077ba1c8768d3ed8f32a14df46a
|
||||
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
|
||||
@@ -4529,6 +4653,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -4529,6 +4657,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return;
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Optimise Fast Movement
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 2acb30101d81766255b4f39a57c1aef9d69abe2a..5f65a6ceba58992b285c104d0422bea2f8eae7fa 100644
|
||||
index 89acaac907dbc948707882e1e9b37eeb507c5037..acc90e8d519bbfad624146675ec26a61d2434781 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1137,6 +1137,92 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1141,6 +1141,92 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
// Paper end - detailed watchdog information
|
||||
|
||||
@@ -101,7 +101,7 @@ index 2acb30101d81766255b4f39a57c1aef9d69abe2a..5f65a6ceba58992b285c104d0422bea2
|
||||
public void move(MoverType movementType, Vec3 movement) {
|
||||
// Paper start - detailed watchdog information
|
||||
io.papermc.paper.util.TickThread.ensureTickThread("Cannot move an entity off-main");
|
||||
@@ -1489,6 +1575,88 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1493,6 +1579,88 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return offsetFactor;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,18 +5,18 @@ Subject: [PATCH] isPushedByFluid API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index d7216d8e4c2a60d94b6c8ca2580c8aa9a7b58c67..1265e7d7e5615481229c89d3a76244a6603fd756 100644
|
||||
index d60a0e771a2a1769405a2cb7e293ef7c370b2f7e..2c59ac30260d76557a36cfcff66ba1f2f7d35442 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -678,6 +678,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
@@ -682,6 +682,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.bukkitEntity = entity.getBukkitEntity();
|
||||
}
|
||||
// Sakura end - cannon entity merging
|
||||
+ public boolean pushedByFluid = true; // Sakura - entity pushed by fluid api
|
||||
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
@@ -3950,7 +3951,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3954,7 +3955,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public boolean isPushedByFluid() {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Optimise TNT fluid state and pushing
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 1265e7d7e5615481229c89d3a76244a6603fd756..5bd03c22c046938d90aa8de17f843b7a8394d0ae 100644
|
||||
index 99be514200cde762923f8bd49dc75c248d4646af..0424482f0cf09929fe4e781181f1bb1c343a4072 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2013,7 +2013,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2017,7 +2017,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return this.isInWater() || flag;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ index 52c1990bd3bcfe0a3f6e70748fca42f3e3994da4..49a698d9e5559aac4943b4b0ae3ced13
|
||||
protected void startExplosion() {
|
||||
for (int i = this.calculateExplosionPotential() - 1; i >= 0; --i) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 5bd03c22c046938d90aa8de17f843b7a8394d0ae..626e192d8a7f9c9821e529c2bdd31b2a17c5695d 100644
|
||||
index 0424482f0cf09929fe4e781181f1bb1c343a4072..fb9d93de6ea371a2fb3423db5022207e3becf7ba 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -362,7 +362,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -87,7 +87,7 @@ index 5bd03c22c046938d90aa8de17f843b7a8394d0ae..626e192d8a7f9c9821e529c2bdd31b2a
|
||||
public boolean isInPowderSnow;
|
||||
public boolean wasInPowderSnow;
|
||||
public boolean wasOnFire;
|
||||
@@ -679,6 +679,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -683,6 +683,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
// Sakura end - cannon entity merging
|
||||
public boolean pushedByFluid = true; // Sakura - entity pushed by fluid api
|
||||
@@ -101,7 +101,7 @@ index 5bd03c22c046938d90aa8de17f843b7a8394d0ae..626e192d8a7f9c9821e529c2bdd31b2a
|
||||
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
@@ -1144,7 +1151,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1148,7 +1155,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
if (this.noPhysics) {
|
||||
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
||||
} else {
|
||||
@@ -110,7 +110,7 @@ index 5bd03c22c046938d90aa8de17f843b7a8394d0ae..626e192d8a7f9c9821e529c2bdd31b2a
|
||||
movement = this.limitPistonMovement(movement);
|
||||
if (movement.equals(Vec3.ZERO)) {
|
||||
return;
|
||||
@@ -1162,8 +1169,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1166,8 +1173,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
Vec3 vec3d1 = this.collideScan(movement);
|
||||
double d0 = vec3d1.lengthSqr();
|
||||
|
||||
@@ -121,7 +121,7 @@ index 5bd03c22c046938d90aa8de17f843b7a8394d0ae..626e192d8a7f9c9821e529c2bdd31b2a
|
||||
BlockHitResult movingobjectpositionblock = this.level.clip(new ClipContext(this.position(), this.position().add(vec3d1), ClipContext.Block.FALLDAMAGE_RESETTING, ClipContext.Fluid.WATER, this));
|
||||
|
||||
if (movingobjectpositionblock.getType() != HitResult.Type.MISS) {
|
||||
@@ -1199,6 +1206,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1203,6 +1210,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
if (this.horizontalCollision) {
|
||||
Vec3 vec3d2 = this.getDeltaMovement();
|
||||
|
||||
@@ -134,7 +134,7 @@ index 5bd03c22c046938d90aa8de17f843b7a8394d0ae..626e192d8a7f9c9821e529c2bdd31b2a
|
||||
this.setDeltaMovement(flag ? 0.0D : vec3d2.x, vec3d2.y, flag1 ? 0.0D : vec3d2.z);
|
||||
}
|
||||
|
||||
@@ -1239,7 +1252,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1243,7 +1256,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
||||
} else {
|
||||
this.wasOnFire = this.isOnFire();
|
||||
@@ -143,7 +143,7 @@ index 5bd03c22c046938d90aa8de17f843b7a8394d0ae..626e192d8a7f9c9821e529c2bdd31b2a
|
||||
this.activatedTick = Math.max(this.activatedTick, MinecraftServer.currentTick + 20); // Paper
|
||||
this.activatedImmunityTick = Math.max(this.activatedImmunityTick, MinecraftServer.currentTick + 20); // Paper
|
||||
movement = this.limitPistonMovement(movement);
|
||||
@@ -1266,8 +1279,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1270,8 +1283,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
Vec3 vec3d1 = this.collide(movement);
|
||||
double d0 = vec3d1.lengthSqr();
|
||||
|
||||
@@ -154,7 +154,7 @@ index 5bd03c22c046938d90aa8de17f843b7a8394d0ae..626e192d8a7f9c9821e529c2bdd31b2a
|
||||
BlockHitResult movingobjectpositionblock = this.level.clip(new ClipContext(this.position(), this.position().add(vec3d1), ClipContext.Block.FALLDAMAGE_RESETTING, ClipContext.Fluid.WATER, this));
|
||||
|
||||
if (movingobjectpositionblock.getType() != HitResult.Type.MISS) {
|
||||
@@ -1303,6 +1316,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1307,6 +1320,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
if (this.horizontalCollision) {
|
||||
Vec3 vec3d2 = this.getDeltaMovement();
|
||||
|
||||
@@ -167,7 +167,7 @@ index 5bd03c22c046938d90aa8de17f843b7a8394d0ae..626e192d8a7f9c9821e529c2bdd31b2a
|
||||
this.setDeltaMovement(flag ? 0.0D : vec3d2.x, vec3d2.y, flag1 ? 0.0D : vec3d2.z);
|
||||
}
|
||||
|
||||
@@ -1591,7 +1610,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1595,7 +1614,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
} else {
|
||||
final AABB bb = currBoundingBox.expandTowards(movement.x, movement.y, movement.z);
|
||||
this.collectCollisions(bb, potentialCollisionsBB);
|
||||
@@ -176,7 +176,7 @@ index 5bd03c22c046938d90aa8de17f843b7a8394d0ae..626e192d8a7f9c9821e529c2bdd31b2a
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1600,7 +1619,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1604,7 +1623,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
double y = movement.y;
|
||||
double z = movement.z;
|
||||
|
||||
@@ -188,7 +188,7 @@ index 5bd03c22c046938d90aa8de17f843b7a8394d0ae..626e192d8a7f9c9821e529c2bdd31b2a
|
||||
|
||||
if (y != 0.0) {
|
||||
y = this.scanY(currBoundingBox, y, bbList);
|
||||
@@ -1703,7 +1725,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1707,7 +1729,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
io.papermc.paper.util.CollisionUtil.addBoxesToIfIntersects(world.getWorldBorder().getCollisionShape(), collisionBox, potentialCollisions);
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ index 5bd03c22c046938d90aa8de17f843b7a8394d0ae..626e192d8a7f9c9821e529c2bdd31b2a
|
||||
|
||||
if (stepHeight > 0.0
|
||||
&& (this.onGround || (limitedMoveVector.y != movement.y && movement.y < 0.0))
|
||||
@@ -1822,8 +1844,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1826,8 +1848,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
|
||||
protected void checkInsideBlocks() {
|
||||
AABB axisalignedbb = this.getBoundingBox();
|
||||
@@ -442,7 +442,7 @@ index 0aed01b24e17aed7f5f7845ced78f64f57cabac3..5f61c5c591ac68e843da22cc1efac7e7
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index 0157727b9849e40d555460faf33e8a88da60ada9..cd8f19b6644fa43460f97525cf47526fd5db40b3 100644
|
||||
index cd812f9504092b80fbe371e7f8d7a47c8e1565f3..83ce73bbbce9a0b2ee0d2435e7ef3f2c8e628142 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -69,6 +69,7 @@ public class Explosion {
|
||||
|
||||
@@ -38,10 +38,10 @@ index 93977027caa8c398ca6f0d2bb0890231adf8bf49..07d3aac679ed4a3d85573706bd664e4d
|
||||
|
||||
if (predicate != null && !predicate.test(blockData, mutablePos)) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 626e192d8a7f9c9821e529c2bdd31b2a17c5695d..2c7672b23414df3c8e48785f22fdb0ae9d5a5a60 100644
|
||||
index fb9d93de6ea371a2fb3423db5022207e3becf7ba..8c1c978cd6cfbe6b987e6cf9a3be4283c78f2b1f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -686,6 +686,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -690,6 +690,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return this.physics;
|
||||
}
|
||||
// Sakura end - physics version api
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Optimise check inside blocks and fluids
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 2c7672b23414df3c8e48785f22fdb0ae9d5a5a60..7145d3ad574e3e5f99d46fc4c18678e80a60087f 100644
|
||||
index 8c1c978cd6cfbe6b987e6cf9a3be4283c78f2b1f..6ec4376f84c8f1a1a9ef1060377e35d5cba5290e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1862,14 +1862,34 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1866,14 +1866,34 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
BlockPos blockposition1 = new BlockPos(axisalignedbb.maxX - offset, axisalignedbb.maxY - offset, axisalignedbb.maxZ - offset);
|
||||
// Sakura end
|
||||
|
||||
@@ -47,7 +47,7 @@ index 2c7672b23414df3c8e48785f22fdb0ae9d5a5a60..7145d3ad574e3e5f99d46fc4c18678e8
|
||||
|
||||
try {
|
||||
iblockdata.entityInside(this.level, blockposition_mutableblockposition, this);
|
||||
@@ -4451,7 +4471,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -4455,7 +4475,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
|
||||
@@ -56,7 +56,7 @@ index 2c7672b23414df3c8e48785f22fdb0ae9d5a5a60..7145d3ad574e3e5f99d46fc4c18678e8
|
||||
return false;
|
||||
} else {
|
||||
AABB axisalignedbb = this.getBoundingBox().deflate(0.001D);
|
||||
@@ -4468,11 +4488,31 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -4472,11 +4492,31 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
int k1 = 0;
|
||||
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@ index ab5472c27f94e196a2747466f8721173cef937fc..c32140ded7da15123774b24438305285
|
||||
} else { entity.inactiveTick(); } // Paper - EAR 2
|
||||
this.getProfiler().pop();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 7145d3ad574e3e5f99d46fc4c18678e80a60087f..cbe68a30983380068c54eec708ce8ec8c0d3db38 100644
|
||||
index 6ec4376f84c8f1a1a9ef1060377e35d5cba5290e..152988e793a61556d76c2067424acb60874a553e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -698,6 +698,19 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -702,6 +702,19 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return false;
|
||||
}
|
||||
// Sakura end - Treat all collidable blocks as full when moving fast
|
||||
@@ -44,7 +44,7 @@ index 7145d3ad574e3e5f99d46fc4c18678e80a60087f..cbe68a30983380068c54eec708ce8ec8
|
||||
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
@@ -745,6 +758,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -749,6 +762,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.setPos(0.0D, 0.0D, 0.0D);
|
||||
this.eyeHeight = this.getEyeHeight(net.minecraft.world.entity.Pose.STANDING, this.dimensions);
|
||||
this.mergeLevel = level.sakuraConfig().cannons.mergeLevel; // Sakura
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Configurable left shooting and adjusting limits
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index cbe68a30983380068c54eec708ce8ec8c0d3db38..a7007de54ceca399b0cc3b611489dc6215be70a9 100644
|
||||
index 152988e793a61556d76c2067424acb60874a553e..c9c1602fba85e8d1c4074289a674e8a741f866e8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -711,6 +711,24 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -715,6 +715,24 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return Math.max(x, z) >= this.travelDistanceLimit;
|
||||
}
|
||||
// Sakura end - entity travel distance limits
|
||||
@@ -33,7 +33,7 @@ index cbe68a30983380068c54eec708ce8ec8c0d3db38..a7007de54ceca399b0cc3b611489dc62
|
||||
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
@@ -1649,6 +1667,25 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1653,6 +1671,25 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
final boolean xSmaller = this.physics == null || this.physics.afterOrEqual(1_14_0) ? Math.abs(x) < Math.abs(z)
|
||||
: this.physics.isLegacy() && Math.abs(x) > Math.abs(z);
|
||||
// Sakura end - physics version api
|
||||
|
||||
Reference in New Issue
Block a user