Class CreativeCrateMountedStorage
java.lang.Object
com.simibubi.create.api.contraption.storage.item.MountedItemStorage
com.simibubi.create.content.logistics.crate.CreativeCrateMountedStorage
- All Implemented Interfaces:
net.neoforged.neoforge.items.IItemHandler,net.neoforged.neoforge.items.IItemHandlerModifiable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<CreativeCrateMountedStorage> Fields inherited from class com.simibubi.create.api.contraption.storage.item.MountedItemStorage
STREAM_CODEC, type -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreativeCrateMountedStorage(MountedItemStorageType<?> type, net.minecraft.world.item.ItemStack suppliedStack) CreativeCrateMountedStorage(net.minecraft.world.item.ItemStack suppliedStack) -
Method Summary
Modifier and TypeMethodDescription@NotNull net.minecraft.world.item.ItemStackextractItem(int slot, int amount, boolean simulate) intgetSlotLimit(int slot) intgetSlots()@NotNull net.minecraft.world.item.ItemStackgetStackInSlot(int slot) @NotNull net.minecraft.world.item.ItemStackinsertItem(int slot, @NotNull net.minecraft.world.item.ItemStack stack, boolean simulate) booleanisItemValid(int slot, @NotNull net.minecraft.world.item.ItemStack stack) voidsetStackInSlot(int slot, @NotNull net.minecraft.world.item.ItemStack stack) voidunmount(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, @Nullable net.minecraft.world.level.block.entity.BlockEntity be) Un-mount this storage back into the world.Methods inherited from class com.simibubi.create.api.contraption.storage.item.MountedItemStorage
createMenuProvider, getHandlerForMenu, getMenuName, handleInteraction, isMenuValid, playClosingSound, playOpeningSound
-
Field Details
-
CODEC
-
-
Constructor Details
-
CreativeCrateMountedStorage
protected CreativeCrateMountedStorage(MountedItemStorageType<?> type, net.minecraft.world.item.ItemStack suppliedStack) -
CreativeCrateMountedStorage
public CreativeCrateMountedStorage(net.minecraft.world.item.ItemStack suppliedStack)
-
-
Method Details
-
unmount
public void unmount(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, @Nullable @Nullable net.minecraft.world.level.block.entity.BlockEntity be) Description copied from class:MountedItemStorageUn-mount this storage back into the world. The expected storage type of the target block has already been checked to make sure it matches this storage's type.- Specified by:
unmountin classMountedItemStorage
-
getSlots
public int getSlots() -
getStackInSlot
@NotNull public @NotNull net.minecraft.world.item.ItemStack getStackInSlot(int slot) -
setStackInSlot
public void setStackInSlot(int slot, @NotNull @NotNull net.minecraft.world.item.ItemStack stack) -
insertItem
@NotNull public @NotNull net.minecraft.world.item.ItemStack insertItem(int slot, @NotNull @NotNull net.minecraft.world.item.ItemStack stack, boolean simulate) -
extractItem
@NotNull public @NotNull net.minecraft.world.item.ItemStack extractItem(int slot, int amount, boolean simulate) -
getSlotLimit
public int getSlotLimit(int slot) -
isItemValid
public boolean isItemValid(int slot, @NotNull @NotNull net.minecraft.world.item.ItemStack stack)
-