Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.gottabadfeeling.mod.papermario.items;
- import net.minecraft.item.EnumAction;
- import net.minecraft.item.ItemFood;
- import net.minecraft.item.ItemStack;
- public class ModItemFood extends ItemFood {
- public ModItemFood(int amount, float saturation, boolean isWolfFood) {
- super(amount, saturation, isWolfFood);
- this.setAlwaysEdible();
- }
- @Override
- public EnumAction getItemUseAction(ItemStack stack)
- {
- if
- (
- this.getUnlocalizedName(stack).substring(5).equals("honey_syrup") ||
- this.getUnlocalizedName(stack).substring(5).equals("maple_syrup") ||
- this.getUnlocalizedName(stack).substring(5).equals("jammin_jelly")
- )
- {
- return EnumAction.DRINK;
- }
- else
- {
- return EnumAction.EAT;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement