aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJordan Byrne <draknyte1@hotmail.com>2018-05-15 20:30:50 +1000
committerJordan Byrne <draknyte1@hotmail.com>2018-05-15 20:30:50 +1000
commit6a807650f8b57b4f94502d736249bda47e1117e3 (patch)
tree9c4dea7458071b36cb338eb7b00b9364feb17bee /src
parentc7b39a04db6f567b1fe62d03abafbe5a77026721 (diff)
downloadGT5-Unofficial-6a807650f8b57b4f94502d736249bda47e1117e3.tar.gz
GT5-Unofficial-6a807650f8b57b4f94502d736249bda47e1117e3.tar.bz2
GT5-Unofficial-6a807650f8b57b4f94502d736249bda47e1117e3.zip
% More shelf work.
Diffstat (limited to 'src')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java196
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java70
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java20
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java7
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java8
5 files changed, 116 insertions, 185 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java
index 6a35805a0c..3a2f62a26a 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java
@@ -13,15 +13,21 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_N
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
+import gregtech.common.items.GT_MetaGenerated_Tool_01;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
+import gtPlusPlus.core.util.sys.KeyboardUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon;
public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
public byte mType = 0;
-
+ public String mOldDesc = "";
+ public boolean mLocked = false;
public static GT_RenderedTexture texBottom = new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_bottom"));
public static GT_RenderedTexture texTop = new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_top"));
public static GT_RenderedTexture texSide = new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_side"));
@@ -29,10 +35,12 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
public GT4Entity_Shelf(final int aID, final String aName, final String aNameRegional, final String aDescription) {
super(aID, aName, aNameRegional, 0, aDescription);
+ mOldDesc = aDescription;
}
public GT4Entity_Shelf(final String aName, final String aDescription, final ITexture[][][] aTextures) {
super(aName, 0, aDescription, aTextures);
+ mOldDesc = aDescription;
}
@Override
@@ -50,8 +58,12 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
}
@Override
- public boolean isAccessAllowed(EntityPlayer aPlayer) {
- return true;
+ public boolean isAccessAllowed(EntityPlayer aPlayer) {
+ if (this.getBaseMetaTileEntity().getOwnerName().equalsIgnoreCase(aPlayer.getDisplayName())) {
+ return true;
+ }
+ PlayerUtils.messagePlayer(aPlayer, "This container belongs to "+this.getBaseMetaTileEntity().getOwnerName()+".");
+ return false;
}
@Override
@@ -83,36 +95,43 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
public boolean onRightclick(IGregTechTileEntity aTile, EntityPlayer aPlayer) {
ItemStack tStack = aPlayer.inventory.getStackInSlot(aPlayer.inventory.currentItem);
if (tStack == null) {
- if ((this.mInventory[0] != null) && (this.mInventory[0].stackSize > 0)) {
- aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, this.mInventory[0]);
- getBaseMetaTileEntity().setInventorySlotContents(0, null);
- this.mType = 0;
- PlayerUtils.messagePlayer(aPlayer, "Set type to "+this.mType+".");
+ if (KeyboardUtils.isCtrlKeyDown()) {
+ if (this.mInventory[0] != null) {
+ PlayerUtils.messagePlayer(aPlayer, "Contains "+this.mInventory[0].getDisplayName()+" x"+this.mInventory[0].stackSize+".");
+ }
+ return false;
}
+ else {
+ if ((this.mInventory[0] != null) && (this.mInventory[0].stackSize > 0)) {
+ if (!this.mLocked) {
+ PlayerUtils.messagePlayer(aPlayer, "Removed "+this.mInventory[0].getDisplayName()+" x"+this.mInventory[0].stackSize+".");
+ aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, this.mInventory[0]);
+ getBaseMetaTileEntity().setInventorySlotContents(0, null);
+ this.mType = 0;
+ return true;
+ }
+ else {
+ PlayerUtils.messagePlayer(aPlayer, "This container is locked. It belongs to "+aTile.getOwnerName()+".");
+ return false;
+ }
+ }
+ return false;
+ }
}
- else if (this.mInventory[0] == null) {
- if (OrePrefixes.paper.contains(tStack)) {
- aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, null);
- getBaseMetaTileEntity().setInventorySlotContents(0, tStack);
- this.mType = 1;
- PlayerUtils.messagePlayer(aPlayer, "Set type to "+this.mType+".");
- }
- else if (OrePrefixes.book.contains(tStack)) {
- aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, null);
- getBaseMetaTileEntity().setInventorySlotContents(0, tStack);
- this.mType = 2;
- PlayerUtils.messagePlayer(aPlayer, "Set type to "+this.mType+".");
- }
- else if ((ItemList.IC2_Food_Can_Filled.isStackEqual(tStack, true, true))
- || (ItemList.IC2_Food_Can_Spoiled.isStackEqual(tStack, true, true))
- || (ItemList.IC2_Food_Can_Empty.isStackEqual(tStack, false, true))) {
- aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, null);
- getBaseMetaTileEntity().setInventorySlotContents(0, tStack);
- this.mType = 3;
- PlayerUtils.messagePlayer(aPlayer, "Set type to "+this.mType+".");
- }
+ else if (tStack != null && this.mInventory[0] == null) {
+
+ if (KeyboardUtils.isCtrlKeyDown() || GT_MetaGenerated_Tool_01.class.isInstance(tStack.getItem())) {
+ return false;
+ }
+ PlayerUtils.messagePlayer(aPlayer, "Stored "+tStack.getDisplayName()+" x"+tStack.stackSize+".");
+ aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, null);
+ getBaseMetaTileEntity().setInventorySlotContents(0, tStack);
+ this.mType = (byte) MathUtils.randInt(1, 3);
+ return true;
+ }
+ else {
+ return super.onRightclick(aTile, aPlayer);
}
- return super.onRightclick(aTile, aPlayer);
}
@Override
@@ -133,7 +152,6 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
getBaseMetaTileEntity().getWorld().spawnEntityInWorld(tEntity);
if (this.mInventory[0] == null) {
this.mType = 0;
- PlayerUtils.messagePlayer(aPlayer, "Set type to "+this.mType+".");
}
}
super.onLeftclick(aTile, aPlayer);
@@ -145,13 +163,15 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
}
@Override
- public void saveNBTData(NBTTagCompound aNBT) {
+ public void saveNBTData(NBTTagCompound aNBT) {//mLocked
aNBT.setInteger("mType", this.mType);
+ aNBT.setBoolean("mLocked", this.mLocked);
}
@Override
public void loadNBTData(NBTTagCompound aNBT) {
this.mType = ((byte) aNBT.getInteger("mType"));
+ this.mLocked = (aNBT.getBoolean("mLocked"));
}
@Override
@@ -166,7 +186,13 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
@Override
public String[] getDescription() {
- return new String[] { "Decorative Item Storage", CORE.GT_Tooltip };
+ return new String[] {
+ mOldDesc,
+ "Decorative Item Storage",
+ "Right click to store something",
+ "Ctrl + right click to check contents",
+ "Ctrl + right click with a screwdriver to lock",
+ CORE.GT_Tooltip };
}
@Override
@@ -175,50 +201,38 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
}
@Override
- public boolean allowPullStack(IGregTechTileEntity p0, int p1, byte p2, ItemStack p3) {
+ public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) {
+ //return aSide != getBaseMetaTileEntity().getFrontFacing();
return false;
}
@Override
+ public boolean allowPullStack(IGregTechTileEntity p0, int p1, byte p2, ItemStack p3) {
+ return true;
+ }
+
+ @Override
public boolean allowPutStack(IGregTechTileEntity p0, int p1, byte p2, ItemStack p3) {
return false;
}
- /*@Override
- public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
- final ITexture[][][] rTextures = new ITexture[10][17][];
- for (byte i = -1; i < 16; ++i) {
- rTextures[0][i + 1] = this.getFront(i);
- rTextures[1][i + 1] = this.getBack(i);
- rTextures[2][i + 1] = this.getBottom(i);
- rTextures[3][i + 1] = this.getTop(i);
- rTextures[4][i + 1] = this.getSides(i);
- rTextures[5][i + 1] = this.getFrontActive(i);
- rTextures[6][i + 1] = this.getBackActive(i);
- rTextures[7][i + 1] = this.getBottomActive(i);
- rTextures[8][i + 1] = this.getTopActive(i);
- rTextures[9][i + 1] = this.getSidesActive(i);
- }
- return rTextures;
- }*/
-
@Override
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[7][17][];
for (byte i = -1; i < 16; i = (byte) (i + 1)) {
ITexture[] tmp0 = {this.getBottom((byte) 0)[0]};
rTextures[0][(i + 1)] = tmp0;
- ITexture[] tmp1 = { this.getTop((byte) 0)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)};
+ ITexture[] tmp1 = { this.getTop((byte) 0)[0]};
rTextures[1][(i + 1)] = tmp1;
- ITexture[] tmp2 = { this.getSides((byte) 0)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)};
+ ITexture[] tmp2 = { this.getSides((byte) 0)[0]};
rTextures[2][(i + 1)] = tmp2;
- ITexture[] tmp4 = {this.getSides((byte) 0)[0], new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT)};
+ ITexture[] tmp4 = {this.getSides((byte) 0)[0]};
rTextures[3][(i + 1)] = tmp4;
ITexture[] tmp5 = {this.getSides((byte) 0)[0], getFront((byte) 0)[0]};
rTextures[4][(i + 1)] = tmp5;
ITexture[] tmp6 = {this.getSides((byte) 0)[0], getFront((byte) 1)[0]};
rTextures[5][(i + 1)] = tmp6;
- ITexture[] tmp7 = {this.getSides((byte) 0)[0], getFront((byte) 3)[0]};
+ ITexture[] tmp7 = {this.getSides((byte) 0)[0], getFront((byte) 2)[0]};
rTextures[6][(i + 1)] = tmp7;
}
return rTextures;
@@ -228,41 +242,26 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity,
final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive,
final boolean aRedstone) {
- /*return this.mTextures[aSide == aFacing ? 0 : 1][aColorIndex + 1];*/
-
- int modeMod = 0;
-
- ITexture[] tmp = this.mTextures[(aSide >= 2) ? ((aSide != aFacing) ? 2 : ((byte) this.mType == 0 ? 4 : this.mType == 1 ? 5 : this.mType == 3 ? 6 : 0)) : aSide][aColorIndex + 1];
+
+ ITexture[] tmp = this.mTextures[(aSide >= 2) ? ((aSide != aFacing) ? 2 : ((byte) this.mType == 0 ? 4 : this.mType == 1 || this.mType == 2 ? 5 : this.mType == 3 ? 6 : 0)) : aSide][aColorIndex + 1];
if (aSide != aFacing && tmp.length == 2) {
tmp = new ITexture[]{tmp[0]};
}
return tmp;
}
- @Override
- public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) {
- return aSide != getBaseMetaTileEntity().getFrontFacing();
- }
-
private static GT_RenderedTexture x1 = new GT_RenderedTexture(TexturesGtBlock.OVERLAY_WOODEN_SHELF_FRONT);
private static GT_RenderedTexture x2 = new GT_RenderedTexture(TexturesGtBlock.OVERLAY_WOODEN_SHELF_PAPER_FRONT);
private static GT_RenderedTexture x3 = new GT_RenderedTexture(TexturesGtBlock.OVERLAY_WOODEN_SHELF_CANS_FRONT);
-
- public ITexture[] getFront(final byte aColor) {
- GT_RenderedTexture x;
- if (aColor == 0) {
- x = x1;
- }
- else if (aColor == 1) {
- x = x2;
- }
- else if (aColor == 3) {
- x = x3;
- }
- else {
- x = x1;
- }
- return new ITexture[]{x};
+
+ public ITexture[] getFrontNormal() {
+ return new ITexture[]{x1};
+ }
+ public ITexture[] getFrontActive() {
+ return new ITexture[]{x2};
+ }
+ public ITexture[] getFrontAlternative() {
+ return new ITexture[]{x3};
}
public ITexture[] getBack(final byte aColor) {
@@ -282,7 +281,7 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
}
public ITexture[] getFrontActive(final byte aColor) {
- return this.getFront(aColor);
+ return this.getFrontNormal();
}
public ITexture[] getBackActive(final byte aColor) {
@@ -303,9 +302,38 @@ public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- // TODO Auto-generated method stub
super.onPostTick(aBaseMetaTileEntity, aTick);
}
+ public ITexture[] getFront(byte aColour) {
+ if (aColour == 1) {
+ return getFrontActive();
+ }
+ else if (aColour == 2) {
+ return getFrontAlternative();
+ }
+ return getFrontNormal();
+ }
+
+ @Override
+ public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ if (KeyboardUtils.isCtrlKeyDown()) {
+ if (!aPlayer.getDisplayName().equalsIgnoreCase(this.getBaseMetaTileEntity().getOwnerName())) {
+ PlayerUtils.messagePlayer(aPlayer, "Container is not yours to lock.");
+ }
+ else {
+ this.mLocked = Utils.invertBoolean(this.mLocked);
+ if (this.mLocked) {
+ PlayerUtils.messagePlayer(aPlayer, "Container is now locked.");
+ }
+ else {
+ PlayerUtils.messagePlayer(aPlayer, "Container is now unlocked.");
+ }
+ }
+ }
+ else {
+ super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ);
+ }
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java
index 42155aa137..7dcb76a22e 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java
@@ -1,29 +1,14 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-import gregtech.api.enums.Dyes;
-import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Utility;
-
-import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
public class GT4Entity_Shelf_Compartment extends GT4Entity_Shelf {
- public static IIcon[] sIconList = new IIcon[32];
public GT4Entity_Shelf_Compartment(final int aID, final String aName, final String aNameRegional, final String aDescription) {
@@ -40,11 +25,6 @@ public class GT4Entity_Shelf_Compartment extends GT4Entity_Shelf {
}
@Override
- public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) {
- return aSide != getBaseMetaTileEntity().getFrontFacing();
- }
-
- @Override
public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
if (aSide == getBaseMetaTileEntity().getFrontFacing()) {
this.mType = ((byte) ((this.mType + 1) % 16));
@@ -52,58 +32,8 @@ public class GT4Entity_Shelf_Compartment extends GT4Entity_Shelf {
}
}
- /*
- @Override
- @SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister aBlockIconRegister) {
- for (int i = 0; i < 32; i++) {
- sIconList[i] = aBlockIconRegister.registerIcon(CORE.MODID + ":" + "TileEntities/Compartment/" + i);
- }
- }*/
-
@Override
public ITexture[] getFront(final byte aColor) {
return new ITexture[]{TexturesGtBlock.OVERLAYS_COMPARTMENT_FRONT[this.mType < 16 ? this.mType : 0]};
}
-
- @Override
- public void onLeftclick(IGregTechTileEntity aTile,EntityPlayer aPlayer) {
- if ((this.mInventory[0] != null) && (this.mInventory[0].stackSize > 0)) {
- ItemStack tOutput = GT_Utility.copy(new Object[] { this.mInventory[0] });
- if (!aPlayer.isSneaking()) {
- tOutput.stackSize = 1;
- }
- getBaseMetaTileEntity().decrStackSize(0, tOutput.stackSize);
- EntityItem tEntity = new EntityItem(getBaseMetaTileEntity().getWorld(),
- getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 1) + 0.5D,
- getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 1) + 0.5D,
- getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 1) + 0.5D, tOutput);
- tEntity.motionX = 0.0D;
- tEntity.motionY = 0.0D;
- tEntity.motionZ = 0.0D;
- getBaseMetaTileEntity().getWorld().spawnEntityInWorld(tEntity);
- }
- super.onLeftclick(aTile, aPlayer);
- }
-
- @Override
- public boolean onRightclick(IGregTechTileEntity aTile, EntityPlayer aPlayer) {
- ItemStack tStack = aPlayer.inventory.getStackInSlot(aPlayer.inventory.currentItem);
- if (tStack == null) {
- if ((this.mInventory[0] != null) && (this.mInventory[0].stackSize > 0)) {
- aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, this.mInventory[0]);
- getBaseMetaTileEntity().setInventorySlotContents(0, null);
- }
- }
- else if (this.mInventory[0] == null) {
- aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, null);
- getBaseMetaTileEntity().setInventorySlotContents(0, tStack);
- }
- return super.onRightclick(aTile, aPlayer);
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity p0, int p1, byte p2, ItemStack p3) {
- return p1 == 0;
- }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java
index 93c0343a88..2c7186a3ce 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java
@@ -1,8 +1,5 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
@@ -26,23 +23,6 @@ public class GT4Entity_Shelf_Desk extends GT4Entity_Shelf {
}
@Override
- public boolean onRightclick(IGregTechTileEntity aTile, EntityPlayer aPlayer) {
- ItemStack tStack = aPlayer.inventory.getStackInSlot(aPlayer.inventory.currentItem);
- if (tStack == null) {
- if ((this.mInventory[0] != null) && (this.mInventory[0].stackSize > 0)) {
- aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, this.mInventory[0]);
- getBaseMetaTileEntity().setInventorySlotContents(0, null);
- this.mType = 0;
- }
- }
- else if (this.mInventory[0] == null) {
- aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, null);
- getBaseMetaTileEntity().setInventorySlotContents(0, tStack);
- }
- return super.onRightclick(aTile, aPlayer);
- }
-
- @Override
public ITexture[] getFront(final byte aColor) {
return new ITexture[]{TexturesGtBlock.OVERLAYS_CABINET_FRONT[this.mType < 16 ? this.mType : 0]};
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java
index 6928285fa5..93bb7d5bb9 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java
@@ -5,7 +5,6 @@ import net.minecraft.entity.player.EntityPlayer;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.objects.GT_ItemStack;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
@@ -20,12 +19,6 @@ public class GT4Entity_Shelf_FileCabinet extends GT4Entity_Shelf {
super(mName, mDescriptionArray, mTextures);
}
-
- @Override
- public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) {
- return aSide != getBaseMetaTileEntity().getFrontFacing();
- }
-
@Override
public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
if (aSide == getBaseMetaTileEntity().getFrontFacing()) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java
index 7bee8f41d5..810564b05b 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java
@@ -47,15 +47,15 @@ public class Gregtech4Content {
// Gregtech 4 Shelves
Logger.INFO("Gregtech 4 Content | Registering Shelves.");
GregtechItemList.GT4_Shelf
- .set(new GT4Entity_Shelf(870, "gtplusplus.shelf.wooden", "Wood encased Shelf", "Stores Books & Things")
+ .set(new GT4Entity_Shelf(870, "gtplusplus.shelf.wooden", "Wooden Shelf", "Usually used for books")
.getStackForm(1L));
GregtechItemList.GT4_Shelf_Iron.set(
- new GT4Entity_Shelf_Iron(871, "gtplusplus.shelf.iron", "Metal encased Shelf", "Stores Books & Things")
+ new GT4Entity_Shelf_Iron(871, "gtplusplus.shelf.iron", "Metal Shelf", "A heavy duty shelf")
.getStackForm(1L));
GregtechItemList.GT4_Shelf_FileCabinet.set(new GT4Entity_Shelf_FileCabinet(872, "gtplusplus.shelf.filecabinet",
- "File Cabinet", "Stores Books & Things").getStackForm(1L));
+ "File Cabinet", "Could look nice in your office").getStackForm(1L));
GregtechItemList.GT4_Shelf_Desk.set(
- new GT4Entity_Shelf_Desk(873, "gtplusplus.shelf.desk", "Metal encased Desk", "Stores Books & Things")
+ new GT4Entity_Shelf_Desk(873, "gtplusplus.shelf.desk", "Metal encased Desk", "A place to study")
.getStackForm(1L));
GregtechItemList.GT4_Shelf_Compartment.set(new GT4Entity_Shelf_Compartment(874, "gtplusplus.shelf.compartment",
"Compartment", "Stores Books & Things").getStackForm(1L));