Class ShulkerBoxHandler
java.lang.Object
com.hammy275.immersivemc.common.immersive.handler.ContainerHandler<ListOfItemsStorage>
com.hammy275.immersivemc.common.immersive.handler.ChestLikeHandler
com.hammy275.immersivemc.common.immersive.handler.ShulkerBoxHandler
- All Implemented Interfaces:
ImmersiveHandler<ListOfItemsStorage>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canPlaceItem
(net.minecraft.world.item.ItemStack item) boolean
enabledInConfig
(net.minecraft.world.entity.player.Player player) net.minecraft.resources.ResourceLocation
getID()
boolean
isValidBlock
(net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level level) void
onStopTracking
(net.minecraft.server.level.ServerPlayer player, net.minecraft.core.BlockPos pos) Function called whenever this immersive is no longer being tracked.Methods inherited from class com.hammy275.immersivemc.common.immersive.handler.ChestLikeHandler
getEmptyNetworkStorage, isDirtyForClientSync, makeInventoryContents, swap
Methods inherited from class com.hammy275.immersivemc.common.immersive.handler.ContainerHandler
clientAuthoritative
-
Constructor Details
-
ShulkerBoxHandler
public ShulkerBoxHandler()
-
-
Method Details
-
canPlaceItem
public boolean canPlaceItem(net.minecraft.world.item.ItemStack item) - Overrides:
canPlaceItem
in classChestLikeHandler
-
isValidBlock
public boolean isValidBlock(net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level level) - Specified by:
isValidBlock
in interfaceImmersiveHandler<ListOfItemsStorage>
- Overrides:
isValidBlock
in classChestLikeHandler
- Parameters:
pos
- Position to check.level
- The level being checked in.- Returns:
- Whether the supplied block matches what this handler handles.
-
enabledInConfig
public boolean enabledInConfig(net.minecraft.world.entity.player.Player player) - Parameters:
player
- The player we're checking the config of.- Returns:
- Whether the immersive this handler handles is enabled. If you do not have a configuration system, this should always return true.
-
onStopTracking
public void onStopTracking(net.minecraft.server.level.ServerPlayer player, net.minecraft.core.BlockPos pos) Description copied from interface:ImmersiveHandler
Function called whenever this immersive is no longer being tracked. Only ever called server-side.- Specified by:
onStopTracking
in interfaceImmersiveHandler<ListOfItemsStorage>
- Overrides:
onStopTracking
in classChestLikeHandler
- Parameters:
player
- Player who is no longer tracking this immersive.pos
- Position of the block no longer being tracked.
-
getID
public net.minecraft.resources.ResourceLocation getID()- Returns:
- A unique ID to identify this handler. The same value should always be returned by this method.
-