Skip to content

Commit

Permalink
this might fix a weird twilight forest crash, though it doesnt fix th…
Browse files Browse the repository at this point in the history
…e underlying issue twilight forest has
  • Loading branch information
GregoriusT committed Apr 10, 2024
1 parent d1c6746 commit 755d58d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/gregapi/item/multiitem/MultiItemTool.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2023 GregTech-6 Team
* Copyright (c) 2024 GregTech-6 Team
*
* This file is part of GregTech.
*
Expand Down Expand Up @@ -473,6 +473,8 @@ public float getDigSpeed(ItemStack aStack, Block aBlock, int aMeta) {
if (aBlock == NB || WD.bedrock(aBlock)) return 0;
if (ST.instaharvest(aBlock, aMeta)) return 10;
if (!isItemStackUsable(aStack)) return 0;
// Required because a combination of Twilight Forest and Block Metadata Extenders can fuck this up and give me values like 49 for vanilla Blocks.
if (aMeta > 15 && (aBlock == Blocks.dirt || aBlock == Blocks.grass || aBlock == Blocks.stone)) aMeta = 0;
float tMultiplier = 1.0F;
OreDictMaterial tMaterial = getPrimaryMaterial(aStack);
if ((IL.TF_Mazestone.equal(aBlock) || IL.TF_Mazehedge.equal(aBlock) || IL.TF_Towerwood.equal(aBlock)) && tMaterial.contains(TD.Properties.MAZEBREAKER)) tMultiplier *= 40;
Expand Down

0 comments on commit 755d58d

Please sign in to comment.