Fix a mistake in getBlockStateAt()

This commit is contained in:
Axionize committed 2024-11-30 12:51:23 -05:00
1 parent 1beedd84d0
commit 151eb58fb6
2 files changed
+1 -6

No files matched your search

@@ -49,11 +49,6 @@ public class FoliaWorld extends SpigotWorld {
}
}
@Override
public WrappedBlockState getBlockStateAt(Vector3d loc) {
return getBlockStateAt((int) Math.floor(loc.x), (int) Math.floor(loc.y), (int) Math.floor(loc.z)); // Corrected to loc.y
}
@Override
public RayTraceResult rayTraceBlocks(Vector3d start, Vector3d direction, double maxDistance, FluidHandling fluidHandling, boolean ignorePassableBlocks) {
Location location = new Location(super.world, start.getX(), start.getY(), start.getZ());
@@ -85,7 +85,7 @@ public class SpigotWorld implements PlatformWorld {
@Override
public WrappedBlockState getBlockStateAt(Vector3d loc) {
return getBlockStateAt((int) Math.floor(loc.x), (int) Math.floor(loc.x), (int) Math.floor(loc.x));
return getBlockStateAt((int) Math.floor(loc.x), (int) Math.floor(loc.y), (int) Math.floor(loc.z));
}
@Override