When you create a block, there is the property "Unbreakable" that can be ticked✔️
Well if you put the Block Resistance(resistance to explosions) at a low number (like default 10) Unbreakable blocks can still be destroyed by explosion
Issue comments
I have been testing this for them and today there is still a problem from what I reading it needs
@Override
public boolean canDropFromExplosion(Explosion explosion) {
return false;
}
But I am getting errors, also your UI is limited to 64K
Even with a block like so
public BlockCustom() {
super(Material.ROCK);
setRegistryName("www");
setUnlocalizedName("www");
setSoundType(SoundType.STONE);
setHarvestLevel("pickaxe", 1);
setHardness(-1F);
setResistance(18000003F);
setLightLevel(0F);
setLightOpacity(255);
setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
setBlockUnbreakable();
}
this is still able to brake by Wither
canDropFromExplosion most likely only disables block drop when it is destroyed by an explosion. One idea I got would be using procedure trigger on block destroyed by the explosion and place the block back when this happens.
What do you mean by UI being limited to 64K?
Unbreakable only means unbreakable for the player, to make it completely unbreakable, set a big resistance too.