remove redundant classes that are in mantle, use mantle's implementations

This commit is contained in:
Progwml6 committed 2013-12-01 19:46:08 -05:00
1 parent a181dc9dcf
commit b57eb8bed1
21 files changed
+87 -239

No files matched your search

@@ -36,7 +36,7 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster() && canDrain(from, null))
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getBlockTileEntity(master.x, master.y, master.z);
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getBlockTileEntity(master.x(), master.y(), master.z());
return smeltery.fill(from, resource, doFill);
}
return 0;
@@ -48,7 +48,7 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
// TConstruct.logger.info("Attempting drain " + hasValidMaster());
if (hasValidMaster() && canDrain(from, null))
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getBlockTileEntity(master.x, master.y, master.z);
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getBlockTileEntity(master.x(), master.y(), master.z());
// TConstruct.logger.info("Found master");
return smeltery.drain(from, maxDrain, doDrain);
}
@@ -60,7 +60,7 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster() && canDrain(from, null))
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getBlockTileEntity(master.x, master.y, master.z);
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getBlockTileEntity(master.x(), master.y(), master.z());
return smeltery.drain(from, resource, doDrain);
}
return null;
@@ -71,7 +71,7 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster())
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getBlockTileEntity(master.x, master.y, master.z);
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getBlockTileEntity(master.x(), master.y(), master.z());
return smeltery.getFillState() < 2;
}
return false;
@@ -82,7 +82,7 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster())
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getBlockTileEntity(master.x, master.y, master.z);
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getBlockTileEntity(master.x(), master.y(), master.z());
return smeltery.getFillState() > 0;
}
return false;
@@ -93,7 +93,7 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster() && (from == getForgeDirection() || from == getForgeDirection().getOpposite() || from == ForgeDirection.UNKNOWN))
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getBlockTileEntity(master.x, master.y, master.z);
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getBlockTileEntity(master.x(), master.y(), master.z());
return smeltery.getTankInfo(ForgeDirection.UNKNOWN);
}
return null;
@@ -32,8 +32,8 @@ import tconstruct.library.blocks.AdaptiveInventoryLogic;
import tconstruct.library.component.IComponentHolder;
import tconstruct.library.component.LogicComponent;
import tconstruct.library.component.MultiFluidTank;
import tconstruct.library.util.CoordTuple;
import tconstruct.library.util.IActiveLogic;
import mantle.blocks.iface.IActiveLogic;
import mantle.world.CoordTuple;
import tconstruct.library.util.IMasterLogic;
import tconstruct.library.util.IServantLogic;
@@ -285,7 +285,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
CoordTuple air = structure.getAirByIndex(slot);
if (air != null)
{
TileEntity te = worldObj.getBlockTileEntity(air.x, air.y, air.z);
TileEntity te = worldObj.getBlockTileEntity(air.x(), air.y(), air.z());
if (te != null && te instanceof TankAirLogic)
{
((TankAirLogic) te).setInventorySlotContents(0, itemstack);
@@ -306,7 +306,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
{
//Base calculations per liquid
LiquidData data = new LiquidData(fluid.amount, size);
int baseY = structure.airCoords.get(0).y;
int baseY = structure.airCoords.get(0).y();
int layerSize = structure.getAirLayerSize();
//Calculate where to distribute liquids
@@ -314,7 +314,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
{
LiquidDataInstance instance;
CoordTuple coord = structure.airCoords.get(i);
int height = 16 * (coord.y - baseY);
int height = 16 * (coord.y() - baseY);
int position = i % layerSize;
if (!airUpdates.containsKey(coord))
@@ -407,7 +407,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
{
Map.Entry pairs = (Map.Entry) iter.next();
CoordTuple coord = (CoordTuple) pairs.getKey();
TileEntity te = worldObj.getBlockTileEntity(coord.x, coord.y, coord.z);
TileEntity te = worldObj.getBlockTileEntity(coord.x(), coord.y(), coord.z());
if (te instanceof TankAirLogic)
{
((TankAirLogic) te).overrideFluids(((LiquidDataInstance) pairs.getValue()).fluids);
@@ -420,7 +420,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
public void updateAir ()
{
for (CoordTuple loc : structure.airCoords)
worldObj.markBlockForUpdate(loc.x, loc.y, loc.z);
worldObj.markBlockForUpdate(loc.x(), loc.y(), loc.z());
}
class LiquidData
@@ -15,7 +15,7 @@ import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
import net.minecraftforge.fluids.IFluidTank;
import tconstruct.TConstruct;
import tconstruct.library.util.IActiveLogic;
import mantle.blocks.iface.IActiveLogic;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -1,8 +1,8 @@
package tconstruct.blocks.logic;
import tconstruct.TConstruct;
import tconstruct.library.util.IActiveLogic;
import mantle.blocks.iface.IFacingLogic;;
import mantle.blocks.iface.IActiveLogic;
import mantle.blocks.iface.IFacingLogic;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.INetworkManager;
@@ -1,7 +1,7 @@
package tconstruct.blocks.logic;
import tconstruct.inventory.FrypanContainer;
import tconstruct.library.util.IActiveLogic;
import mantle.blocks.iface.IActiveLogic;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.InventoryPlayer;
@@ -21,7 +21,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import tconstruct.inventory.FurnaceContainer;
import mantle.blocks.abstracts.InventoryLogic;
import tconstruct.library.util.IActiveLogic;
import mantle.blocks.iface.IActiveLogic;
import mantle.blocks.iface.IFacingLogic;
import cpw.mods.fml.common.registry.GameRegistry;
@@ -1,12 +1,12 @@
package tconstruct.blocks.logic;
import mantle.world.CoordTuple;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.Packet132TileEntityData;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import tconstruct.library.util.CoordTuple;
import tconstruct.library.util.IMasterLogic;
import tconstruct.library.util.IServantLogic;
@@ -27,7 +27,7 @@ public class MultiServantLogic extends TileEntity implements IServantLogic
if (!hasMaster)
return false;
if (worldObj.getBlockId(master.x, master.y, master.z) == masterID && worldObj.getBlockMetadata(master.x, master.y, master.z) == masterMeat)
if (worldObj.getBlockId(master.x(), master.y(), master.z()) == masterID && worldObj.getBlockMetadata(master.x(), master.y(), master.z()) == masterMeat)
return true;
else
@@ -71,7 +71,7 @@ public class MultiServantLogic extends TileEntity implements IServantLogic
@Deprecated
public boolean setMaster (int x, int y, int z)
{
if (!hasMaster || worldObj.getBlockId(master.x, master.y, master.z) != masterID || (worldObj.getBlockMetadata(master.x, master.y, master.z) != masterMeat))
if (!hasMaster || worldObj.getBlockId(master.x(), master.y(), master.z()) != masterID || (worldObj.getBlockMetadata(master.x(), master.y(), master.z()) != masterMeat))
{
overrideMaster(x, y, z);
return true;
@@ -113,7 +113,7 @@ public class MultiServantLogic extends TileEntity implements IServantLogic
{
if (hasValidMaster())
{
IMasterLogic logic = (IMasterLogic) worldObj.getBlockTileEntity(master.x, master.y, master.z);
IMasterLogic logic = (IMasterLogic) worldObj.getBlockTileEntity(master.x(), master.y(), master.z());
logic.notifyChange(this, xCoord, yCoord, zCoord);
}
}
@@ -137,9 +137,9 @@ public class MultiServantLogic extends TileEntity implements IServantLogic
tags.setBoolean("TiedToMaster", hasMaster);
if (hasMaster)
{
tags.setInteger("xCenter", master.x);
tags.setInteger("yCenter", master.y);
tags.setInteger("zCenter", master.z);
tags.setInteger("xCenter", master.x());
tags.setInteger("yCenter", master.y());
tags.setInteger("zCenter", master.z());
tags.setShort("MasterID", masterID);
tags.setByte("masterMeat", masterMeat);
}
@@ -29,7 +29,7 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (doFill)
{
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getBlockTileEntity(master.x, master.y, master.z);
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getBlockTileEntity(master.x(), master.y(), master.z());
return smeltery.fill(resource, doFill);
}
else
@@ -48,7 +48,7 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster() && canDrain(from, null))
{
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getBlockTileEntity(master.x, master.y, master.z);
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getBlockTileEntity(master.x(), master.y(), master.z());
return smeltery.drain(maxDrain, doDrain);
}
else
@@ -79,7 +79,7 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
boolean containsFluid = fluid == null;
if (fluid != null)
{
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getBlockTileEntity(master.x, master.y, master.z);
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getBlockTileEntity(master.x(), master.y(), master.z());
for (FluidStack fstack : smeltery.moltenMetal)
{
if (fstack.fluidID == fluid.getID())
@@ -98,7 +98,7 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
{
if (hasValidMaster() && (from == getForgeDirection() || from == getForgeDirection().getOpposite() || from == ForgeDirection.UNKNOWN))
{
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getBlockTileEntity(master.x, master.y, master.z);
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getBlockTileEntity(master.x(), master.y(), master.z());
return smeltery.getMultiTankInfo();
//return new FluidTankInfo[] { smeltery.getInfo() };
}
@@ -35,9 +35,9 @@ import tconstruct.common.TRepo;
import tconstruct.inventory.SmelteryContainer;
import mantle.blocks.abstracts.InventoryLogic;
import tconstruct.library.crafting.Smeltery;
import tconstruct.library.util.CoordTuple;
import tconstruct.library.util.IActiveLogic;
import mantle.blocks.iface.IActiveLogic;
import mantle.blocks.iface.IFacingLogic;
import mantle.world.CoordTuple;
import tconstruct.library.util.IMasterLogic;
import tconstruct.library.util.IServantLogic;
import tconstruct.util.SmelteryDamageSource;
@@ -306,7 +306,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
void detectEntities ()
{
AxisAlignedBB box = AxisAlignedBB.getAABBPool().getAABB(centerPos.x, centerPos.y, centerPos.z, centerPos.x + 1.0D, centerPos.y + 1.0D, centerPos.z + 1.0D).expand(1.0D, 0.0D, 1.0D);
AxisAlignedBB box = AxisAlignedBB.getAABBPool().getAABB(centerPos.x(), centerPos.y(), centerPos.z(), centerPos.x() + 1.0D, centerPos.y() + 1.0D, centerPos.z() + 1.0D).expand(1.0D, 0.0D, 1.0D);
List list = worldObj.getEntitiesWithinAABB(Entity.class, box);
for (Object o : list)
@@ -522,14 +522,14 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
if (activeLavaTank == null || useTime > 0)
return;
if (!worldObj.blockExists(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z))
if (!worldObj.blockExists(activeLavaTank.x(), activeLavaTank.y(), activeLavaTank.z()))
{
fuelAmount = 0;
fuelGague = 0;
return;
}
TileEntity tankContainer = worldObj.getBlockTileEntity(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z);
TileEntity tankContainer = worldObj.getBlockTileEntity(activeLavaTank.x(), activeLavaTank.y(), activeLavaTank.z());
if (tankContainer == null)
{
fuelAmount = 0;
@@ -563,14 +563,14 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
if (activeLavaTank == null || useTime > 0)
return;
if (!worldObj.blockExists(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z))
if (!worldObj.blockExists(activeLavaTank.x(), activeLavaTank.y(), activeLavaTank.z()))
{
fuelAmount = 0;
fuelGague = 0;
return;
}
TileEntity tankContainer = worldObj.getBlockTileEntity(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z);
TileEntity tankContainer = worldObj.getBlockTileEntity(activeLavaTank.x(), activeLavaTank.y(), activeLavaTank.z());
if (tankContainer == null)
{
fuelAmount = 0;
@@ -607,7 +607,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
while (!foundTank)
{
CoordTuple possibleTank = lavaTanks.get(iter);
TileEntity newTankContainer = worldObj.getBlockTileEntity(possibleTank.x, possibleTank.y, possibleTank.z);
TileEntity newTankContainer = worldObj.getBlockTileEntity(possibleTank.x(), possibleTank.y(), possibleTank.z());
if (newTankContainer instanceof IFluidHandler)
{
//TConstruct.logger.info("Tank: "+possibleTank.toString());
@@ -1113,7 +1113,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
if (centerPos == null)
center = new int[] { xCoord, yCoord, zCoord };
else
center = new int[] { centerPos.x, centerPos.y, centerPos.z };
center = new int[] { centerPos.x(), centerPos.y(), centerPos.z() };
tags.setIntArray("CenterPos", center);
tags.setByte("Direction", direction);
@@ -17,7 +17,7 @@ import net.minecraftforge.fluids.FluidStack;
import tconstruct.TConstruct;
import tconstruct.blocks.component.TankAirComponent;
import mantle.blocks.abstracts.InventoryLogic;
import tconstruct.library.util.CoordTuple;
import mantle.world.CoordTuple;
import tconstruct.library.util.IMasterLogic;
import tconstruct.library.util.IServantLogic;
@@ -1,7 +1,7 @@
package tconstruct.blocks.logic;
import tconstruct.library.blocks.AdaptiveInventoryLogic;
import tconstruct.library.util.IActiveLogic;
import mantle.blocks.iface.IActiveLogic;
import mantle.blocks.iface.IFacingLogic;
import tconstruct.library.util.IMasterLogic;