mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-24 01:09:16 +00:00
Fix mergeInto not updating the entity handle for merged entities
This commit is contained in:
@@ -181,7 +181,7 @@ index 3c98362624e1b02b6b028db95564254e044c7b0d..f78881fcf186c44da243c2f31ff855b8
|
||||
this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 55e0be135ec084ee7ebe6bc7bb9323519e0cd864..51fa57e8b9d5c9ee563ec3608a437c69da08d32c 100644
|
||||
index 22b202274895cdc38c57bf2bb1b0ba010cee1ae6..297ab4dde3cfef55bd9dca662f473c0652ca3b7b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -893,6 +893,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -209,10 +209,10 @@ index 55e0be135ec084ee7ebe6bc7bb9323519e0cd864..51fa57e8b9d5c9ee563ec3608a437c69
|
||||
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 e657b5f88195f1db2cb9a9a97f255ff23992cadd..c10f6574cc08aafe34a63c803e55e406b3d972c6 100644
|
||||
index e657b5f88195f1db2cb9a9a97f255ff23992cadd..87327a63fdaf48b5a42666c36b925bda5516544e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -603,6 +603,120 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -603,6 +603,123 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
return to.entityState() != null && to.entityState().isCurrentState(this);
|
||||
}
|
||||
// Sakura end - store entity data/state
|
||||
@@ -313,11 +313,14 @@ index e657b5f88195f1db2cb9a9a97f255ff23992cadd..c10f6574cc08aafe34a63c803e55e406
|
||||
+ entity.mergeList.addAll(mergeList);
|
||||
+ entity.stacked += stacked;
|
||||
+
|
||||
+ for (Entity mergedEntity : this.mergeList) {
|
||||
+ mergedEntity.updateEntityHandle(entity);
|
||||
+ }
|
||||
+
|
||||
+ mergeList.clear(); // clear the list to stop our tracking when merging
|
||||
+ stacked = 0; // prevent any possible duplication
|
||||
+
|
||||
+ discard(null); // MERGE is appropriate here but plugins may not expect tnt or falling blocks to merge
|
||||
+
|
||||
+ updateEntityHandle(entity);
|
||||
+ }
|
||||
+
|
||||
@@ -326,14 +329,14 @@ index e657b5f88195f1db2cb9a9a97f255ff23992cadd..c10f6574cc08aafe34a63c803e55e406
|
||||
+ //noinspection ConstantValue
|
||||
+ if (bukkitEntity != null) {
|
||||
+ bukkitEntity.setHandle(entity);
|
||||
+ bukkitEntity = entity.bukkitEntity;
|
||||
+ }
|
||||
+ this.bukkitEntity = entity.getBukkitEntity();
|
||||
+ }
|
||||
+ // Sakura end - cannon entity merging
|
||||
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
@@ -651,6 +765,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -651,6 +768,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
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);
|
||||
@@ -341,7 +344,7 @@ index e657b5f88195f1db2cb9a9a97f255ff23992cadd..c10f6574cc08aafe34a63c803e55e406
|
||||
}
|
||||
|
||||
public boolean isColliding(BlockPos pos, BlockState state) {
|
||||
@@ -2533,6 +2648,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2533,6 +2651,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
nbttagcompound.putBoolean("Paper.FreezeLock", true);
|
||||
}
|
||||
// Paper end
|
||||
@@ -353,7 +356,7 @@ index e657b5f88195f1db2cb9a9a97f255ff23992cadd..c10f6574cc08aafe34a63c803e55e406
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
||||
@@ -2680,6 +2800,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2680,6 +2803,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
freezeLocked = nbt.getBoolean("Paper.FreezeLock");
|
||||
}
|
||||
// Paper end
|
||||
@@ -365,7 +368,7 @@ index e657b5f88195f1db2cb9a9a97f255ff23992cadd..c10f6574cc08aafe34a63c803e55e406
|
||||
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
|
||||
@@ -4889,6 +5014,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4889,6 +5017,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
// Paper end - rewrite chunk system
|
||||
CraftEventFactory.callEntityRemoveEvent(this, cause);
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -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 c10f6574cc08aafe34a63c803e55e406b3d972c6..ad0743957b17c3a31a09836672eba47bc794401a 100644
|
||||
index 87327a63fdaf48b5a42666c36b925bda5516544e..ed49b640fef4e391c071453124c8ebd69d7f4197 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1239,6 +1239,95 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1242,6 +1242,95 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
// Paper end - detailed watchdog information
|
||||
|
||||
@@ -104,7 +104,7 @@ index c10f6574cc08aafe34a63c803e55e406b3d972c6..ad0743957b17c3a31a09836672eba47b
|
||||
public void move(MoverType movementType, Vec3 movement) {
|
||||
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
|
||||
// Paper start - detailed watchdog information
|
||||
@@ -1617,6 +1706,95 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1620,6 +1709,95 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
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 ad0743957b17c3a31a09836672eba47bc794401a..6ad96ca1a5d220ecd209e6c212108a3832c65535 100644
|
||||
index ed49b640fef4e391c071453124c8ebd69d7f4197..fd10bf88ed6c75a4617d568b9310e1ee61de46c4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -717,6 +717,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
@@ -720,6 +720,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
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();
|
||||
@@ -4255,7 +4256,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4258,7 +4259,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
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 6ad96ca1a5d220ecd209e6c212108a3832c65535..499618b41531103456be9b7879198bd9105ca6b4 100644
|
||||
index fd10bf88ed6c75a4617d568b9310e1ee61de46c4..65301ec71b02b3c2e08abb47a4d65d7edbf72009 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2202,7 +2202,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2205,7 +2205,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
return this.isInWater() || flag;
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ index 51f6c04e2a3861369013a4fb2b193a9df6c961cf..2ef0151556d090e1e890edbe8c9f0299
|
||||
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 499618b41531103456be9b7879198bd9105ca6b4..413d129f44b48584b6b8dd59fae866838a01dfeb 100644
|
||||
index 65301ec71b02b3c2e08abb47a4d65d7edbf72009..90ea89719b3718f2421fd27bd094fabccad51cb0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -380,7 +380,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -119,7 +119,7 @@ index 499618b41531103456be9b7879198bd9105ca6b4..413d129f44b48584b6b8dd59fae86683
|
||||
public boolean isInPowderSnow;
|
||||
public boolean wasInPowderSnow;
|
||||
public boolean wasOnFire;
|
||||
@@ -718,6 +718,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -721,6 +721,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
// Sakura end - cannon entity merging
|
||||
public boolean pushedByFluid = true; // Sakura - entity pushed by fluid api
|
||||
@@ -133,7 +133,7 @@ index 499618b41531103456be9b7879198bd9105ca6b4..413d129f44b48584b6b8dd59fae86683
|
||||
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
@@ -1185,7 +1192,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1188,7 +1195,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
protected void checkSupportingBlock(boolean onGround, @Nullable Vec3 movement) {
|
||||
@@ -142,7 +142,7 @@ index 499618b41531103456be9b7879198bd9105ca6b4..413d129f44b48584b6b8dd59fae86683
|
||||
AABB axisalignedbb = this.getBoundingBox();
|
||||
AABB axisalignedbb1 = new AABB(axisalignedbb.minX, axisalignedbb.minY - 1.0E-6D, axisalignedbb.minZ, axisalignedbb.maxX, axisalignedbb.minY, axisalignedbb.maxZ);
|
||||
Optional<BlockPos> optional = this.level.findSupportingBlock(this, axisalignedbb1);
|
||||
@@ -1247,7 +1254,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1250,7 +1257,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
if (this.noPhysics) {
|
||||
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
||||
} else {
|
||||
@@ -151,7 +151,7 @@ index 499618b41531103456be9b7879198bd9105ca6b4..413d129f44b48584b6b8dd59fae86683
|
||||
movement = this.limitPistonMovement(movement);
|
||||
if (movement.equals(Vec3.ZERO)) {
|
||||
return;
|
||||
@@ -1265,10 +1272,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1268,10 +1275,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
Vec3 vec3d1 = this.collideScan(movement);
|
||||
double d0 = vec3d1.lengthSqr();
|
||||
|
||||
@@ -164,7 +164,7 @@ index 499618b41531103456be9b7879198bd9105ca6b4..413d129f44b48584b6b8dd59fae86683
|
||||
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) {
|
||||
@@ -1304,6 +1311,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1307,6 +1314,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
if (this.horizontalCollision) {
|
||||
Vec3 vec3d2 = this.getDeltaMovement();
|
||||
|
||||
@@ -177,7 +177,7 @@ index 499618b41531103456be9b7879198bd9105ca6b4..413d129f44b48584b6b8dd59fae86683
|
||||
this.setDeltaMovement(flag ? 0.0D : vec3d2.x, vec3d2.y, flag1 ? 0.0D : vec3d2.z);
|
||||
}
|
||||
|
||||
@@ -1345,7 +1358,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1348,7 +1361,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
||||
} else {
|
||||
this.wasOnFire = this.isOnFire();
|
||||
@@ -186,7 +186,7 @@ index 499618b41531103456be9b7879198bd9105ca6b4..413d129f44b48584b6b8dd59fae86683
|
||||
this.activatedTick = Math.max(this.activatedTick, MinecraftServer.currentTick + 20); // Paper
|
||||
this.activatedImmunityTick = Math.max(this.activatedImmunityTick, MinecraftServer.currentTick + 20); // Paper
|
||||
movement = this.limitPistonMovement(movement);
|
||||
@@ -1372,8 +1385,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1375,8 +1388,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
Vec3 vec3d1 = this.collide(movement);
|
||||
double d0 = vec3d1.lengthSqr();
|
||||
|
||||
@@ -197,7 +197,7 @@ index 499618b41531103456be9b7879198bd9105ca6b4..413d129f44b48584b6b8dd59fae86683
|
||||
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) {
|
||||
@@ -1409,6 +1422,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1412,6 +1425,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
if (this.horizontalCollision) {
|
||||
Vec3 vec3d2 = this.getDeltaMovement();
|
||||
|
||||
@@ -210,7 +210,7 @@ index 499618b41531103456be9b7879198bd9105ca6b4..413d129f44b48584b6b8dd59fae86683
|
||||
this.setDeltaMovement(flag ? 0.0D : vec3d2.x, vec3d2.y, flag1 ? 0.0D : vec3d2.z);
|
||||
}
|
||||
|
||||
@@ -1723,7 +1742,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1726,7 +1745,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
} else {
|
||||
final AABB bb = currBoundingBox.expandTowards(movement.x, movement.y, movement.z);
|
||||
collectCollisions(bb, potentialCollisionsVoxel, potentialCollisionsBB);
|
||||
@@ -219,7 +219,7 @@ index 499618b41531103456be9b7879198bd9105ca6b4..413d129f44b48584b6b8dd59fae86683
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1732,7 +1751,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1735,7 +1754,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
double y = movement.y;
|
||||
double z = movement.z;
|
||||
|
||||
@@ -231,7 +231,7 @@ index 499618b41531103456be9b7879198bd9105ca6b4..413d129f44b48584b6b8dd59fae86683
|
||||
|
||||
if (y != 0.0) {
|
||||
y = scanY(currBoundingBox, y, voxelList, bbList);
|
||||
@@ -1848,7 +1870,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1851,7 +1873,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
return movement;
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ index 499618b41531103456be9b7879198bd9105ca6b4..413d129f44b48584b6b8dd59fae86683
|
||||
|
||||
if (stepHeight > 0.0
|
||||
&& (onGround || (limitedMoveVector.y != movement.y && movement.y < 0.0))
|
||||
@@ -1964,8 +1986,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1967,8 +1989,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
||||
protected void checkInsideBlocks() {
|
||||
AABB axisalignedbb = this.getBoundingBox();
|
||||
|
||||
@@ -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 78fc8b0d534d3682697424f4931836d9a26167ea..060f3ebc5823d450f6389044721eea89a56ca85c 100644
|
||||
index 2fb8806ecdb71b8a6afd64ee433b721fadbe3016..068047fbb869df7f72f6a0fa03d8a61e57d84f22 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2000,18 +2000,37 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2003,18 +2003,37 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
BlockPos blockposition1 = BlockPos.containing(axisalignedbb.maxX - offset, axisalignedbb.maxY - offset, axisalignedbb.maxZ - offset);
|
||||
// Sakura end
|
||||
|
||||
@@ -50,7 +50,7 @@ index 78fc8b0d534d3682697424f4931836d9a26167ea..060f3ebc5823d450f6389044721eea89
|
||||
|
||||
try {
|
||||
iblockdata.entityInside(this.level(), blockposition_mutableblockposition, this);
|
||||
@@ -4799,7 +4818,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4802,7 +4821,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
|
||||
@@ -59,7 +59,7 @@ index 78fc8b0d534d3682697424f4931836d9a26167ea..060f3ebc5823d450f6389044721eea89
|
||||
return false;
|
||||
} else {
|
||||
AABB axisalignedbb = this.getBoundingBox().deflate(0.001D);
|
||||
@@ -4816,11 +4835,30 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4819,11 +4838,30 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
int k1 = 0;
|
||||
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add entity travel distance limits
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index ec7d7f22b267ae6572e6005f10221755cbb1a480..2a9a6a9f00343f614a0d2430095a17088861eb1f 100644
|
||||
index 6af0a91e5ae053330f80f40ea4369dff22f5d634..9e5b33d4bb1493b4a0435971a6669c230bd9f7fc 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1417,6 +1417,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -21,10 +21,10 @@ index ec7d7f22b267ae6572e6005f10221755cbb1a480..2a9a6a9f00343f614a0d2430095a1708
|
||||
} 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 060f3ebc5823d450f6389044721eea89a56ca85c..42642b77213567e9bf6acb3728f75e76e3f3447c 100644
|
||||
index 068047fbb869df7f72f6a0fa03d8a61e57d84f22..6d12d1175e5331c6466a4a9cdba790abcbb9aca9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -733,6 +733,19 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -736,6 +736,19 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
return this.physics;
|
||||
}
|
||||
// Sakura end - physics version api
|
||||
@@ -44,7 +44,7 @@ index 060f3ebc5823d450f6389044721eea89a56ca85c..42642b77213567e9bf6acb3728f75e76
|
||||
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
@@ -782,6 +795,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -785,6 +798,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
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 42642b77213567e9bf6acb3728f75e76e3f3447c..09cdb4fb53552e23a4870649a6f834d9c2b36780 100644
|
||||
index 6d12d1175e5331c6466a4a9cdba790abcbb9aca9..f5fb10c206b6ee9e48650101beedc9e36fd45bbb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -746,6 +746,24 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -749,6 +749,24 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
return Math.max(x, z) >= travelDistanceLimit;
|
||||
}
|
||||
// Sakura end - entity travel distance limits
|
||||
@@ -33,7 +33,7 @@ index 42642b77213567e9bf6acb3728f75e76e3f3447c..09cdb4fb53552e23a4870649a6f834d9
|
||||
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
@@ -1777,6 +1795,25 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1780,6 +1798,25 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
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