Class LootrNullImpl
java.lang.Object
com.hammy275.immersivemc.common.compat.lootr.LootrNullImpl
- All Implemented Interfaces:
LootrCompat
-
Field Summary
Fields inherited from interface com.hammy275.immersivemc.common.compat.lootr.LootrCompat
BLOCK_TAG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean@Nullable net.minecraft.world.ContainergetContainer(net.minecraft.server.level.ServerPlayer player, net.minecraft.core.BlockPos pos) Gets the container Lootr-handled block, or returns null if the target isn't a Lootr-handled block.booleanisLootrContainer(net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level level) booleanisOpen(net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player) voidmarkOpener(net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos pos) Mark the specified player as having opened this Lootr-handled block, if this is a Lootr-handled block.booleanopenLootrBarrel(net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, boolean nowOpen) Open/close Lootr barrel if it is one.booleanopenLootrShulkerBox(net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, boolean nowOpen) Open/close Lootr Shulker Box if it is one.
-
Constructor Details
-
LootrNullImpl
public LootrNullImpl()
-
-
Method Details
-
getContainer
@Nullable public @Nullable net.minecraft.world.Container getContainer(net.minecraft.server.level.ServerPlayer player, net.minecraft.core.BlockPos pos) Description copied from interface:LootrCompatGets the container Lootr-handled block, or returns null if the target isn't a Lootr-handled block.- Specified by:
getContainerin interfaceLootrCompat- Parameters:
player- Player to get contents for.pos- Position of block.- Returns:
- A list of items in the block, or null if there isn't one.
-
markOpener
public void markOpener(net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos pos) Description copied from interface:LootrCompatMark the specified player as having opened this Lootr-handled block, if this is a Lootr-handled block.- Specified by:
markOpenerin interfaceLootrCompat- Parameters:
player- Player to markpos- Position of chest
-
isLootrContainer
public boolean isLootrContainer(net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level level) - Specified by:
isLootrContainerin interfaceLootrCompat- Parameters:
pos- Position to checklevel- Level to check in- Returns:
- Whether the block at the given position is a Lootr container.
-
openLootrBarrel
public boolean openLootrBarrel(net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, boolean nowOpen) Description copied from interface:LootrCompatOpen/close Lootr barrel if it is one.- Specified by:
openLootrBarrelin interfaceLootrCompat- Parameters:
pos- The position of the potential barrel.player- Player that is opening/closing the barrel.nowOpen- Whether the player is opening or closing the barrel.- Returns:
- Whether the open/close succeeded. Fails when it isn't a Lootr barrel.
-
openLootrShulkerBox
public boolean openLootrShulkerBox(net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, boolean nowOpen) Description copied from interface:LootrCompatOpen/close Lootr Shulker Box if it is one.- Specified by:
openLootrShulkerBoxin interfaceLootrCompat- Parameters:
pos- The position of the potential Shulker Box.player- Player that is opening/closing the Shulker Box.nowOpen- Whether the player is opening or closing the Shulker Box.- Returns:
- Whether the open/close succeeded. Fails when it isn't a Lootr Shulker Box.
-
isOpen
public boolean isOpen(net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player) - Specified by:
isOpenin interfaceLootrCompat- Parameters:
pos- Position to check.player- Player to check for.- Returns:
- Whether the supplied Lootr block is open.
-
disableLootrContainerCompat
public boolean disableLootrContainerCompat()- Specified by:
disableLootrContainerCompatin interfaceLootrCompat- Returns:
- Whether Lootr compat should be fully disabled.
-