From 4f2b4ee11ee20f121ba980e9b1bd9ee6e0aab1fd Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 2 Dec 2018 23:21:40 +0100 Subject: [PATCH] Updated block transformer API for consistency (previously a mix for source/old and target/new states were passed as arguments, now only target/new bockstate is provided) --- .../java/cr0s/warpdrive/api/IBlockTransformer.java | 7 ++++--- .../compat/CompatAdvancedRepulsionSystems.java | 6 ++++-- .../warpdrive/compat/CompatAppliedEnergistics2.java | 6 ++++-- .../java/cr0s/warpdrive/compat/CompatArsMagica2.java | 5 +++-- .../java/cr0s/warpdrive/compat/CompatBiblioCraft.java | 6 ++++-- src/main/java/cr0s/warpdrive/compat/CompatBotania.java | 5 +++-- .../java/cr0s/warpdrive/compat/CompatBuildCraft.java | 6 ++++-- .../cr0s/warpdrive/compat/CompatCarpentersBlocks.java | 6 ++++-- .../cr0s/warpdrive/compat/CompatComputerCraft.java | 6 ++++-- .../java/cr0s/warpdrive/compat/CompatCustomNpcs.java | 6 ++++-- .../cr0s/warpdrive/compat/CompatDraconicEvolution.java | 5 +++-- src/main/java/cr0s/warpdrive/compat/CompatEnderIO.java | 5 +++-- .../java/cr0s/warpdrive/compat/CompatEvilCraft.java | 6 ++++-- .../cr0s/warpdrive/compat/CompatForgeMultipart.java | 6 ++++-- .../warpdrive/compat/CompatImmersiveEngineering.java | 5 +++-- .../cr0s/warpdrive/compat/CompatIndustrialCraft2.java | 5 +++-- .../java/cr0s/warpdrive/compat/CompatIronChest.java | 6 ++++-- src/main/java/cr0s/warpdrive/compat/CompatJABBA.java | 6 ++++-- .../java/cr0s/warpdrive/compat/CompatMekanism.java | 5 +++-- .../java/cr0s/warpdrive/compat/CompatMetalChests.java | 6 ++++-- .../java/cr0s/warpdrive/compat/CompatMetallurgy.java | 6 ++++-- src/main/java/cr0s/warpdrive/compat/CompatNatura.java | 6 ++++-- .../cr0s/warpdrive/compat/CompatOpenComputers.java | 6 ++++-- .../cr0s/warpdrive/compat/CompatParziStarWars.java | 6 ++++-- .../cr0s/warpdrive/compat/CompatRedstonePaste.java | 6 ++++-- src/main/java/cr0s/warpdrive/compat/CompatRoots.java | 6 ++++-- src/main/java/cr0s/warpdrive/compat/CompatSGCraft.java | 5 +++-- .../cr0s/warpdrive/compat/CompatStargateTech2.java | 5 +++-- .../cr0s/warpdrive/compat/CompatStorageDrawers.java | 6 ++++-- .../java/cr0s/warpdrive/compat/CompatTConstruct.java | 6 ++++-- .../java/cr0s/warpdrive/compat/CompatTechguns.java | 5 +++-- .../java/cr0s/warpdrive/compat/CompatThaumcraft.java | 5 +++-- .../cr0s/warpdrive/compat/CompatThermalDynamics.java | 6 ++++-- .../cr0s/warpdrive/compat/CompatThermalExpansion.java | 6 ++++-- .../java/cr0s/warpdrive/compat/CompatWarpDrive.java | 10 ++++++---- src/main/java/cr0s/warpdrive/event/JumpSequencer.java | 9 +++++---- 36 files changed, 136 insertions(+), 77 deletions(-) diff --git a/src/main/java/cr0s/warpdrive/api/IBlockTransformer.java b/src/main/java/cr0s/warpdrive/api/IBlockTransformer.java index 8af7fa1c..a881a133 100644 --- a/src/main/java/cr0s/warpdrive/api/IBlockTransformer.java +++ b/src/main/java/cr0s/warpdrive/api/IBlockTransformer.java @@ -1,9 +1,11 @@ package cr0s.warpdrive.api; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public interface IBlockTransformer { @@ -37,8 +39,7 @@ public interface IBlockTransformer { // Called when placing back a ship in the world, if saveExternals() returned non-null for that block. // 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(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 0d6d3f51..c5275844 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatAdvancedRepulsionSystems.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatAdvancedRepulsionSystems.java @@ -6,9 +6,11 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class CompatAdvancedRepulsionSystems implements IBlockTransformer { @@ -117,8 +119,8 @@ public class CompatAdvancedRepulsionSystems implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 2f064f6b..46aa6f20 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatAppliedEnergistics2.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatAppliedEnergistics2.java @@ -15,9 +15,11 @@ import java.util.Map; import java.util.Map.Entry; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class CompatAppliedEnergistics2 implements IBlockTransformer { @@ -190,8 +192,8 @@ public class CompatAppliedEnergistics2 implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 7eee8249..7b3222c5 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatArsMagica2.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatArsMagica2.java @@ -9,6 +9,7 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; @@ -129,8 +130,8 @@ public class CompatArsMagica2 implements IBlockTransformer { @Override @Optional.Method(modid = "arsmagica2") - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 31d87ee6..1ef32f34 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatBiblioCraft.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatBiblioCraft.java @@ -6,9 +6,11 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class CompatBiblioCraft implements IBlockTransformer { @@ -135,8 +137,8 @@ public class CompatBiblioCraft implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 faaed1c5..0b933316 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatBotania.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatBotania.java @@ -6,6 +6,7 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -124,8 +125,8 @@ public class CompatBotania implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 fa77a836..1afb38e5 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatBuildCraft.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatBuildCraft.java @@ -12,9 +12,11 @@ import java.util.Map; import java.util.Set; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.TextComponentTranslation; import net.minecraft.world.World; @@ -250,8 +252,8 @@ public class CompatBuildCraft implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 ce4031ed..53907cc0 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatCarpentersBlocks.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatCarpentersBlocks.java @@ -6,9 +6,11 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class CompatCarpentersBlocks implements IBlockTransformer { @@ -344,8 +346,8 @@ public class CompatCarpentersBlocks implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 f7c03875..74ac902b 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatComputerCraft.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatComputerCraft.java @@ -7,9 +7,11 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class CompatComputerCraft implements IBlockTransformer { @@ -137,8 +139,8 @@ public class CompatComputerCraft implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 3b9b74ff..bcb5a2ca 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatCustomNpcs.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatCustomNpcs.java @@ -6,9 +6,11 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class CompatCustomNpcs implements IBlockTransformer { @@ -165,8 +167,8 @@ public class CompatCustomNpcs implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, final TileEntity tileEntity, final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatDraconicEvolution.java b/src/main/java/cr0s/warpdrive/compat/CompatDraconicEvolution.java index 52dedbdf..b757625f 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatDraconicEvolution.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatDraconicEvolution.java @@ -7,6 +7,7 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; @@ -323,8 +324,8 @@ public class CompatDraconicEvolution implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 3707a092..bc5dd590 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatEnderIO.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatEnderIO.java @@ -12,6 +12,7 @@ import java.util.Map.Entry; import java.util.Set; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; @@ -310,8 +311,8 @@ public class CompatEnderIO implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 ccc9eda1..65c73f1e 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatEvilCraft.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatEvilCraft.java @@ -6,9 +6,11 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class CompatEvilCraft implements IBlockTransformer { @@ -80,8 +82,8 @@ public class CompatEvilCraft implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 347ba1d6..741b2ca5 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatForgeMultipart.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatForgeMultipart.java @@ -9,10 +9,12 @@ import cr0s.warpdrive.config.WarpDriveConfig; import java.lang.reflect.Method; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; @@ -180,8 +182,8 @@ public class CompatForgeMultipart implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 5d77d548..d0c1e9fb 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatImmersiveEngineering.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatImmersiveEngineering.java @@ -11,6 +11,7 @@ import cr0s.warpdrive.config.WarpDriveConfig; import java.util.Collection; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; @@ -93,8 +94,8 @@ public class CompatImmersiveEngineering implements IBlockTransformer { @Override @Optional.Method(modid = "immersiveengineering") - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, final TileEntity tileEntity, final ITransformation transformation, final NBTBase nbtBase) { final NBTTagList nbtImmersiveEngineering = (NBTTagList) nbtBase; if (nbtImmersiveEngineering == null) { diff --git a/src/main/java/cr0s/warpdrive/compat/CompatIndustrialCraft2.java b/src/main/java/cr0s/warpdrive/compat/CompatIndustrialCraft2.java index 551ba03c..f564d444 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatIndustrialCraft2.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatIndustrialCraft2.java @@ -6,6 +6,7 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -87,8 +88,8 @@ public class CompatIndustrialCraft2 implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, final TileEntity tileEntity, final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatIronChest.java b/src/main/java/cr0s/warpdrive/compat/CompatIronChest.java index 166d7e5a..24e9bdf8 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatIronChest.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatIronChest.java @@ -6,9 +6,11 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class CompatIronChest implements IBlockTransformer { @@ -82,8 +84,8 @@ public class CompatIronChest implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 467d1ad4..5f61eca8 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatJABBA.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatJABBA.java @@ -6,9 +6,11 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class CompatJABBA implements IBlockTransformer { @@ -121,8 +123,8 @@ public class CompatJABBA implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 f9242d65..943ae465 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatMekanism.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatMekanism.java @@ -10,6 +10,7 @@ import java.util.HashMap; import java.util.Map; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -157,8 +158,8 @@ public class CompatMekanism implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, final TileEntity tileEntity, final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatMetalChests.java b/src/main/java/cr0s/warpdrive/compat/CompatMetalChests.java index bbc47a9d..24f4fd47 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatMetalChests.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatMetalChests.java @@ -10,9 +10,11 @@ import java.util.HashMap; import java.util.Map; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class CompatMetalChests implements IBlockTransformer { @@ -90,8 +92,8 @@ public class CompatMetalChests implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 3a310e37..ced9df50 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatMetallurgy.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatMetallurgy.java @@ -6,9 +6,11 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class CompatMetallurgy implements IBlockTransformer { @@ -73,8 +75,8 @@ public class CompatMetallurgy implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 fd2741cf..1c5289e6 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatNatura.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatNatura.java @@ -6,9 +6,11 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class CompatNatura implements IBlockTransformer { @@ -74,8 +76,8 @@ public class CompatNatura implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 93c5344a..c52dba87 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatOpenComputers.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatOpenComputers.java @@ -6,9 +6,11 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class CompatOpenComputers implements IBlockTransformer { @@ -71,8 +73,8 @@ public class CompatOpenComputers implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, final TileEntity tileEntity, final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatParziStarWars.java b/src/main/java/cr0s/warpdrive/compat/CompatParziStarWars.java index 0f4b0b5c..d60a9f92 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatParziStarWars.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatParziStarWars.java @@ -6,9 +6,11 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class CompatParziStarWars implements IBlockTransformer { @@ -157,8 +159,8 @@ public class CompatParziStarWars implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 59973f99..c81520ea 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatRedstonePaste.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatRedstonePaste.java @@ -6,9 +6,11 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class CompatRedstonePaste implements IBlockTransformer { @@ -201,8 +203,8 @@ public class CompatRedstonePaste implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, final TileEntity tileEntity, final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatRoots.java b/src/main/java/cr0s/warpdrive/compat/CompatRoots.java index 7bd22071..4570e3cd 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatRoots.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatRoots.java @@ -6,9 +6,11 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class CompatRoots implements IBlockTransformer { @@ -75,8 +77,8 @@ public class CompatRoots implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 0bb4baa2..6007a790 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatSGCraft.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatSGCraft.java @@ -10,6 +10,7 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -117,8 +118,8 @@ public class CompatSGCraft implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 fc6ee58e..bc85c1a3 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatStargateTech2.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatStargateTech2.java @@ -13,6 +13,7 @@ import java.util.Map; import java.util.Set; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagByte; import net.minecraft.nbt.NBTTagCompound; @@ -152,8 +153,8 @@ public class CompatStargateTech2 implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, final TileEntity tileEntity, final ITransformation transformation, final NBTBase nbtBase) { if (classTileTransportRing.isInstance(tileEntity)) { try { diff --git a/src/main/java/cr0s/warpdrive/compat/CompatStorageDrawers.java b/src/main/java/cr0s/warpdrive/compat/CompatStorageDrawers.java index 95a2b045..0080e425 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatStorageDrawers.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatStorageDrawers.java @@ -6,9 +6,11 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class CompatStorageDrawers implements IBlockTransformer { @@ -115,8 +117,8 @@ public class CompatStorageDrawers implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, final TileEntity tileEntity, final ITransformation transformation, final NBTBase nbtBase) { // nothing to do } diff --git a/src/main/java/cr0s/warpdrive/compat/CompatTConstruct.java b/src/main/java/cr0s/warpdrive/compat/CompatTConstruct.java index 688fd843..65e69ca3 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatTConstruct.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatTConstruct.java @@ -6,9 +6,11 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class CompatTConstruct implements IBlockTransformer { @@ -133,8 +135,8 @@ public class CompatTConstruct implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 d52aeaad..c4543a9d 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatTechguns.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatTechguns.java @@ -6,6 +6,7 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -217,8 +218,8 @@ public class CompatTechguns implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 34c4c615..f30acaeb 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatThaumcraft.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatThaumcraft.java @@ -6,6 +6,7 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -230,8 +231,8 @@ public class CompatThaumcraft implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 21524801..ff823de9 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatThermalDynamics.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatThermalDynamics.java @@ -6,10 +6,12 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; @@ -122,8 +124,8 @@ public class CompatThermalDynamics implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 a06e9ef3..d112bc33 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatThermalExpansion.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatThermalExpansion.java @@ -6,9 +6,11 @@ import cr0s.warpdrive.api.WarpDriveText; import cr0s.warpdrive.config.WarpDriveConfig; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class CompatThermalExpansion implements IBlockTransformer { @@ -104,8 +106,8 @@ public class CompatThermalExpansion implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, 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 0e358d08..17d1533f 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatWarpDrive.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatWarpDrive.java @@ -19,9 +19,11 @@ import cr0s.warpdrive.data.StateAir; import cr0s.warpdrive.event.ChunkHandler; import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class CompatWarpDrive implements IBlockTransformer { @@ -157,8 +159,8 @@ public class CompatWarpDrive implements IBlockTransformer { } @Override - public void restoreExternals(final World world, final int x, final int y, final int z, - final Block block, final int blockMeta, final TileEntity tileEntity, + public void restoreExternals(final World world, final BlockPos blockPos, + final IBlockState blockState, final TileEntity tileEntity, final ITransformation transformation, final NBTBase nbtBase) { if (nbtBase == null) { return; @@ -169,13 +171,13 @@ public class CompatWarpDrive implements IBlockTransformer { if (((NBTTagCompound) nbtBase).hasKey("dataAir")) { final byte rotationSteps = transformation.getRotationSteps(); final int dataAir = ((NBTTagCompound) nbtBase).getInteger("dataAir"); - final ChunkData chunkData = ChunkHandler.getChunkData(world, x, y, z); + final ChunkData chunkData = ChunkHandler.getChunkData(world, blockPos.getX(), blockPos.getY(), blockPos.getZ()); if (chunkData == null) { // chunk isn't loaded, skip it return; } final int dataAirRotated = StateAir.rotate(dataAir, rotationSteps); - chunkData.setDataAir(x, y, z, dataAirRotated); + chunkData.setDataAir(blockPos.getX(), blockPos.getY(), blockPos.getZ(), dataAirRotated); } } } diff --git a/src/main/java/cr0s/warpdrive/event/JumpSequencer.java b/src/main/java/cr0s/warpdrive/event/JumpSequencer.java index 74a836f7..6b0cc9dc 100644 --- a/src/main/java/cr0s/warpdrive/event/JumpSequencer.java +++ b/src/main/java/cr0s/warpdrive/event/JumpSequencer.java @@ -1143,10 +1143,11 @@ public class JumpSequencer extends AbstractSequencer { jumpBlock.block, jumpBlock.blockMeta, tileEntitySource); } - final BlockPos target = transformation.apply(jumpBlock.x, jumpBlock.y, jumpBlock.z); - final TileEntity newTileEntity = jumpBlock.weakTileEntity == null ? null : targetWorld.getTileEntity(target); - blockTransformer.restoreExternals(targetWorld, target.getX(), target.getY(), target.getZ(), - jumpBlock.block, jumpBlock.blockMeta, newTileEntity, transformation, external.getValue()); + final BlockPos blockPosTarget = transformation.apply(jumpBlock.x, jumpBlock.y, jumpBlock.z); + final IBlockState blockStateTarget = targetWorld.getBlockState(blockPosTarget); + final TileEntity newTileEntity = jumpBlock.weakTileEntity == null ? null : targetWorld.getTileEntity(blockPosTarget); + blockTransformer.restoreExternals(targetWorld, blockPosTarget, + blockStateTarget, newTileEntity, transformation, external.getValue()); } } index++;