Example item added (Adamantite Ingot)
This commit is contained in:
parent
f16b6596d6
commit
1598612b5d
5 changed files with 45 additions and 3 deletions
22
src/main/java/com/example/AdamantiteIngot.java
Normal file
22
src/main/java/com/example/AdamantiteIngot.java
Normal file
|
@ -0,0 +1,22 @@
|
|||
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));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue