Package com.ldtteam.structurize.api.util
Interface ISpecialBlockPickItem
- All Known Implementing Classes:
ItemScanTool,ItemTagSubstitution
public interface ISpecialBlockPickItem
An item that supports middle-clicking
-
Method Summary
Modifier and TypeMethodDescription@NotNull net.minecraft.world.InteractionResultonBlockPick(@NotNull net.minecraft.world.entity.player.Player player, @NotNull net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.core.BlockPos pos, boolean ctrlKey) Called first on client side when the player presses "pick block" (default middle mouse) with this item selected.
-
Method Details
-
onBlockPick
@NotNull @NotNull net.minecraft.world.InteractionResult onBlockPick(@NotNull @NotNull net.minecraft.world.entity.player.Player player, @NotNull @NotNull net.minecraft.world.item.ItemStack stack, @Nullable @Nullable net.minecraft.core.BlockPos pos, boolean ctrlKey) Called first on client side when the player presses "pick block" (default middle mouse) with this item selected. If that succeeds, called again on server side.- Parameters:
player- the playerstack- the item stackpos- the focused block, or null if on airctrlKey- ctrl key is pressed too- Returns:
- (client) return SUCCESS to send to server, FAIL to cancel, or PASS to do normal pick action. (server) return value is ignored.
-