feat: add canHarvest to ICrystal

closes #6
This commit is contained in:
Timo Ley 2023-05-20 21:27:16 +02:00
parent 3db4a140e3
commit 4a4798738e
2 changed files with 8 additions and 0 deletions

View File

@ -27,4 +27,6 @@ public interface ICrystal {
*/
void harvestShard(EntityPlayer player);
boolean canHarvest(EntityPlayer player);
}

View File

@ -119,4 +119,10 @@ public abstract class MixinTileCrystal extends TileThaumcraft implements ICrysta
worldObj.spawnEntityInWorld(entity);
}
@Override
public boolean canHarvest(EntityPlayer player) {
int md = this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord);
return md != 6 && md != 9 && count > 1;
}
}