Class HTComponentSlot

  • All Implemented Interfaces:
    hiiragi283.core.api.HTContentListener , hiiragi283.core.api.HTContentListener.Empty , hiiragi283.core.api.serialization.value.HTValueSerializable , hiiragi283.core.api.serialization.value.HTValueSerializable.Empty , hiiragi283.core.api.storage.amount.HTAmountView , hiiragi283.core.api.storage.resource.HTResourceSlot , hiiragi283.core.api.storage.resource.HTResourceView , java.lang.Runnable , net.neoforged.neoforge.common.util.INBTSerializable

    
    public abstract class HTComponentSlot<RESOURCE extends HTResourceType<?>, STACK extends Object, ATTACHED extends HTAttachedContainers<STACK, ATTACHED>>
    extends HTResourceSlot.Mutable<RESOURCE> implements HTContentListener.Empty, HTValueSerializable.Empty
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Integer getAmount() 保持している量を返します。
      Unit setResource(RESOURCE resource) 指定したresourceで中身を置換します。
      Unit setAmount(Integer amount) 保持しているリソースの量を変更します。
      final Unit setStack(STACK stack)
      final Boolean isValid(RESOURCE resource) 指定したresourceが有効か判定します。
      final Boolean isStackValidForInsert(RESOURCE resource, HTStorageAccess access) 指定したリソースをこのスロットに搬入できるか判定します。
      final Boolean canStackExtract(RESOURCE resource, HTStorageAccess access) 指定したリソースをこのスロットから搬出できるか判定します。
      RESOURCE getResource() 保持しているリソースを取得します。
      Integer getCapacity(RESOURCE resource) 指定したresourceから容量を取得します。
      • Methods inherited from class hiiragi283.core.api.storage.amount.HTAmountView

        getCapacity, getLevelAsFloat, getLevelAsFraction, getNeeded, isEmpty
      • Methods inherited from class hiiragi283.core.api.storage.resource.HTResourceSlot.Mutable

        extract, insert
      • Methods inherited from class hiiragi283.core.api.storage.resource.HTResourceSlot

        extract
      • Methods inherited from class hiiragi283.core.api.storage.resource.HTResourceView

        getLevelAsFloat, getLevelAsFraction, getNeeded
      • Methods inherited from class hiiragi283.core.api.serialization.value.HTValueSerializable

        deserialize, serialize
      • Methods inherited from class hiiragi283.core.api.HTContentListener

        onContentsChanged
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait