Package org.cyclops.cyclopscore.block
Interface IBlockGui
- All Known Implementing Classes:
BlockGui
,BlockWithEntityGui
public interface IBlockGui
Block gui component.
Pass
IBlockGui.IBlockContainerProvider.get(BlockState, Level, BlockPos)
ass a lambda to specify the gui.
Optionally implement getOpenStat()
to specify a stat on gui opening.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault net.minecraft.stats.Stat<net.minecraft.resources.ResourceLocation>
static net.minecraft.world.InteractionResult
onBlockActivatedHook
(IBlockGui block, IBlockGui.IBlockContainerProvider blockContainerProvider, net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos blockPos, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult rayTraceResult) default void
writeExtraGuiData
(net.minecraft.network.FriendlyByteBuf packetBuffer, net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos blockPos, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult rayTraceResult)
-
Method Details
-
writeExtraGuiData
default void writeExtraGuiData(net.minecraft.network.FriendlyByteBuf packetBuffer, net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos blockPos, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult rayTraceResult) -
getOpenStat
@Nullable default net.minecraft.stats.Stat<net.minecraft.resources.ResourceLocation> getOpenStat()- Returns:
- An optional gui opening statistic.
-
onBlockActivatedHook
static net.minecraft.world.InteractionResult onBlockActivatedHook(IBlockGui block, IBlockGui.IBlockContainerProvider blockContainerProvider, net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos blockPos, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult rayTraceResult)
-