Interface IVariableFacade

All Known Subinterfaces:
IAspectVariableFacade, IDelayVariableFacade, IOperatorVariableFacade, IProxyVariableFacade, IValueTypeVariableFacade<V>
All Known Implementing Classes:
AspectVariableFacade, DelayVariableFacade, OperatorVariableFacade, ProxyVariableFacade, ValueTypeVariableFacade, VariableFacadeBase, VariableFacadeHandlerRegistry.DummyVariableFacade

public interface IVariableFacade
A facade for retrieving a variable.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addModelOverlay(IVariableModelBaked variableModelBaked, List<net.minecraft.client.renderer.block.model.BakedQuad> quads, net.minecraft.util.RandomSource random, net.minecraftforge.client.model.data.ModelData modelData)
    Handle the quads for the given baked model.
    void
    appendHoverText(List<net.minecraft.network.chat.Component> list, net.minecraft.world.level.Level world)
    Add information about this variable facade to the list.
    int
     
     
     
    default <V extends IValue>
    IVariable<V>
    getVariable(INetwork network, IPartNetwork partNetwork)
    Get the variable.
    <V extends IValue>
    IVariable<V>
    Deprecated.
    default net.minecraft.client.resources.model.BakedModel
    getVariableItemOverrideModel(net.minecraft.client.resources.model.BakedModel model, net.minecraft.world.item.ItemStack stack, net.minecraft.client.multiplayer.ClientLevel world, net.minecraft.world.entity.LivingEntity livingEntity)
    An optional baked model to override when rendering the variable as item.
    boolean
     
    default void
    renderISTER(net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.ItemDisplayContext transformType, com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource buffer, int combinedLight, int combinedOverlay)
    Called during ISTER rendering of an variable item.
    default void
    validate(INetwork network, IPartNetwork partNetwork, IVariableFacade.IValidator validator, IValueType containingValueType)
    Check if this facade is valid, otherwise notify the validator of any errors.
    void
    validate(IPartNetwork network, IVariableFacade.IValidator validator, IValueType containingValueType)
    Deprecated.
  • Method Details

    • getId

      int getId()
      Returns:
      The unique id for this facade.
    • getLabel

      @Nullable String getLabel()
      Returns:
      The optional label for this facade.
    • getVariable

      @Deprecated <V extends IValue> IVariable<V> getVariable(IPartNetwork network)
      Deprecated.
      Get the variable.
      Type Parameters:
      V - The value type.
      Parameters:
      network - The object used to look for the variable.
      Returns:
      The variable.
    • getVariable

      default <V extends IValue> IVariable<V> getVariable(INetwork network, IPartNetwork partNetwork)
      Get the variable.
      Type Parameters:
      V - The value type.
      Parameters:
      network - The network used to look for the variable.
      partNetwork - The part network used to look for the variable.
      Returns:
      The variable.
    • isValid

      boolean isValid()
      Returns:
      If this is a valid reference.
    • validate

      @Deprecated void validate(IPartNetwork network, IVariableFacade.IValidator validator, IValueType containingValueType)
      Deprecated.
      Check if this facade is valid, otherwise notify the validator of any errors.
      Parameters:
      network - The object used to look for the variable.
      validator - The object to notify errors to.
      containingValueType - The value type in which this variable facade is being used.
    • validate

      default void validate(INetwork network, IPartNetwork partNetwork, IVariableFacade.IValidator validator, IValueType containingValueType)
      Check if this facade is valid, otherwise notify the validator of any errors.
      Parameters:
      network - The network used to look for the variable.
      partNetwork - The part network used to look for the variable.
      validator - The object to notify errors to.
      containingValueType - The value type in which this variable facade is being used.
    • getOutputType

      IValueType getOutputType()
      Returns:
      The output type of this variable facade.
    • appendHoverText

      void appendHoverText(List<net.minecraft.network.chat.Component> list, net.minecraft.world.level.Level world)
      Add information about this variable facade to the list.
      Parameters:
      list - The list to add lines to.
      world - The world.
    • addModelOverlay

      void addModelOverlay(IVariableModelBaked variableModelBaked, List<net.minecraft.client.renderer.block.model.BakedQuad> quads, net.minecraft.util.RandomSource random, net.minecraftforge.client.model.data.ModelData modelData)
      Handle the quads for the given baked model.
      Parameters:
      variableModelBaked - The baked model.
      quads - The quads that can be added to.
      random - A random instance.
      modelData - Model data.
    • getVariableItemOverrideModel

      @Nullable default net.minecraft.client.resources.model.BakedModel getVariableItemOverrideModel(net.minecraft.client.resources.model.BakedModel model, net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.client.multiplayer.ClientLevel world, @Nullable net.minecraft.world.entity.LivingEntity livingEntity)
      An optional baked model to override when rendering the variable as item.
      Parameters:
      model - The original baked model.
      stack - The variable stack.
      world - The client world.
      livingEntity - The entity holding the stack.
      Returns:
      The overridden model. Will fallback to default if null.
    • renderISTER

      default void renderISTER(net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.ItemDisplayContext transformType, com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource buffer, int combinedLight, int combinedOverlay)
      Called during ISTER rendering of an variable item.
      Parameters:
      stack - The variable stack.
      transformType - Transform type.
      matrixStack - Matrix stack.
      buffer - Render buffer.
      combinedLight - Lighting.
      combinedOverlay - Overlay.