Skip to content

Commit 03b3a8a

Browse files
committed
fix recipe check the mill
1 parent c0e699a commit 03b3a8a

File tree

1 file changed

+11
-6
lines changed
  • src/main/java/com/impact/mods/gregtech/tileentities/multi/processing/defaultmachines

1 file changed

+11
-6
lines changed

src/main/java/com/impact/mods/gregtech/tileentities/multi/processing/defaultmachines/GTMTE_TheMill.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public GTMTE_TheMill(int aID, String aNameRegional) {
5656
Utilits.is(OrePrefixes.dustImpure, Materials.Calcite),
5757
Utilits.is(OrePrefixes.dustImpure, Materials.Gypsum)
5858
},
59-
new int[]{10000, 10000}, 20 * 30
59+
new int[]{10000, 10000}, 20 * 20
6060
);
6161
impact.I_RA.addTheMillRecipes(DropCrashedMetallic.get(1),
6262
new ItemStack[]{
@@ -65,15 +65,15 @@ public GTMTE_TheMill(int aID, String aNameRegional) {
6565
Utilits.is(OrePrefixes.dustImpure, Materials.Tin),
6666
Utilits.is(OrePrefixes.dustImpure, Materials.Lead)
6767
},
68-
new int[]{10000, 10000, 10000, 10000}, 20 * 30
68+
new int[]{10000, 10000, 10000, 10000}, 20 * 20
6969
);
7070
impact.I_RA.addTheMillRecipes(DropCrashedCoal.get(1),
7171
new ItemStack[]{
7272
Utilits.is(OrePrefixes.dustImpure, Materials.Coal),
7373
Utilits.is(OrePrefixes.dustImpure, Materials.Lignite),
7474
Utilits.is(OrePrefixes.dustImpure, Materials.Sulfur)
7575
},
76-
new int[]{10000, 10000, 10000}, 20 * 30);
76+
new int[]{10000, 10000, 10000}, 20 * 20);
7777
}
7878

7979
public GTMTE_TheMill(String aName) {
@@ -141,9 +141,7 @@ public void onPostTick(IGregTechTileEntity iAm, long aTick) {
141141

142142
IInventory tTileEntity = iAm.getIInventoryAtSide(iAm.getBackFacing());
143143
if (tTileEntity != null) {
144-
if (mInventory[1] != null) {
145-
GT_Utility.moveOneItemStack(iAm, tTileEntity, (byte) 1, (byte) 1, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1);
146-
}
144+
GT_Utility.moveOneItemStack(iAm, tTileEntity, (byte) 1, (byte) 1, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1);
147145
}
148146
}
149147
}
@@ -183,6 +181,13 @@ public boolean checkRecipe(ItemStack itemStack) {
183181
ItemStack[] slot0 = {mInventory[0]};
184182
GT_Recipe tRecipe = getRecipeMap().findRecipe(getBaseMetaTileEntity(), cashedRecipe, false, false, 0, null, slot0);
185183
if (tRecipe != null) {
184+
if (cashedRecipe != tRecipe) {
185+
for (int i = 1; i < mInventory.length; i++) {
186+
if (mInventory[i] != null) {
187+
return false;
188+
}
189+
}
190+
}
186191
mInventory[0].stackSize--;
187192
if (mInventory[0].stackSize <= 0) {
188193
mInventory[0] = null;

0 commit comments

Comments
 (0)