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 TypeMethodDescriptionvoidaddModelOverlay(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.voidappendHoverText(List<net.minecraft.network.chat.Component> list, net.minecraft.world.level.Level world) Add information about this variable facade to the list.protected Optional<BlockEntityProxy>getProxy(IPartNetwork network) protected 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(IPartNetwork network) Get the variable.booleanisValid()voidvalidate(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
generateId, getLabel, getReferenceDisplayMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cyclops.integrateddynamics.api.item.IProxyVariableFacade
getProxyIdMethods inherited from interface org.cyclops.integrateddynamics.api.item.IVariableFacade
getId, getLabel, getVariable, getVariableItemOverrideModel, renderISTER, validate
-
Constructor Details
-
ProxyVariableFacade
public ProxyVariableFacade(boolean generateId, int proxyId) -
ProxyVariableFacade
public ProxyVariableFacade(int id, int proxyId)
-
-
Method Details
-
getProxy
-
getTargetVariable
-
getVariable
Description copied from interface:IVariableFacadeGet the variable.- Specified by:
getVariablein interfaceIVariableFacade- Overrides:
getVariablein classVariableFacadeBase- Type Parameters:
V- The value type.- Parameters:
network- The object 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(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- Overrides:
validatein classVariableFacadeBase- Parameters:
partNetwork- 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.
-
getOutputType
- Specified by:
getOutputTypein interfaceIVariableFacade- Returns:
- The output type of this variable facade.
-
getProxyTooltip
protected net.minecraft.network.chat.Component getProxyTooltip() -
appendHoverText
public void appendHoverText(List<net.minecraft.network.chat.Component> list, net.minecraft.world.level.Level world) Description copied from interface:IVariableFacadeAdd information about this variable facade to the list.- Specified by:
appendHoverTextin interfaceIVariableFacade- Overrides:
appendHoverTextin classVariableFacadeBase- Parameters:
list- The list to add lines to.world- The world.
-
addModelOverlay
public 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) Description copied from interface:IVariableFacadeHandle the quads for the given baked model.- Specified by:
addModelOverlayin interfaceIVariableFacade- Parameters:
variableModelBaked- The baked model.quads- The quads that can be added to.random- A random instance.modelData- Model data.
-