mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 05:02:39 +00:00
Merge branch 'master' into dumpbutton
This commit is contained in:
2 files changed
+13
-1
No files matched your search
@@ -229,9 +229,14 @@ public abstract class HarvestTool extends ToolCore {
|
||||
Block refBlock = world.getBlock(refX, refY, refZ);
|
||||
float refStrength = ForgeHooks.blockStrength(refBlock, player, world, refX, refY, refZ);
|
||||
float strength = ForgeHooks.blockStrength(block, player, world, x, y, z);
|
||||
if (strength <= 0) strength = 0.00001F; // don't div by zero or go below 0.
|
||||
|
||||
// only harvestable blocks that aren't impossibly slow to harvest
|
||||
if (!ForgeHooks.canHarvestBlock(block, player, meta) || refStrength / strength > 10f) return;
|
||||
// don't exclude blocks that would be broken in 1-2 ticks, regardless of hardness diff
|
||||
// blocks are instantly broken if the mining speed is more than 30x the block hardness/strength
|
||||
if (!ForgeHooks.canHarvestBlock(block, player, meta)
|
||||
|| (refStrength / strength > PHConstruct.HarvestToolAOERelativeStrength && strength * 2 < 1))
|
||||
return; // the Forgehooks method returns mining speed / hardness / 30
|
||||
|
||||
// send the blockbreak event
|
||||
BlockEvent.BreakEvent event = ForgeHooks
|
||||
|
||||
@@ -71,6 +71,12 @@ public class PHConstruct {
|
||||
miningLevelIncrease = config.get("Difficulty Changes", "Modifiers increase Mining Level", true)
|
||||
.getBoolean(true);
|
||||
denyMattock = config.get("Difficulty Changes", "Deny creation of non-metal mattocks", false).getBoolean(false);
|
||||
HarvestToolAOERelativeStrength = config.get(
|
||||
"general",
|
||||
"AOE Harvest Max Relative Strength",
|
||||
10,
|
||||
"The maximum relative strength of the blocks in the aoe of the tool compared to the broken block to still mine them")
|
||||
.getDouble(10);
|
||||
craftEndstone = config.get("Difficulty Changes", "Allow creation of endstone", true).getBoolean(true);
|
||||
redstoneFaucet = config.get("Difficulty Changes", "Allow Faucets to be activated by Redstone", true)
|
||||
.getBoolean(true);
|
||||
@@ -439,6 +445,7 @@ public class PHConstruct {
|
||||
public static boolean consumeXPBerryStacks;
|
||||
|
||||
public static boolean disableAllRecipes;
|
||||
public static double HarvestToolAOERelativeStrength;
|
||||
|
||||
// Mobs
|
||||
public static int naturalSlimeSpawn;
|
||||
|
||||
Reference in new issue
Block a user