Skip to content

Commit

Permalink
Update ClientUtil.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadiboo committed Jan 15, 2019
1 parent e5a8074 commit be7dab8
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,11 @@ public static void extendLiquidsBlock(final RebuildChunkBlockEvent event) {
// Flat[x + WIDTH * (y + HEIGHT * z)] = Original[x, y, z]
final int index = (posX - renderChunkPositionX + offsetPos[0] + liquidCacheAddX) + liquidCacheSizeX * ((posY - renderChunkPositionY + offsetPos[1] + liquidCacheAddY) + liquidCacheSizeY * (posZ - renderChunkPositionZ + offsetPos[2] + liquidCacheAddZ));

if(index > stateCache.length) {
// Fix crash on TP when renderChunkPosition is changed mid-render (somehow)
return;
}

final IBlockState potentialLiquidState = stateCache[index];
if (!isLiquid(potentialLiquidState)) {
continue;
Expand Down

0 comments on commit be7dab8

Please sign in to comment.