Class HTListFluidTank
-
- All Implemented Interfaces:
-
hiiragi283.core.api.HTDataSerializable,hiiragi283.core.api.HTDataSerializable.Empty,hiiragi283.core.api.storage.amount.HTAmountView,hiiragi283.core.api.storage.fluid.HTFluidTank,hiiragi283.core.api.storage.resource.HTResourceSlot,hiiragi283.core.api.storage.resource.HTResourceView,net.neoforged.neoforge.common.util.INBTSerializable
public final class HTListFluidTank extends HTFluidTank.Basic implements HTDataSerializable.Empty
EMIにおける入力スロットで複数の液体を表示させるためのHTFluidTankの実装クラスです。
GTCEuに感謝!
- Since:
0.7.0
Hiiragi Tsubasa
-
-
Field Summary
Fields Modifier and Type Field Description private final Either<TagKey<Fluid>, List<HTFluidResourceType>>content
-
Constructor Summary
Constructors Constructor Description HTListFluidTank(HTFluidIngredient ingredient)HTListFluidTank(TagKey<Fluid> tagKey, Integer amount)HTListFluidTank(List<HTFluidResourceType> resources, Integer amount)HTListFluidTank(List<FluidStack> stacks)
-
Method Summary
Modifier and Type Method Description final Either<TagKey<Fluid>, List<HTFluidResourceType>>getContent()final EmiIngredientgetIngredient()UnitsetResource(HTFluidResourceType resource)指定したresourceで中身を置換します。 UnitsetAmount(Integer amount)保持しているリソースの量を変更します。 IntegergetAmount()保持している量を返します。 HTFluidResourceTypegetResource()保持しているリソースを取得します。 IntegergetCapacity(HTFluidResourceType resource)指定したresourceから容量を取得します。 BooleanisValid(HTFluidResourceType resource)指定したresourceが有効か判定します。 -
Methods inherited from class hiiragi283.core.api.storage.amount.HTAmountView
getCapacity, getLevelAsFloat, getLevelAsFraction, getNeeded -
Methods inherited from class hiiragi283.core.api.storage.fluid.HTFluidTank.Basic
setStack, toString -
Methods inherited from class hiiragi283.core.api.storage.resource.HTResourceSlot.Basic
canStackExtract, extract, insert, isStackValidForInsert -
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.HTDataSerializable
serializeNBT -
Methods inherited from class net.neoforged.neoforge.common.util.INBTSerializable
deserializeNBT -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
HTListFluidTank
HTListFluidTank(HTFluidIngredient ingredient)
-
HTListFluidTank
HTListFluidTank(TagKey<Fluid> tagKey, Integer amount)
-
HTListFluidTank
HTListFluidTank(List<HTFluidResourceType> resources, Integer amount)
-
HTListFluidTank
HTListFluidTank(List<FluidStack> stacks)
-
-
Method Detail
-
getContent
final Either<TagKey<Fluid>, List<HTFluidResourceType>> getContent()
-
getIngredient
final EmiIngredient getIngredient()
-
setResource
Unit setResource(HTFluidResourceType resource)
指定したresourceで中身を置換します。
-
getResource
HTFluidResourceType getResource()
保持しているリソースを取得します。
-
getCapacity
Integer getCapacity(HTFluidResourceType resource)
指定したresourceから容量を取得します。
-
isValid
Boolean isValid(HTFluidResourceType resource)
指定したresourceが有効か判定します。
- Returns:
有効な場合は
true
-
-
-
-