TContent refactor Part 1

This commit is contained in:
Progwml6 committed 2013-11-29 23:16:32 -05:00
1 parent 241bfcf0d5
commit 1a74c0768f
77 files changed
+1884 -5647

No files matched your search

@@ -26,6 +26,7 @@ import tconstruct.TConstruct;
import tconstruct.blocks.component.SmelteryComponent;
import tconstruct.blocks.component.SmelteryScan;
import tconstruct.common.TContent;
import tconstruct.common.TRepo;
import tconstruct.inventory.AdaptiveSmelteryContainer;
import tconstruct.library.blocks.AdaptiveInventoryLogic;
import tconstruct.library.component.IComponentHolder;
@@ -42,7 +43,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
boolean updateFluids = false;
boolean recheckStructure = false;
boolean updateAir = false;
SmelteryScan structure = new SmelteryScan(this, TContent.smeltery, TContent.lavaTank);
SmelteryScan structure = new SmelteryScan(this, TRepo.smeltery, TRepo.lavaTank);
MultiFluidTank multitank = new MultiFluidTank();
SmelteryComponent smeltery = new SmelteryComponent(this, structure, multitank, 800);
HashMap<CoordTuple, LiquidDataInstance> airUpdates = new HashMap<CoordTuple, LiquidDataInstance>();
@@ -31,6 +31,7 @@ import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
import net.minecraftforge.fluids.IFluidTank;
import tconstruct.common.TContent;
import tconstruct.common.TRepo;
import tconstruct.inventory.SmelteryContainer;
import tconstruct.library.blocks.InventoryLogic;
import tconstruct.library.crafting.Smeltery;
@@ -320,7 +321,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
if (currentLiquid + 40 < maxLiquid)
{
int amount = villager.isChild() ? 5 : 40;
this.fill(new FluidStack(TContent.moltenEmeraldFluid, amount), true);
this.fill(new FluidStack(TRepo.moltenEmeraldFluid, amount), true);
}
}
}
@@ -331,7 +332,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
if (currentLiquid + 125 < maxLiquid)
{
this.fill(new FluidStack(TContent.moltenEnderFluid, 125), true);
this.fill(new FluidStack(TRepo.moltenEnderFluid, 125), true);
}
}
}
@@ -342,7 +343,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
if (currentLiquid + 40 < maxLiquid)
{
this.fill(new FluidStack(TContent.moltenIronFluid, 40), true);
this.fill(new FluidStack(TRepo.moltenIronFluid, 40), true);
}
}
}
@@ -353,7 +354,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
if (currentLiquid + 108 < maxLiquid)
{
this.fill(new FluidStack(TContent.glueFluid, 108), true);
this.fill(new FluidStack(TRepo.glueFluid, 108), true);
}
}
}
@@ -365,7 +366,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
if (currentLiquid + 40 < maxLiquid)
{
int amount = (living.isChild() || living instanceof EntityPlayer) ? 5 : 40;
this.fill(new FluidStack(TContent.bloodFluid, amount), true);
this.fill(new FluidStack(TRepo.bloodFluid, amount), true);
}
}
}
@@ -673,7 +674,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
//worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
//worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
/*@Override
public void setInventorySlotContents (int slot, ItemStack itemstack)
{
@@ -864,7 +865,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
Block block = Block.blocksList[blockID];
if (block != null && !block.isAirBlock(worldObj, xPos, y, zPos))
{
if (blockID == TContent.smeltery.blockID)
if (blockID == TRepo.smeltery.blockID)
return validateBottom(x, y, z, count);
else
return count;
@@ -899,7 +900,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
{
if (worldObj.getBlockId(xPos, y, zPos) == TContent.smeltery.blockID && (worldObj.getBlockMetadata(xPos, y, zPos) >= 2))
if (worldObj.getBlockId(xPos, y, zPos) == TRepo.smeltery.blockID && (worldObj.getBlockMetadata(xPos, y, zPos) >= 2))
bottomBricks++;
}
}
@@ -919,7 +920,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
int tempBricks = 0;
int blockID = worldObj.getBlockId(x, y, z);
if (blockID == TContent.smeltery.blockID || blockID == TContent.lavaTank.blockID)
if (blockID == TRepo.smeltery.blockID || blockID == TRepo.lavaTank.blockID)
{
TileEntity te = worldObj.getBlockTileEntity(x, y, z);
if (te == this)
@@ -1,6 +1,7 @@
package tconstruct.blocks.logic;
import tconstruct.common.TContent;
import tconstruct.common.TRepo;
import tconstruct.inventory.PatternShaperContainer;
import tconstruct.library.blocks.InventoryLogic;
import net.minecraft.entity.player.InventoryPlayer;
@@ -45,10 +46,10 @@ public class StencilTableLogic extends InventoryLogic implements ISidedInventory
public void setInventorySlotContents (int slot, ItemStack itemstack)
{
super.setInventorySlotContents(slot, itemstack);
if (slot == 0 && itemstack != null && itemstack.getItem() == TContent.blankPattern)//instanceof tconstruct.items.Pattern)
if (slot == 0 && itemstack != null && itemstack.getItem() == TRepo.blankPattern)//instanceof tconstruct.items.Pattern)
{
if (itemstack.getItemDamage() == 0)
setInventorySlotContents(1, new ItemStack(TContent.woodPattern, 1, 1));
setInventorySlotContents(1, new ItemStack(TRepo.woodPattern, 1, 1));
/*else if (itemstack.getItemDamage() == 1)
setInventorySlotContents(1, new ItemStack(TContent.metalPattern, 1, 0));*/
}