Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AOE Tools now only break up to 10x harder blocks with it. (Yes, 10. b…
…elieve me, you wouldn't like any lower value.) That mean stone breaking obsidian is not a thing anymore
- Loading branch information
Showing
2 changed files
with
8 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -221,7 +221,7 @@ public boolean onItemUse (ItemStack stack, EntityPlayer player, World world, int | |
return used; | ||
} | ||
|
||
protected void breakExtraBlock(World world, int x, int y, int z, int sidehit, EntityPlayer player) { | ||
protected void breakExtraBlock(World world, int x, int y, int z, int sidehit, EntityPlayer player, int refX, int refY, int refZ) { | ||
// prevent calling that stuff for air blocks, could lead to unexpected behaviour since it fires events | ||
if (world.isAirBlock(x, y, z)) | ||
return; | ||
|
@@ -235,8 +235,13 @@ protected void breakExtraBlock(World world, int x, int y, int z, int sidehit, En | |
if (!isEffective(block, meta)) | ||
return; | ||
|
||
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); | ||
float foo = refStrength/strength; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
squeek502
Contributor
|
||
|
||
// only harvestable blocks that aren't impossibly slow to harvest | ||
if (!ForgeHooks.canHarvestBlock(block, player, meta) || ForgeHooks.blockStrength(block, player, world, x, y, z) <= 0.0001f) | ||
if (!ForgeHooks.canHarvestBlock(block, player, meta) || refStrength/strength > 10f) | ||
return; | ||
|
||
if (player.capabilities.isCreativeMode) { | ||
|
Biggest bug in the universe alert: unused variable