Interface ImmersiveHandler
- All Known Subinterfaces:
BlockBasedImmersiveHandler<S>, MultiblockBlockBasedImmersiveHandler<S>, PlayerAttachmentImmersiveHandler<S>, WorldStorageHandler<S>
- All Known Implementing Classes:
AnvilHandler, ApothSalvagingTableHandler, BagHandler, BarrelHandler, BeaconHandler, BrewingStandHandler, ChestHandler, ChestLikeHandler, ChiseledBookshelfHandler, ContainerHandler, CraftingHandler, DoorHandler, ETableHandler, FurnaceHandler, GrindstoneHandler, HitboxesHandler, HopperHandler, IronFurnacesFurnaceHandler, ItemWorldStorageHandler, JukeboxHandler, LecternHandler, LeverHandler, RepeaterHandler, ShulkerBoxHandler, SmithingTableHandler, TCCraftingStationHandler, TrapdoorHandler, VisualWorkbenchHandler
public sealed interface ImmersiveHandler
permits BlockBasedImmersiveHandler<S>, PlayerAttachmentImmersiveHandler<S>
While an
Immersive defines how a client should work
with an Immersive, an ImmersiveHandler handles both the server-half of a block-based Immersive, along
with the shared, common portion. For example, retrieving what items are stored in a furnace to send to the client
(server-specific) and identifying what a furnace is (common) are both handled in an ImmersiveHandler.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether the client should be the one to begin tracking this immersive.booleanenabledInConfig(net.minecraft.world.entity.player.Player player) net.minecraft.resources.IdentifiergetID()
-
Method Details
-
enabledInConfig
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.
-
clientAuthoritative
boolean clientAuthoritative()Whether the client should be the one to begin tracking this immersive. If this is true, the server should not send any data to the client about this Immersive, and does not know who is tracking this Immersive.- Returns:
- Whether this immersive should have tracking initiated by the client. The same value should always be returned by this method.
-
getID
net.minecraft.resources.Identifier getID()- Returns:
- A unique ID to identify this handler. The same value should always be returned by this method.
-