public abstract class EventWrapper<E>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
EventWrapper.EventType<E extends EventWrapper<?>> |
static class |
EventWrapper.Result |
| Modifier | Constructor and Description |
|---|---|
protected |
EventWrapper(EventWrapper.EventType<?> type) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel() |
boolean |
hasInvokers() |
boolean |
hasResult() |
<V> V |
initPrimitive(java.util.function.Function<E,V> func,
V defVal) |
boolean |
isCancelable() |
abstract boolean |
isClient() |
abstract boolean |
isCommon() |
abstract boolean |
isServer() |
protected abstract void |
populate() |
void |
setEvent(E event) |
protected <V> AdvancementAPI<V> |
wrapAdvancement(java.util.function.Function<E,V> advancementFunc) |
protected <V> EventFieldWrapper<E,AdvancementAPI<?>> |
wrapAdvancementBoth(java.util.function.Function<E,V> getter,
java.util.function.BiConsumer<E,V> setter) |
protected <V> EventFieldWrapper<E,AdvancementAPI<?>> |
wrapAdvancementGetter(java.util.function.Function<E,V> getter) |
protected <V> BlockAPI<V> |
wrapBlock(java.util.function.Function<E,V> blockFunc) |
protected <V> EventFieldWrapper<E,BlockAPI<?>> |
wrapBlockBoth(java.util.function.Function<E,V> getter,
java.util.function.BiConsumer<E,V> setter) |
protected <V> BlockEntityAPI<V,?> |
wrapBlockEntity(java.util.function.Function<E,V> blockEntityFunc) |
protected <V> EventFieldWrapper<E,BlockEntityAPI<?,?>> |
wrapBlockEntityBoth(java.util.function.Function<E,V> getter,
java.util.function.BiConsumer<E,V> setter) |
protected <V> EventFieldWrapper<E,BlockEntityAPI<?,?>> |
wrapBlockEntityGetter(java.util.function.Function<E,V> getter) |
protected <V> EventFieldWrapper<E,BlockAPI<?>> |
wrapBlockGetter(java.util.function.Function<E,V> getter) |
protected <V> EntityAPI<V,?> |
wrapEntity(java.util.function.Function<E,V> entityFunc) |
protected <V> EventFieldWrapper<E,EntityAPI<?,?>> |
wrapEntityBoth(java.util.function.Function<E,V> getter,
java.util.function.BiConsumer<E,V> setter) |
protected <V> EventFieldWrapper<E,EntityAPI<?,?>> |
wrapEntityGetter(java.util.function.Function<E,V> getter) |
protected <V> ExplosionAPI<V> |
wrapExplosion(java.util.function.Function<E,V> explosionFunc) |
protected <V> EventFieldWrapper<E,ExplosionAPI<?>> |
wrapExplosionBoth(java.util.function.Function<E,V> getter,
java.util.function.BiConsumer<E,V> setter) |
protected <V> EventFieldWrapper<E,ExplosionAPI<?>> |
wrapExplosionGetter(java.util.function.Function<E,V> getter) |
protected <V> EventFieldWrapper<E,V> |
wrapGenericBoth(java.util.function.Function<E,V> getter,
java.util.function.BiConsumer<E,V> setter,
V defVal) |
protected <V> EventFieldWrapper<E,V> |
wrapGenericGetter(java.util.function.Function<E,V> getter,
V defVal) |
protected <V> ItemAPI<V> |
wrapItem(java.util.function.Function<E,V> itemFunc) |
protected <V> EventFieldWrapper<E,ItemAPI<?>> |
wrapItemBoth(java.util.function.Function<E,V> getter,
java.util.function.BiConsumer<E,V> setter) |
protected <V> EventFieldWrapper<E,ItemAPI<?>> |
wrapItemGetter(java.util.function.Function<E,V> getter) |
protected <V> ItemStackAPI<V> |
wrapItemStack(java.util.function.Function<E,V> itemStackFunc) |
protected <V> EventFieldWrapper<E,ItemStackAPI<?>> |
wrapItemStackBoth(java.util.function.Function<E,V> getter,
java.util.function.BiConsumer<E,V> setter) |
protected <V> EventFieldWrapper<E,ItemStackAPI<?>> |
wrapItemStackGetter(java.util.function.Function<E,V> getter) |
protected <V> LivingEntityAPI<V,?> |
wrapLiving(java.util.function.Function<E,V> livingFunc) |
protected <V> EventFieldWrapper<E,LivingEntityAPI<?,?>> |
wrapLivingBoth(java.util.function.Function<E,V> getter,
java.util.function.BiConsumer<E,V> setter) |
protected <V> EventFieldWrapper<E,LivingEntityAPI<?,?>> |
wrapLivingGetter(java.util.function.Function<E,V> getter) |
protected <V> PlayerAPI<V,?> |
wrapPlayer(java.util.function.Function<E,V> playerFunc) |
protected <V> EventFieldWrapper<E,PlayerAPI<?,?>> |
wrapPlayerBoth(java.util.function.Function<E,V> getter,
java.util.function.BiConsumer<E,V> setter) |
protected <V> EventFieldWrapper<E,PlayerAPI<?,?>> |
wrapPlayerGetter(java.util.function.Function<E,V> getter) |
protected <V> BlockPosAPI<?> |
wrapPos(java.util.function.Function<E,V> posFunc) |
protected <V> EventFieldWrapper<E,BlockPosAPI<?>> |
wrapPosBoth(java.util.function.Function<E,V> getter,
java.util.function.BiConsumer<E,V> setter) |
protected <V> EventFieldWrapper<E,BlockPosAPI<?>> |
wrapPosGetter(java.util.function.Function<E,V> getter) |
protected <V> BlockSnapshotAPI<V> |
wrapSnapshot(java.util.function.Function<E,V> snapshotFunc) |
protected <V> EventFieldWrapper<E,BlockSnapshotAPI<?>> |
wrapSnapshotBoth(java.util.function.Function<E,V> getter,
java.util.function.BiConsumer<E,V> setter) |
protected <V> EventFieldWrapper<E,BlockSnapshotAPI<?>> |
wrapSnapshotGetter(java.util.function.Function<E,V> getter) |
protected <V> BlockStateAPI<V> |
wrapState(java.util.function.Function<E,V> stateFunc) |
protected <V> EventFieldWrapper<E,BlockStateAPI<?>> |
wrapStateBoth(java.util.function.Function<E,V> getter,
java.util.function.BiConsumer<E,V> setter) |
protected <V> EventFieldWrapper<E,BlockStateAPI<?>> |
wrapStateGetter(java.util.function.Function<E,V> getter) |
protected <V> WorldAPI<V> |
wrapWorld(java.util.function.Function<E,V> worldFunc) |
protected <V> EventFieldWrapper<E,WorldAPI<?>> |
wrapWorldBoth(java.util.function.Function<E,V> getter,
java.util.function.BiConsumer<E,V> setter) |
protected <V> EventFieldWrapper<E,WorldAPI<?>> |
wrapWorldGetter(java.util.function.Function<E,V> getter) |
protected E event
protected EventWrapper(EventWrapper.EventType<?> type)
public void cancel()
public boolean hasInvokers()
public boolean hasResult()
public <V> V initPrimitive(@Nullable
java.util.function.Function<E,V> func,
V defVal)
public boolean isCancelable()
public abstract boolean isClient()
public abstract boolean isCommon()
public abstract boolean isServer()
protected abstract void populate()
public void setEvent(E event)
@Nullable protected <V> AdvancementAPI<V> wrapAdvancement(@Nullable java.util.function.Function<E,V> advancementFunc)
protected <V> EventFieldWrapper<E,AdvancementAPI<?>> wrapAdvancementBoth(java.util.function.Function<E,V> getter, java.util.function.BiConsumer<E,V> setter)
protected <V> EventFieldWrapper<E,AdvancementAPI<?>> wrapAdvancementGetter(java.util.function.Function<E,V> getter)
@Nullable protected <V> BlockAPI<V> wrapBlock(@Nullable java.util.function.Function<E,V> blockFunc)
protected <V> EventFieldWrapper<E,BlockAPI<?>> wrapBlockBoth(java.util.function.Function<E,V> getter, java.util.function.BiConsumer<E,V> setter)
protected <V> EventFieldWrapper<E,BlockAPI<?>> wrapBlockGetter(java.util.function.Function<E,V> getter)
@Nullable protected <V> BlockEntityAPI<V,?> wrapBlockEntity(@Nullable java.util.function.Function<E,V> blockEntityFunc)
protected <V> EventFieldWrapper<E,BlockEntityAPI<?,?>> wrapBlockEntityBoth(java.util.function.Function<E,V> getter, java.util.function.BiConsumer<E,V> setter)
protected <V> EventFieldWrapper<E,BlockEntityAPI<?,?>> wrapBlockEntityGetter(java.util.function.Function<E,V> getter)
@Nullable protected <V> EntityAPI<V,?> wrapEntity(@Nullable java.util.function.Function<E,V> entityFunc)
protected <V> EventFieldWrapper<E,EntityAPI<?,?>> wrapEntityBoth(java.util.function.Function<E,V> getter, java.util.function.BiConsumer<E,V> setter)
protected <V> EventFieldWrapper<E,EntityAPI<?,?>> wrapEntityGetter(java.util.function.Function<E,V> getter)
@Nullable protected <V> ExplosionAPI<V> wrapExplosion(@Nullable java.util.function.Function<E,V> explosionFunc)
protected <V> EventFieldWrapper<E,ExplosionAPI<?>> wrapExplosionBoth(java.util.function.Function<E,V> getter, java.util.function.BiConsumer<E,V> setter)
protected <V> EventFieldWrapper<E,ExplosionAPI<?>> wrapExplosionGetter(java.util.function.Function<E,V> getter)
@Nullable protected <V> ItemAPI<V> wrapItem(@Nullable java.util.function.Function<E,V> itemFunc)
protected <V> EventFieldWrapper<E,ItemAPI<?>> wrapItemBoth(java.util.function.Function<E,V> getter, java.util.function.BiConsumer<E,V> setter)
protected <V> EventFieldWrapper<E,ItemAPI<?>> wrapItemGetter(java.util.function.Function<E,V> getter)
@Nullable protected <V> ItemStackAPI<V> wrapItemStack(@Nullable java.util.function.Function<E,V> itemStackFunc)
protected <V> EventFieldWrapper<E,ItemStackAPI<?>> wrapItemStackBoth(java.util.function.Function<E,V> getter, java.util.function.BiConsumer<E,V> setter)
protected <V> EventFieldWrapper<E,ItemStackAPI<?>> wrapItemStackGetter(java.util.function.Function<E,V> getter)
@Nullable protected <V> LivingEntityAPI<V,?> wrapLiving(@Nullable java.util.function.Function<E,V> livingFunc)
protected <V> EventFieldWrapper<E,LivingEntityAPI<?,?>> wrapLivingBoth(java.util.function.Function<E,V> getter, java.util.function.BiConsumer<E,V> setter)
protected <V> EventFieldWrapper<E,LivingEntityAPI<?,?>> wrapLivingGetter(java.util.function.Function<E,V> getter)
@Nullable protected <V> PlayerAPI<V,?> wrapPlayer(@Nullable java.util.function.Function<E,V> playerFunc)
protected <V> EventFieldWrapper<E,PlayerAPI<?,?>> wrapPlayerBoth(java.util.function.Function<E,V> getter, java.util.function.BiConsumer<E,V> setter)
protected <V> EventFieldWrapper<E,PlayerAPI<?,?>> wrapPlayerGetter(java.util.function.Function<E,V> getter)
protected <V> BlockPosAPI<?> wrapPos(@Nullable java.util.function.Function<E,V> posFunc)
protected <V> EventFieldWrapper<E,BlockPosAPI<?>> wrapPosBoth(java.util.function.Function<E,V> getter, java.util.function.BiConsumer<E,V> setter)
protected <V> EventFieldWrapper<E,BlockPosAPI<?>> wrapPosGetter(java.util.function.Function<E,V> getter)
protected <V> EventFieldWrapper<E,V> wrapGenericBoth(java.util.function.Function<E,V> getter, java.util.function.BiConsumer<E,V> setter, V defVal)
protected <V> EventFieldWrapper<E,V> wrapGenericGetter(java.util.function.Function<E,V> getter, V defVal)
@Nullable protected <V> BlockSnapshotAPI<V> wrapSnapshot(@Nullable java.util.function.Function<E,V> snapshotFunc)
protected <V> EventFieldWrapper<E,BlockSnapshotAPI<?>> wrapSnapshotBoth(java.util.function.Function<E,V> getter, java.util.function.BiConsumer<E,V> setter)
protected <V> EventFieldWrapper<E,BlockSnapshotAPI<?>> wrapSnapshotGetter(java.util.function.Function<E,V> getter)
@Nullable protected <V> BlockStateAPI<V> wrapState(@Nullable java.util.function.Function<E,V> stateFunc)
protected <V> EventFieldWrapper<E,BlockStateAPI<?>> wrapStateBoth(java.util.function.Function<E,V> getter, java.util.function.BiConsumer<E,V> setter)
protected <V> EventFieldWrapper<E,BlockStateAPI<?>> wrapStateGetter(java.util.function.Function<E,V> getter)
@Nullable protected <V> WorldAPI<V> wrapWorld(@Nullable java.util.function.Function<E,V> worldFunc)
protected <V> EventFieldWrapper<E,WorldAPI<?>> wrapWorldBoth(java.util.function.Function<E,V> getter, java.util.function.BiConsumer<E,V> setter)
protected <V> EventFieldWrapper<E,WorldAPI<?>> wrapWorldGetter(java.util.function.Function<E,V> getter)