Item classes rename
This commit is contained in:
parent
5f3547de8e
commit
b53e76ce7b
15 changed files with 57 additions and 64 deletions
30
src/main/java/ru/betterend/item/DrinkItem.java
Normal file
30
src/main/java/ru/betterend/item/DrinkItem.java
Normal file
|
@ -0,0 +1,30 @@
|
|||
package ru.betterend.item;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemUsage;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.TypedActionResult;
|
||||
import net.minecraft.util.UseAction;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class DrinkItem extends PatternedItem {
|
||||
public DrinkItem(Settings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxUseTime(ItemStack stack) {
|
||||
return 32;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UseAction getUseAction(ItemStack stack) {
|
||||
return UseAction.DRINK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand hand) {
|
||||
return ItemUsage.consumeHeldItem(world, user, hand);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue