Code cleanup

This commit is contained in:
LemADEC 2016-04-30 10:06:46 +02:00
parent ac9854b816
commit f10cd75fc7
3 changed files with 4 additions and 3 deletions

View file

@ -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);
}

View file

@ -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());

View file

@ -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;