From 6a5336aef146bc18713a75e9fbc8976afa42a90c Mon Sep 17 00:00:00 2001 From: Ben Spiers Date: Thu, 26 Sep 2013 20:18:27 +0100 Subject: [PATCH] Swap out the tile if necessary before notifying adjacent blocks; helps the adjacent blocks to not crash the game by trying to call methods of removed interfaces. --- codechicken/multipart/TileMultipart.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codechicken/multipart/TileMultipart.scala b/codechicken/multipart/TileMultipart.scala index bb7961e..119c378 100644 --- a/codechicken/multipart/TileMultipart.scala +++ b/codechicken/multipart/TileMultipart.scala @@ -361,10 +361,11 @@ class TileMultipart extends TileEntity if(!isInvalid) { + val tile = MultipartGenerator.partRemoved(this, part) notifyPartChange(part) markDirty() markRender() - return MultipartGenerator.partRemoved(this, part) + return tile } return null