diff --git a/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java b/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java index 5a9e51a..73ae756 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java +++ b/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java @@ -27,7 +27,10 @@ import net.minecraft.state.property.Property; import net.minecraft.util.Hand; import net.minecraft.util.Util; import net.minecraft.util.hit.BlockHitResult; -import net.minecraft.util.math.*; +import net.minecraft.util.math.BlockBox; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.util.math.Vec3d; import net.minecraft.world.chunk.Chunk; import net.minecraft.world.dimension.DimensionType; @@ -360,7 +363,7 @@ public class CommandCore implements Listener { if ( player.getPos().getY() < dimensionType.minY() - || player.getPos().getY() > dimensionType.height() + dimensionType.minY() + || player.getPos().getY() > dimensionType.height() + dimensionType.minY() ) { networkHandler.sendChatCommand(command); return; @@ -451,7 +454,7 @@ public class CommandCore implements Listener { for (final Property property : oldBlockState.getProperties()) { command.append(property.getName()) .append('=') - .append(Util.getValueAsString(property, property.getType())) + .append(Util.getValueAsString(property, property.getValues().getLast())) // water[level=15] instead of water[level=0,level=1,....,level=15] .append(','); }