mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 08:48:34 +01:00
fix it for real this time
This commit is contained in:
parent
dcd8f5207b
commit
75f9b17154
1 changed files with 3 additions and 2 deletions
|
@ -81,10 +81,11 @@ public class TileEntityDirectionalBreaker extends TileEntityInventoryBase{
|
||||||
|
|
||||||
for(int i = 0; i < RANGE; i++){
|
for(int i = 0; i < RANGE; i++){
|
||||||
BlockPos coordsBlock = this.pos.offset(sideToManipulate, i+1);
|
BlockPos coordsBlock = this.pos.offset(sideToManipulate, i+1);
|
||||||
Block blockToBreak = this.world.getBlockState(coordsBlock).getBlock();
|
IBlockState breakState = world.getBlockState(coordsBlock);
|
||||||
|
Block blockToBreak = breakState.getBlock();
|
||||||
if(blockToBreak != null && !this.world.isAirBlock(coordsBlock) && this.world.getBlockState(coordsBlock).getBlockHardness(this.world, coordsBlock) > -1.0F){
|
if(blockToBreak != null && !this.world.isAirBlock(coordsBlock) && this.world.getBlockState(coordsBlock).getBlockHardness(this.world, coordsBlock) > -1.0F){
|
||||||
NonNullList<ItemStack> drops = NonNullList.create();
|
NonNullList<ItemStack> drops = NonNullList.create();
|
||||||
blockToBreak.getDrops(drops, world, coordsBlock, state, 0);
|
blockToBreak.getDrops(drops, world, coordsBlock, breakState, 0);
|
||||||
float chance = WorldUtil.fireFakeHarvestEventsForDropChance(drops, this.world, coordsBlock);
|
float chance = WorldUtil.fireFakeHarvestEventsForDropChance(drops, this.world, coordsBlock);
|
||||||
|
|
||||||
if(chance > 0 && this.world.rand.nextFloat() <= chance){
|
if(chance > 0 && this.world.rand.nextFloat() <= chance){
|
||||||
|
|
Loading…
Reference in a new issue