Refactor and rename to Thresholds
This commit is contained in:
parent
32a61e7925
commit
cd9d548806
568 changed files with 214858 additions and 215029 deletions
|
@ -1,38 +0,0 @@
|
|||
package dev.zontreck.otemod.items;
|
||||
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.item.SimpleFoiledItem;
|
||||
import net.minecraft.world.item.context.UseOnContext;
|
||||
import net.minecraft.world.level.Explosion;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||
|
||||
public class UnstableSingularity extends SimpleFoiledItem
|
||||
{
|
||||
|
||||
public UnstableSingularity(Properties pProperties) {
|
||||
super(pProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InteractionResult useOn(UseOnContext pContext) {
|
||||
BlockState block = pContext.getLevel().getBlockState(pContext.getClickedPos());
|
||||
|
||||
if(block.getBlock().defaultDestroyTime() < 0)
|
||||
{
|
||||
pContext.getLevel().explode(pContext.getPlayer(), pContext.getClickedPos().getX(), pContext.getClickedPos().getY(), pContext.getClickedPos().getZ(), 16, true, Level.ExplosionInteraction.TNT);
|
||||
|
||||
pContext.getLevel().setBlock(pContext.getClickedPos(), Blocks.AIR.defaultBlockState(), 0, 0);
|
||||
|
||||
pContext.getItemInHand().shrink(1);
|
||||
|
||||
}
|
||||
|
||||
return InteractionResult.CONSUME;
|
||||
|
||||
}
|
||||
}
|
Reference in a new issue