Package com.ldtteam.structurize.storage
Interface ISurvivalBlueprintHandler
public interface ISurvivalBlueprintHandler
Handle the placement of blueprints in survival.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandle(Blueprint blueprint, net.minecraft.client.multiplayer.ClientLevel level, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos pos, PlacementSettings placementSettings) Client side check if this handler can handle this blueprint.net.minecraft.network.chat.ComponentGet the display name of the handler.getId()Get the unique registry id of the handler.voidhandle(Blueprint blueprint, String structurePackId, String blueprintPath, boolean clientPack, net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos pos, PlacementSettings placementSettings) Handle the placement.
-
Method Details
-
getId
String getId()Get the unique registry id of the handler.- Returns:
- the id.
-
getDisplayName
net.minecraft.network.chat.Component getDisplayName()Get the display name of the handler.- Returns:
- the chat component.
-
canHandle
boolean canHandle(Blueprint blueprint, net.minecraft.client.multiplayer.ClientLevel level, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos pos, PlacementSettings placementSettings) Client side check if this handler can handle this blueprint.- Parameters:
blueprint- the blueprint to check.level- the world.player- the player trying to place it.pos- the position they're trying to place it at.placementSettings- the placement settings.- Returns:
- true if so.
-
handle
void handle(Blueprint blueprint, String structurePackId, String blueprintPath, boolean clientPack, net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos pos, PlacementSettings placementSettings) Handle the placement.- Parameters:
blueprint- the blueprint to place.structurePackId- the id of the structurepack.blueprintPath- the path of the blueprint.clientPack- if this blueprint is not inside any server pack.level- the world.player- the player placing it.pos- the position they're placing it at.placementSettings- the placement settings.
-