Package hiiragi283.core.common.gui.sync
Class HTItemSyncSlot
-
- All Implemented Interfaces:
-
hiiragi283.core.api.gui.sync.HTSyncableSlot,hiiragi283.core.common.gui.sync.HTIntSyncSlot
public final class HTItemSyncSlot implements HTIntSyncSlot
ItemStack向けのHTIntSyncSlotの実装クラスです。
- Since:
0.8.0
Hiiragi Tsubasa
-
-
Field Summary
Fields Modifier and Type Field Description private ItemStackasItemStackprivate IntegeramountAsInt
-
Constructor Summary
Constructors Constructor Description HTItemSyncSlot(Supplier<ItemStack> getter, Consumer<ItemStack> setter)HTItemSyncSlot(KMutableProperty0<ItemStack> property)HTItemSyncSlot(HTItemStackResourceSlot slot)
-
Method Summary
Modifier and Type Method Description final ItemStackgetAsItemStack()final UnitsetAsItemStack(ItemStack value)IntegergetAmountAsInt()UnitsetAmountAsInt(Integer value)HTChangeTypegetChange()現在の同期のフラグを取得します。 HTSyncablePayloadcreatePayload(RegistryAccess access, HTChangeType changeType)指定したaccessとchangeTypeからHTSyncablePayloadを作成します。 final ItemStackgetValue(Object thisRef, KProperty<?> property)final UnitsetValue(Object thisRef, KProperty<?> property, ItemStack value)-
-
Constructor Detail
-
HTItemSyncSlot
HTItemSyncSlot(KMutableProperty0<ItemStack> property)
-
HTItemSyncSlot
HTItemSyncSlot(HTItemStackResourceSlot slot)
-
-
Method Detail
-
getAsItemStack
final ItemStack getAsItemStack()
-
setAsItemStack
final Unit setAsItemStack(ItemStack value)
-
getAmountAsInt
Integer getAmountAsInt()
-
setAmountAsInt
Unit setAmountAsInt(Integer value)
-
getChange
HTChangeType getChange()
現在の同期のフラグを取得します。
- Returns:
同期を行わない場合は
null
-
createPayload
HTSyncablePayload createPayload(RegistryAccess access, HTChangeType changeType)
指定したaccessとchangeTypeからHTSyncablePayloadを作成します。
- Returns:
同期を行わない場合は
null
-
-
-
-