java.lang.Object
net.minecraft.client.gui.components.AbstractSelectionList.Entry<E>
net.minecraft.client.gui.components.ObjectSelectionList.Entry<ConfigScreenList.Entry>
All Implemented Interfaces:
TickableGuiEventListener, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.narration.NarrationSupplier
Direct Known Subclasses:
BooleanEntry, EnumEntry, NumberEntry

public class ValueEntry<T> extends ConfigScreenList.LabeledEntry
  • Field Details

    • resetWidth

      protected static final int resetWidth
      See Also:
    • value

      protected net.minecraftforge.common.ForgeConfigSpec.ConfigValue<T> value
    • spec

      protected net.minecraftforge.common.ForgeConfigSpec.ValueSpec spec
    • resetButton

      protected BoxWidget resetButton
    • editable

      protected boolean editable
  • Constructor Details

    • ValueEntry

      public ValueEntry(String label, net.minecraftforge.common.ForgeConfigSpec.ConfigValue<T> value, net.minecraftforge.common.ForgeConfigSpec.ValueSpec spec)
  • Method Details

    • setEditable

      protected void setEditable(boolean b)
      Overrides:
      setEditable in class ConfigScreenList.Entry
    • tick

      public void tick()
      Specified by:
      tick in interface TickableGuiEventListener
      Overrides:
      tick in class ConfigScreenList.LabeledEntry
    • render

      public void render(com.mojang.blaze3d.vertex.PoseStack ms, int index, int y, int x, int width, int height, int mouseX, int mouseY, boolean p_230432_9_, float partialTicks)
      Overrides:
      render in class ConfigScreenList.LabeledEntry
    • getLabelWidth

      protected int getLabelWidth(int totalWidth)
      Overrides:
      getLabelWidth in class ConfigScreenList.LabeledEntry
    • setValue

      public void setValue(@Nonnull T value)
    • getValue

      @Nonnull public T getValue()
    • isCurrentValueDefault

      protected boolean isCurrentValueDefault()
    • onReset

      public void onReset()
    • onValueChange

      public void onValueChange()
    • onValueChange

      public void onValueChange(T newValue)
    • bumpCog

      protected void bumpCog()
    • bumpCog

      protected void bumpCog(float force)