Made Automation tooltips more descriptive
Adjusted allowPutStack, isInputFacing, isOutputFacing for the Item Distributor Adjusted onScrewdriverRightClick for the Item Regulator
This commit is contained in:
parent
e1aafccce5
commit
b9f8927b3d
7 changed files with 56 additions and 6 deletions
|
@ -19,6 +19,10 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM
|
|||
super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Buffer(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription) {
|
||||
super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Buffer(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
|
|
@ -14,13 +14,20 @@ import net.minecraft.entity.player.InventoryPlayer;
|
|||
public class GT_MetaTileEntity_ChestBuffer
|
||||
extends GT_MetaTileEntity_Buffer {
|
||||
public GT_MetaTileEntity_ChestBuffer(int aID, String aName, String aNameRegional, int aTier) {
|
||||
super(aID, aName, aNameRegional, aTier, 28, "Buffering lots of incoming Items");
|
||||
super(aID, aName, aNameRegional, aTier, 28, new String[]{
|
||||
"Buffers up to 27 Item Stacks",
|
||||
"Use Screwdriver to regulate output stack size",
|
||||
"Consumes 1EU per moved Item"});
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_ChestBuffer(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription) {
|
||||
super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_ChestBuffer(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription) {
|
||||
super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_ChestBuffer(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,10 @@ public class GT_MetaTileEntity_Filter
|
|||
public boolean bInvertFilter = false;
|
||||
|
||||
public GT_MetaTileEntity_Filter(int aID, String aName, String aNameRegional, int aTier) {
|
||||
super(aID, aName, aNameRegional, aTier, 19, "Filtering incoming Items");
|
||||
super(aID, aName, aNameRegional, aTier, 19, new String[]{
|
||||
"Filters up to 9 different Items",
|
||||
"Use Screwdriver to regulate output stack size",
|
||||
"Consumes 1EU per moved Item"});
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Filter(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
|
||||
|
|
|
@ -11,6 +11,7 @@ import gregtech.common.gui.GT_Container_ChestBuffer;
|
|||
import gregtech.common.gui.GT_GUIContainer_ChestBuffer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
|
@ -19,7 +20,11 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer
|
|||
private byte currentSide = 0, currentSideItemCount = 0;
|
||||
|
||||
public GT_MetaTileEntity_ItemDistributor(int aID, String aName, String aNameRegional, int aTier) {
|
||||
super(aID, aName, aNameRegional, aTier, 28, "Buffering lots of incoming Items");
|
||||
super(aID, aName, aNameRegional, aTier, 28, new String[]{
|
||||
"Distributes Items between different Machine Sides",
|
||||
"Default Items per Machine Side: 0",
|
||||
"Use Screwdriver to increase/decrease Items per Side",
|
||||
"Consumes 1EU per moved Item"});
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_ItemDistributor(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount,
|
||||
|
@ -64,6 +69,11 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer
|
|||
return new GT_Container_ChestBuffer(aPlayerInventory, aBaseMetaTileEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
||||
return aSide == aBaseMetaTileEntity.getFrontFacing();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||
if (aSide == aFacing) {
|
||||
|
@ -83,6 +93,16 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer
|
|||
}
|
||||
return returnTextures;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInputFacing(byte aSide) {
|
||||
return getBaseMetaTileEntity().getFrontFacing() == aSide;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOutputFacing(byte aSide) {
|
||||
return getBaseMetaTileEntity().getFrontFacing() != aSide;
|
||||
}
|
||||
|
||||
public boolean isValidSlot(int aIndex) {
|
||||
return aIndex < this.mInventory.length - 1;
|
||||
|
|
|
@ -9,6 +9,7 @@ import gregtech.api.objects.GT_RenderedTexture;
|
|||
import gregtech.api.util.GT_Utility;
|
||||
import gregtech.common.gui.GT_Container_Regulator;
|
||||
import gregtech.common.gui.GT_GUIContainer_Regulator;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -21,7 +22,11 @@ public class GT_MetaTileEntity_Regulator
|
|||
private boolean charge = false, decharge = false;
|
||||
|
||||
public GT_MetaTileEntity_Regulator(int aID, String aName, String aNameRegional, int aTier) {
|
||||
super(aID, aName, aNameRegional, aTier, 20, "Regulating incoming Items");
|
||||
super(aID, aName, aNameRegional, aTier, 20, new String[]{
|
||||
"Filters up to 9 different Items",
|
||||
"Allows Item-specific output stack size",
|
||||
"Allows Item-specific output slot",
|
||||
"Consumes 1EU per moved Item"});
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Regulator(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
|
||||
|
@ -78,6 +83,11 @@ public class GT_MetaTileEntity_Regulator
|
|||
this.mTargetSlots[8] = aNBT.getInteger("mTargetSlot9");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
|
||||
//Regulation per Screwdriver is overridden by GUI regulation.
|
||||
}
|
||||
|
||||
public void moveItems(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) {
|
||||
int i = 0;
|
||||
for (int tCosts = 0; i < 9; i++) {
|
||||
|
|
|
@ -12,7 +12,10 @@ import net.minecraft.entity.player.InventoryPlayer;
|
|||
public class GT_MetaTileEntity_SuperBuffer
|
||||
extends GT_MetaTileEntity_ChestBuffer {
|
||||
public GT_MetaTileEntity_SuperBuffer(int aID, String aName, String aNameRegional, int aTier) {
|
||||
super(aID, aName, aNameRegional, aTier, 257, "Buffering up to 256 Stacks");
|
||||
super(aID, aName, aNameRegional, aTier, 257, new String[]{
|
||||
"Buffers up to 256 Item Stacks",
|
||||
"Use Screwdriver to regulate output stack size",
|
||||
"Consumes 1EU per moved Item"});
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_SuperBuffer(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
|
||||
|
|
|
@ -24,7 +24,10 @@ public class GT_MetaTileEntity_TypeFilter
|
|||
public OrePrefixes mPrefix = OrePrefixes.ore;
|
||||
|
||||
public GT_MetaTileEntity_TypeFilter(int aID, String aName, String aNameRegional, int aTier) {
|
||||
super(aID, aName, aNameRegional, aTier, 11, "Filtering incoming Items by Type");
|
||||
super(aID, aName, aNameRegional, aTier, 11, new String[]{
|
||||
"Filters 1 Item Type",
|
||||
"Use Screwdriver to regulate output stack size",
|
||||
"Consumes 1 EU per moved Item"});
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_TypeFilter(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
|
||||
|
|
Loading…
Reference in a new issue