From f10cd75fc7a924bccd6bdb973e18c716e481500c Mon Sep 17 00:00:00 2001 From: LemADEC Date: Sat, 30 Apr 2016 10:06:46 +0200 Subject: [PATCH] Code cleanup --- src/main/java/cr0s/warpdrive/api/IBlockTransformer.java | 1 + src/main/java/cr0s/warpdrive/compat/CompatForgeMultipart.java | 4 ++-- src/main/java/cr0s/warpdrive/data/JumpBlock.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/cr0s/warpdrive/api/IBlockTransformer.java b/src/main/java/cr0s/warpdrive/api/IBlockTransformer.java index 4f9ca659..6d5840ec 100644 --- a/src/main/java/cr0s/warpdrive/api/IBlockTransformer.java +++ b/src/main/java/cr0s/warpdrive/api/IBlockTransformer.java @@ -34,5 +34,6 @@ public interface IBlockTransformer { // Called when placing back a ship in the world. // Use this to restore external data from the ship schematic, right after block & tile entity placement. // Use priority placement to ensure dependent blocks are placed first. + // This is will be called whether saveExternals returned null or not. void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase); } \ No newline at end of file diff --git a/src/main/java/cr0s/warpdrive/compat/CompatForgeMultipart.java b/src/main/java/cr0s/warpdrive/compat/CompatForgeMultipart.java index c0af400e..ff9625a2 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatForgeMultipart.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatForgeMultipart.java @@ -17,7 +17,7 @@ public class CompatForgeMultipart implements IBlockTransformer { public static Method methodMultipartHelper_createTileFromNBT = null; public static Method methodMultipartHelper_sendDescPacket = null; - public static Method tileMultipart_onChunkLoad = null; + public static Method methodTileMultipart_onChunkLoad = null; private static Class classBlockMultipart; @@ -27,7 +27,7 @@ public class CompatForgeMultipart implements IBlockTransformer { methodMultipartHelper_createTileFromNBT = forgeMultipart_helper.getDeclaredMethod("createTileFromNBT", World.class, NBTTagCompound.class); methodMultipartHelper_sendDescPacket = forgeMultipart_helper.getDeclaredMethod("sendDescPacket", World.class, TileEntity.class); Class forgeMultipart_tileMultipart = Class.forName("codechicken.multipart.TileMultipart"); - tileMultipart_onChunkLoad = forgeMultipart_tileMultipart.getDeclaredMethod("onChunkLoad"); + methodTileMultipart_onChunkLoad = forgeMultipart_tileMultipart.getDeclaredMethod("onChunkLoad"); classBlockMultipart = Class.forName("codechicken.multipart.BlockMultipart"); WarpDriveConfig.registerBlockTransformer("ForgeMultipart", new CompatForgeMultipart()); diff --git a/src/main/java/cr0s/warpdrive/data/JumpBlock.java b/src/main/java/cr0s/warpdrive/data/JumpBlock.java index b0c1b861..6d1f15dd 100644 --- a/src/main/java/cr0s/warpdrive/data/JumpBlock.java +++ b/src/main/java/cr0s/warpdrive/data/JumpBlock.java @@ -327,7 +327,7 @@ public class JumpBlock { targetWorld.setTileEntity(target.posX, target.posY, target.posZ, newTileEntity); if (isForgeMultipart) { - CompatForgeMultipart.tileMultipart_onChunkLoad.invoke(newTileEntity); + CompatForgeMultipart.methodTileMultipart_onChunkLoad.invoke(newTileEntity); CompatForgeMultipart.methodMultipartHelper_sendDescPacket.invoke(null, targetWorld, newTileEntity); } return;