Hi,
I get an undocumented error on getBlock. Like there is PositionOutOfBoundsException
on javadoc, but no the IllegalStateException
that i’m getting.
I get this error:
Caused by: java.lang.IllegalStateException: Unable to retrieve a TileEntity for location: Location{(2694.0, 79.0, -1107.0) in WorldServer{Name=adminworld, DimensionId=2, DimensionType=minecraft:overworld}}
at net.minecraft.block.state.BlockStateContainer$StateImplementation.md32f0dd$lambda$snapshotFor$3$1(BlockStateContainer.java:700)
at java.util.Optional.orElseThrow(Optional.java:290)
at net.minecraft.block.state.BlockStateContainer$StateImplementation.snapshotFor(BlockStateContainer.java:700)
at com.myplugin.SpongeWorld.getBlockAt(SpongeWorld.java:30)
This is my code:
world.getBlock(x, y, z).snapshotFor(world.getLocation(x, y, z));
How can i fix it ? And why it appear ?