serenas-shitmod/src/main/java/net/serenas/shitmod/totemOfEquivalency.java
Sunskimmer822 12789ce26f totem
2022-03-03 07:52:29 -06:00

23 lines
689 B
Java

package net.serenas.shitmod;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.TypedActionResult;
import net.minecraft.world.World;
public class totemOfEquivalency extends Item {
public totemOfEquivalency(Settings settings) {
super(settings);
}
@Override
public TypedActionResult<ItemStack> use(World World, PlayerEntity PlayerEntity, Hand Hand) {
PlayerEntity.kill();
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand));
}
}