Class SyncedField<T>
java.lang.Object
me.desht.pneumaticcraft.common.network.SyncedField<T>
- Direct Known Subclasses:
SyncedField.SyncedBoolean,SyncedField.SyncedDouble,SyncedField.SyncedEnum,SyncedField.SyncedFloat,SyncedField.SyncedFluidStack,SyncedField.SyncedInt,SyncedField.SyncedItemHandler,SyncedField.SyncedItemStack,SyncedField.SyncedString
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classFIXME: sync'ing an array of enum does not workstatic classstatic classstatic classstatic classstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionprotected TcopyWhenNecessary(T oldValue) protected booleanClass<?>static bytegetType(SyncedField<?> syncedField) Utility MethodsgetValue()protected abstract TgetValueForArray(Object array, int index) protected voidinjectValue(Field field, Object te, T value) protected TretrieveValue(Field field, Object te) voidsetAnnotation(Class<?> annotation) setLazy(boolean lazy) voidprotected abstract voidsetValueForArray(Object array, int index, T value) toString()booleanupdate()Called server-side: retrieve the latest value of this field from the syncable object and return true if it's changed since the last time update() was called (provided this is not a @LazySynced field).
-
Method Details
-
setLazy
-
toString
-
update
public boolean update()Called server-side: retrieve the latest value of this field from the syncable object and return true if it's changed since the last time update() was called (provided this is not a @LazySynced field).- Returns:
- true if the field has changed and is non-lazy so needs to be sync'd to clients, false otherwise
-
equals
-
copyWhenNecessary
-
retrieveValue
- Throws:
Exception
-
injectValue
- Throws:
Exception
-
getValueForArray
-
setValueForArray
-
getValue
-
setValue
-
setAnnotation
-
getAnnotation
-
getType
Utility Methods
-