From 0c37284c97f3cc0cac5522c0f9ce18c57755fda2 Mon Sep 17 00:00:00 2001 From: MauveCloud Date: Sat, 11 Mar 2017 19:50:00 -0800 Subject: [PATCH 1/6] Fix for #909 --- src/main/java/gregtech/jei/JEIGregtechRecipe.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gregtech/jei/JEIGregtechRecipe.java b/src/main/java/gregtech/jei/JEIGregtechRecipe.java index 0e275509..ac87feba 100644 --- a/src/main/java/gregtech/jei/JEIGregtechRecipe.java +++ b/src/main/java/gregtech/jei/JEIGregtechRecipe.java @@ -576,7 +576,7 @@ public class JEIGregtechRecipe implements IRecipeWrapper { mInputs.addTooltipCallback((slotIndex, input, ingredient, tooltip) -> { int slotType = slotIndex / 1000; - int inputIndex = slotType % 1000; + int inputIndex = slotIndex % 1000; switch (slotType) { case 1: //it's output From 9da8a7789ba70b3fd54d8b4df84e828d9066fc68 Mon Sep 17 00:00:00 2001 From: MauveCloud Date: Sat, 11 Mar 2017 19:52:16 -0800 Subject: [PATCH 2/6] Fix for #910 --- .../common/tileentities/boilers/GT_MetaTileEntity_Boiler.java | 2 +- .../tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java | 2 +- .../tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java | 2 +- .../tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java | 2 +- .../tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java index 6df60108..5b6ce978 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java @@ -186,7 +186,7 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa } if (getFluidAmount() != 0) { for (EnumFacing side : EnumFacing.VALUES) { - if (side.getIndex() != aBaseMetaTileEntity.getFrontFacing()) { + if (side.getIndex() != aBaseMetaTileEntity.getFrontFacing() && side != EnumFacing.DOWN) { int drain = GT_Utility.fillFluidTank( aBaseMetaTileEntity.getWorldObj(), aBaseMetaTileEntity.getWorldPos(), side, diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java index 6019eee5..fcf410f2 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java @@ -75,7 +75,7 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler { } if (getFluidAmount() != 0) { for (EnumFacing side : EnumFacing.VALUES) { - if (side.getIndex() != aBaseMetaTileEntity.getFrontFacing()) { + if (side.getIndex() != aBaseMetaTileEntity.getFrontFacing() && side != EnumFacing.DOWN) { int drain = GT_Utility.fillFluidTank( aBaseMetaTileEntity.getWorldObj(), aBaseMetaTileEntity.getWorldPos(), side, diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java index f36eb6c3..48d1055e 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java @@ -74,7 +74,7 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler { } if (getFluidAmount() != 0) { for (EnumFacing side : EnumFacing.VALUES) { - if (side.getIndex() != aBaseMetaTileEntity.getFrontFacing()) { + if (side.getIndex() != aBaseMetaTileEntity.getFrontFacing() && side != EnumFacing.DOWN) { int drain = GT_Utility.fillFluidTank( aBaseMetaTileEntity.getWorldObj(), aBaseMetaTileEntity.getWorldPos(), side, diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java index 54801f6e..4399aa74 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java @@ -94,7 +94,7 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { } if (getFluidAmount() != 0) { for (EnumFacing side : EnumFacing.VALUES) { - if (side.getIndex() != aBaseMetaTileEntity.getFrontFacing()) { + if (side.getIndex() != aBaseMetaTileEntity.getFrontFacing() && side != EnumFacing.DOWN) { int drain = GT_Utility.fillFluidTank( aBaseMetaTileEntity.getWorldObj(), aBaseMetaTileEntity.getWorldPos(), side, diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java index 37f61891..f02100fc 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java @@ -78,7 +78,7 @@ public class GT_MetaTileEntity_Boiler_Steel extends GT_MetaTileEntity_Boiler { } if (getFluidAmount() != 0) { for (EnumFacing side : EnumFacing.VALUES) { - if (side.getIndex() != aBaseMetaTileEntity.getFrontFacing()) { + if (side.getIndex() != aBaseMetaTileEntity.getFrontFacing() && side != EnumFacing.DOWN) { int drain = GT_Utility.fillFluidTank( aBaseMetaTileEntity.getWorldObj(), aBaseMetaTileEntity.getWorldPos(), side, From 1023ecca6567f10c2c708b83e4070f1c9edf1c5e Mon Sep 17 00:00:00 2001 From: MauveCloud Date: Sat, 11 Mar 2017 19:53:10 -0800 Subject: [PATCH 3/6] Partial fix for #916 --- src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java b/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java index 84944153..f0297ce0 100644 --- a/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java +++ b/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java @@ -456,7 +456,7 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements if (isItemStackUsable(aStack)) { IToolStats toolStats = getToolStats(aStack); if(toolStats != null && toolStats.isMinableBlock(state)) { - if(getHarvestLevel(aStack, null) > state.getBlock().getHarvestLevel(state)) { + if(getHarvestLevel(aStack, null) >= state.getBlock().getHarvestLevel(state)) { float toolSpeed = toolStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed; return Math.max(defSpeed, toolSpeed); } From ca5e41318f4cac308da936c3c9b162fd3601e75f Mon Sep 17 00:00:00 2001 From: MauveCloud Date: Sat, 11 Mar 2017 20:02:57 -0800 Subject: [PATCH 4/6] Fix for #924 --- .../java/gregtech/loaders/postload/GT_MachineRecipeLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 75b75496..ed11a2d3 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -261,7 +261,7 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addChemicalBathRecipe(ItemList.Food_Raw_Fries.get(1), Materials.FryingOilHot.getFluid(10L), ItemList.Food_Fries.get(1), GT_Values.NI, GT_Values.NI, null, 16, 4); GT_Values.RA.addChemicalBathRecipe(GT_ModHandler.getIC2Item(BlockName.te, TeBlock.itnt, 1), Materials.Glue.getFluid(10L), GT_ModHandler.getIC2Item(ItemName.dynamite_sticky, 1), GT_Values.NI, GT_Values.NI, null, 16, 4); - GT_Values.RA.addChemicalRecipe(new ItemStack(Items.PAPER,1), new ItemStack(Items.STRING,1), Materials.Glyceryl.getFluid(150), GT_Values.NF, GT_ModHandler.getIC2Item(BlockName.te, TeBlock.itnt, 1), 160, 4); + GT_Values.RA.addChemicalRecipe(new ItemStack(Items.PAPER,1), new ItemStack(Items.STRING,1), Materials.Glyceryl.getFluid(150), GT_Values.NF, GT_ModHandler.getIC2Item(ItemName.dynamite, 1), 160, 4); GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Steel, 1), Materials.Concrete.getMolten(144L), GT_ModHandler.getIC2Item(BlockName.resource, ResourceBlock.reinforced_stone, 1), GT_Values.NI, GT_Values.NI, null, 200, 4); GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1), Materials.Water.getFluid(125L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HydratedCoal, 1), GT_Values.NI, GT_Values.NI, null, 12, 4); GT_Values.RA.addChemicalBathRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1), Materials.Water.getFluid(100L), new ItemStack(Items.PAPER, 1, 0), GT_Values.NI, GT_Values.NI, null, 200, 4); From 9fba3e22a92f997f7c2ade49337f2f07975e150e Mon Sep 17 00:00:00 2001 From: MauveCloud Date: Sat, 11 Mar 2017 20:04:05 -0800 Subject: [PATCH 5/6] 1 step toward fixing #928 --- src/main/java/gregtech/common/tools/GT_Tool.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gregtech/common/tools/GT_Tool.java b/src/main/java/gregtech/common/tools/GT_Tool.java index eb64a7b0..e6f153f7 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool.java +++ b/src/main/java/gregtech/common/tools/GT_Tool.java @@ -34,7 +34,7 @@ public abstract class GT_Tool protected static boolean isStateEqual(IBlockState state1, IBlockState state2) { if(state1.getBlock() != state2.getBlock()) return false; - if(!state1.getProperties().equals(state2)) + if(!state1.getProperties().equals(state2.getProperties())) return false; return true; } From ca11db3ff17c4c0784901a12536f73e0cd2afed3 Mon Sep 17 00:00:00 2001 From: MauveCloud Date: Sat, 11 Mar 2017 20:45:05 -0800 Subject: [PATCH 6/6] Slightly less-hacky workaround for #940 I'm a bit confused that this change works, though, considering the line number of loadCuboidFace listed in the stack trace. --- src/main/java/gregtech/common/render/RenderBlocks.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/gregtech/common/render/RenderBlocks.java b/src/main/java/gregtech/common/render/RenderBlocks.java index ed8fcc8c..016f45be 100644 --- a/src/main/java/gregtech/common/render/RenderBlocks.java +++ b/src/main/java/gregtech/common/render/RenderBlocks.java @@ -102,7 +102,9 @@ public class RenderBlocks implements ICCBlockRenderer { public static void renderFace(CCRenderState state, EnumFacing side, IVertexOperation... ops) { - face.loadCuboidFace(bounds, side.ordinal()); + if (bounds != null) { + face.loadCuboidFace(bounds, side.ordinal()); + } state.setPipeline(face, 0, face.verts.length, ops); state.render(); }