package com.teamacronymcoders.contenttweaker.modules.vanilla.items.food;

import com.teamacronymcoders.base.registrysystem.ItemRegistry;
import com.teamacronymcoders.contenttweaker.ContentTweaker;
import com.teamacronymcoders.contenttweaker.modules.vanilla.items.ItemRepresentation;
import stanhebben.zenscript.annotations.ZenClass;
import stanhebben.zenscript.annotations.ZenMethod;
import stanhebben.zenscript.annotations.ZenProperty;

@ZenClass("mods.contenttweaker.ItemFood")
public class ItemFoodRepresentation extends ItemRepresentation {
    @ZenProperty
    public int healAmount;
    @ZenProperty
    public boolean alwaysEditable = false;
    @ZenProperty
    public boolean wolfFood = false;
    @ZenProperty
    public float saturation = 0.6f;

    @ZenMethod
    public int getHealAmount() {
        return healAmount;
    }

    @ZenMethod
    public void setHealAmount(int healAmount) {
        this.healAmount = healAmount;
    }

    @ZenMethod
    public boolean isAlwaysEditable() {
        return alwaysEditable;
    }

    @ZenMethod
    public void setAlwaysEditable(boolean alwaysEditable) {
        this.alwaysEditable = alwaysEditable;
    }

    @ZenMethod
    public boolean isWolfFood() {
        return wolfFood;
    }

    @ZenMethod
    public void setWolfFood(boolean wolfFood) {
        this.wolfFood = wolfFood;
    }

    @ZenMethod
    public float getSaturation() {
        return saturation;
    }

    @ZenMethod
    public void setSaturation(float saturation) {
        this.saturation = saturation;
    }

    @Override
    public String getTypeName() {
        return "ItemFood";
    }

    @ZenMethod
    public void register() {
        ContentTweaker.instance.getRegistry(ItemRegistry.class, "ITEM").register(new ItemContentFood(this));
    }
}

@@ -276,16 +276,54 @@
 tation;%0A
+import net.minecraft.item.EnumAction;%0A
 import s
@@ -364,16 +364,16 @@
 nClass;%0A
-
 import s
@@ -786,16 +786,94 @@
  = 0.6f;
+%0A    @ZenProperty%0A    public String itemUseAction = EnumAction.EAT.toString();
 %0A%0A    @Z
@@ -1607,24 +1607,24 @@
 turation) %7B%0A
-
         this
@@ -1652,24 +1652,238 @@
 ion;%0A    %7D%0A%0A
+    @ZenMethod%0A    public String getItemUseAction() %7B%0A        return itemUseAction;%0A    %7D%0A%0A    @ZenMethod%0A    public void setItemUseAction(String itemUseAction) %7B%0A        this.itemUseAction = itemUseAction;%0A    %7D%0A%0A
     @Overrid

Make eating the default action for foods