Finished TileEntities
This commit is contained in:
parent
cfed9f5ab3
commit
b2f7ec6030
|
@ -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");
|
||||
|
|
|
@ -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 = "";
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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())
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -35,7 +35,7 @@ public class BlockSchematicSaver extends BlockContainer
|
|||
|
||||
TESchematicSaver tileEntity = (TESchematicSaver) world.getTileEntity(blockPos);
|
||||
|
||||
tileEntity.rightClickBlock(player, side.getIndex());
|
||||
tileEntity.rightClickBlock();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellTable;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
|
@ -24,13 +22,6 @@ public class BlankSpell extends EnergyItems
|
|||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BlankSpell");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
|
@ -65,13 +56,13 @@ public class BlankSpell extends EnergyItems
|
|||
if (world != null)
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
TileEntity tileEntity = world.getTileEntity(itemTag.getInteger("xCoord"), itemTag.getInteger("yCoord"), itemTag.getInteger("zCoord"));
|
||||
TileEntity tileEntity = world.getTileEntity(new BlockPos(itemTag.getInteger("xCoord"), itemTag.getInteger("yCoord"), itemTag.getInteger("zCoord")));
|
||||
|
||||
if (tileEntity instanceof TEHomHeart)
|
||||
if (tileEntity instanceof TESpellTable)
|
||||
{
|
||||
TEHomHeart homHeart = (TEHomHeart) tileEntity;
|
||||
TESpellTable homHeart = (TESpellTable) tileEntity;
|
||||
|
||||
if (homHeart.canCastSpell(par1ItemStack, par2World, par3EntityPlayer))
|
||||
if (homHeart.canCastSpell())
|
||||
{
|
||||
if(EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, homHeart.getCostForSpell()))
|
||||
{
|
||||
|
|
|
@ -11,6 +11,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EnergyItems extends Item implements IBindable
|
||||
|
@ -47,7 +48,7 @@ public class EnergyItems extends Item implements IBindable
|
|||
float f3 = f * f * 0.6F - 0.7F;
|
||||
for (int l = 0; l < 8; ++l)
|
||||
{
|
||||
world.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3);
|
||||
world.spawnParticle(EnumParticleTypes.REDSTONE, posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < damage; i++)
|
||||
|
@ -115,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("")))
|
||||
|
@ -173,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))
|
||||
|
@ -222,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)
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
|||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelAlchemicalCalcinator;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicalCalcinator;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
|
@ -41,9 +41,9 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer
|
|||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i)
|
||||
{
|
||||
if (tileEntity instanceof TEAlchemicCalcinator)
|
||||
if (tileEntity instanceof TEAlchemicalCalcinator)
|
||||
{
|
||||
TEAlchemicCalcinator tileAltar = (TEAlchemicCalcinator) tileEntity;
|
||||
TEAlchemicalCalcinator tileAltar = (TEAlchemicalCalcinator) tileEntity;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
|
|
|
@ -4,7 +4,7 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
|||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelCrystalBelljar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
|
@ -24,9 +24,9 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer
|
|||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
|
||||
{
|
||||
if (tileEntity instanceof TEBellJar)
|
||||
if (tileEntity instanceof TEBelljar)
|
||||
{
|
||||
TEBellJar tileAltar = (TEBellJar) tileEntity;
|
||||
TEBelljar tileAltar = (TEBelljar) tileEntity;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/CrystalBelljar.png");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEChemistrySet;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
|
@ -37,9 +37,9 @@ public class RenderWritingTable extends TileEntitySpecialRenderer
|
|||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
|
||||
{
|
||||
if (tileEntity instanceof TEWritingTable)
|
||||
if (tileEntity instanceof TEChemistrySet)
|
||||
{
|
||||
TEWritingTable tileAltar = (TEWritingTable) tileEntity;
|
||||
TEChemistrySet tileAltar = (TEChemistrySet) tileEntity;
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
|
|
|
@ -14,7 +14,7 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
|||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelCrystalBelljar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class TEBellJarItemRenderer implements IItemRenderer
|
||||
|
@ -35,7 +35,7 @@ public class TEBellJarItemRenderer implements IItemRenderer
|
|||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
ReagentContainerInfo[] info = TEBellJar.getContainerInfoFromItem(item);
|
||||
ReagentContainerInfo[] info = TEBelljar.getContainerInfoFromItem(item);
|
||||
if (info.length >= 1 && info[0] != null)
|
||||
{
|
||||
ReagentStack reagentStack = info[0].reagent;
|
||||
|
|
|
@ -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(x + 1, y, z);
|
||||
TileEntity westEntity = world.getTileEntity(x - 1, y, z);
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
|||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal;
|
||||
import WayofTime.alchemicalWizardry.api.tile.IBloodAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEBelljar;
|
||||
|
||||
public class RitualEffectDemonPortal extends RitualEffect
|
||||
{
|
||||
|
@ -137,7 +137,7 @@ public class RitualEffectDemonPortal extends RitualEffect
|
|||
|
||||
for(Int3 pos : jarLocations)
|
||||
{
|
||||
if(!(ritualStone.getWorld().getTileEntity(x + pos.xCoord, y + pos.yCoord, z + pos.zCoord) instanceof TEBellJar))
|
||||
if(!(ritualStone.getWorld().getTileEntity(x + pos.xCoord, y + pos.yCoord, z + pos.zCoord) instanceof TEBelljar))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -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() {}
|
||||
}
|
|
@ -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);
|
||||
|
@ -901,7 +896,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
|||
sortList[1] = 0;
|
||||
} else
|
||||
{
|
||||
sortList[0] = this.fluid.fluidID;
|
||||
sortList[0] = this.fluid.getFluidID();
|
||||
sortList[1] = this.fluid.amount;
|
||||
}
|
||||
|
||||
|
@ -911,7 +906,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
|||
sortList[3] = 0;
|
||||
} else
|
||||
{
|
||||
sortList[2] = this.fluidInput.fluidID;
|
||||
sortList[2] = this.fluidInput.getFluidID();
|
||||
sortList[3] = this.fluidInput.amount;
|
||||
}
|
||||
|
||||
|
@ -921,7 +916,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
|
|||
sortList[5] = 0;
|
||||
} else
|
||||
{
|
||||
sortList[4] = this.fluidOutput.fluidID;
|
||||
sortList[4] = this.fluidOutput.getFluidID();
|
||||
sortList[5] = this.fluidOutput.amount;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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};
|
||||
}
|
||||
}
|
||||
|
|
@ -20,6 +20,6 @@ public class TEConduit extends TESpellBlock
|
|||
@Override
|
||||
protected void applySpellChange(SpellParadigm parad)
|
||||
{
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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<Reagent, Integer>();
|
||||
|
||||
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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -135,5 +135,4 @@ public class TEPedestal extends TEInventory
|
|||
SpellHelper.sendIndexedParticleToAllAround(worldObj, pos, 20, worldObj.provider.getDimensionId(), 2, pos);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ public class TEPlinth extends TEInventory implements IUpdatePlayerListBox
|
|||
private int progressInterval;
|
||||
private int progress;
|
||||
|
||||
public static List<PlinthComponent> pedestalPositions = new ArrayList();
|
||||
public static List<PlinthComponent> pedestalPositions = new ArrayList<PlinthComponent>();
|
||||
|
||||
public TEPlinth()
|
||||
{
|
||||
|
|
|
@ -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<ColourAndCoords>();
|
||||
reagentTargetList = new HashMap<Reagent, List<Int3>>();
|
||||
reagentTankDesignationList = new HashMap<Reagent, Integer>();
|
||||
}
|
||||
|
||||
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<ColourAndCoords>();
|
||||
|
||||
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<Reagent, List<Int3>>();
|
||||
|
||||
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<Int3> coordList = new LinkedList();
|
||||
List<Int3> coordList = new LinkedList<Int3>();
|
||||
|
||||
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<Reagent, Integer>();
|
||||
|
||||
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<ColourAndCoords>();
|
||||
|
||||
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<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())
|
||||
{
|
||||
|
@ -475,7 +471,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp
|
|||
List<Int3> coordList = this.reagentTargetList.get(reagent);
|
||||
if (coordList == null)
|
||||
{
|
||||
List<Int3> newCoordList = new LinkedList();
|
||||
List<Int3> newCoordList = new LinkedList<Int3>();
|
||||
newCoordList.add(newCoord);
|
||||
this.reagentTargetList.put(reagent, newCoordList);
|
||||
} else
|
||||
|
@ -486,7 +482,7 @@ public class TEReagentConduit extends TileSegmentedReagentHandler implements IUp
|
|||
return true;
|
||||
} else
|
||||
{
|
||||
List<Int3> newCoordList = new LinkedList();
|
||||
List<Int3> newCoordList = new LinkedList<Int3>();
|
||||
newCoordList.add(newCoord);
|
||||
this.reagentTargetList.put(reagent, newCoordList);
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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()));
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -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))
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue