Class ProxyVariableFacade
java.lang.Object
org.cyclops.integrateddynamics.core.item.VariableFacadeBase
org.cyclops.integrateddynamics.core.item.ProxyVariableFacade
- All Implemented Interfaces:
IProxyVariableFacade,IVariableFacade
- Direct Known Subclasses:
DelayVariableFacade
Variable facade for variables determined by proxies.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.cyclops.integrateddynamics.api.item.IVariableFacade
IVariableFacade.IValidator -
Constructor Summary
ConstructorsConstructorDescriptionProxyVariableFacade(boolean generateId, int proxyId) ProxyVariableFacade(int id, int proxyId) -
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.protected IVariableFacadeClientbooleanprotected Optional<BlockEntityProxy> getProxy(IPartNetwork network) intprotected net.minecraft.network.chat.MutableComponentprotected net.minecraft.network.chat.MutableComponentgetProxyInvalidTypeError(IPartNetwork network, IValueType containingValueType, IValueType actualType) protected net.minecraft.network.chat.MutableComponentprotected net.minecraft.network.chat.ComponentgetTargetVariable(IPartNetwork network) getVariable(INetwork network, IPartNetwork partNetwork) Get the variable.inthashCode()booleanbooleanisValid()booleanvoidsetGettingVariable(boolean gettingVariable) voidsetValidatingVariable(boolean validatingVariable) voidvalidate(INetwork network, IPartNetwork partNetwork, IVariableFacade.IValidator validator, IValueType containingValueType) Check if this facade is valid, otherwise notify the validator of any errors.Methods inherited from class org.cyclops.integrateddynamics.core.item.VariableFacadeBase
canEqual, generateId, getClient, getId, getLabel, getReferenceDisplay, setClient, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.cyclops.integrateddynamics.api.item.IVariableFacade
getClient, getId, getLabel
-
Constructor Details
-
ProxyVariableFacade
public ProxyVariableFacade(boolean generateId, int proxyId) -
ProxyVariableFacade
public ProxyVariableFacade(int id, int proxyId)
-
-
Method Details
-
getProxyId
public int getProxyId()- Specified by:
getProxyIdin interfaceIProxyVariableFacade- Returns:
- The proxy id.
-
isValidatingVariable
public boolean isValidatingVariable() -
setValidatingVariable
public void setValidatingVariable(boolean validatingVariable) -
isGettingVariable
public boolean isGettingVariable() -
setGettingVariable
public void setGettingVariable(boolean gettingVariable) -
getProxy
-
getTargetVariable
-
getVariable
Description copied from interface:IVariableFacadeGet the variable.- Specified by:
getVariablein interfaceIVariableFacade- 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
public boolean isValid()- Specified by:
isValidin interfaceIVariableFacade- Returns:
- If this is a valid reference.
-
getProxyNotInNetworkError
protected net.minecraft.network.chat.MutableComponent getProxyNotInNetworkError() -
getProxyInvalidError
protected net.minecraft.network.chat.MutableComponent getProxyInvalidError() -
getProxyInvalidTypeError
protected net.minecraft.network.chat.MutableComponent getProxyInvalidTypeError(IPartNetwork network, IValueType containingValueType, IValueType actualType) -
validate
public void validate(INetwork network, IPartNetwork partNetwork, IVariableFacade.IValidator validator, IValueType containingValueType) Description copied from interface:IVariableFacadeCheck if this facade is valid, otherwise notify the validator of any errors.- Specified by:
validatein interfaceIVariableFacade- 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
- Specified by:
getOutputTypein interfaceIVariableFacade- Returns:
- The output type of this variable facade.
-
getProxyTooltip
protected net.minecraft.network.chat.Component getProxyTooltip() -
constructClient
- Specified by:
constructClientin classVariableFacadeBase
-
appendHoverText
public void appendHoverText(Consumer<net.minecraft.network.chat.Component> tooltipAdder, net.minecraft.world.item.Item.TooltipContext context) Description copied from interface:IVariableFacadeAdd information about this variable facade to the list.- Specified by:
appendHoverTextin interfaceIVariableFacade- Overrides:
appendHoverTextin classVariableFacadeBase- Parameters:
tooltipAdder- The list to add lines to.context- The context.
-
equals
- Overrides:
equalsin classVariableFacadeBase
-
hashCode
public int hashCode()- Overrides:
hashCodein classVariableFacadeBase
-