diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index 99836f43..4b915857 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -259,12 +259,12 @@ import WayofTime.alchemicalWizardry.common.spell.simple.SpellWateryGrave; import WayofTime.alchemicalWizardry.common.spell.simple.SpellWindGust; import WayofTime.alchemicalWizardry.common.summoning.SummoningHelperAW; import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; import WayofTime.alchemicalWizardry.common.tileEntity.TECrucible; -import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpellTable; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; import WayofTime.alchemicalWizardry.common.tileEntity.TEMimicBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TEOrientable; @@ -280,7 +280,7 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; import WayofTime.alchemicalWizardry.common.tileEntity.gui.GuiHandler; //import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration; @@ -761,8 +761,8 @@ public class AlchemicalWizardry GameRegistry.registerTileEntity(TEAltar.class, "containerAltar"); GameRegistry.registerTileEntity(TEMasterStone.class, "containerMasterStone"); GameRegistry.registerTileEntity(TESocket.class, "containerSocket"); - GameRegistry.registerTileEntity(TEWritingTable.class, "containerWritingTable"); - GameRegistry.registerTileEntity(TEHomHeart.class, "containerHomHeart"); + GameRegistry.registerTileEntity(TEChemistrySet.class, "containerWritingTable"); + GameRegistry.registerTileEntity(TESpellTable.class, "containerHomHeart"); GameRegistry.registerTileEntity(TEPedestal.class, "containerPedestal"); GameRegistry.registerTileEntity(TEPlinth.class, "containerPlinth"); GameRegistry.registerTileEntity(TETeleposer.class, "containerTeleposer"); @@ -777,8 +777,8 @@ public class AlchemicalWizardry GameRegistry.registerTileEntity(TESchematicSaver.class, "containerSchematicSaver"); GameRegistry.registerTileEntity(TESpectralBlock.class, "containerSpectralBlock"); GameRegistry.registerTileEntity(TEReagentConduit.class, "containerReagentConduit"); - GameRegistry.registerTileEntity(TEBellJar.class, "containerBellJar"); - GameRegistry.registerTileEntity(TEAlchemicCalcinator.class, "containerAlchemicCalcinator"); + GameRegistry.registerTileEntity(TEBelljar.class, "containerBellJar"); + GameRegistry.registerTileEntity(TEAlchemicalCalcinator.class, "containerAlchemicCalcinator"); GameRegistry.registerTileEntity(TEDemonChest.class, "containerDemonChest"); GameRegistry.registerTileEntity(TEMimicBlock.class, "containerMimic"); GameRegistry.registerTileEntity(TECrucible.class, "containerCrucible"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java index 4796f951..ea051a0d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/api/soulNetwork/SoulNetworkHandler.java @@ -19,6 +19,32 @@ import WayofTime.alchemicalWizardry.api.event.ItemDrainNetworkEvent; public class SoulNetworkHandler { + public static boolean canSyphonInContainer(ItemStack ist, int damageToBeDone) + { + if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) + { + String ownerName = ist.getTagCompound().getString("ownerName"); + + if (MinecraftServer.getServer() == null) + { + return false; + } + + World world = MinecraftServer.getServer().worldServers[0]; + LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); + + if (data == null) + { + data = new LifeEssenceNetwork(ownerName); + world.setItemData(ownerName, data); + } + + return data.currentEssence >= damageToBeDone; + } + + return false; + } + public static boolean syphonFromNetworkWhileInContainer(ItemStack ist, int damageToBeDone) { String ownerName = ""; diff --git a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java b/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java index c8a076b6..911fc563 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/client/ClientProxy.java @@ -89,9 +89,9 @@ import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBazoo import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBlastProjectile; import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderMeteor; import WayofTime.alchemicalWizardry.common.thread.GAPIChecker; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; @@ -101,7 +101,7 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; public class ClientProxy extends CommonProxy { @@ -152,7 +152,7 @@ public class ClientProxy extends CommonProxy ClientRegistry.bindTileEntitySpecialRenderer(TEAltar.class, new TEAltarRenderer()); ClientRegistry.bindTileEntitySpecialRenderer(TEPedestal.class, new RenderPedestal()); ClientRegistry.bindTileEntitySpecialRenderer(TEPlinth.class, new RenderPlinth()); - ClientRegistry.bindTileEntitySpecialRenderer(TEWritingTable.class, new RenderWritingTable()); + ClientRegistry.bindTileEntitySpecialRenderer(TEChemistrySet.class, new RenderWritingTable()); ClientRegistry.bindTileEntitySpecialRenderer(TEConduit.class, new RenderConduit()); ClientRegistry.bindTileEntitySpecialRenderer(TESpellEffectBlock.class, new RenderSpellEffectBlock()); ClientRegistry.bindTileEntitySpecialRenderer(TESpellEnhancementBlock.class, new RenderSpellEnhancementBlock()); @@ -160,8 +160,8 @@ public class ClientProxy extends CommonProxy ClientRegistry.bindTileEntitySpecialRenderer(TESpellModifierBlock.class, new RenderSpellModifierBlock()); ClientRegistry.bindTileEntitySpecialRenderer(TEReagentConduit.class, new RenderReagentConduit()); ClientRegistry.bindTileEntitySpecialRenderer(TEMasterStone.class, new RenderMasterStone()); - ClientRegistry.bindTileEntitySpecialRenderer(TEAlchemicCalcinator.class, new RenderAlchemicCalcinator()); - ClientRegistry.bindTileEntitySpecialRenderer(TEBellJar.class, new RenderCrystalBelljar()); + ClientRegistry.bindTileEntitySpecialRenderer(TEAlchemicalCalcinator.class, new RenderAlchemicCalcinator()); + ClientRegistry.bindTileEntitySpecialRenderer(TEBelljar.class, new RenderCrystalBelljar()); //Item Renderer stuff MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockConduit), new TEConduitItemRenderer()); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java index 1902d47b..f11a4853 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/NewPacketHandler.java @@ -39,7 +39,7 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; public enum NewPacketHandler { @@ -194,9 +194,9 @@ public enum NewPacketHandler { World world = AlchemicalWizardry.proxy.getClientWorld(); TileEntity te = world.getTileEntity(msg.pos); - if (te instanceof TEWritingTable) + if (te instanceof TEChemistrySet) { - TEWritingTable WritingTable = (TEWritingTable) te; + TEChemistrySet WritingTable = (TEChemistrySet) te; WritingTable.handlePacketData(msg.items); } @@ -809,10 +809,10 @@ public enum NewPacketHandler boolean hasStacks5 = newBuffer.readBoolean(); - ((TEWritingTableMessage) msg).items = new int[TEWritingTable.sizeInv * 3]; + ((TEWritingTableMessage) msg).items = new int[TEChemistrySet.sizeInv * 3]; if (hasStacks5) { - ((TEWritingTableMessage) msg).items = new int[TEWritingTable.sizeInv * 3]; + ((TEWritingTableMessage) msg).items = new int[TEChemistrySet.sizeInv * 3]; for (int i = 0; i < ((TEWritingTableMessage) msg).items.length; i++) { ((TEWritingTableMessage) msg).items[i] = newBuffer.readInt(); @@ -971,7 +971,7 @@ public enum NewPacketHandler return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg); } - public static Packet getPacket(TEWritingTable tileWritingTable) + public static Packet getPacket(TEChemistrySet tileWritingTable) { TEWritingTableMessage msg = new TEWritingTableMessage(); msg.index = 6; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicalCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicalCalcinator.java index 2413fa19..ae0548f9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicalCalcinator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockAlchemicalCalcinator.java @@ -2,7 +2,7 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; -import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator; +import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -30,7 +30,7 @@ public class BlockAlchemicalCalcinator extends BlockContainer @Override public TileEntity createNewTileEntity(World world, int meta) { - return new TEAlchemicCalcinator(); + return new TEAlchemicalCalcinator(); } @Override @@ -105,7 +105,7 @@ public class BlockAlchemicalCalcinator extends BlockContainer @Override public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { - TEAlchemicCalcinator tileEntity = (TEAlchemicCalcinator) world.getTileEntity(blockPos); + TEAlchemicalCalcinator tileEntity = (TEAlchemicalCalcinator) world.getTileEntity(blockPos); if (tileEntity == null || player.isSneaking()) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java index fa724cc9..b96d8d4b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockBelljar.java @@ -21,7 +21,7 @@ import net.minecraft.world.World; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; -import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; +import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -77,12 +77,12 @@ public class BlockBelljar extends BlockContainer { TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TEBellJar) + if (tile instanceof TEBelljar) { NBTTagCompound tag = stack.getTagCompound(); if (tag != null) { - ((TEBellJar) tile).readTankNBTOnPlace(tag); + ((TEBelljar) tile).readTankNBTOnPlace(tag); } } } @@ -90,7 +90,7 @@ public class BlockBelljar extends BlockContainer @Override public TileEntity createNewTileEntity(World world, int meta) { - return new TEBellJar(); + return new TEBelljar(); } @Override @@ -121,9 +121,9 @@ public class BlockBelljar extends BlockContainer public int getComparatorInputOverride(World world, BlockPos blockPos) { TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TEBellJar) + if (tile instanceof TEBelljar) { - return ((TEBellJar) tile).getRSPowerOutput(); + return ((TEBelljar) tile).getRSPowerOutput(); } return 15; } @@ -142,11 +142,11 @@ public class BlockBelljar extends BlockContainer TileEntity tile = world.getTileEntity(blockPos); - if (tile instanceof TEBellJar) + if (tile instanceof TEBelljar) { ItemStack drop = new ItemStack(this); NBTTagCompound tag = new NBTTagCompound(); - ((TEBellJar) tile).writeTankNBT(tag); + ((TEBelljar) tile).writeTankNBT(tag); drop.setTagCompound(tag); list.add(drop); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java index fabb3416..9830f182 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockChemistrySet.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -92,7 +92,7 @@ public class BlockChemistrySet extends BlockContainer @Override public TileEntity createNewTileEntity(World world, int meta) { - return new TEWritingTable(); + return new TEChemistrySet(); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java index 7c0f86e3..7d7ab440 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSchematicSaver.java @@ -35,7 +35,7 @@ public class BlockSchematicSaver extends BlockContainer TESchematicSaver tileEntity = (TESchematicSaver) world.getTileEntity(blockPos); - tileEntity.rightClickBlock(player, side.getIndex()); + tileEntity.rightClickBlock(); return false; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java index af6bfe66..89b4746e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BlockSpellTable.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.common.block; import WayofTime.alchemicalWizardry.common.items.BlankSpell; -import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpellTable; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -25,7 +25,7 @@ public class BlockSpellTable extends BlockContainer @Override public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { - TEHomHeart tileEntity = (TEHomHeart) world.getTileEntity(blockPos); + TESpellTable tileEntity = (TESpellTable) world.getTileEntity(blockPos); if (tileEntity == null || player.isSneaking()) { @@ -58,6 +58,6 @@ public class BlockSpellTable extends BlockContainer @Override public TileEntity createNewTileEntity(World world, int metaMaybe) { - return new TEHomHeart(); + return new TESpellTable(); } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java index ee96a703..5f487513 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/EnergyItems.java @@ -116,6 +116,7 @@ public class EnergyItems extends Item implements IBindable return false; } + @Deprecated public static boolean canSyphonInContainer(ItemStack ist, int damageToBeDone) { if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) @@ -174,6 +175,7 @@ public class EnergyItems extends Item implements IBindable } } + @Deprecated public static boolean syphonAndDamageWhileInContainer(ItemStack ist, EntityPlayer player, int damageToBeDone) { if (!syphonWhileInContainer(ist, damageToBeDone)) @@ -223,35 +225,6 @@ public class EnergyItems extends Item implements IBindable return item.getTagCompound().getString("ownerName"); } - @Deprecated - public static void drainPlayerNetwork(EntityPlayer player, int damageToBeDone) - { - String ownerName = SpellHelper.getUsername(player); - - if (MinecraftServer.getServer() == null) - { - return; - } - - World world = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName); - - if (data == null) - { - data = new LifeEssenceNetwork(ownerName); - world.setItemData(ownerName, data); - } - - if (data.currentEssence >= damageToBeDone) - { - data.currentEssence -= damageToBeDone; - data.markDirty(); - } else - { - hurtPlayer(player, damageToBeDone); - } - } - @Deprecated public static int getCurrentEssence(String ownerName) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java index d8e916f8..a763c07b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectAutoAlchemy.java @@ -18,7 +18,7 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; public class RitualEffectAutoAlchemy extends RitualEffect { @@ -60,7 +60,7 @@ public class RitualEffectAutoAlchemy extends RitualEffect ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(targetStack); if (recipe != null) { - TEWritingTable alchemyEntity; + TEChemistrySet alchemyEntity; IInventory outputInv = null; IInventory inputInv1 = null; IInventory inputInv2 = null; @@ -70,63 +70,63 @@ public class RitualEffectAutoAlchemy extends RitualEffect TileEntity eastEntity = world.getTileEntity(pos.offsetEast()); TileEntity westEntity = world.getTileEntity(pos.offsetWest()); - if (northEntity instanceof TEWritingTable) + if (northEntity instanceof TEChemistrySet) { - alchemyEntity = (TEWritingTable) northEntity; - if (southEntity instanceof IInventory && !(southEntity instanceof TEWritingTable)) + alchemyEntity = (TEChemistrySet) northEntity; + if (southEntity instanceof IInventory && !(southEntity instanceof TEChemistrySet)) { outputInv = (IInventory) southEntity; } - if (eastEntity instanceof IInventory && !(eastEntity instanceof TEWritingTable)) + if (eastEntity instanceof IInventory && !(eastEntity instanceof TEChemistrySet)) { inputInv1 = (IInventory) eastEntity; } - if (westEntity instanceof IInventory && !(westEntity instanceof TEWritingTable)) + if (westEntity instanceof IInventory && !(westEntity instanceof TEChemistrySet)) { inputInv2 = (IInventory) westEntity; } - } else if (southEntity instanceof TEWritingTable) + } else if (southEntity instanceof TEChemistrySet) { - alchemyEntity = (TEWritingTable) southEntity; - if (northEntity instanceof IInventory && !(northEntity instanceof TEWritingTable)) + alchemyEntity = (TEChemistrySet) southEntity; + if (northEntity instanceof IInventory && !(northEntity instanceof TEChemistrySet)) { outputInv = (IInventory) northEntity; } - if (eastEntity instanceof IInventory && !(eastEntity instanceof TEWritingTable)) + if (eastEntity instanceof IInventory && !(eastEntity instanceof TEChemistrySet)) { inputInv1 = (IInventory) eastEntity; } - if (westEntity instanceof IInventory && !(westEntity instanceof TEWritingTable)) + if (westEntity instanceof IInventory && !(westEntity instanceof TEChemistrySet)) { inputInv2 = (IInventory) westEntity; } - } else if (eastEntity instanceof TEWritingTable) + } else if (eastEntity instanceof TEChemistrySet) { - alchemyEntity = (TEWritingTable) eastEntity; - if (westEntity instanceof IInventory && !(westEntity instanceof TEWritingTable)) + alchemyEntity = (TEChemistrySet) eastEntity; + if (westEntity instanceof IInventory && !(westEntity instanceof TEChemistrySet)) { outputInv = (IInventory) westEntity; } - if (northEntity instanceof IInventory && !(northEntity instanceof TEWritingTable)) + if (northEntity instanceof IInventory && !(northEntity instanceof TEChemistrySet)) { inputInv1 = (IInventory) northEntity; } - if (southEntity instanceof IInventory && !(southEntity instanceof TEWritingTable)) + if (southEntity instanceof IInventory && !(southEntity instanceof TEChemistrySet)) { inputInv2 = (IInventory) southEntity; } - } else if (westEntity instanceof TEWritingTable) + } else if (westEntity instanceof TEChemistrySet) { - alchemyEntity = (TEWritingTable) westEntity; - if (eastEntity instanceof IInventory && !(eastEntity instanceof TEWritingTable)) + alchemyEntity = (TEChemistrySet) westEntity; + if (eastEntity instanceof IInventory && !(eastEntity instanceof TEChemistrySet)) { outputInv = (IInventory) eastEntity; } - if (northEntity instanceof IInventory && !(northEntity instanceof TEWritingTable)) + if (northEntity instanceof IInventory && !(northEntity instanceof TEChemistrySet)) { inputInv1 = (IInventory) northEntity; } - if (southEntity instanceof IInventory && !(southEntity instanceof TEWritingTable)) + if (southEntity instanceof IInventory && !(southEntity instanceof TEChemistrySet)) { inputInv2 = (IInventory) southEntity; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicCalcinator.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicalCalcinator.java similarity index 90% rename from src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicCalcinator.java rename to src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicalCalcinator.java index f585b570..b406f3dc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicCalcinator.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAlchemicalCalcinator.java @@ -20,19 +20,16 @@ import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory, IUpdatePlayerListBox +public class TEAlchemicalCalcinator extends TEReagentConduit implements IInventory, IUpdatePlayerListBox { protected ItemStack[] inv; protected ReagentContainer bufferTank = new ReagentContainer(Reagent.REAGENT_SIZE * 2); protected int bufferTransferRate = 20; - private int lpPerTick = 10; - private int ticksPerReagent = 200; + private int progress; - public int progress; - - public TEAlchemicCalcinator() + public TEAlchemicalCalcinator() { super(1, Reagent.REAGENT_SIZE * 4); this.inv = new ItemStack[2]; @@ -56,7 +53,7 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory for (int i = 0; i < tagList.tagCount(); i++) { - NBTTagCompound savedTag = (NBTTagCompound) tagList.getCompoundTagAt(i); + NBTTagCompound savedTag = tagList.getCompoundTagAt(i); if (savedTag.getBoolean("Empty")) { @@ -85,7 +82,6 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory for (int i = 0; i < inv.length; i++) { - ItemStack stack = inv[i]; NBTTagCompound savedTag = new NBTTagCompound(); if (inv[i] != null) @@ -128,7 +124,10 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory public void tickProgress() { + int lpPerTick = 10; + int ticksPerReagent = 200; ItemStack reagentItemStack = this.getStackInSlot(1); + if (reagentItemStack == null) { progress = 0; @@ -165,7 +164,7 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); } - if (progress >= this.ticksPerReagent) + if (progress >= ticksPerReagent) { progress = 0; this.bufferTank.fill(possibleReagent, true); @@ -200,7 +199,7 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory for (int i = 0; i < invTagList.tagCount(); i++) { - NBTTagCompound savedTag = (NBTTagCompound) invTagList.getCompoundTagAt(i); + NBTTagCompound savedTag = invTagList.getCompoundTagAt(i); if (savedTag.getBoolean("Empty")) { @@ -235,7 +234,6 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory for (int i = 0; i < inv.length; i++) { - ItemStack stack = inv[i]; NBTTagCompound savedTag = new NBTTagCompound(); if (inv[i] != null) @@ -342,14 +340,10 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory } @Override - public void openInventory(EntityPlayer player) - { - } + public void openInventory(EntityPlayer player) {} @Override - public void closeInventory(EntityPlayer player) - { - } + public void closeInventory(EntityPlayer player) {} @Override public String getName() @@ -381,32 +375,26 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory } @Override - public IChatComponent getDisplayName() { - // TODO Auto-generated method stub + public IChatComponent getDisplayName() + { return null; } @Override - public int getField(int id) { - // TODO Auto-generated method stub + public int getField(int id) + { return 0; } @Override - public void setField(int id, int value) { - // TODO Auto-generated method stub - - } + public void setField(int id, int value) {} @Override - public int getFieldCount() { - // TODO Auto-generated method stub + public int getFieldCount() + { return 0; } @Override - public void clear() { - // TODO Auto-generated method stub - - } + public void clear() {} } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java index 75a21e69..ff3cc550 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java @@ -106,11 +106,6 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I return filledAmount; } - - public int getRSPowerOutput() - { - return 5; - } public void addToDemonBloodDuration(int dur) { @@ -509,8 +504,8 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I if(worldObj.getWorldTime() % Math.max(20 - this.accelerationUpgrades, 1) == 0) { int syphonMax = (int) (20 * this.dislocationMultiplier); - int fluidInputted = 0; - int fluidOutputted = 0; + int fluidInputted; + int fluidOutputted; fluidInputted = Math.min(syphonMax, -this.fluid.amount + capacity); fluidInputted = Math.min(this.fluidInput.amount, fluidInputted); this.fluid.amount += fluidInputted; @@ -688,9 +683,9 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I } } - FluidStack flMain = new FluidStack(fluidData[0], fluidData[1]); - FluidStack flIn = new FluidStack(fluidData[2], fluidData[3]); - FluidStack flOut = new FluidStack(fluidData[4], fluidData[5]); + FluidStack flMain = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, fluidData[1]); //First parameter was fluidData[0] --Checking to see if this will cause issues or not + FluidStack flIn = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, fluidData[3]); //" " + FluidStack flOut = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, fluidData[5]); //" " this.setMainFluid(flMain); this.setInputFluid(flIn); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java index b12c426c..2a04adc1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEBellJar.java @@ -14,9 +14,9 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraftforge.common.util.Constants; -public class TEBellJar extends TEReagentConduit +public class TEBelljar extends TEReagentConduit { - public TEBellJar() + public TEBelljar() { super(1, 16000); this.maxConnextions = 1; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEChemistrySet.java similarity index 98% rename from src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java rename to src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEChemistrySet.java index 270fce74..502c3f75 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEChemistrySet.java @@ -23,7 +23,7 @@ import WayofTime.alchemicalWizardry.common.alchemy.ICombinationalCatalyst; import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; -public class TEWritingTable extends TEInventory implements ISidedInventory, IUpdatePlayerListBox +public class TEChemistrySet extends TEInventory implements ISidedInventory, IUpdatePlayerListBox { public static final int sizeInv = 7; @@ -32,7 +32,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory, IUpd private int accelerationTime; - public TEWritingTable() + public TEChemistrySet() { super(sizeInv); } @@ -180,13 +180,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory, IUpd public boolean containsCombinationCatalyst() { - if (getCombinationCatalystPosition() != -1) - { - return true; - } else - { - return false; - } + return getCombinationCatalystPosition() != -1; } public int getCombinationCatalystPosition() @@ -742,10 +736,10 @@ public class TEWritingTable extends TEInventory implements ISidedInventory, IUpd { switch(facing) { - case DOWN: - return new int[]{6}; - default: - return new int[]{0, 1, 2, 3, 4, 5}; + case DOWN: + return new int[]{6}; + default: + return new int[]{0, 1, 2, 3, 4, 5}; } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java index 1a24d7f4..ed90c954 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEConduit.java @@ -20,6 +20,6 @@ public class TEConduit extends TESpellBlock @Override protected void applySpellChange(SpellParadigm parad) { - return; + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java index b498a309..1b4f449c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TECrucible.java @@ -266,7 +266,7 @@ public class TECrucible extends TEInventory implements IUpdatePlayerListBox @Override public boolean isItemValidForSlot(int slot, ItemStack stack) { - return stack != null ? stack.getItem() instanceof IIncense : false; + return stack != null && stack.getItem() instanceof IIncense; } public int getRSPowerOutput() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java index 83ee371f..01d78af0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java @@ -56,7 +56,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp public TEMasterStone() { tanks = new ReagentContainer[]{new ReagentContainer(1000), new ReagentContainer(1000), new ReagentContainer(1000)}; - this.attunedTankMap = new HashMap(); + this.attunedTankMap = new HashMap(); isActive = false; owner = ""; @@ -454,9 +454,8 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp public AxisAlignedBB getRenderBoundingBox() { - double renderExtention = 1.0d; - AxisAlignedBB bb = new AxisAlignedBB(pos.add(-renderExtention, -renderExtention, -renderExtention), pos.add(1 + renderExtention, 1 + renderExtention, 1 + renderExtention)); - return bb; + double renderExtension = 1.0d; + return new AxisAlignedBB(pos.add(-renderExtension, -renderExtension, -renderExtension), pos.add(1 + renderExtension, 1 + renderExtension, 1 + renderExtension)); } /* ISegmentedReagentHandler */ @@ -484,7 +483,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp ReagentStack remainingStack = resource.copy(); remainingStack.amount = maxFill - totalFill; - boolean doesReagentMatch = tanks[i].getReagent() == null ? false : tanks[i].getReagent().isReagentEqual(remainingStack); + boolean doesReagentMatch = tanks[i].getReagent() != null && tanks[i].getReagent().isReagentEqual(remainingStack); if (doesReagentMatch) { @@ -637,7 +636,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp return; } - this.attunedTankMap.put(reagent, new Integer(total)); + this.attunedTankMap.put(reagent, total); } @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java index bc0774a9..d059a92e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMimicBlock.java @@ -58,7 +58,7 @@ public class TEMimicBlock extends TileEntity implements IUpdatePlayerListBox for (int i = 0; i < tagList.tagCount(); i++) { - NBTTagCompound tag = (NBTTagCompound) tagList.getCompoundTagAt(i); + NBTTagCompound tag = tagList.getCompoundTagAt(i); int slot = tag.getByte("Slot"); if (slot >= 0 && slot < inv.length) @@ -79,8 +79,6 @@ public class TEMimicBlock extends TileEntity implements IUpdatePlayerListBox for (int i = 0; i < inv.length; i++) { - ItemStack stack = inv[i]; - if (inv[i] != null) { NBTTagCompound tag = new NBTTagCompound(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java index 87ff82be..7b664d7f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPedestal.java @@ -135,5 +135,4 @@ public class TEPedestal extends TEInventory SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 2, pos); } } - } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java index 4096e114..579581ae 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEPlinth.java @@ -36,7 +36,7 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox private int progressInterval; private int progress; - public static List pedestalPositions = new ArrayList(); + public static List pedestalPositions = new ArrayList(); public TEPlinth() { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java index 6b74b1e9..fc59f70b 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEReagentConduit.java @@ -17,7 +17,6 @@ import net.minecraft.server.gui.IUpdatePlayerListBox; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -55,9 +54,9 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp { super(numberOfTanks, size); - destinationList = new LinkedList(); - reagentTargetList = new HashMap(); - reagentTankDesignationList = new HashMap(); + destinationList = new LinkedList(); + reagentTargetList = new HashMap>(); + reagentTankDesignationList = new HashMap(); } public Int3 getColour() @@ -164,7 +163,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp NBTTagList tagList = tag.getTagList("destinationList", Constants.NBT.TAG_COMPOUND); - destinationList = new LinkedList(); + destinationList = new LinkedList(); for (int i = 0; i < tagList.tagCount(); i++) { @@ -173,7 +172,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp destinationList.add(ColourAndCoords.readFromNBT(savedTag)); } - reagentTargetList = new HashMap(); + reagentTargetList = new HashMap>(); NBTTagList reagentTagList = tag.getTagList("reagentTargetList", Constants.NBT.TAG_COMPOUND); @@ -183,7 +182,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp Reagent reagent = ReagentRegistry.getReagentForKey(savedTag.getString("reagent")); - List coordList = new LinkedList(); + List coordList = new LinkedList(); NBTTagList coordinateList = savedTag.getTagList("coordinateList", Constants.NBT.TAG_COMPOUND); @@ -195,7 +194,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp reagentTargetList.put(reagent, coordList); } - reagentTankDesignationList = new HashMap(); + reagentTankDesignationList = new HashMap(); NBTTagList tankDesignationList = tag.getTagList("tankDesignationList", Constants.NBT.TAG_COMPOUND); @@ -203,7 +202,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp { NBTTagCompound savedTag = tankDesignationList.getCompoundTagAt(i); - this.reagentTankDesignationList.put(ReagentRegistry.getReagentForKey(savedTag.getString("reagent")), new Integer(savedTag.getInteger("integer"))); + this.reagentTankDesignationList.put(ReagentRegistry.getReagentForKey(savedTag.getString("reagent")), savedTag.getInteger("integer")); } } @@ -211,7 +210,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp { NBTTagList tagList = tag.getTagList("destinationList", Constants.NBT.TAG_COMPOUND); - destinationList = new LinkedList(); + destinationList = new LinkedList(); for (int i = 0; i < tagList.tagCount(); i++) { @@ -315,7 +314,6 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp int amount = Math.min(((IReagentHandler) tile).fill(EnumFacing.UP, maxDrainAmount, false), amountLeft); if (amount > 0) { - amountLeft -= amount; totalTransfered += amount; ReagentStack stack = this.drain(EnumFacing.UP, new ReagentStack(entry.getKey(), amount), true); @@ -342,13 +340,11 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp } } - @SideOnly(Side.CLIENT) public void sendPlayerStuffs() { Minecraft mc = Minecraft.getMinecraft(); EntityPlayer player = mc.thePlayer; - World world = mc.theWorld; if (SpellHelper.canPlayerSeeAlchemy(player)) { for (ColourAndCoords colourSet : this.destinationList) @@ -387,7 +383,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp public List compileListForReagentTargets(Map> map) { - List list = new LinkedList(); + List list = new LinkedList(); for (Entry> entry : map.entrySet()) { @@ -475,7 +471,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp List coordList = this.reagentTargetList.get(reagent); if (coordList == null) { - List newCoordList = new LinkedList(); + List newCoordList = new LinkedList(); newCoordList.add(newCoord); this.reagentTargetList.put(reagent, newCoordList); } else @@ -486,7 +482,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp return true; } else { - List newCoordList = new LinkedList(); + List newCoordList = new LinkedList(); newCoordList.add(newCoord); this.reagentTargetList.put(reagent, newCoordList); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java index e4e46c92..82cd940e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java @@ -7,7 +7,6 @@ import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import WayofTime.alchemicalWizardry.AlchemicalWizardry; @@ -21,7 +20,7 @@ public class TESchematicSaver extends TileEntity { public Block targetBlock = ModBlocks.largeBloodStoneBrick; - public void rightClickBlock(EntityPlayer player, int side) + public void rightClickBlock() { BuildingSchematic schematic = new BuildingSchematic(); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java index c83379c9..278c943a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellBlock.java @@ -24,9 +24,6 @@ public abstract class TESpellBlock extends TEOrientable implements ISpellTile public TESpellBlock getTileAtOutput() { EnumFacing output = this.getOutputDirection(); - int xOffset = output.getFrontOffsetX(); - int yOffset = output.getFrontOffsetY(); - int zOffset = output.getFrontOffsetZ(); TileEntity tile = worldObj.getTileEntity(pos.add(output.getDirectionVec())); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java index 4e06b26d..c60c5ebc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellParadigmBlock.java @@ -31,10 +31,7 @@ public class TESpellParadigmBlock extends TESpellBlock implements ISpellParadigm } @Override - protected void applySpellChange(SpellParadigm parad) - { - - } + protected void applySpellChange(SpellParadigm parad) {} public boolean canInputRecieve() { @@ -68,10 +65,7 @@ public class TESpellParadigmBlock extends TESpellBlock implements ISpellParadigm } @Override - public void setInputDirection(EnumFacing direction) - { - - } + public void setInputDirection(EnumFacing direction) {} @Override public EnumFacing getInputDirection() diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellTable.java similarity index 95% rename from src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java rename to src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellTable.java index 7ebffa93..d90314d9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEHomHeart.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpellTable.java @@ -9,9 +9,9 @@ import net.minecraft.world.World; import WayofTime.alchemicalWizardry.common.spell.simple.HomSpell; import WayofTime.alchemicalWizardry.common.spell.simple.HomSpellRegistry; -public class TEHomHeart extends TileEntity +public class TESpellTable extends TileEntity { - public boolean canCastSpell(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) + public boolean canCastSpell() { return true; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java index 3687e1ad..018f3244 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java @@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.tileEntity; import java.util.Iterator; import java.util.List; +import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -14,7 +15,6 @@ import net.minecraft.util.BlockPos; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.common.NewPacketHandler; import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; @@ -127,7 +127,7 @@ public class TETeleposer extends TEInventory implements IUpdatePlayerListBox entityCount++; } - if (EnergyItems.canSyphonInContainer(focus, damage * (focusLevel * 2 - 1) * (focusLevel * 2 - 1) * (focusLevel * 2 - 1) + damage * entityCount)) + if (SoulNetworkHandler.canSyphonInContainer(focus, damage * (focusLevel * 2 - 1) * (focusLevel * 2 - 1) * (focusLevel * 2 - 1) + damage * entityCount)) { for (int k = 0; k <= (focusLevel * 2 - 2); k++) for (int i = -(focusLevel - 1); i <= (focusLevel - 1); i++) @@ -148,7 +148,7 @@ public class TETeleposer extends TEInventory implements IUpdatePlayerListBox entityCount = 0; } - EnergyItems.syphonWhileInContainer(focus, damage * transportCount + damage * entityCount); + SoulNetworkHandler.syphonFromNetworkWhileInContainer(focus, damage * transportCount + damage * entityCount); //Teleport if (worldF.equals(worldObj)) diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java index 647f43e7..23bc01cc 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/container/ContainerWritingTable.java @@ -1,7 +1,7 @@ package WayofTime.alchemicalWizardry.common.tileEntity.container; import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; @@ -10,9 +10,9 @@ import net.minecraft.item.ItemStack; public class ContainerWritingTable extends Container { - protected TEWritingTable tileEntity; + protected TEChemistrySet tileEntity; - public ContainerWritingTable(InventoryPlayer inventoryPlayer, TEWritingTable te) + public ContainerWritingTable(InventoryPlayer inventoryPlayer, TEChemistrySet te) { tileEntity = te; addSlotToContainer(new Slot(tileEntity, 0, 152, 110)); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java index 587178d7..496aac83 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiHandler.java @@ -10,7 +10,7 @@ import WayofTime.alchemicalWizardry.common.items.sigil.holding.ContainerHolding; import WayofTime.alchemicalWizardry.common.items.sigil.holding.GuiHolding; import WayofTime.alchemicalWizardry.common.items.sigil.holding.InventoryHolding; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerTeleposer; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable; @@ -28,9 +28,9 @@ public class GuiHandler implements IGuiHandler case 0: tileEntity = world.getTileEntity(pos); - if (tileEntity instanceof TEWritingTable) + if (tileEntity instanceof TEChemistrySet) { - return new ContainerWritingTable(player.inventory, (TEWritingTable) tileEntity); + return new ContainerWritingTable(player.inventory, (TEChemistrySet) tileEntity); } case 1: @@ -62,9 +62,9 @@ public class GuiHandler implements IGuiHandler case 0: tileEntity = world.getTileEntity(pos); - if (tileEntity instanceof TEWritingTable) + if (tileEntity instanceof TEChemistrySet) { - return new GuiWritingTable(player.inventory, (TEWritingTable) tileEntity); + return new GuiWritingTable(player.inventory, (TEChemistrySet) tileEntity); } break; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java index a0c1baba..06339896 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/gui/GuiWritingTable.java @@ -7,12 +7,12 @@ import net.minecraft.util.StatCollector; import org.lwjgl.opengl.GL11; -import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; +import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable; public class GuiWritingTable extends GuiContainer { - public GuiWritingTable(InventoryPlayer inventoryPlayer, TEWritingTable tileEntity) + public GuiWritingTable(InventoryPlayer inventoryPlayer, TEChemistrySet tileEntity) { super(new ContainerWritingTable(inventoryPlayer, tileEntity)); xSize = 176;