A
- The sender typeB
- The data typepublic class DataSync<A,B>
extends java.lang.Object
DataParameter
as cache's are faster (no concurrency checks/locking)Constructor and Description |
---|
DataSync(java.lang.Class<? extends net.minecraft.entity.Entity> entityClass,
net.minecraft.network.datasync.DataParameter<B> dataParameter,
java.util.function.BiConsumer<A,B> fieldSetter) |
DataSync(java.lang.Class<? extends net.minecraft.entity.Entity> entityClass,
net.minecraft.network.datasync.DataParameter<B> dataParameter,
java.util.function.BiConsumer<A,B> fieldSetter,
java.util.function.BiConsumer<Pokemon,B> fieldSetterPokemon) |
DataSync(java.lang.Class<? extends net.minecraft.entity.Entity> entityClass,
net.minecraft.network.datasync.IDataSerializer<B> serializer,
java.util.function.BiConsumer<A,B> fieldSetter) |
DataSync(java.lang.Class<? extends net.minecraft.entity.Entity> entityClass,
net.minecraft.network.datasync.IDataSerializer<B> serializer,
java.util.function.BiConsumer<A,B> fieldSetter,
java.util.function.BiConsumer<Pokemon,B> fieldSetterPokemon) |
Modifier and Type | Method and Description |
---|---|
net.minecraft.network.datasync.DataParameter<B> |
getDataParameter() |
int |
getParameterId() |
void |
onSyncedDataUpdated(net.minecraft.network.datasync.DataParameter<?> key,
net.minecraft.entity.Entity sender) |
void |
set(net.minecraft.entity.Entity sender,
java.lang.Object data) |
void |
set(Pokemon sender,
java.lang.Object data) |
public DataSync(java.lang.Class<? extends net.minecraft.entity.Entity> entityClass, net.minecraft.network.datasync.IDataSerializer<B> serializer, java.util.function.BiConsumer<A,B> fieldSetter)
public DataSync(java.lang.Class<? extends net.minecraft.entity.Entity> entityClass, net.minecraft.network.datasync.DataParameter<B> dataParameter, java.util.function.BiConsumer<A,B> fieldSetter)
public DataSync(java.lang.Class<? extends net.minecraft.entity.Entity> entityClass, net.minecraft.network.datasync.IDataSerializer<B> serializer, java.util.function.BiConsumer<A,B> fieldSetter, java.util.function.BiConsumer<Pokemon,B> fieldSetterPokemon)
public int getParameterId()
public net.minecraft.network.datasync.DataParameter<B> getDataParameter()
public void onSyncedDataUpdated(net.minecraft.network.datasync.DataParameter<?> key, net.minecraft.entity.Entity sender)
public void set(net.minecraft.entity.Entity sender, java.lang.Object data)
public void set(Pokemon sender, java.lang.Object data)