Class UpgradeContainer
java.lang.Object
net.minecraft.world.SimpleContainer
com.refinedmods.refinedstorage.common.upgrade.UpgradeContainer
- All Implemented Interfaces:
UpgradeState, Iterable<net.minecraft.world.item.ItemStack>, net.minecraft.world.Clearable, net.minecraft.world.Container, net.minecraft.world.entity.SlotProvider, net.minecraft.world.inventory.StackedContentsCompatible
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.world.Container
net.minecraft.world.Container.ContainerIterator -
Field Summary
Fields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER -
Constructor Summary
ConstructorsConstructorDescriptionUpgradeContainer(int size, UpgradeDestination destination, @Nullable UpgradeContainer.Listener listener, @Nullable Runnable changeListener) UpgradeContainer(int size, UpgradeDestination destination, @Nullable UpgradeContainer.Listener listener, @Nullable Runnable changeListener, int defaultWorkTickRate) UpgradeContainer(UpgradeDestination destination) UpgradeContainer(UpgradeDestination destination, int size) UpgradeContainer(UpgradeDestination destination, @Nullable UpgradeContainer.Listener listener, @Nullable Runnable changeListener) UpgradeContainer(UpgradeDestination destination, @Nullable UpgradeContainer.Listener listener, @Nullable Runnable changeListener, int defaultWorkTickRate) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddUpgrade(net.minecraft.world.item.ItemStack upgrade) booleancanPlaceItem(int slot, net.minecraft.world.item.ItemStack stack) intgetAmount(UpgradeItem upgradeItem) net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getDrops()longintlonggetRegulatedAmount(ResourceKey resource) List<net.minecraft.world.item.ItemStack> voidload(net.minecraft.world.item.component.ItemContainerContents contents) voidMethods inherited from class net.minecraft.world.SimpleContainer
addItem, canAddItem, clearContent, fillStackedContents, fromItemList, getContainerSize, getItem, getItems, isEmpty, removeAllItems, removeItem, removeItemNoUpdate, removeItemType, setItem, stillValid, storeAsItemList, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.Container
canTakeItem, countItem, getEntitiesWithContainerOpen, getMaxStackSize, getSlot, hasAnyMatching, hasAnyOf, iterator, startOpen, stopOpenMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface net.minecraft.world.entity.SlotProvider
getSlotsFromRangeMethods inherited from interface UpgradeState
has
-
Constructor Details
-
UpgradeContainer
-
UpgradeContainer
-
UpgradeContainer
public UpgradeContainer(UpgradeDestination destination, @Nullable UpgradeContainer.Listener listener, @Nullable Runnable changeListener) -
UpgradeContainer
public UpgradeContainer(int size, UpgradeDestination destination, @Nullable UpgradeContainer.Listener listener, @Nullable Runnable changeListener) -
UpgradeContainer
public UpgradeContainer(UpgradeDestination destination, @Nullable UpgradeContainer.Listener listener, @Nullable Runnable changeListener, int defaultWorkTickRate) -
UpgradeContainer
public UpgradeContainer(int size, UpgradeDestination destination, @Nullable UpgradeContainer.Listener listener, @Nullable Runnable changeListener, int defaultWorkTickRate)
-
-
Method Details
-
setChanged
public void setChanged()- Specified by:
setChangedin interfacenet.minecraft.world.Container- Overrides:
setChangedin classnet.minecraft.world.SimpleContainer
-
getTicker
-
getMaxStackSize
public int getMaxStackSize()- Specified by:
getMaxStackSizein interfacenet.minecraft.world.Container
-
canPlaceItem
public boolean canPlaceItem(int slot, net.minecraft.world.item.ItemStack stack) - Specified by:
canPlaceItemin interfacenet.minecraft.world.Container
-
getAllowedUpgrades
-
getRegulatedAmount
- Specified by:
getRegulatedAmountin interfaceUpgradeState
-
getAmount
- Specified by:
getAmountin interfaceUpgradeState
-
getEnergyUsage
public long getEnergyUsage() -
getUpgrades
-
addUpgrade
public boolean addUpgrade(net.minecraft.world.item.ItemStack upgrade) -
getDrops
public net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getDrops() -
load
public void load(net.minecraft.world.item.component.ItemContainerContents contents)
-