Class HTFractionSyncSlot
-
- All Implemented Interfaces:
-
hiiragi283.core.api.inventory.slot.HTSyncableSlot,hiiragi283.core.common.inventory.slot.HTIntSyncSlot
public final class HTFractionSyncSlot implements HTIntSyncSlot
Fraction向けのHTIntSyncSlotの実装クラスです。
- Since:
0.4.0
Hiiragi Tsubasa
-
-
Constructor Summary
Constructors Constructor Description HTFractionSyncSlot(Supplier<Fraction> getter, Consumer<Fraction> setter)HTFractionSyncSlot(KMutableProperty0<Fraction> property)
-
Method Summary
Modifier and Type Method Description IntegergetAmountAsInt()UnitsetAmountAsInt(Integer amount)final FractiongetAmount()final UnitsetAmount(Fraction amount)HTChangeTypegetChange()現在の同期のフラグを取得します。 HTSyncablePayloadcreatePayload(RegistryAccess access, HTChangeType changeType)指定したaccessとchangeTypeから同期用のパケットを作成します。 -
-
Constructor Detail
-
HTFractionSyncSlot
HTFractionSyncSlot(KMutableProperty0<Fraction> property)
-
-
Method Detail
-
getAmountAsInt
Integer getAmountAsInt()
-
setAmountAsInt
Unit setAmountAsInt(Integer amount)
-
getAmount
final Fraction getAmount()
-
getChange
HTChangeType getChange()
現在の同期のフラグを取得します。
-
createPayload
HTSyncablePayload createPayload(RegistryAccess access, HTChangeType changeType)
指定したaccessとchangeTypeから同期用のパケットを作成します。
- Returns:
同期を行わない場合は
null
-
-
-
-