Fix MC-297591
Vanilla does not increment ticket timeouts if the chunk is progressing in generation. They made this change in 1.21.6 so that the ender pearl ticket does not expire if the chunk fails to generate before the timeout expires. Rather than blindly adjusting the entire system behavior to fix this small issue, we instead add non-expirable tickets to keep ender pearls ticking.
This commit is contained in:
@@ -102,6 +102,8 @@ public interface PlatformHooks extends ChunkSystemHooks {
|
||||
|
||||
public int modifyEntityTrackingRange(final Entity entity, final int currentRange);
|
||||
|
||||
public boolean addTicketForEnderPearls(final ServerLevel world);
|
||||
|
||||
public static final class Holder {
|
||||
private Holder() {
|
||||
}
|
||||
|
||||
@@ -16,7 +16,8 @@ public final class CoordinateUtils {
|
||||
}
|
||||
|
||||
public static long getChunkKey(final Entity entity) {
|
||||
return ((Mth.lfloor(entity.getZ()) >> 4) << 32) | ((Mth.lfloor(entity.getX()) >> 4) & 0xFFFFFFFFL);
|
||||
final ChunkPos pos = entity.chunkPosition();
|
||||
return ((long)pos.z << 32) | (pos.x & 0xFFFFFFFFL);
|
||||
}
|
||||
|
||||
public static long getChunkKey(final ChunkPos pos) {
|
||||
|
||||
Reference in New Issue
Block a user