diff options
author | Jordan Byrne <draknyte1@hotmail.com> | 2018-05-17 08:40:56 +1000 |
---|---|---|
committer | Jordan Byrne <draknyte1@hotmail.com> | 2018-05-17 08:40:56 +1000 |
commit | 23adeefa94f8f6f67bafacd1969bf0b07328b609 (patch) | |
tree | 26e7fb7e8fb9f7a3d4d1d348f058d25f53f33ea1 /src/Java/gtPlusPlus/xmod/gregtech/common/tileentities | |
parent | 92494e56c33fc029f6b06be1c76e50bb5be56cbe (diff) | |
download | GT5-Unofficial-23adeefa94f8f6f67bafacd1969bf0b07328b609.tar.gz GT5-Unofficial-23adeefa94f8f6f67bafacd1969bf0b07328b609.tar.bz2 GT5-Unofficial-23adeefa94f8f6f67bafacd1969bf0b07328b609.zip |
+ Added some new Fusion Reactor Casings & Coils.
+ Added recipes for the shelves.
% Made the Adv. EBF process 8 parallel recipes, up from 4.
% Made the Fusion Reaction MK IV use the new casings.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/tileentities')
3 files changed, 82 insertions, 21 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java index 5d78c90a9d..15c4d487be 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java @@ -107,7 +107,7 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase } public boolean checkRecipe(ItemStack aStack) { - return checkRecipeGeneric(4, 100, 100); //Will have to clone the logic from parent class to handle heating coil tiers. + return checkRecipeGeneric(8, 90, 120); //Will have to clone the logic from parent class to handle heating coil tiers. } public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java index e5b690b7a5..b54e3929d5 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java @@ -7,6 +7,8 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_FusionComputer; +import gtPlusPlus.core.block.ModBlocks; + import net.minecraft.block.Block; public class GregtechMetaTileEntity_Adv_Fusion_MK4 extends GT_MetaTileEntity_FusionComputer { @@ -35,18 +37,23 @@ public class GregtechMetaTileEntity_Adv_Fusion_MK4 extends GT_MetaTileEntity_Fus } @Override + public Block getCasing() { + return getFusionCoil(); + } + + @Override public int getCasingMeta() { - return 8; + return 12; } @Override public Block getFusionCoil() { - return GregTech_API.sBlockCasings4; + return ModBlocks.blockCasings3Misc; } @Override public int getFusionCoilMeta() { - return 7; + return 13; } public String[] getDescription() { @@ -66,11 +73,6 @@ public class GregtechMetaTileEntity_Adv_Fusion_MK4 extends GT_MetaTileEntity_Fus } @Override - public Block getCasing() { - return GregTech_API.sBlockCasings4; - } - - @Override public IIconContainer getIconOverlay() { return Textures.BlockIcons.OVERLAY_FUSION3; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java index bdb3584b89..cc17f49d83 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java @@ -10,7 +10,10 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.util.GT_Utility; + +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.sys.KeyboardUtils; import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_SuperChest; import gtPlusPlus.xmod.gregtech.api.gui.GUI_SuperChest; @@ -61,19 +64,19 @@ public class GT4Entity_Shelf_Large extends GT4Entity_Shelf { } @Override - public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { - //Single Block Behaviour - //return super.onRightclick(aTile, aPlayer); + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { if (aBaseMetaTileEntity.isClientSide()) { return true; - } - - String itemName = (this.mItemStack != null ? this.mItemStack.getDisplayName() : "Nothing."); - String itemAmount = (this.mItemCount > 0 ? ""+this.mItemCount : "bad"); - String itemMessage = "This container currently holds "+(itemAmount.equalsIgnoreCase("bad") ? "nothing." : itemName+" x"+itemAmount+"."); - PlayerUtils.messagePlayer(aPlayer, itemMessage); - - aBaseMetaTileEntity.openGUI(aPlayer); + } + if (KeyboardUtils.isCtrlKeyDown()) { + String itemName = (this.mItemStack != null ? this.mItemStack.getDisplayName() : "Nothing."); + String itemAmount = (this.mItemCount > 0 ? ""+this.mItemCount : "bad"); + String itemMessage = "This container currently holds "+(itemAmount.equalsIgnoreCase("bad") ? "nothing." : itemName+" x"+itemAmount+"."); + PlayerUtils.messagePlayer(aPlayer, itemMessage); + } + else { + aBaseMetaTileEntity.openGUI(aPlayer); + } return true; } @@ -115,7 +118,7 @@ public class GT4Entity_Shelf_Large extends GT4Entity_Shelf { public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTimer) { if (this.getBaseMetaTileEntity().isServerSide() && this.getBaseMetaTileEntity().isAllowedToWork()) { - + try { if (this.mInventory[0] != null) { this.mType = (byte) this.mIndex; } @@ -158,6 +161,12 @@ public class GT4Entity_Shelf_Large extends GT4Entity_Shelf { } else { this.mInventory[2] = null; } + } + catch (Throwable t) { + if (t instanceof ArrayIndexOutOfBoundsException) { + + } + } } } @@ -170,8 +179,13 @@ public class GT4Entity_Shelf_Large extends GT4Entity_Shelf { } public int getProgresstime() { + try { return this.mItemCount + ((this.mInventory[0] == null) ? 0 : this.mInventory[0].stackSize) + ((this.mInventory[1] == null) ? 0 : this.mInventory[1].stackSize); + } + catch (Throwable t) { + return 0; + } } public int maxProgresstime() { @@ -203,5 +217,50 @@ public class GT4Entity_Shelf_Large extends GT4Entity_Shelf { "Space Remaining: "+Integer.toString(this.getMaxItemCount()-this.getItemCount())+"/"+Integer.toString(this.getMaxItemCount())}; } + @Override + public String[] getDescription() { + String[] mSuper = super.getDescription(); + String[] desc = new String[mSuper.length+1]; + for (int i=0;i>mSuper.length;i++) { + desc[i] = mSuper[i]; + } + desc[desc.length-1] = "Control + Rmb block to check contents"; + return desc; + } + + @Override + public boolean isItemValidForSlot(int aIndex, ItemStack aStack) { + Logger.INFO("1:"+aIndex); + if (aIndex == 2) { + if (ItemStack.areItemStacksEqual(aStack, mItemStack)) { + return true; + } + else { + if (mItemStack == null) { + return true; + } + return false; + } + } + return super.isItemValidForSlot(aIndex, aStack); + } + + @Override + public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { + Logger.INFO("2:"+aIndex); + if (aIndex == 0) { + if (ItemStack.areItemStacksEqual(aStack, mItemStack)) { + return true; + } + else { + if (mItemStack == null) { + return true; + } + return false; + } + } + return super.canInsertItem(aIndex, aStack, aSide); + } + } |