Buggy code:
@ ThreadSafe public class TridentWorld implements World { private static final int SIZE = 1 ; private static final int MAX_HEIGHT = 255 ; private static final int MAX_CHUNKS = 30000000 ; public final ChunkCache loadedChunks = new ChunkCache ( this ) ; private final Set < Entity > entities = Factories . collect ( ) . createSet ( ) ; private final String name ; private final WorldLoader loader ; private final Position spawnPosition ; private volatile long time ; private volatile long existed ; private volatile int rainTime ; private volatile int thunderTime ; private volatile double borderSize ; private volatile Dimension dimension ; private volatile Difficulty difficulty ; private volatile GameMode defaultGamemode ; private volatile LevelType type ; private volatile boolean difficultyLocked ; private volatile boolean redstoneTick ; private volatile boolean raining ; private volatile boolean thundering ; private TridentWorld ( String name , WorldLoader loader , boolean throwaway ) { } TridentWorld ( String name , WorldLoader loader ) { } static TridentWorld createWorld ( String name , WorldLoader loader ) { } public void tick ( ) { } protected void addChunkAt ( ChunkLocation location , Chunk chunk ) { } public Collection < TridentChunk > loadedChunks ( ) { } public void save ( ) { } private Entity internalSpawn ( Entity entity ) { } public Entity addEntity ( Entity entity ) { } public void removeEntity ( Entity entity ) { } @ Override public String name ( ) { } @ Override public Chunk chunkAt ( int x , int z , boolean generateIfNotFound ) { } @ Override public TridentChunk chunkAt ( ChunkLocation location , boolean generateIfNotFound ) { } @ Override public Chunk generateChunk ( int x , int z ) { } @ Override public TridentChunk generateChunk ( ChunkLocation location ) { } @ Override public boolean equals ( Object obj ) { } @ Override public Block blockAt ( Position location ) { if ( ! ( location . world ( ) . name ( ) . equals ( this . name ( ) ) ) ) throw new IllegalArgumentException ( "Provided<seq2seq4repair_space>location<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>have<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>world!" ) ; int x = ( ( int ) ( Math . round ( location . x ( ) ) ) ) ; int y = ( ( int ) ( Math . round ( location . y ( ) ) ) ) ; int z = ( ( int ) ( Math . round ( location . z ( ) ) ) ) ; <START_BUG> return this . chunkAt ( WorldUtils . chunkLocation ( x , z ) , true ) . blockAt ( ( x % 16 ) , y , ( z % 16 ) ) ; <END_BUG> } @ Override public Difficulty difficulty ( ) { } @ Override public GameMode defaultGamemode ( ) { } @ Override public WorldLoader loader ( ) { } @ Override public LevelType levelType ( ) { } @ Override public Position spawnPosition ( ) { } @ Override public Dimension dimension ( ) { } @ Override public boolean gameRule ( String rule ) { } @ Override public long time ( ) { } @ Override public boolean isRaining ( ) { } @ Override public int rainTime ( ) { } @ Override public boolean isThundering ( ) { } @ Override public int thunderTime ( ) { } @ Override public boolean canGenerateStructures ( ) { } @ Override public double borderSize ( ) { } @ Override public Position borderCenter ( ) { } @ Override public int borderSizeContraction ( ) { } @ Override public int borderSizeContractionTime ( ) { } @ Override public Entity spawn ( EntityType type , Position spawnPosition ) { } @ Override public Set < Entity > entities ( ) { } private static class PlayerFilter implements FilenameFilter { @ Override public boolean accept ( File file , String name ) { } } No newline ; at end ; of file ; }

Fix:
return this . chunkAt ( WorldUtils . chunkLocation ( x , z ) , true ) . blockAt ( ( x & 15 ) , y , ( z & 15 ) ) ;