chestContents[i] = null;
}
// Clear the old block out
world.setBlock(X, Y, Z, Blocks.air, 0, 3);
// Force the Chest TE to reset it's knowledge of neighbouring blocks
tec.updateContainingBlockInfo();
// Force the Chest TE to update any neighbours so they update next
// tick
tec.checkForAdjacentChests();
// And put in our block instead
world.setBlock(X, Y, Z, block, newchest.getType().ordinal(), 3);