Try some stuff

This commit is contained in:
2024-11-01 23:35:39 +01:00
parent 2395fa83ff
commit 78633a1338
18 changed files with 67 additions and 138 deletions

View File

@@ -9,8 +9,8 @@ import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.sound.SoundEvent;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.TypedActionResult;
import net.minecraft.world.World;
import net.minecraft.world.event.GameEvent;
@@ -27,10 +27,10 @@ public class TrinketPolymerItem extends SimpleItem implements Trinket {
}
@Override
public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand hand) {
public ActionResult use(World world, PlayerEntity user, Hand hand) {
ItemStack stack = user.getStackInHand(hand);
if (equipItem(user, stack)) {
return TypedActionResult.success(stack, world.isClient());
return ActionResult.SUCCESS;
}
return super.use(world, user, hand);
}