Skip to content

Commit 2d0c72c

Browse files
Fix Naga breaking unbreakable blocks (#128)
1 parent 32e38e4 commit 2d0c72c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/twilightforest/entity/boss/EntityTFNaga.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,8 +623,9 @@ protected void crumbleBelowTarget(int range) {
623623
protected void breakBlock(int dx, int dy, int dz) {
624624
Block whatsThere = worldObj.getBlock(dx, dy, dz);
625625
int whatsMeta = worldObj.getBlockMetadata(dx, dy, dz);
626+
float whatsHardness = whatsThere.getBlockHardness(worldObj, dx, dy, dz);
626627

627-
if (whatsThere != Blocks.air) {
628+
if ((whatsThere != Blocks.air) && (whatsHardness >= 0)) {
628629
whatsThere.dropBlockAsItem(worldObj, dx, dy, dz, whatsMeta, 0);
629630
this.worldObj.setBlock(dx, dy, dz, Blocks.air, 0, 2);
630631

0 commit comments

Comments
 (0)