@@ -436,7 +436,7 @@ public class CraftBlock implements Block {
|
||||
}
|
||||
|
||||
public double getTemperature() {
|
||||
return world.getBiome(position).c(position); // PAIL: getAdjustedTemperature
|
||||
return world.getBiome(position).getAdjustedTemperature(position);
|
||||
}
|
||||
|
||||
public double getHumidity() {
|
||||
@@ -652,13 +652,13 @@ public class CraftBlock implements Block {
|
||||
|
||||
@Override
|
||||
public BoundingBox getBoundingBox() {
|
||||
VoxelShape shape = getData0().g(world, position); // PAIL: getShape
|
||||
VoxelShape shape = getData0().getShape(world, position);
|
||||
|
||||
if (shape.isEmpty()) {
|
||||
return new BoundingBox(); // Return an empty bounding box if the block has no dimension
|
||||
}
|
||||
|
||||
AxisAlignedBB aabb = shape.a(); // PAIL: getBoundingBox
|
||||
AxisAlignedBB aabb = shape.getBoundingBox();
|
||||
return new BoundingBox(getX() + aabb.minX, getY() + aabb.minY, getZ() + aabb.minZ, getX() + aabb.maxX, getY() + aabb.maxY, getZ() + aabb.maxZ);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ public class CraftBlockData implements BlockData {
|
||||
|
||||
@Override
|
||||
public String getAsString() {
|
||||
return toString(((BlockDataAbstract) state).b());
|
||||
return toString(((BlockDataAbstract) state).getStateMap());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -268,23 +268,13 @@ public class CraftBlockData implements BlockData {
|
||||
|
||||
if (!states.isEmpty()) {
|
||||
stateString.append('[');
|
||||
stateString.append(states.entrySet().stream().map(STATE_TO_VALUE).collect(Collectors.joining(",")));
|
||||
stateString.append(states.entrySet().stream().map(BlockDataAbstract.STATE_TO_VALUE).collect(Collectors.joining(",")));
|
||||
stateString.append(']');
|
||||
}
|
||||
|
||||
return stateString.toString();
|
||||
}
|
||||
|
||||
// BlockDataAbstract#b. Should PAIL public in future release but is mimicked for now to avoid a decompile error patch
|
||||
private static final Function<Map.Entry<IBlockState<?>, Comparable<?>>, String> STATE_TO_VALUE = (entry) -> {
|
||||
if (entry == null) {
|
||||
return "<NULL>";
|
||||
}
|
||||
|
||||
IBlockState state = entry.getKey();
|
||||
return state.a() + "=" + state.a(entry.getValue());
|
||||
};
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return obj instanceof CraftBlockData && state.equals(((CraftBlockData) obj).state);
|
||||
@@ -517,8 +507,8 @@ public class CraftBlockData implements BlockData {
|
||||
ArgumentBlock arg = new ArgumentBlock(reader, false).a(false);
|
||||
Preconditions.checkArgument(!reader.canRead(), "Spurious trailing data");
|
||||
|
||||
blockData = arg.b(); // PAIL rename getBlockData
|
||||
parsed = arg.a(); // PAIL rename getStateMap
|
||||
blockData = arg.getBlockData();
|
||||
parsed = arg.getStateMap();
|
||||
} catch (CommandSyntaxException ex) {
|
||||
throw new IllegalArgumentException("Could not parse data: " + data, ex);
|
||||
}
|
||||
|
||||
@@ -55,9 +55,9 @@ public class CraftVillagerZombie extends CraftZombie implements ZombieVillager {
|
||||
public void setConversionTime(int time) {
|
||||
if (time < 0) {
|
||||
getHandle().conversionTime = -1;
|
||||
getHandle().getDataWatcher().set(EntityZombieVillager.a, false);
|
||||
getHandle().getDataWatcher().set(EntityZombieVillager.CONVERTING, false);
|
||||
} else {
|
||||
getHandle().a((UUID) null, time);
|
||||
getHandle().startConversion((UUID) null, time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,9 +72,9 @@ public class CraftZombie extends CraftMonster implements Zombie {
|
||||
public void setConversionTime(int time) {
|
||||
if (time < 0) {
|
||||
getHandle().drownedConversionTime = -1;
|
||||
getHandle().getDataWatcher().set(EntityZombie.bF, false);
|
||||
getHandle().getDataWatcher().set(EntityZombie.DROWN_CONVERTING, false);
|
||||
} else {
|
||||
getHandle().a(time);
|
||||
getHandle().startDrownedConversion(time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user