This commit is contained in:
gnembon committed 2025-05-13 23:20:31 +02:00
1 parent 74e8a8d2ec
commit 52cf8c027a
11 files changed
+38 -38

No files matched your search

+1 -1
View File
@@ -30,7 +30,7 @@ public class MobAI
public static boolean isTracking(Entity e, TrackingType type)
{
if (e.getCommandSenderWorld().isClientSide())
if (e.level().isClientSide())
return false;
Set<TrackingType> currentTrackers = aiTrackers.get(e.getType());
if (currentTrackers == null)
@@ -182,7 +182,7 @@ public class PerimeterDiagnostics
{
el.snapTo(pos.getX() + 0.5F, pos.getY(), pos.getZ()+0.5F, 0.0F, 0.0F);
return el.checkSpawnObstruction(worldServer) && el.checkSpawnRules(worldServer, EntitySpawnReason.NATURAL) &&
SpawnPlacements.checkSpawnRules(el.getType(),(ServerLevel)el.getCommandSenderWorld(), EntitySpawnReason.NATURAL, el.blockPosition(), el.getCommandSenderWorld().random) &&
SpawnPlacements.checkSpawnRules(el.getType(),(ServerLevel)el.level(), EntitySpawnReason.NATURAL, el.blockPosition(), el.level().random) &&
worldServer.noCollision(el); // check collision rules once they stop fiddling with them after 1.14.1
}
return false;
@@ -382,7 +382,7 @@ public class SpawnReporter
}
if (entity instanceof Ocelot)
{
for (Entity e: entity.getCommandSenderWorld().getEntities(entity, entity.getBoundingBox()))
for (Entity e: entity.level().getEntities(entity, entity.getBoundingBox()))
{
e.discard();
}