Merge pull request #408 from Arcaratus/bloodmagic1.8

Finished TileEntities
This commit is contained in:
WayofTime 2015-07-30 11:00:44 -04:00
commit 8eed901fcb
30 changed files with 159 additions and 201 deletions

View file

@ -259,12 +259,12 @@ import WayofTime.alchemicalWizardry.common.spell.simple.SpellWateryGrave;
import WayofTime.alchemicalWizardry.common.spell.simple.SpellWindGust; import WayofTime.alchemicalWizardry.common.spell.simple.SpellWindGust;
import WayofTime.alchemicalWizardry.common.summoning.SummoningHelperAW; import WayofTime.alchemicalWizardry.common.summoning.SummoningHelperAW;
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; 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.TEAltar;
import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar;
import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit;
import WayofTime.alchemicalWizardry.common.tileEntity.TECrucible; 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.TEMasterStone;
import WayofTime.alchemicalWizardry.common.tileEntity.TEMimicBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TEMimicBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TEOrientable; 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.TESpellModifierBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; 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.tileEntity.gui.GuiHandler;
//import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration; //import WayofTime.alchemicalWizardry.common.tweaker.MineTweakerIntegration;
@ -761,8 +761,8 @@ public class AlchemicalWizardry
GameRegistry.registerTileEntity(TEAltar.class, "containerAltar"); GameRegistry.registerTileEntity(TEAltar.class, "containerAltar");
GameRegistry.registerTileEntity(TEMasterStone.class, "containerMasterStone"); GameRegistry.registerTileEntity(TEMasterStone.class, "containerMasterStone");
GameRegistry.registerTileEntity(TESocket.class, "containerSocket"); GameRegistry.registerTileEntity(TESocket.class, "containerSocket");
GameRegistry.registerTileEntity(TEWritingTable.class, "containerWritingTable"); GameRegistry.registerTileEntity(TEChemistrySet.class, "containerWritingTable");
GameRegistry.registerTileEntity(TEHomHeart.class, "containerHomHeart"); GameRegistry.registerTileEntity(TESpellTable.class, "containerHomHeart");
GameRegistry.registerTileEntity(TEPedestal.class, "containerPedestal"); GameRegistry.registerTileEntity(TEPedestal.class, "containerPedestal");
GameRegistry.registerTileEntity(TEPlinth.class, "containerPlinth"); GameRegistry.registerTileEntity(TEPlinth.class, "containerPlinth");
GameRegistry.registerTileEntity(TETeleposer.class, "containerTeleposer"); GameRegistry.registerTileEntity(TETeleposer.class, "containerTeleposer");
@ -777,8 +777,8 @@ public class AlchemicalWizardry
GameRegistry.registerTileEntity(TESchematicSaver.class, "containerSchematicSaver"); GameRegistry.registerTileEntity(TESchematicSaver.class, "containerSchematicSaver");
GameRegistry.registerTileEntity(TESpectralBlock.class, "containerSpectralBlock"); GameRegistry.registerTileEntity(TESpectralBlock.class, "containerSpectralBlock");
GameRegistry.registerTileEntity(TEReagentConduit.class, "containerReagentConduit"); GameRegistry.registerTileEntity(TEReagentConduit.class, "containerReagentConduit");
GameRegistry.registerTileEntity(TEBellJar.class, "containerBellJar"); GameRegistry.registerTileEntity(TEBelljar.class, "containerBellJar");
GameRegistry.registerTileEntity(TEAlchemicCalcinator.class, "containerAlchemicCalcinator"); GameRegistry.registerTileEntity(TEAlchemicalCalcinator.class, "containerAlchemicCalcinator");
GameRegistry.registerTileEntity(TEDemonChest.class, "containerDemonChest"); GameRegistry.registerTileEntity(TEDemonChest.class, "containerDemonChest");
GameRegistry.registerTileEntity(TEMimicBlock.class, "containerMimic"); GameRegistry.registerTileEntity(TEMimicBlock.class, "containerMimic");
GameRegistry.registerTileEntity(TECrucible.class, "containerCrucible"); GameRegistry.registerTileEntity(TECrucible.class, "containerCrucible");

View file

@ -19,6 +19,32 @@ import WayofTime.alchemicalWizardry.api.event.ItemDrainNetworkEvent;
public class SoulNetworkHandler 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) public static boolean syphonFromNetworkWhileInContainer(ItemStack ist, int damageToBeDone)
{ {
String ownerName = ""; String ownerName = "";

View file

@ -89,9 +89,9 @@ import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBazoo
import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBlastProjectile; import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderEnergyBlastProjectile;
import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderMeteor; import WayofTime.alchemicalWizardry.common.renderer.projectile.RenderMeteor;
import WayofTime.alchemicalWizardry.common.thread.GAPIChecker; 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.TEAltar;
import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar;
import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit; import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit;
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; 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.TESpellEnhancementBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet;
public class ClientProxy extends CommonProxy public class ClientProxy extends CommonProxy
{ {
@ -152,7 +152,7 @@ public class ClientProxy extends CommonProxy
ClientRegistry.bindTileEntitySpecialRenderer(TEAltar.class, new TEAltarRenderer()); ClientRegistry.bindTileEntitySpecialRenderer(TEAltar.class, new TEAltarRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TEPedestal.class, new RenderPedestal()); ClientRegistry.bindTileEntitySpecialRenderer(TEPedestal.class, new RenderPedestal());
ClientRegistry.bindTileEntitySpecialRenderer(TEPlinth.class, new RenderPlinth()); 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(TEConduit.class, new RenderConduit());
ClientRegistry.bindTileEntitySpecialRenderer(TESpellEffectBlock.class, new RenderSpellEffectBlock()); ClientRegistry.bindTileEntitySpecialRenderer(TESpellEffectBlock.class, new RenderSpellEffectBlock());
ClientRegistry.bindTileEntitySpecialRenderer(TESpellEnhancementBlock.class, new RenderSpellEnhancementBlock()); ClientRegistry.bindTileEntitySpecialRenderer(TESpellEnhancementBlock.class, new RenderSpellEnhancementBlock());
@ -160,8 +160,8 @@ public class ClientProxy extends CommonProxy
ClientRegistry.bindTileEntitySpecialRenderer(TESpellModifierBlock.class, new RenderSpellModifierBlock()); ClientRegistry.bindTileEntitySpecialRenderer(TESpellModifierBlock.class, new RenderSpellModifierBlock());
ClientRegistry.bindTileEntitySpecialRenderer(TEReagentConduit.class, new RenderReagentConduit()); ClientRegistry.bindTileEntitySpecialRenderer(TEReagentConduit.class, new RenderReagentConduit());
ClientRegistry.bindTileEntitySpecialRenderer(TEMasterStone.class, new RenderMasterStone()); ClientRegistry.bindTileEntitySpecialRenderer(TEMasterStone.class, new RenderMasterStone());
ClientRegistry.bindTileEntitySpecialRenderer(TEAlchemicCalcinator.class, new RenderAlchemicCalcinator()); ClientRegistry.bindTileEntitySpecialRenderer(TEAlchemicalCalcinator.class, new RenderAlchemicCalcinator());
ClientRegistry.bindTileEntitySpecialRenderer(TEBellJar.class, new RenderCrystalBelljar()); ClientRegistry.bindTileEntitySpecialRenderer(TEBelljar.class, new RenderCrystalBelljar());
//Item Renderer stuff //Item Renderer stuff
MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockConduit), new TEConduitItemRenderer()); MinecraftForgeClient.registerItemRenderer(ItemBlock.getItemFromBlock(ModBlocks.blockConduit), new TEConduitItemRenderer());

View file

@ -39,7 +39,7 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth;
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit; import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; import WayofTime.alchemicalWizardry.common.tileEntity.TESocket;
import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer;
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet;
public enum NewPacketHandler public enum NewPacketHandler
{ {
@ -194,9 +194,9 @@ public enum NewPacketHandler
{ {
World world = AlchemicalWizardry.proxy.getClientWorld(); World world = AlchemicalWizardry.proxy.getClientWorld();
TileEntity te = world.getTileEntity(msg.pos); 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); WritingTable.handlePacketData(msg.items);
} }
@ -809,10 +809,10 @@ public enum NewPacketHandler
boolean hasStacks5 = newBuffer.readBoolean(); boolean hasStacks5 = newBuffer.readBoolean();
((TEWritingTableMessage) msg).items = new int[TEWritingTable.sizeInv * 3]; ((TEWritingTableMessage) msg).items = new int[TEChemistrySet.sizeInv * 3];
if (hasStacks5) 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++) for (int i = 0; i < ((TEWritingTableMessage) msg).items.length; i++)
{ {
((TEWritingTableMessage) msg).items[i] = newBuffer.readInt(); ((TEWritingTableMessage) msg).items[i] = newBuffer.readInt();
@ -971,7 +971,7 @@ public enum NewPacketHandler
return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg); return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg);
} }
public static Packet getPacket(TEWritingTable tileWritingTable) public static Packet getPacket(TEChemistrySet tileWritingTable)
{ {
TEWritingTableMessage msg = new TEWritingTableMessage(); TEWritingTableMessage msg = new TEWritingTableMessage();
msg.index = 6; msg.index = 6;

View file

@ -2,7 +2,7 @@ package WayofTime.alchemicalWizardry.common.block;
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator; 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.BlockContainer;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
@ -30,7 +30,7 @@ public class BlockAlchemicalCalcinator extends BlockContainer
@Override @Override
public TileEntity createNewTileEntity(World world, int meta) public TileEntity createNewTileEntity(World world, int meta)
{ {
return new TEAlchemicCalcinator(); return new TEAlchemicalCalcinator();
} }
@Override @Override
@ -105,7 +105,7 @@ public class BlockAlchemicalCalcinator extends BlockContainer
@Override @Override
public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) 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()) if (tileEntity == null || player.isSneaking())
{ {

View file

@ -21,7 +21,7 @@ import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.ModBlocks;
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer; 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.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@ -77,12 +77,12 @@ public class BlockBelljar extends BlockContainer
{ {
TileEntity tile = world.getTileEntity(blockPos); TileEntity tile = world.getTileEntity(blockPos);
if (tile instanceof TEBellJar) if (tile instanceof TEBelljar)
{ {
NBTTagCompound tag = stack.getTagCompound(); NBTTagCompound tag = stack.getTagCompound();
if (tag != null) if (tag != null)
{ {
((TEBellJar) tile).readTankNBTOnPlace(tag); ((TEBelljar) tile).readTankNBTOnPlace(tag);
} }
} }
} }
@ -90,7 +90,7 @@ public class BlockBelljar extends BlockContainer
@Override @Override
public TileEntity createNewTileEntity(World world, int meta) public TileEntity createNewTileEntity(World world, int meta)
{ {
return new TEBellJar(); return new TEBelljar();
} }
@Override @Override
@ -121,9 +121,9 @@ public class BlockBelljar extends BlockContainer
public int getComparatorInputOverride(World world, BlockPos blockPos) public int getComparatorInputOverride(World world, BlockPos blockPos)
{ {
TileEntity tile = world.getTileEntity(blockPos); TileEntity tile = world.getTileEntity(blockPos);
if (tile instanceof TEBellJar) if (tile instanceof TEBelljar)
{ {
return ((TEBellJar) tile).getRSPowerOutput(); return ((TEBelljar) tile).getRSPowerOutput();
} }
return 15; return 15;
} }
@ -142,11 +142,11 @@ public class BlockBelljar extends BlockContainer
TileEntity tile = world.getTileEntity(blockPos); TileEntity tile = world.getTileEntity(blockPos);
if (tile instanceof TEBellJar) if (tile instanceof TEBelljar)
{ {
ItemStack drop = new ItemStack(this); ItemStack drop = new ItemStack(this);
NBTTagCompound tag = new NBTTagCompound(); NBTTagCompound tag = new NBTTagCompound();
((TEBellJar) tile).writeTankNBT(tag); ((TEBelljar) tile).writeTankNBT(tag);
drop.setTagCompound(tag); drop.setTagCompound(tag);
list.add(drop); list.add(drop);

View file

@ -1,7 +1,7 @@
package WayofTime.alchemicalWizardry.common.block; package WayofTime.alchemicalWizardry.common.block;
import WayofTime.alchemicalWizardry.AlchemicalWizardry; 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.BlockContainer;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
@ -92,7 +92,7 @@ public class BlockChemistrySet extends BlockContainer
@Override @Override
public TileEntity createNewTileEntity(World world, int meta) public TileEntity createNewTileEntity(World world, int meta)
{ {
return new TEWritingTable(); return new TEChemistrySet();
} }
@Override @Override

View file

@ -35,7 +35,7 @@ public class BlockSchematicSaver extends BlockContainer
TESchematicSaver tileEntity = (TESchematicSaver) world.getTileEntity(blockPos); TESchematicSaver tileEntity = (TESchematicSaver) world.getTileEntity(blockPos);
tileEntity.rightClickBlock(player, side.getIndex()); tileEntity.rightClickBlock();
return false; return false;
} }

View file

@ -1,7 +1,7 @@
package WayofTime.alchemicalWizardry.common.block; package WayofTime.alchemicalWizardry.common.block;
import WayofTime.alchemicalWizardry.common.items.BlankSpell; 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.BlockContainer;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
@ -25,7 +25,7 @@ public class BlockSpellTable extends BlockContainer
@Override @Override
public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) 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()) if (tileEntity == null || player.isSneaking())
{ {
@ -58,6 +58,6 @@ public class BlockSpellTable extends BlockContainer
@Override @Override
public TileEntity createNewTileEntity(World world, int metaMaybe) public TileEntity createNewTileEntity(World world, int metaMaybe)
{ {
return new TEHomHeart(); return new TESpellTable();
} }
} }

View file

@ -116,6 +116,7 @@ public class EnergyItems extends Item implements IBindable
return false; return false;
} }
@Deprecated
public static boolean canSyphonInContainer(ItemStack ist, int damageToBeDone) public static boolean canSyphonInContainer(ItemStack ist, int damageToBeDone)
{ {
if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals(""))) 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) public static boolean syphonAndDamageWhileInContainer(ItemStack ist, EntityPlayer player, int damageToBeDone)
{ {
if (!syphonWhileInContainer(ist, damageToBeDone)) if (!syphonWhileInContainer(ist, damageToBeDone))
@ -223,35 +225,6 @@ public class EnergyItems extends Item implements IBindable
return item.getTagCompound().getString("ownerName"); 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 @Deprecated
public static int getCurrentEssence(String ownerName) public static int getCurrentEssence(String ownerName)
{ {

View file

@ -18,7 +18,7 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar;
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet;
public class RitualEffectAutoAlchemy extends RitualEffect public class RitualEffectAutoAlchemy extends RitualEffect
{ {
@ -60,7 +60,7 @@ public class RitualEffectAutoAlchemy extends RitualEffect
ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(targetStack); ItemStack[] recipe = AlchemyRecipeRegistry.getRecipeForItemStack(targetStack);
if (recipe != null) if (recipe != null)
{ {
TEWritingTable alchemyEntity; TEChemistrySet alchemyEntity;
IInventory outputInv = null; IInventory outputInv = null;
IInventory inputInv1 = null; IInventory inputInv1 = null;
IInventory inputInv2 = null; IInventory inputInv2 = null;
@ -70,63 +70,63 @@ public class RitualEffectAutoAlchemy extends RitualEffect
TileEntity eastEntity = world.getTileEntity(pos.offsetEast()); TileEntity eastEntity = world.getTileEntity(pos.offsetEast());
TileEntity westEntity = world.getTileEntity(pos.offsetWest()); TileEntity westEntity = world.getTileEntity(pos.offsetWest());
if (northEntity instanceof TEWritingTable) if (northEntity instanceof TEChemistrySet)
{ {
alchemyEntity = (TEWritingTable) northEntity; alchemyEntity = (TEChemistrySet) northEntity;
if (southEntity instanceof IInventory && !(southEntity instanceof TEWritingTable)) if (southEntity instanceof IInventory && !(southEntity instanceof TEChemistrySet))
{ {
outputInv = (IInventory) southEntity; outputInv = (IInventory) southEntity;
} }
if (eastEntity instanceof IInventory && !(eastEntity instanceof TEWritingTable)) if (eastEntity instanceof IInventory && !(eastEntity instanceof TEChemistrySet))
{ {
inputInv1 = (IInventory) eastEntity; inputInv1 = (IInventory) eastEntity;
} }
if (westEntity instanceof IInventory && !(westEntity instanceof TEWritingTable)) if (westEntity instanceof IInventory && !(westEntity instanceof TEChemistrySet))
{ {
inputInv2 = (IInventory) westEntity; inputInv2 = (IInventory) westEntity;
} }
} else if (southEntity instanceof TEWritingTable) } else if (southEntity instanceof TEChemistrySet)
{ {
alchemyEntity = (TEWritingTable) southEntity; alchemyEntity = (TEChemistrySet) southEntity;
if (northEntity instanceof IInventory && !(northEntity instanceof TEWritingTable)) if (northEntity instanceof IInventory && !(northEntity instanceof TEChemistrySet))
{ {
outputInv = (IInventory) northEntity; outputInv = (IInventory) northEntity;
} }
if (eastEntity instanceof IInventory && !(eastEntity instanceof TEWritingTable)) if (eastEntity instanceof IInventory && !(eastEntity instanceof TEChemistrySet))
{ {
inputInv1 = (IInventory) eastEntity; inputInv1 = (IInventory) eastEntity;
} }
if (westEntity instanceof IInventory && !(westEntity instanceof TEWritingTable)) if (westEntity instanceof IInventory && !(westEntity instanceof TEChemistrySet))
{ {
inputInv2 = (IInventory) westEntity; inputInv2 = (IInventory) westEntity;
} }
} else if (eastEntity instanceof TEWritingTable) } else if (eastEntity instanceof TEChemistrySet)
{ {
alchemyEntity = (TEWritingTable) eastEntity; alchemyEntity = (TEChemistrySet) eastEntity;
if (westEntity instanceof IInventory && !(westEntity instanceof TEWritingTable)) if (westEntity instanceof IInventory && !(westEntity instanceof TEChemistrySet))
{ {
outputInv = (IInventory) westEntity; outputInv = (IInventory) westEntity;
} }
if (northEntity instanceof IInventory && !(northEntity instanceof TEWritingTable)) if (northEntity instanceof IInventory && !(northEntity instanceof TEChemistrySet))
{ {
inputInv1 = (IInventory) northEntity; inputInv1 = (IInventory) northEntity;
} }
if (southEntity instanceof IInventory && !(southEntity instanceof TEWritingTable)) if (southEntity instanceof IInventory && !(southEntity instanceof TEChemistrySet))
{ {
inputInv2 = (IInventory) southEntity; inputInv2 = (IInventory) southEntity;
} }
} else if (westEntity instanceof TEWritingTable) } else if (westEntity instanceof TEChemistrySet)
{ {
alchemyEntity = (TEWritingTable) westEntity; alchemyEntity = (TEChemistrySet) westEntity;
if (eastEntity instanceof IInventory && !(eastEntity instanceof TEWritingTable)) if (eastEntity instanceof IInventory && !(eastEntity instanceof TEChemistrySet))
{ {
outputInv = (IInventory) eastEntity; outputInv = (IInventory) eastEntity;
} }
if (northEntity instanceof IInventory && !(northEntity instanceof TEWritingTable)) if (northEntity instanceof IInventory && !(northEntity instanceof TEChemistrySet))
{ {
inputInv1 = (IInventory) northEntity; inputInv1 = (IInventory) northEntity;
} }
if (southEntity instanceof IInventory && !(southEntity instanceof TEWritingTable)) if (southEntity instanceof IInventory && !(southEntity instanceof TEChemistrySet))
{ {
inputInv2 = (IInventory) southEntity; inputInv2 = (IInventory) southEntity;
} }

View file

@ -20,19 +20,16 @@ import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; 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 ItemStack[] inv;
protected ReagentContainer bufferTank = new ReagentContainer(Reagent.REAGENT_SIZE * 2); protected ReagentContainer bufferTank = new ReagentContainer(Reagent.REAGENT_SIZE * 2);
protected int bufferTransferRate = 20; protected int bufferTransferRate = 20;
private int lpPerTick = 10; private int progress;
private int ticksPerReagent = 200;
public int progress; public TEAlchemicalCalcinator()
public TEAlchemicCalcinator()
{ {
super(1, Reagent.REAGENT_SIZE * 4); super(1, Reagent.REAGENT_SIZE * 4);
this.inv = new ItemStack[2]; this.inv = new ItemStack[2];
@ -56,7 +53,7 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
for (int i = 0; i < tagList.tagCount(); i++) for (int i = 0; i < tagList.tagCount(); i++)
{ {
NBTTagCompound savedTag = (NBTTagCompound) tagList.getCompoundTagAt(i); NBTTagCompound savedTag = tagList.getCompoundTagAt(i);
if (savedTag.getBoolean("Empty")) if (savedTag.getBoolean("Empty"))
{ {
@ -85,7 +82,6 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
for (int i = 0; i < inv.length; i++) for (int i = 0; i < inv.length; i++)
{ {
ItemStack stack = inv[i];
NBTTagCompound savedTag = new NBTTagCompound(); NBTTagCompound savedTag = new NBTTagCompound();
if (inv[i] != null) if (inv[i] != null)
@ -128,7 +124,10 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
public void tickProgress() public void tickProgress()
{ {
int lpPerTick = 10;
int ticksPerReagent = 200;
ItemStack reagentItemStack = this.getStackInSlot(1); ItemStack reagentItemStack = this.getStackInSlot(1);
if (reagentItemStack == null) if (reagentItemStack == null)
{ {
progress = 0; progress = 0;
@ -165,7 +164,7 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos); SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 1, pos);
} }
if (progress >= this.ticksPerReagent) if (progress >= ticksPerReagent)
{ {
progress = 0; progress = 0;
this.bufferTank.fill(possibleReagent, true); this.bufferTank.fill(possibleReagent, true);
@ -200,7 +199,7 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
for (int i = 0; i < invTagList.tagCount(); i++) for (int i = 0; i < invTagList.tagCount(); i++)
{ {
NBTTagCompound savedTag = (NBTTagCompound) invTagList.getCompoundTagAt(i); NBTTagCompound savedTag = invTagList.getCompoundTagAt(i);
if (savedTag.getBoolean("Empty")) if (savedTag.getBoolean("Empty"))
{ {
@ -235,7 +234,6 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
for (int i = 0; i < inv.length; i++) for (int i = 0; i < inv.length; i++)
{ {
ItemStack stack = inv[i];
NBTTagCompound savedTag = new NBTTagCompound(); NBTTagCompound savedTag = new NBTTagCompound();
if (inv[i] != null) if (inv[i] != null)
@ -342,14 +340,10 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
} }
@Override @Override
public void openInventory(EntityPlayer player) public void openInventory(EntityPlayer player) {}
{
}
@Override @Override
public void closeInventory(EntityPlayer player) public void closeInventory(EntityPlayer player) {}
{
}
@Override @Override
public String getName() public String getName()
@ -381,32 +375,26 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
} }
@Override @Override
public IChatComponent getDisplayName() { public IChatComponent getDisplayName()
// TODO Auto-generated method stub {
return null; return null;
} }
@Override @Override
public int getField(int id) { public int getField(int id)
// TODO Auto-generated method stub {
return 0; return 0;
} }
@Override @Override
public void setField(int id, int value) { public void setField(int id, int value) {}
// TODO Auto-generated method stub
}
@Override @Override
public int getFieldCount() { public int getFieldCount()
// TODO Auto-generated method stub {
return 0; return 0;
} }
@Override @Override
public void clear() { public void clear() {}
// TODO Auto-generated method stub
}
} }

View file

@ -106,11 +106,6 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
return filledAmount; return filledAmount;
} }
public int getRSPowerOutput()
{
return 5;
}
public void addToDemonBloodDuration(int dur) 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) if(worldObj.getWorldTime() % Math.max(20 - this.accelerationUpgrades, 1) == 0)
{ {
int syphonMax = (int) (20 * this.dislocationMultiplier); int syphonMax = (int) (20 * this.dislocationMultiplier);
int fluidInputted = 0; int fluidInputted;
int fluidOutputted = 0; int fluidOutputted;
fluidInputted = Math.min(syphonMax, -this.fluid.amount + capacity); fluidInputted = Math.min(syphonMax, -this.fluid.amount + capacity);
fluidInputted = Math.min(this.fluidInput.amount, fluidInputted); fluidInputted = Math.min(this.fluidInput.amount, fluidInputted);
this.fluid.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 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(fluidData[2], fluidData[3]); FluidStack flIn = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, fluidData[3]); //" "
FluidStack flOut = new FluidStack(fluidData[4], fluidData[5]); FluidStack flOut = new FluidStack(AlchemicalWizardry.lifeEssenceFluid, fluidData[5]); //" "
this.setMainFluid(flMain); this.setMainFluid(flMain);
this.setInputFluid(flIn); this.setInputFluid(flIn);

View file

@ -14,9 +14,9 @@ import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.util.Constants; import net.minecraftforge.common.util.Constants;
public class TEBellJar extends TEReagentConduit public class TEBelljar extends TEReagentConduit
{ {
public TEBellJar() public TEBelljar()
{ {
super(1, 16000); super(1, 16000);
this.maxConnextions = 1; this.maxConnextions = 1;

View file

@ -23,7 +23,7 @@ import WayofTime.alchemicalWizardry.common.alchemy.ICombinationalCatalyst;
import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask; import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; 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; public static final int sizeInv = 7;
@ -32,7 +32,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory, IUpd
private int accelerationTime; private int accelerationTime;
public TEWritingTable() public TEChemistrySet()
{ {
super(sizeInv); super(sizeInv);
} }
@ -180,13 +180,7 @@ public class TEWritingTable extends TEInventory implements ISidedInventory, IUpd
public boolean containsCombinationCatalyst() public boolean containsCombinationCatalyst()
{ {
if (getCombinationCatalystPosition() != -1) return getCombinationCatalystPosition() != -1;
{
return true;
} else
{
return false;
}
} }
public int getCombinationCatalystPosition() public int getCombinationCatalystPosition()
@ -742,10 +736,10 @@ public class TEWritingTable extends TEInventory implements ISidedInventory, IUpd
{ {
switch(facing) switch(facing)
{ {
case DOWN: case DOWN:
return new int[]{6}; return new int[]{6};
default: default:
return new int[]{0, 1, 2, 3, 4, 5}; return new int[]{0, 1, 2, 3, 4, 5};
} }
} }

View file

@ -20,6 +20,6 @@ public class TEConduit extends TESpellBlock
@Override @Override
protected void applySpellChange(SpellParadigm parad) protected void applySpellChange(SpellParadigm parad)
{ {
return;
} }
} }

View file

@ -266,7 +266,7 @@ public class TECrucible extends TEInventory implements IUpdatePlayerListBox
@Override @Override
public boolean isItemValidForSlot(int slot, ItemStack stack) 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() public int getRSPowerOutput()

View file

@ -56,7 +56,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp
public TEMasterStone() public TEMasterStone()
{ {
tanks = new ReagentContainer[]{new ReagentContainer(1000), new ReagentContainer(1000), new ReagentContainer(1000)}; tanks = new ReagentContainer[]{new ReagentContainer(1000), new ReagentContainer(1000), new ReagentContainer(1000)};
this.attunedTankMap = new HashMap(); this.attunedTankMap = new HashMap<Reagent, Integer>();
isActive = false; isActive = false;
owner = ""; owner = "";
@ -454,9 +454,8 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp
public AxisAlignedBB getRenderBoundingBox() public AxisAlignedBB getRenderBoundingBox()
{ {
double renderExtention = 1.0d; double renderExtension = 1.0d;
AxisAlignedBB bb = new AxisAlignedBB(pos.add(-renderExtention, -renderExtention, -renderExtention), pos.add(1 + renderExtention, 1 + renderExtention, 1 + renderExtention)); return new AxisAlignedBB(pos.add(-renderExtension, -renderExtension, -renderExtension), pos.add(1 + renderExtension, 1 + renderExtension, 1 + renderExtension));
return bb;
} }
/* ISegmentedReagentHandler */ /* ISegmentedReagentHandler */
@ -484,7 +483,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp
ReagentStack remainingStack = resource.copy(); ReagentStack remainingStack = resource.copy();
remainingStack.amount = maxFill - totalFill; 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) if (doesReagentMatch)
{ {
@ -637,7 +636,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone, IUp
return; return;
} }
this.attunedTankMap.put(reagent, new Integer(total)); this.attunedTankMap.put(reagent, total);
} }
@Override @Override

View file

@ -58,7 +58,7 @@ public class TEMimicBlock extends TileEntity implements IUpdatePlayerListBox
for (int i = 0; i < tagList.tagCount(); i++) for (int i = 0; i < tagList.tagCount(); i++)
{ {
NBTTagCompound tag = (NBTTagCompound) tagList.getCompoundTagAt(i); NBTTagCompound tag = tagList.getCompoundTagAt(i);
int slot = tag.getByte("Slot"); int slot = tag.getByte("Slot");
if (slot >= 0 && slot < inv.length) 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++) for (int i = 0; i < inv.length; i++)
{ {
ItemStack stack = inv[i];
if (inv[i] != null) if (inv[i] != null)
{ {
NBTTagCompound tag = new NBTTagCompound(); NBTTagCompound tag = new NBTTagCompound();

View file

@ -135,5 +135,4 @@ public class TEPedestal extends TEInventory
SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 2, pos); SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 2, pos);
} }
} }
} }

View file

@ -36,7 +36,7 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox
private int progressInterval; private int progressInterval;
private int progress; private int progress;
public static List<PlinthComponent> pedestalPositions = new ArrayList(); public static List<PlinthComponent> pedestalPositions = new ArrayList<PlinthComponent>();
public TEPlinth() public TEPlinth()
{ {

View file

@ -17,7 +17,6 @@ import net.minecraft.server.gui.IUpdatePlayerListBox;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos; import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import net.minecraftforge.common.util.Constants; import net.minecraftforge.common.util.Constants;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@ -55,9 +54,9 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp
{ {
super(numberOfTanks, size); super(numberOfTanks, size);
destinationList = new LinkedList(); destinationList = new LinkedList<ColourAndCoords>();
reagentTargetList = new HashMap(); reagentTargetList = new HashMap<Reagent, List<Int3>>();
reagentTankDesignationList = new HashMap(); reagentTankDesignationList = new HashMap<Reagent, Integer>();
} }
public Int3 getColour() public Int3 getColour()
@ -164,7 +163,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp
NBTTagList tagList = tag.getTagList("destinationList", Constants.NBT.TAG_COMPOUND); NBTTagList tagList = tag.getTagList("destinationList", Constants.NBT.TAG_COMPOUND);
destinationList = new LinkedList(); destinationList = new LinkedList<ColourAndCoords>();
for (int i = 0; i < tagList.tagCount(); i++) for (int i = 0; i < tagList.tagCount(); i++)
{ {
@ -173,7 +172,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp
destinationList.add(ColourAndCoords.readFromNBT(savedTag)); destinationList.add(ColourAndCoords.readFromNBT(savedTag));
} }
reagentTargetList = new HashMap(); reagentTargetList = new HashMap<Reagent, List<Int3>>();
NBTTagList reagentTagList = tag.getTagList("reagentTargetList", Constants.NBT.TAG_COMPOUND); 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")); Reagent reagent = ReagentRegistry.getReagentForKey(savedTag.getString("reagent"));
List<Int3> coordList = new LinkedList(); List<Int3> coordList = new LinkedList<Int3>();
NBTTagList coordinateList = savedTag.getTagList("coordinateList", Constants.NBT.TAG_COMPOUND); NBTTagList coordinateList = savedTag.getTagList("coordinateList", Constants.NBT.TAG_COMPOUND);
@ -195,7 +194,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp
reagentTargetList.put(reagent, coordList); reagentTargetList.put(reagent, coordList);
} }
reagentTankDesignationList = new HashMap(); reagentTankDesignationList = new HashMap<Reagent, Integer>();
NBTTagList tankDesignationList = tag.getTagList("tankDesignationList", Constants.NBT.TAG_COMPOUND); 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); 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); NBTTagList tagList = tag.getTagList("destinationList", Constants.NBT.TAG_COMPOUND);
destinationList = new LinkedList(); destinationList = new LinkedList<ColourAndCoords>();
for (int i = 0; i < tagList.tagCount(); i++) 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); int amount = Math.min(((IReagentHandler) tile).fill(EnumFacing.UP, maxDrainAmount, false), amountLeft);
if (amount > 0) if (amount > 0)
{ {
amountLeft -= amount;
totalTransfered += amount; totalTransfered += amount;
ReagentStack stack = this.drain(EnumFacing.UP, new ReagentStack(entry.getKey(), amount), true); 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) @SideOnly(Side.CLIENT)
public void sendPlayerStuffs() public void sendPlayerStuffs()
{ {
Minecraft mc = Minecraft.getMinecraft(); Minecraft mc = Minecraft.getMinecraft();
EntityPlayer player = mc.thePlayer; EntityPlayer player = mc.thePlayer;
World world = mc.theWorld;
if (SpellHelper.canPlayerSeeAlchemy(player)) if (SpellHelper.canPlayerSeeAlchemy(player))
{ {
for (ColourAndCoords colourSet : this.destinationList) for (ColourAndCoords colourSet : this.destinationList)
@ -387,7 +383,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp
public List<ColourAndCoords> compileListForReagentTargets(Map<Reagent, List<Int3>> map) public List<ColourAndCoords> compileListForReagentTargets(Map<Reagent, List<Int3>> map)
{ {
List<ColourAndCoords> list = new LinkedList(); List<ColourAndCoords> list = new LinkedList<ColourAndCoords>();
for (Entry<Reagent, List<Int3>> entry : map.entrySet()) for (Entry<Reagent, List<Int3>> entry : map.entrySet())
{ {
@ -475,7 +471,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp
List<Int3> coordList = this.reagentTargetList.get(reagent); List<Int3> coordList = this.reagentTargetList.get(reagent);
if (coordList == null) if (coordList == null)
{ {
List<Int3> newCoordList = new LinkedList(); List<Int3> newCoordList = new LinkedList<Int3>();
newCoordList.add(newCoord); newCoordList.add(newCoord);
this.reagentTargetList.put(reagent, newCoordList); this.reagentTargetList.put(reagent, newCoordList);
} else } else
@ -486,7 +482,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp
return true; return true;
} else } else
{ {
List<Int3> newCoordList = new LinkedList(); List<Int3> newCoordList = new LinkedList<Int3>();
newCoordList.add(newCoord); newCoordList.add(newCoord);
this.reagentTargetList.put(reagent, newCoordList); this.reagentTargetList.put(reagent, newCoordList);

View file

@ -7,7 +7,6 @@ import java.util.Random;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos; import net.minecraft.util.BlockPos;
import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.AlchemicalWizardry;
@ -21,7 +20,7 @@ public class TESchematicSaver extends TileEntity
{ {
public Block targetBlock = ModBlocks.largeBloodStoneBrick; public Block targetBlock = ModBlocks.largeBloodStoneBrick;
public void rightClickBlock(EntityPlayer player, int side) public void rightClickBlock()
{ {
BuildingSchematic schematic = new BuildingSchematic(); BuildingSchematic schematic = new BuildingSchematic();

View file

@ -24,9 +24,6 @@ public abstract class TESpellBlock extends TEOrientable implements ISpellTile
public TESpellBlock getTileAtOutput() public TESpellBlock getTileAtOutput()
{ {
EnumFacing output = this.getOutputDirection(); EnumFacing output = this.getOutputDirection();
int xOffset = output.getFrontOffsetX();
int yOffset = output.getFrontOffsetY();
int zOffset = output.getFrontOffsetZ();
TileEntity tile = worldObj.getTileEntity(pos.add(output.getDirectionVec())); TileEntity tile = worldObj.getTileEntity(pos.add(output.getDirectionVec()));

View file

@ -31,10 +31,7 @@ public class TESpellParadigmBlock extends TESpellBlock implements ISpellParadigm
} }
@Override @Override
protected void applySpellChange(SpellParadigm parad) protected void applySpellChange(SpellParadigm parad) {}
{
}
public boolean canInputRecieve() public boolean canInputRecieve()
{ {
@ -68,10 +65,7 @@ public class TESpellParadigmBlock extends TESpellBlock implements ISpellParadigm
} }
@Override @Override
public void setInputDirection(EnumFacing direction) public void setInputDirection(EnumFacing direction) {}
{
}
@Override @Override
public EnumFacing getInputDirection() public EnumFacing getInputDirection()

View file

@ -9,9 +9,9 @@ import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.simple.HomSpell; import WayofTime.alchemicalWizardry.common.spell.simple.HomSpell;
import WayofTime.alchemicalWizardry.common.spell.simple.HomSpellRegistry; 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; return true;
} }

View file

@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.tileEntity;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -14,7 +15,6 @@ import net.minecraft.util.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.NewPacketHandler; import WayofTime.alchemicalWizardry.common.NewPacketHandler;
import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; import WayofTime.alchemicalWizardry.common.block.BlockTeleposer;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import WayofTime.alchemicalWizardry.common.items.TelepositionFocus; import WayofTime.alchemicalWizardry.common.items.TelepositionFocus;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
@ -127,7 +127,7 @@ public class TETeleposer extends TEInventory implements IUpdatePlayerListBox
entityCount++; 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 k = 0; k <= (focusLevel * 2 - 2); k++)
for (int i = -(focusLevel - 1); i <= (focusLevel - 1); i++) for (int i = -(focusLevel - 1); i <= (focusLevel - 1); i++)
@ -148,7 +148,7 @@ public class TETeleposer extends TEInventory implements IUpdatePlayerListBox
entityCount = 0; entityCount = 0;
} }
EnergyItems.syphonWhileInContainer(focus, damage * transportCount + damage * entityCount); SoulNetworkHandler.syphonFromNetworkWhileInContainer(focus, damage * transportCount + damage * entityCount);
//Teleport //Teleport
if (worldF.equals(worldObj)) if (worldF.equals(worldObj))

View file

@ -1,7 +1,7 @@
package WayofTime.alchemicalWizardry.common.tileEntity.container; package WayofTime.alchemicalWizardry.common.tileEntity.container;
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb; 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.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
@ -10,9 +10,9 @@ import net.minecraft.item.ItemStack;
public class ContainerWritingTable extends Container 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; tileEntity = te;
addSlotToContainer(new Slot(tileEntity, 0, 152, 110)); addSlotToContainer(new Slot(tileEntity, 0, 152, 110));

View file

@ -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.GuiHolding;
import WayofTime.alchemicalWizardry.common.items.sigil.holding.InventoryHolding; import WayofTime.alchemicalWizardry.common.items.sigil.holding.InventoryHolding;
import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; 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.ContainerTeleposer;
import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable;
@ -28,9 +28,9 @@ public class GuiHandler implements IGuiHandler
case 0: case 0:
tileEntity = world.getTileEntity(pos); 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: case 1:
@ -62,9 +62,9 @@ public class GuiHandler implements IGuiHandler
case 0: case 0:
tileEntity = world.getTileEntity(pos); 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; break;

View file

@ -7,12 +7,12 @@ import net.minecraft.util.StatCollector;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet;
import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerWritingTable;
public class GuiWritingTable extends GuiContainer public class GuiWritingTable extends GuiContainer
{ {
public GuiWritingTable(InventoryPlayer inventoryPlayer, TEWritingTable tileEntity) public GuiWritingTable(InventoryPlayer inventoryPlayer, TEChemistrySet tileEntity)
{ {
super(new ContainerWritingTable(inventoryPlayer, tileEntity)); super(new ContainerWritingTable(inventoryPlayer, tileEntity));
xSize = 176; xSize = 176;