Package alexiil.mc.lib.attributes.misc
Class SimulatableRef<T>
java.lang.Object
alexiil.mc.lib.attributes.misc.SimulatableRef<T>
- All Implemented Interfaces:
- Reference<T>
A variant of 
CallableRef that uses Supplier for get(), and LimitedConsumer for
 set(Object) and isValid(Object).- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionget()booleanbooleanbooleanset(T value, Simulation simulation)Delegates toReference.set(Object)if the simulation isSimulation.ACTION, otherwise it delegates toReference.isValid(Object).Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface alexiil.mc.lib.attributes.misc.ReferenceasDestroyable
- 
Constructor Details- 
SimulatableRef
 
- 
- 
Method Details- 
get- Specified by:
- getin interface- Reference<T>
- Returns:
- The object referenced. Note that you should generally not modify the returned value directly - instead
         copy it before passing it to Reference.set(Object)orReference.isValid(Object)to see if your modifications are permitted.
 
- 
set
- 
isValid- Specified by:
- isValidin interface- Reference<T>
- Returns:
- True if Reference.set(Object)was called with the same value.
 
- 
setDescription copied from interface:ReferenceDelegates toReference.set(Object)if the simulation isSimulation.ACTION, otherwise it delegates toReference.isValid(Object).
 
-