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 -
Method Summary
Modifier and TypeMethodDescriptionvoidappendHoverText(Consumer<net.minecraft.network.chat.Component> tooltipAdder, net.minecraft.world.item.Item.TooltipContext context) Add information about this variable facade to the list.intgetId()getLabel()getVariable(INetwork network, IPartNetwork partNetwork) Get the variable.booleanisValid()voidvalidate(INetwork network, IPartNetwork partNetwork, IVariableFacade.IValidator validator, IValueType containingValueType) Check if this facade is valid, otherwise notify the validator of any errors.
-
Method Details
-
getClient
IVariableFacadeClient getClient() -
getId
int getId()- Returns:
- The unique id for this facade.
-
getLabel
- Returns:
- The optional label for this facade.
-
getVariable
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
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(Consumer<net.minecraft.network.chat.Component> tooltipAdder, net.minecraft.world.item.Item.TooltipContext context) Add information about this variable facade to the list.- Parameters:
tooltipAdder- The list to add lines to.context- The context.
-