aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorBlood-Asp <bloodasphendrik@gmail.com>2016-03-19 22:15:50 +0100
committerBlood-Asp <bloodasphendrik@gmail.com>2016-03-19 22:15:50 +0100
commit20cd83a175f462297eab863d4f4dd763fd975c43 (patch)
treef06bbb090edca95fc344d51be2a8e6320ccc64b7 /src/main/java
parentf4b8aa6f3a8a700dc31084d9185b8ae1e516db4b (diff)
downloadGT5-Unofficial-20cd83a175f462297eab863d4f4dd763fd975c43.tar.gz
GT5-Unofficial-20cd83a175f462297eab863d4f4dd763fd975c43.tar.bz2
GT5-Unofficial-20cd83a175f462297eab863d4f4dd763fd975c43.zip
Allow shift rightclick for screwdrivers
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Machines.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java43
2 files changed, 52 insertions, 1 deletions
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java
index 40edbaf306..2793130d91 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java
@@ -256,9 +256,17 @@ public class GT_Block_Machines
public boolean onBlockActivated(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int aSide, float par1, float par2, float par3) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- if ((tTileEntity == null) || (aPlayer.isSneaking())) {
+ if (tTileEntity == null) {
return false;
}
+ if(aPlayer.isSneaking()){
+ ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem();
+ if(tCurrentItem!=null){
+ if(!GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList)){
+ return false;
+ }
+ }else {return false;}
+ }
if ((tTileEntity instanceof IGregTechTileEntity)) {
if (((IGregTechTileEntity) tTileEntity).getTimer() < 50L) {
return false;
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java
new file mode 100644
index 0000000000..8433f07242
--- /dev/null
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_CuringOven.java
@@ -0,0 +1,43 @@
+package gregtech.common.tileentities.machines.basic;
+
+
+import java.util.Iterator;
+
+import gregtech.api.enums.ItemList;
+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_RenderedTexture;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
+public class GT_MetaTileEntity_CuringOven
+ extends GT_MetaTileEntity_BasicMachine {
+ private static int sHeaviestElementMass = 0;
+
+ public GT_MetaTileEntity_CuringOven(int aID, String aName, String aNameRegional, int aTier) {
+ super(aID, aName, aNameRegional, aTier, 1, "Producing Elemental Matter", 1, 1, "Replicator.png", "", new ITexture[]{new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_SIDE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_FRONT")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_TOP")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/ELECTRIC_OVEN/OVERLAY_BOTTOM"))});
+ }
+
+ public GT_MetaTileEntity_CuringOven(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
+ super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
+ }
+
+ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_Replicator(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
+ }
+
+ public int checkRecipe() {
+ return 0;
+ }
+
+ public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (ItemList.Cell_Empty.isStackEqual(aStack));
+ }
+
+ public boolean isFluidInputAllowed(FluidStack aFluid) {
+ return false;
+ }
+}