Update GT_MetaTileEntity_MultiBlockBase.java
This commit is contained in:
parent
b1a29c3a22
commit
8295f740af
1 changed files with 0 additions and 42 deletions
|
@ -48,7 +48,6 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
||||||
public ArrayList<GT_MetaTileEntity_Hatch_Muffler> mMufflerHatches = new ArrayList<GT_MetaTileEntity_Hatch_Muffler>();
|
public ArrayList<GT_MetaTileEntity_Hatch_Muffler> mMufflerHatches = new ArrayList<GT_MetaTileEntity_Hatch_Muffler>();
|
||||||
public ArrayList<GT_MetaTileEntity_Hatch_Energy> mEnergyHatches = new ArrayList<GT_MetaTileEntity_Hatch_Energy>();
|
public ArrayList<GT_MetaTileEntity_Hatch_Energy> mEnergyHatches = new ArrayList<GT_MetaTileEntity_Hatch_Energy>();
|
||||||
public ArrayList<GT_MetaTileEntity_Hatch_Maintenance> mMaintenanceHatches = new ArrayList<GT_MetaTileEntity_Hatch_Maintenance>();
|
public ArrayList<GT_MetaTileEntity_Hatch_Maintenance> mMaintenanceHatches = new ArrayList<GT_MetaTileEntity_Hatch_Maintenance>();
|
||||||
public ArrayList<GT_MetaTileEntity_Hatch_DataAccess> mDataAccessHatches = new ArrayList<GT_MetaTileEntity_Hatch_DataAccess>();
|
|
||||||
|
|
||||||
public GT_MetaTileEntity_MultiBlockBase(int aID, String aName, String aNameRegional) {
|
public GT_MetaTileEntity_MultiBlockBase(int aID, String aName, String aNameRegional) {
|
||||||
super(aID, aName, aNameRegional, 2);
|
super(aID, aName, aNameRegional, 2);
|
||||||
|
@ -696,36 +695,6 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
||||||
return rList;
|
return rList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb
|
|
||||||
*/
|
|
||||||
private boolean isCorrectDataItem(ItemStack aStack, int state){
|
|
||||||
if ((state & 1) != 0 && ItemList.Circuit_Integrated.isStackEqual(aStack, false, true)) return true;
|
|
||||||
if ((state & 2) != 0 && ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) return true;
|
|
||||||
if ((state & 4) != 0 && ItemList.Tool_DataOrb.isStackEqual(aStack, false, true)) return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb
|
|
||||||
*/
|
|
||||||
public ArrayList<ItemStack> getDataItems(byte state) {
|
|
||||||
ArrayList<ItemStack> rList = new ArrayList<ItemStack>();
|
|
||||||
if (GT_Utility.isStackValid(mInventory[1]) && isCorrectDataItem(mInventory[1], state)) {
|
|
||||||
rList.add(mInventory[1]);
|
|
||||||
}
|
|
||||||
for (GT_MetaTileEntity_Hatch_DataAccess tHatch : mDataAccessHatches) {
|
|
||||||
if (isValidMetaTileEntity(tHatch)) {
|
|
||||||
for (int i = 0; i < tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) {
|
|
||||||
if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null
|
|
||||||
&& isCorrectDataItem(tHatch.getBaseMetaTileEntity().getStackInSlot(i), state))
|
|
||||||
rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return rList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GT_Recipe_Map getRecipeMap() {
|
public GT_Recipe_Map getRecipeMap() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -840,17 +809,6 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean addDataAccessToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
|
|
||||||
if (aTileEntity == null) return false;
|
|
||||||
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
|
|
||||||
if (aMetaTileEntity == null) return false;
|
|
||||||
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DataAccess) {
|
|
||||||
((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
|
|
||||||
return mDataAccessHatches.add((GT_MetaTileEntity_Hatch_DataAccess) aMetaTileEntity);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getInfoData() {
|
public String[] getInfoData() {
|
||||||
return new String[]{"Progress:", (mProgresstime / 20) + "secs", (mMaxProgresstime / 20) + "secs", "Efficiency:", (mEfficiency / 100.0F) + "%", "Problems:", String.valueOf((getIdealStatus() - getRepairStatus()))};
|
return new String[]{"Progress:", (mProgresstime / 20) + "secs", (mMaxProgresstime / 20) + "secs", "Efficiency:", (mEfficiency / 100.0F) + "%", "Problems:", String.valueOf((getIdealStatus() - getRepairStatus()))};
|
||||||
|
|
Loading…
Reference in a new issue