Class DataSync<A,B>
java.lang.Object
com.pixelmonmod.pixelmon.api.data.DataSync<A,B>
- Type Parameters:
A
- The sender typeB
- The data type
Wrapper class used for optimizing data from
EntityDataAccessor
as cache's are faster (no concurrency checks/locking)-
Constructor Summary
ConstructorDescriptionDataSync
(Class<? extends net.minecraft.world.entity.Entity> entityClass, net.minecraft.network.syncher.EntityDataAccessor<B> dataParameter, BiConsumer<A, B> fieldSetter) DataSync
(Class<? extends net.minecraft.world.entity.Entity> entityClass, net.minecraft.network.syncher.EntityDataAccessor<B> dataParameter, BiConsumer<A, B> fieldSetter, BiConsumer<Pokemon, B> fieldSetterPokemon) DataSync
(Class<? extends net.minecraft.world.entity.Entity> entityClass, net.minecraft.network.syncher.EntityDataSerializer<B> serializer, BiConsumer<A, B> fieldSetter) DataSync
(Class<? extends net.minecraft.world.entity.Entity> entityClass, net.minecraft.network.syncher.EntityDataSerializer<B> serializer, BiConsumer<A, B> fieldSetter, BiConsumer<Pokemon, B> fieldSetterPokemon) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.network.syncher.EntityDataAccessor<B>
int
void
onSyncedDataUpdated
(net.minecraft.network.syncher.EntityDataAccessor<?> key, net.minecraft.world.entity.Entity sender) void
void
-
Constructor Details
-
DataSync
public DataSync(Class<? extends net.minecraft.world.entity.Entity> entityClass, net.minecraft.network.syncher.EntityDataSerializer<B> serializer, BiConsumer<A, B> fieldSetter) -
DataSync
public DataSync(Class<? extends net.minecraft.world.entity.Entity> entityClass, net.minecraft.network.syncher.EntityDataAccessor<B> dataParameter, BiConsumer<A, B> fieldSetter) -
DataSync
public DataSync(Class<? extends net.minecraft.world.entity.Entity> entityClass, net.minecraft.network.syncher.EntityDataSerializer<B> serializer, BiConsumer<A, B> fieldSetter, BiConsumer<Pokemon, B> fieldSetterPokemon) -
DataSync
public DataSync(Class<? extends net.minecraft.world.entity.Entity> entityClass, net.minecraft.network.syncher.EntityDataAccessor<B> dataParameter, BiConsumer<A, B> fieldSetter, BiConsumer<Pokemon, B> fieldSetterPokemon)
-
-
Method Details
-
getParameterId
public int getParameterId() -
getEntityDataAccessor
-
onSyncedDataUpdated
public void onSyncedDataUpdated(net.minecraft.network.syncher.EntityDataAccessor<?> key, net.minecraft.world.entity.Entity sender) -
set
-
set
-