Drop Infuser
EnergonRelics/pipeline/head This commit looks good Details

This commit is contained in:
TheBrokenRail 2020-07-29 22:57:53 -04:00
parent 192fab32ff
commit 6b857abc38
1 changed files with 3 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package com.thebrokenrail.energonrelics.block.entity.infuser;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@ -31,8 +32,10 @@ interface InfuserAction {
class ExplosionAction implements InfuserAction {
@Override
public void run(World world, BlockPos pos) {
BlockState oldState = world.getBlockState(pos);
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);
Block.dropStacks(oldState, world, pos);
}
}
}