Make AOE tools creative-mode compatible again

This commit is contained in:
Bernhard Bonigl committed 2014-09-17 15:59:28 +02:00
1 parent 619bfdb1f1
commit 29f72ed357
2 files changed
+35 -21

No files matched your search

@@ -48,7 +48,7 @@ public abstract class AOEHarvestTool extends HarvestTool {
}
// the code below initiates block breaks, which again call this function. But we don't want to do the aoe-break-stuff again. This is to prevent recursive, infinite-range aoe blockbreaking.
if(originalBlock) {
if(originalBlock || player.capabilities.isCreativeMode) {
antiRecurse = true;
MovingObjectPosition mop = AbilityHelper.raytraceFromEntity(player.worldObj, player, false, 4.5d);
if(mop == null)
@@ -89,6 +89,9 @@ public abstract class AOEHarvestTool extends HarvestTool {
antiRecurse = false;
}
return super.onBlockStartBreak(stack, x, y, z, player);
}