mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-20 04:09:40 +00:00
remove redundant classes that are in mantle, use mantle's implementations
This commit is contained in:
1 parent
a181dc9dcf
commit
b57eb8bed1
21 files changed
+87
-239
No files matched your search
@@ -2,6 +2,7 @@ package tconstruct.blocks.component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mantle.world.CoordTuple;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -14,7 +15,6 @@ import tconstruct.blocks.logic.AdaptiveSmelteryLogic;
|
||||
import tconstruct.library.component.LogicComponent;
|
||||
import tconstruct.library.component.MultiFluidTank;
|
||||
import tconstruct.library.crafting.Smeltery;
|
||||
import tconstruct.library.util.CoordTuple;
|
||||
|
||||
public class SmelteryComponent extends LogicComponent
|
||||
{
|
||||
@@ -138,14 +138,14 @@ public class SmelteryComponent extends LogicComponent
|
||||
if (activeLavaTank == null || fuelTicks > 0 || structure.lavaTanks.size() < 1)
|
||||
return;
|
||||
|
||||
if (!world.blockExists(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z))
|
||||
if (!world.blockExists(activeLavaTank.x(), activeLavaTank.y(), activeLavaTank.z()))
|
||||
{
|
||||
fuelAmount = 0;
|
||||
fuelGague = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
TileEntity tankContainer = world.getBlockTileEntity(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z);
|
||||
TileEntity tankContainer = world.getBlockTileEntity(activeLavaTank.x(), activeLavaTank.y(), activeLavaTank.z());
|
||||
if (tankContainer == null)
|
||||
{
|
||||
fuelAmount = 0;
|
||||
@@ -182,7 +182,7 @@ public class SmelteryComponent extends LogicComponent
|
||||
while (!foundTank)
|
||||
{
|
||||
CoordTuple possibleTank = structure.lavaTanks.get(iter);
|
||||
TileEntity newTankContainer = world.getBlockTileEntity(possibleTank.x, possibleTank.y, possibleTank.z);
|
||||
TileEntity newTankContainer = world.getBlockTileEntity(possibleTank.x(), possibleTank.y(), possibleTank.z());
|
||||
if (newTankContainer instanceof IFluidHandler)
|
||||
{
|
||||
FluidStack newliquid = ((IFluidHandler) newTankContainer).drain(ForgeDirection.UNKNOWN, drainFuelAmount(), false);
|
||||
@@ -276,6 +276,6 @@ public class SmelteryComponent extends LogicComponent
|
||||
tags.setIntArray("Melting", meltingTemps);
|
||||
tags.setInteger("Fuel", fuelAmount);
|
||||
if (activeLavaTank != null)
|
||||
tags.setIntArray("LavaTank", new int[] { activeLavaTank.x, activeLavaTank.y, activeLavaTank.z });
|
||||
tags.setIntArray("LavaTank", new int[] { activeLavaTank.x(), activeLavaTank.y(), activeLavaTank.z() });
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package tconstruct.blocks.component;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
|
||||
import mantle.world.CoordTuple;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagIntArray;
|
||||
@@ -11,7 +12,6 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import tconstruct.common.TContent;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.library.component.TankLayerScan;
|
||||
import tconstruct.library.util.CoordTuple;
|
||||
import tconstruct.library.util.IServantLogic;
|
||||
|
||||
public class SmelteryScan extends TankLayerScan
|
||||
@@ -71,10 +71,10 @@ public class SmelteryScan extends TankLayerScan
|
||||
{
|
||||
for (CoordTuple coord : airCoords)
|
||||
{
|
||||
if (world.getBlockId(coord.x, coord.y, coord.z) != TRepo.tankAir.blockID)
|
||||
if (world.getBlockId(coord.x(), coord.y(), coord.z()) != TRepo.tankAir.blockID)
|
||||
{
|
||||
world.setBlock(coord.x, coord.y, coord.z, TRepo.tankAir.blockID);
|
||||
IServantLogic servant = (IServantLogic) world.getBlockTileEntity(coord.x, coord.y, coord.z);
|
||||
world.setBlock(coord.x(), coord.y(), coord.z(), TRepo.tankAir.blockID);
|
||||
IServantLogic servant = (IServantLogic) world.getBlockTileEntity(coord.x(), coord.y(), coord.z());
|
||||
servant.verifyMaster(imaster, world, master.xCoord, master.yCoord, master.zCoord);
|
||||
}
|
||||
}
|
||||
@@ -87,7 +87,7 @@ public class SmelteryScan extends TankLayerScan
|
||||
super.invalidateStructure();
|
||||
for (CoordTuple coord : airCoords)
|
||||
{
|
||||
TileEntity servant = world.getBlockTileEntity(coord.x, coord.y, coord.z);
|
||||
TileEntity servant = world.getBlockTileEntity(coord.x(), coord.y(), coord.z());
|
||||
if (servant instanceof IServantLogic)
|
||||
((IServantLogic) servant).invalidateMaster(imaster, world, master.xCoord, master.yCoord, master.zCoord);
|
||||
}
|
||||
@@ -98,10 +98,10 @@ public class SmelteryScan extends TankLayerScan
|
||||
{
|
||||
for (CoordTuple coord : airCoords)
|
||||
{
|
||||
if (coord.y < height)
|
||||
if (coord.y() < height)
|
||||
continue;
|
||||
|
||||
TileEntity servant = world.getBlockTileEntity(coord.x, coord.y, coord.z);
|
||||
TileEntity servant = world.getBlockTileEntity(coord.x(), coord.y(), coord.z());
|
||||
if (servant instanceof IServantLogic)
|
||||
((IServantLogic) servant).invalidateMaster(imaster, world, master.xCoord, master.yCoord, master.zCoord);
|
||||
}
|
||||
@@ -115,7 +115,7 @@ public class SmelteryScan extends TankLayerScan
|
||||
while (i.hasNext())
|
||||
{
|
||||
CoordTuple coord = (CoordTuple) i.next();
|
||||
TileEntity te = world.getBlockTileEntity(coord.x, coord.y, coord.z);
|
||||
TileEntity te = world.getBlockTileEntity(coord.x(), coord.y(), coord.z());
|
||||
if (te != null && te instanceof IServantLogic)
|
||||
{
|
||||
((IServantLogic) te).invalidateMaster(imaster, world, master.xCoord, master.yCoord, master.zCoord);
|
||||
@@ -151,7 +151,7 @@ public class SmelteryScan extends TankLayerScan
|
||||
NBTTagList tanks = new NBTTagList();
|
||||
for (CoordTuple coord : lavaTanks)
|
||||
{
|
||||
tanks.appendTag(new NBTTagIntArray("coord", new int[] { coord.x, coord.y, coord.z }));
|
||||
tanks.appendTag(new NBTTagIntArray("coord", new int[] { coord.x(), coord.y(), coord.z() }));
|
||||
}
|
||||
tags.setTag("Tanks", tanks);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user