Auto Maintenance Hatch tweaks
Fixed #958 and #1053, allowed robots\pipes to interact with it.
This commit is contained in:
parent
6398c06506
commit
4e3ed071dc
1 changed files with 10 additions and 4 deletions
|
@ -23,8 +23,8 @@ import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import scala.actors.threadpool.Arrays;
|
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch {
|
public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch {
|
||||||
|
@ -99,7 +99,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isValidSlot(int aIndex) {
|
public boolean isValidSlot(int aIndex) {
|
||||||
return false;
|
return mAuto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -128,6 +128,11 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch
|
||||||
return new GT_GUIContainer_MaintenanceHatch(aPlayerInventory, aBaseMetaTileEntity);
|
return new GT_GUIContainer_MaintenanceHatch(aPlayerInventory, aBaseMetaTileEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateSlots() {
|
||||||
|
for (int i = 0; i < mInventory.length; i++)
|
||||||
|
if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean autoMaintainance() {
|
public boolean autoMaintainance() {
|
||||||
boolean tSuccess = true;
|
boolean tSuccess = true;
|
||||||
ItemStack[] mInputs = new ItemStack[]{ItemList.Duct_Tape.get(4, new Object[]{}), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 2), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 4), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2)};
|
ItemStack[] mInputs = new ItemStack[]{ItemList.Duct_Tape.get(4, new Object[]{}), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 2), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 4), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2)};
|
||||||
|
@ -174,6 +179,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch
|
||||||
this.mSoftHammer = true;
|
this.mSoftHammer = true;
|
||||||
this.mSolderingTool = true;
|
this.mSolderingTool = true;
|
||||||
this.mWrench = true;
|
this.mWrench = true;
|
||||||
|
updateSlots()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -208,11 +214,11 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
||||||
return false;
|
return mAuto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
||||||
return false;
|
return mAuto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue