fixes ranges of perimeterinfo. fixes #1207
This commit is contained in:
1 parent
4a1a710eb0
commit
5dca846363
2 files changed
+4
-2
No files matched your search
@@ -52,7 +52,7 @@ public class PerimeterInfoCommand
|
||||
{
|
||||
nbttagcompound.putString("id", mobId);
|
||||
Entity baseEntity = EntityType.loadEntityWithPassengers(nbttagcompound, source.getWorld(), (entity_1x) -> {
|
||||
entity_1x.refreshPositionAndAngles(new BlockPos(pos.getX(), -10, pos.getZ()), entity_1x.getYaw(), entity_1x. getPitch());
|
||||
entity_1x.refreshPositionAndAngles(new BlockPos(pos.getX(), source.getWorld().getBottomY()-10, pos.getZ()), entity_1x.getYaw(), entity_1x. getPitch());
|
||||
return !source.getWorld().tryLoadEntity(entity_1x) ? null : entity_1x;
|
||||
});
|
||||
if (!(baseEntity instanceof MobEntity))
|
||||
|
||||
@@ -89,6 +89,8 @@ public class PerimeterDiagnostics
|
||||
PerimeterDiagnostics diagnostic = new PerimeterDiagnostics(worldserver,ctype,el);
|
||||
EntityType type = EntityType.ZOMBIE;
|
||||
if (el != null) type = el.getType();
|
||||
int minY = worldserver.getBottomY();
|
||||
int maxY = worldserver.getTopY();
|
||||
for (int x = -128; x <= 128; ++x)
|
||||
{
|
||||
for (int z = -128; z <= 128; ++z)
|
||||
@@ -97,7 +99,7 @@ public class PerimeterDiagnostics
|
||||
{
|
||||
continue;
|
||||
}
|
||||
for (int y= 0; y < 256; ++y)
|
||||
for (int y= minY; y < maxY; ++y)
|
||||
{
|
||||
if ((Math.abs(y-eY)>128) )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user