mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
53 lines
1.5 KiB
Java
53 lines
1.5 KiB
Java
package com.hbm.blocks.bomb;
|
|
|
|
import java.util.List;
|
|
|
|
import com.hbm.explosion.vanillant.ExplosionVNT;
|
|
import com.hbm.explosion.vanillant.standard.BlockAllocatorStandard;
|
|
import com.hbm.explosion.vanillant.standard.BlockProcessorStandard;
|
|
import com.hbm.particle.helper.ExplosionCreator;
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.util.EnumChatFormatting;
|
|
import net.minecraft.world.World;
|
|
|
|
public class BlockChargeSemtex extends BlockChargeBase {
|
|
|
|
@Override
|
|
public BombReturnCode explode(World world, int x, int y, int z) {
|
|
|
|
if(!world.isRemote) {
|
|
safe = true;
|
|
world.setBlockToAir(x, y, z);
|
|
safe = false;
|
|
|
|
ExplosionVNT xnt = new ExplosionVNT(world, x + 0.5, y + 0.5, z + 0.5, 10F);
|
|
xnt.setBlockAllocator(new BlockAllocatorStandard(32));
|
|
xnt.setBlockProcessor(new BlockProcessorStandard()
|
|
.setAllDrop()
|
|
.setFortune(3));
|
|
xnt.explode();
|
|
ExplosionCreator.composeEffectSmall(world, x + 0.5, y + 1, z + 0.5);
|
|
|
|
return BombReturnCode.DETONATED;
|
|
}
|
|
|
|
return BombReturnCode.UNDEFINED;
|
|
}
|
|
|
|
@Override
|
|
public int getRenderType() {
|
|
return BlockChargeC4.renderID;
|
|
}
|
|
|
|
@Override
|
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
|
super.addInformation(stack, player, list, ext);
|
|
list.add(EnumChatFormatting.BLUE + "Will drop all blocks.");
|
|
list.add(EnumChatFormatting.BLUE + "Does not do damage.");
|
|
list.add(EnumChatFormatting.BLUE + "");
|
|
list.add(EnumChatFormatting.LIGHT_PURPLE + "Fortune III");
|
|
}
|
|
}
|