Add shouldCauseBlockBreakReset callback to Item. This allows to keep breaking blocks if the NBT or similar changes.

This commit is contained in:
Bernhard Bonigl committed 2016-07-24 13:52:27 +02:00
1 parent d7245c5ffe
commit bc27f0e204
4 files changed
+61 -3

No files matched your search

@@ -32,6 +32,7 @@ import java.nio.FloatBuffer;
import java.util.Collections;
import java.util.Map;
import javax.annotation.Nonnull;
import javax.vecmath.Matrix3f;
import javax.vecmath.Matrix4f;
import javax.vecmath.Vector3f;
@@ -677,6 +678,11 @@ public class ForgeHooksClient
return from.getItem().shouldCauseReequipAnimation(from, to, changed);
}
public static boolean shouldCauseBlockBreakReset(@Nonnull ItemStack from, @Nonnull ItemStack to)
{
return from.getItem().shouldCauseBlockBreakReset(from, to);
}
public static BlockFaceUV applyUVLock(BlockFaceUV blockFaceUV, EnumFacing originalSide, ITransformation rotation)
{
TRSRTransformation global = new TRSRTransformation(rotation.getMatrix());