diff --git a/src/main/java/cr0s/warpdrive/api/IBlockTransformer.java b/src/main/java/cr0s/warpdrive/api/IBlockTransformer.java index 6d5840ec..b4ff542d 100644 --- a/src/main/java/cr0s/warpdrive/api/IBlockTransformer.java +++ b/src/main/java/cr0s/warpdrive/api/IBlockTransformer.java @@ -4,9 +4,10 @@ import net.minecraft.block.Block; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public interface IBlockTransformer { - // Return true if this transformer is applicable to that TileEntity. + // Return true if this transformer is applicable to that block. boolean isApplicable(final Block block, final int metadata, final TileEntity tileEntity); // Called when preparing to save a ship structure. @@ -17,23 +18,26 @@ public interface IBlockTransformer { // Use this to save external data in the ship schematic. // You don't need to save Block and TileEntity data here, it's already covered. // Warning: do NOT assume that the ship will be removed! - NBTBase saveExternals(final TileEntity tileEntity); + NBTBase saveExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity); // Called when removing the original ship structure. // Use this to prevents drops, clear energy networks, etc. // Block and TileEntity will be removed right after this call. // When moving, the new ship is placed first. - void remove(TileEntity tileEntity); + void remove(final TileEntity tileEntity); // Called when restoring a ship in the world. // Use this to apply metadata & NBT rotation, right before block & tile entity placement. // Use priority placement to ensure dependent blocks are placed first. // Warning: do NOT place the block or tile entity! - int rotate(final Block block, int metadata, NBTTagCompound nbtTileEntity, ITransformation transformation); + int rotate(final Block block, int metadata, final NBTTagCompound nbtTileEntity, final ITransformation transformation); // 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); + void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase); } \ No newline at end of file diff --git a/src/main/java/cr0s/warpdrive/compat/CompatAdvancedRepulsionSystems.java b/src/main/java/cr0s/warpdrive/compat/CompatAdvancedRepulsionSystems.java index 38852dc3..d816b291 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatAdvancedRepulsionSystems.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatAdvancedRepulsionSystems.java @@ -8,6 +8,7 @@ import net.minecraft.block.Block; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class CompatAdvancedRepulsionSystems implements IBlockTransformer { @@ -42,7 +43,7 @@ public class CompatAdvancedRepulsionSystems implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -114,7 +115,7 @@ public class CompatAdvancedRepulsionSystems implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity, final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatAppliedEnergistics2.java b/src/main/java/cr0s/warpdrive/compat/CompatAppliedEnergistics2.java index 7293fa7c..d1ed648a 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatAppliedEnergistics2.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatAppliedEnergistics2.java @@ -16,6 +16,7 @@ import net.minecraft.block.Block; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class CompatAppliedEnergistics2 implements IBlockTransformer { @@ -67,7 +68,7 @@ public class CompatAppliedEnergistics2 implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -186,7 +187,7 @@ public class CompatAppliedEnergistics2 implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity, final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatArsMagica2.java b/src/main/java/cr0s/warpdrive/compat/CompatArsMagica2.java index 2414603b..287c8ccb 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatArsMagica2.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatArsMagica2.java @@ -57,7 +57,7 @@ public class CompatArsMagica2 implements IBlockTransformer { @Override @Optional.Method(modid = "arsmagica2") - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { if (tileEntity instanceof IPowerNode) { return PowerNodeRegistry.For(tileEntity.getWorldObj()).getDataCompoundForNode((IPowerNode) tileEntity); } @@ -127,7 +127,7 @@ public class CompatArsMagica2 implements IBlockTransformer { @Override @Optional.Method(modid = "arsmagica2") - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity, final ITransformation transformation, final NBTBase nbtBase) { if (!(tileEntity instanceof IPowerNode) || nbtBase == null) { return; } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatBiblioCraft.java b/src/main/java/cr0s/warpdrive/compat/CompatBiblioCraft.java index 45eb70f3..9bf1ea6d 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatBiblioCraft.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatBiblioCraft.java @@ -8,6 +8,7 @@ import net.minecraft.block.Block; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class CompatBiblioCraft implements IBlockTransformer { @@ -39,7 +40,7 @@ public class CompatBiblioCraft implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -132,7 +133,9 @@ public class CompatBiblioCraft implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatBotania.java b/src/main/java/cr0s/warpdrive/compat/CompatBotania.java index fead5e0a..9358bd9c 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatBotania.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatBotania.java @@ -9,6 +9,7 @@ import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; public class CompatBotania implements IBlockTransformer { @@ -42,7 +43,7 @@ public class CompatBotania implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -111,7 +112,7 @@ public class CompatBotania implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity, final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatBuildCraft.java b/src/main/java/cr0s/warpdrive/compat/CompatBuildCraft.java index 42efa50e..10a9862f 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatBuildCraft.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatBuildCraft.java @@ -13,6 +13,7 @@ import net.minecraft.block.Block; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class CompatBuildCraft implements IBlockTransformer { @@ -59,7 +60,7 @@ public class CompatBuildCraft implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -240,7 +241,7 @@ public class CompatBuildCraft implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity, final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatCarpentersBlocks.java b/src/main/java/cr0s/warpdrive/compat/CompatCarpentersBlocks.java index e07a9993..756f75a2 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatCarpentersBlocks.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatCarpentersBlocks.java @@ -8,6 +8,7 @@ import net.minecraft.block.Block; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class CompatCarpentersBlocks implements IBlockTransformer { @@ -71,7 +72,7 @@ public class CompatCarpentersBlocks implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -341,7 +342,9 @@ public class CompatCarpentersBlocks implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatComputerCraft.java b/src/main/java/cr0s/warpdrive/compat/CompatComputerCraft.java index 17a5d2d1..ab24e3f2 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatComputerCraft.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatComputerCraft.java @@ -9,6 +9,7 @@ import net.minecraft.block.Block; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class CompatComputerCraft implements IBlockTransformer { @@ -42,7 +43,7 @@ public class CompatComputerCraft implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -132,7 +133,9 @@ public class CompatComputerCraft implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatCustomNpcs.java b/src/main/java/cr0s/warpdrive/compat/CompatCustomNpcs.java index 3e381177..7d07317b 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatCustomNpcs.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatCustomNpcs.java @@ -8,6 +8,7 @@ import net.minecraft.block.Block; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class CompatCustomNpcs implements IBlockTransformer { @@ -48,7 +49,7 @@ public class CompatCustomNpcs implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -162,7 +163,9 @@ public class CompatCustomNpcs implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatEnderIO.java b/src/main/java/cr0s/warpdrive/compat/CompatEnderIO.java index d5211daa..86ba23ec 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatEnderIO.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatEnderIO.java @@ -16,6 +16,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; @@ -45,7 +46,7 @@ public class CompatEnderIO implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -306,7 +307,9 @@ public class CompatEnderIO implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatEvilCraft.java b/src/main/java/cr0s/warpdrive/compat/CompatEvilCraft.java index 968a0154..d06b4ff6 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatEvilCraft.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatEvilCraft.java @@ -8,6 +8,7 @@ import net.minecraft.block.Block; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class CompatEvilCraft implements IBlockTransformer { @@ -33,7 +34,7 @@ public class CompatEvilCraft implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -77,7 +78,9 @@ public class CompatEvilCraft implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatForgeMultipart.java b/src/main/java/cr0s/warpdrive/compat/CompatForgeMultipart.java index 786ff95d..cbf2f98a 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatForgeMultipart.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatForgeMultipart.java @@ -52,7 +52,7 @@ public class CompatForgeMultipart implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -176,7 +176,9 @@ public class CompatForgeMultipart implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatImmersiveEngineering.java b/src/main/java/cr0s/warpdrive/compat/CompatImmersiveEngineering.java index 47654839..810d9cbc 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatImmersiveEngineering.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatImmersiveEngineering.java @@ -44,7 +44,7 @@ public class CompatImmersiveEngineering implements IBlockTransformer { @Override @Optional.Method(modid = "ImmersiveEngineering") - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { if (tileEntity instanceof IImmersiveConnectable) { ChunkCoordinates node = new ChunkCoordinates(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); Collection connections = ImmersiveNetHandler.INSTANCE.getConnections(tileEntity.getWorldObj(), node); @@ -92,7 +92,9 @@ public class CompatImmersiveEngineering implements IBlockTransformer { @Override @Optional.Method(modid = "ImmersiveEngineering") - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { NBTTagList nbtImmersiveEngineering = (NBTTagList) nbtBase; if (nbtImmersiveEngineering == null) { return; diff --git a/src/main/java/cr0s/warpdrive/compat/CompatIndustrialCraft2.java b/src/main/java/cr0s/warpdrive/compat/CompatIndustrialCraft2.java index 7b071802..d3598b51 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatIndustrialCraft2.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatIndustrialCraft2.java @@ -8,6 +8,7 @@ import net.minecraft.block.Block; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class CompatIndustrialCraft2 implements IBlockTransformer { @@ -33,7 +34,7 @@ public class CompatIndustrialCraft2 implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -68,7 +69,9 @@ public class CompatIndustrialCraft2 implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatJABBA.java b/src/main/java/cr0s/warpdrive/compat/CompatJABBA.java index 4c88f670..1cc78f27 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatJABBA.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatJABBA.java @@ -8,6 +8,7 @@ import net.minecraft.block.Block; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class CompatJABBA implements IBlockTransformer { @@ -33,7 +34,7 @@ public class CompatJABBA implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -118,7 +119,9 @@ public class CompatJABBA implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatMekanism.java b/src/main/java/cr0s/warpdrive/compat/CompatMekanism.java index a1bd2a74..dd178c96 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatMekanism.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatMekanism.java @@ -12,6 +12,7 @@ import net.minecraft.block.Block; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class CompatMekanism implements IBlockTransformer { @@ -38,7 +39,7 @@ public class CompatMekanism implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -119,7 +120,9 @@ public class CompatMekanism implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatMetallurgy.java b/src/main/java/cr0s/warpdrive/compat/CompatMetallurgy.java index 3daf2523..a37c2380 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatMetallurgy.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatMetallurgy.java @@ -8,6 +8,7 @@ import net.minecraft.block.Block; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class CompatMetallurgy implements IBlockTransformer { @@ -33,7 +34,7 @@ public class CompatMetallurgy implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -70,7 +71,9 @@ public class CompatMetallurgy implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatNatura.java b/src/main/java/cr0s/warpdrive/compat/CompatNatura.java index 4b09f25d..d690c49f 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatNatura.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatNatura.java @@ -8,6 +8,7 @@ import net.minecraft.block.Block; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class CompatNatura implements IBlockTransformer { @@ -33,7 +34,7 @@ public class CompatNatura implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -71,7 +72,9 @@ public class CompatNatura implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatOpenComputers.java b/src/main/java/cr0s/warpdrive/compat/CompatOpenComputers.java index d0edd800..4d5f6bb1 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatOpenComputers.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatOpenComputers.java @@ -8,6 +8,7 @@ import net.minecraft.block.Block; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class CompatOpenComputers implements IBlockTransformer { @@ -33,7 +34,7 @@ public class CompatOpenComputers implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -68,7 +69,9 @@ public class CompatOpenComputers implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatPneumaticCraft.java b/src/main/java/cr0s/warpdrive/compat/CompatPneumaticCraft.java index 49561448..adb8ea2c 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatPneumaticCraft.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatPneumaticCraft.java @@ -10,6 +10,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; public class CompatPneumaticCraft implements IBlockTransformer { @@ -35,7 +36,8 @@ public class CompatPneumaticCraft implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { + // nothing to do return null; } @@ -187,7 +189,9 @@ public class CompatPneumaticCraft implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatRedstonePaste.java b/src/main/java/cr0s/warpdrive/compat/CompatRedstonePaste.java index eea6383a..e243147a 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatRedstonePaste.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatRedstonePaste.java @@ -8,6 +8,7 @@ import net.minecraft.block.Block; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class CompatRedstonePaste implements IBlockTransformer { @@ -33,7 +34,7 @@ public class CompatRedstonePaste implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -198,7 +199,9 @@ public class CompatRedstonePaste implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatSGCraft.java b/src/main/java/cr0s/warpdrive/compat/CompatSGCraft.java index 067b9eab..43e67ee8 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatSGCraft.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatSGCraft.java @@ -12,6 +12,7 @@ import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; public class CompatSGCraft implements IBlockTransformer { @@ -58,7 +59,7 @@ public class CompatSGCraft implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -113,7 +114,9 @@ public class CompatSGCraft implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatStargateTech2.java b/src/main/java/cr0s/warpdrive/compat/CompatStargateTech2.java index 99d5f4d5..abcfa135 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatStargateTech2.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatStargateTech2.java @@ -17,6 +17,7 @@ import net.minecraft.nbt.NBTTagByte; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; public class CompatStargateTech2 implements IBlockTransformer { @@ -52,7 +53,7 @@ public class CompatStargateTech2 implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -149,7 +150,9 @@ public class CompatStargateTech2 implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { if (classTileTransportRing.isInstance(tileEntity)) { try { methodTileTransportRing_link.invoke(tileEntity); diff --git a/src/main/java/cr0s/warpdrive/compat/CompatTConstruct.java b/src/main/java/cr0s/warpdrive/compat/CompatTConstruct.java index b2f3f4e4..e819b45c 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatTConstruct.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatTConstruct.java @@ -8,6 +8,7 @@ import net.minecraft.block.Block; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class CompatTConstruct implements IBlockTransformer { @@ -45,7 +46,7 @@ public class CompatTConstruct implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -100,7 +101,9 @@ public class CompatTConstruct implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatTechguns.java b/src/main/java/cr0s/warpdrive/compat/CompatTechguns.java index b4c7b791..15d242a4 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatTechguns.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatTechguns.java @@ -9,6 +9,7 @@ import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; public class CompatTechguns implements IBlockTransformer { @@ -43,7 +44,7 @@ public class CompatTechguns implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -214,7 +215,9 @@ public class CompatTechguns implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatThaumcraft.java b/src/main/java/cr0s/warpdrive/compat/CompatThaumcraft.java index 0c7e6076..1e9db15e 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatThaumcraft.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatThaumcraft.java @@ -9,6 +9,7 @@ import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; @@ -60,7 +61,7 @@ public class CompatThaumcraft implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -337,7 +338,9 @@ public class CompatThaumcraft implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatThermalDynamics.java b/src/main/java/cr0s/warpdrive/compat/CompatThermalDynamics.java index 643a7ed9..63160833 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatThermalDynamics.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatThermalDynamics.java @@ -12,6 +12,7 @@ import net.minecraft.block.Block; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class CompatThermalDynamics implements IBlockTransformer { @@ -38,7 +39,7 @@ public class CompatThermalDynamics implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -103,7 +104,9 @@ public class CompatThermalDynamics implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatThermalExpansion.java b/src/main/java/cr0s/warpdrive/compat/CompatThermalExpansion.java index d83a27c6..c5b94295 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatThermalExpansion.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatThermalExpansion.java @@ -8,6 +8,7 @@ import net.minecraft.block.Block; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class CompatThermalExpansion implements IBlockTransformer { @@ -34,7 +35,7 @@ public class CompatThermalExpansion implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { + public NBTBase saveExternals(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { // nothing to do return null; } @@ -140,7 +141,9 @@ public class CompatThermalExpansion implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatWarpDrive.java b/src/main/java/cr0s/warpdrive/compat/CompatWarpDrive.java index 063d93df..54a94a4d 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatWarpDrive.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatWarpDrive.java @@ -3,14 +3,20 @@ package cr0s.warpdrive.compat; import cr0s.warpdrive.api.IBlockTransformer; import cr0s.warpdrive.api.ITransformation; +import cr0s.warpdrive.block.breathing.BlockAirFlow; +import cr0s.warpdrive.block.breathing.BlockAirSource; import cr0s.warpdrive.block.energy.TileEntityEnergyBank; import cr0s.warpdrive.block.hull.BlockHullSlab; import cr0s.warpdrive.config.WarpDriveConfig; +import cr0s.warpdrive.data.StateAir; +import cr0s.warpdrive.event.ChunkHandler; import net.minecraft.block.Block; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IWorldAccess; +import net.minecraft.world.World; public class CompatWarpDrive implements IBlockTransformer { @@ -30,8 +36,17 @@ public class CompatWarpDrive implements IBlockTransformer { } @Override - public NBTBase saveExternals(final TileEntity tileEntity) { - // nothing to do + public NBTBase saveExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity) { + if (block instanceof BlockAirFlow || block instanceof BlockAirSource) { + final int dataAir = ChunkHandler.getChunkData(world, x, y, z).getDataAir(x, y, z); + if (dataAir == StateAir.AIR_DEFAULT) { + return null; + } + final NBTTagCompound tagCompound = new NBTTagCompound(); + tagCompound.setInteger("dataAir", dataAir); + return tagCompound; + } return null; } @@ -89,7 +104,18 @@ public class CompatWarpDrive implements IBlockTransformer { } @Override - public void restoreExternals(TileEntity tileEntity, ITransformation transformation, NBTBase nbtBase) { - // nothing to do + public void restoreExternals(final World world, final int x, final int y, final int z, + final Block block, final int blockMeta, final TileEntity tileEntity, + final ITransformation transformation, final NBTBase nbtBase) { + if (nbtBase == null) { + return; + } + if (!(nbtBase instanceof NBTTagCompound)) { + return; + } + if (((NBTTagCompound) nbtBase).hasKey("dataAir")) { + final int dataAir = ((NBTTagCompound) nbtBase).getInteger("dataAir"); + ChunkHandler.getChunkData(world, x, y, z).setDataAir(x, y, z, dataAir); + } } } diff --git a/src/main/java/cr0s/warpdrive/data/ChunkData.java b/src/main/java/cr0s/warpdrive/data/ChunkData.java index 4c0c30a6..9996048e 100644 --- a/src/main/java/cr0s/warpdrive/data/ChunkData.java +++ b/src/main/java/cr0s/warpdrive/data/ChunkData.java @@ -339,7 +339,7 @@ public class ChunkData { return dataAirSegment[indexData & 0xFFF]; } - protected void setDataAir(final int x, final int y, final int z, final int dataAirBlock) { + public void setDataAir(final int x, final int y, final int z, final int dataAirBlock) { final int indexData = getDataIndex(x, y, z); // get segment diff --git a/src/main/java/cr0s/warpdrive/data/JumpBlock.java b/src/main/java/cr0s/warpdrive/data/JumpBlock.java index f0d82b0a..98d3888e 100644 --- a/src/main/java/cr0s/warpdrive/data/JumpBlock.java +++ b/src/main/java/cr0s/warpdrive/data/JumpBlock.java @@ -71,7 +71,7 @@ public class JumpBlock { public JumpBlock() { } - public JumpBlock(Block block, int blockMeta, TileEntity tileEntity, int x, int y, int z) { + public JumpBlock(final World world, final int x, final int y, final int z, final Block block, final int blockMeta, final TileEntity tileEntity) { this.block = block; this.blockMeta = blockMeta; blockTileEntity = tileEntity; @@ -82,7 +82,7 @@ public class JumpBlock { // save externals for (Entry entryBlockTransformer : WarpDriveConfig.blockTransformers.entrySet()) { if (entryBlockTransformer.getValue().isApplicable(block, blockMeta, tileEntity)) { - NBTBase nbtBase = entryBlockTransformer.getValue().saveExternals(tileEntity); + NBTBase nbtBase = entryBlockTransformer.getValue().saveExternals(world, x, y, z, block, blockMeta, tileEntity); setExternal(entryBlockTransformer.getKey(), nbtBase); } } @@ -137,7 +137,7 @@ public class JumpBlock { private static final byte[] mrotStair = { 2, 3, 1, 0, 6, 7, 5, 4, 8, 9, 10, 11, 12, 13, 14, 15 }; private static final byte[] mrotSign = { 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3 }; // Sign, Skull private static final byte[] mrotTrapDoor = { 3, 2, 0, 1, 7, 6, 4, 5, 11, 10, 8, 9, 15, 14, 12, 13 }; - private static final byte[] mrotLever = { 7, 2, 3, 4, 1, 6, 5, 0, 15, 11, 12, 10, 9, 14, 13, 8 }; + private static final byte[] mrotLever = { 7, 3, 4, 2, 1, 6, 5, 0, 15, 11, 12, 10, 9, 14, 13, 8 }; private static final byte[] mrotNetherPortal = { 0, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; private static final byte[] mrotVine = { 0, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 15 }; private static final byte[] mrotButton = { 0, 3, 4, 2, 1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; // Button, torch (normal, redstone lit/unlit) diff --git a/src/main/java/cr0s/warpdrive/data/JumpShip.java b/src/main/java/cr0s/warpdrive/data/JumpShip.java index 06da1e36..f773b841 100644 --- a/src/main/java/cr0s/warpdrive/data/JumpShip.java +++ b/src/main/java/cr0s/warpdrive/data/JumpShip.java @@ -316,9 +316,9 @@ public class JumpShip { return false; } - int blockMeta = worldObj.getBlockMetadata(x, y, z); - TileEntity tileEntity = worldObj.getTileEntity(x, y, z); - JumpBlock jumpBlock = new JumpBlock(block, blockMeta, tileEntity, x, y, z); + final int blockMeta = worldObj.getBlockMetadata(x, y, z); + final TileEntity tileEntity = worldObj.getTileEntity(x, y, z); + JumpBlock jumpBlock = new JumpBlock(worldObj, x, y, z, block, blockMeta, tileEntity); if (jumpBlock.blockTileEntity != null && jumpBlock.externals != null) { for (Entry external : jumpBlock.externals.entrySet()) { diff --git a/src/main/java/cr0s/warpdrive/data/StateAir.java b/src/main/java/cr0s/warpdrive/data/StateAir.java index 49526e26..8d330d80 100644 --- a/src/main/java/cr0s/warpdrive/data/StateAir.java +++ b/src/main/java/cr0s/warpdrive/data/StateAir.java @@ -25,7 +25,7 @@ import net.minecraftforge.fluids.BlockFluidBase; public class StateAir { - static final int AIR_DEFAULT = 0x060000C0; // default is the unknown state + public static final int AIR_DEFAULT = 0x060000C0; // default is the unknown state // highest bit is unusable since Java only supports signed primitives (mostly) static final int USED_MASK = 0b01110111111111111111111100001111; diff --git a/src/main/java/cr0s/warpdrive/event/JumpSequencer.java b/src/main/java/cr0s/warpdrive/event/JumpSequencer.java index f2f8af91..af3153eb 100644 --- a/src/main/java/cr0s/warpdrive/event/JumpSequencer.java +++ b/src/main/java/cr0s/warpdrive/event/JumpSequencer.java @@ -918,7 +918,8 @@ public class JumpSequencer extends AbstractSequencer { ChunkCoordinates target = transformation.apply(jumpBlock.x, jumpBlock.y, jumpBlock.z); TileEntity newTileEntity = targetWorld.getTileEntity(target.posX, target.posY, target.posZ); - blockTransformer.restoreExternals(newTileEntity, transformation, external.getValue()); + blockTransformer.restoreExternals(targetWorld, target.posX, target.posY, target.posZ, + jumpBlock.block, jumpBlock.blockMeta, newTileEntity, transformation, external.getValue()); } } index++;