Fix BOP stone drops
This commit is contained in:
parent
7dc1020de2
commit
f219f84c09
3 changed files with 12 additions and 43 deletions
|
@ -77,16 +77,19 @@ public class BlockBOPStone extends Block implements IBOPBlock
|
|||
|
||||
}
|
||||
|
||||
// TODO: can we get rid of these and just use a single hardness / resistance value?
|
||||
// These don't work completely as expected - sometimes the block at pos is not this (when destroyed it becomes air for example)
|
||||
@Override
|
||||
public float getBlockHardness(World world, BlockPos pos)
|
||||
{
|
||||
return (Boolean)world.getBlockState(pos).getValue(POLISHED) ? 1.5F : 3.0F;
|
||||
IBlockState state = world.getBlockState(pos);
|
||||
return (state.getBlock() == this && (Boolean)state.getValue(POLISHED)) ? 1.5F : 3.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getExplosionResistance(World world, BlockPos pos, Entity exploder, Explosion explosion)
|
||||
{
|
||||
return (Boolean)world.getBlockState(pos).getValue(POLISHED) ? 7.0F : 5.0F;
|
||||
IBlockState state = world.getBlockState(pos);
|
||||
return (state.getBlock() == this && (Boolean)state.getValue(POLISHED)) ? 7.0F : 5.0F;
|
||||
}
|
||||
|
||||
// map from state to meta and vice verca - use highest bit for polished boolean, use low 2 bits for variant
|
||||
|
@ -105,4 +108,10 @@ public class BlockBOPStone extends Block implements IBOPBlock
|
|||
return type + (polished ? 8 : 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(IBlockState state)
|
||||
{
|
||||
return this.getMetaFromState(state);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"variants": {
|
||||
"half=bottom,variant=a": { "model": "biomesoplenty:half_slab_sacred_oak" },
|
||||
"half=top,variant=a": { "model": "biomesoplenty:upper_slab_sacred_oak" },
|
||||
"half=bottom,variant=b": { "model": "biomesoplenty:half_slab_cherry" },
|
||||
"half=top,variant=b": { "model": "biomesoplenty:upper_slab_cherry" },
|
||||
"half=bottom,variant=c": { "model": "biomesoplenty:half_slab_dark" },
|
||||
"half=top,variant=c": { "model": "biomesoplenty:upper_slab_dark" },
|
||||
"half=bottom,variant=d": { "model": "biomesoplenty:half_slab_fir" },
|
||||
"half=top,variant=d": { "model": "biomesoplenty:upper_slab_fir" },
|
||||
"half=bottom,variant=e": { "model": "biomesoplenty:half_slab_ethereal" },
|
||||
"half=top,variant=e": { "model": "biomesoplenty:upper_slab_ethereal" },
|
||||
"half=bottom,variant=f": { "model": "biomesoplenty:half_slab_magic" },
|
||||
"half=top,variant=f": { "model": "biomesoplenty:upper_slab_magic" },
|
||||
"half=bottom,variant=g": { "model": "biomesoplenty:half_slab_mangrove" },
|
||||
"half=top,variant=g": { "model": "biomesoplenty:upper_slab_mangrove" },
|
||||
"half=bottom,variant=h": { "model": "biomesoplenty:half_slab_palm" },
|
||||
"half=top,variant=h": { "model": "biomesoplenty:upper_slab_palm" }
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"variants": {
|
||||
"half=bottom,variant=a": { "model": "biomesoplenty:half_slab_redwood" },
|
||||
"half=top,variant=a": { "model": "biomesoplenty:upper_slab_redwood" },
|
||||
"half=bottom,variant=b": { "model": "biomesoplenty:half_slab_willow" },
|
||||
"half=top,variant=b": { "model": "biomesoplenty:upper_slab_willow" },
|
||||
"half=bottom,variant=c": { "model": "biomesoplenty:half_slab_pine" },
|
||||
"half=top,variant=c": { "model": "biomesoplenty:upper_slab_pine" },
|
||||
"half=bottom,variant=d": { "model": "biomesoplenty:half_slab_hell_bark" },
|
||||
"half=top,variant=d": { "model": "biomesoplenty:upper_slab_hell_bark" },
|
||||
"half=bottom,variant=e": { "model": "biomesoplenty:half_slab_jacaranda" },
|
||||
"half=top,variant=e": { "model": "biomesoplenty:upper_slab_jacaranda" },
|
||||
"half=bottom,variant=f": { "model": "biomesoplenty:half_slab_mahogany" },
|
||||
"half=top,variant=f": { "model": "biomesoplenty:upper_slab_mahogany" },
|
||||
"half=bottom,variant=g": { "model": "biomesoplenty:half_slab_giant_flower" },
|
||||
"half=top,variant=g": { "model": "biomesoplenty:upper_slab_giant_flower" },
|
||||
"half=bottom,variant=h": { "model": "biomesoplenty:half_slab_dead" },
|
||||
"half=top,variant=h": { "model": "biomesoplenty:upper_slab_dead" }
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue