This commit is contained in:
parent
192fab32ff
commit
6b857abc38
@ -1,6 +1,7 @@
|
|||||||
package com.thebrokenrail.energonrelics.block.entity.infuser;
|
package com.thebrokenrail.energonrelics.block.entity.infuser;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@ -31,8 +32,10 @@ interface InfuserAction {
|
|||||||
class ExplosionAction implements InfuserAction {
|
class ExplosionAction implements InfuserAction {
|
||||||
@Override
|
@Override
|
||||||
public void run(World world, BlockPos pos) {
|
public void run(World world, BlockPos pos) {
|
||||||
|
BlockState oldState = world.getBlockState(pos);
|
||||||
world.setBlockState(pos, Blocks.AIR.getDefaultState());
|
world.setBlockState(pos, Blocks.AIR.getDefaultState());
|
||||||
world.createExplosion(null, pos.getX() + 0.5d, pos.getY() + 0.5d, pos.getZ() + 0.5d, 3f, true, Explosion.DestructionType.DESTROY);
|
world.createExplosion(null, pos.getX() + 0.5d, pos.getY() + 0.5d, pos.getZ() + 0.5d, 3f, true, Explosion.DestructionType.DESTROY);
|
||||||
|
Block.dropStacks(oldState, world, pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user