23 lines
677 B
Java
23 lines
677 B
Java
|
package com.example;
|
||
|
|
||
|
import net.minecraft.entity.player.PlayerEntity;
|
||
|
import net.minecraft.item.Item;
|
||
|
import net.minecraft.item.ItemStack;
|
||
|
import net.minecraft.sound.SoundEvents;
|
||
|
import net.minecraft.util.Hand;
|
||
|
import net.minecraft.util.TypedActionResult;
|
||
|
import net.minecraft.world.World;
|
||
|
|
||
|
public class AdamantiteIngot extends Item{
|
||
|
|
||
|
public AdamantiteIngot(Item.Settings settings) {
|
||
|
super(settings);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand hand) {
|
||
|
user.playSound(SoundEvents.BLOCK_AMETHYST_BLOCK_CHIME, 1.0f, 1.0f);
|
||
|
return TypedActionResult.success(user.getStackInHand(hand));
|
||
|
}
|
||
|
}
|