Class ItemPlacementContext

java.lang.Object
net.minecraft.item.ItemUsageContext
net.minecraft.item.ItemPlacementContext
Direct Known Subclasses:
AutomaticItemPlacementContext

public class ItemPlacementContext extends ItemUsageContext
Mappings:
Namespace Name
official bsp
intermediary net/minecraft/class_1750
named net/minecraft/item/ItemPlacementContext
  • Field Details

    • placementPos

      private final BlockPos placementPos
      Mappings:
      Namespace Name Mixin selector
      official b Lbsp;b:Lgg;
      intermediary field_7903 Lnet/minecraft/class_1750;field_7903:Lnet/minecraft/class_2338;
      named placementPos Lnet/minecraft/item/ItemPlacementContext;placementPos:Lnet/minecraft/util/math/BlockPos;
    • canReplaceExisting

      protected boolean canReplaceExisting
      Mappings:
      Namespace Name Mixin selector
      official a Lbsp;a:Z
      intermediary field_7904 Lnet/minecraft/class_1750;field_7904:Z
      named canReplaceExisting Lnet/minecraft/item/ItemPlacementContext;canReplaceExisting:Z
  • Constructor Details

    • ItemPlacementContext

      public ItemPlacementContext(PlayerEntity player, Hand hand, ItemStack stack, BlockHitResult hitResult)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbsp;<init>(Lbkd;Larz;Lbqp;Ldmw;)V
      intermediary <init> Lnet/minecraft/class_1750;<init>(Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;Lnet/minecraft/class_1799;Lnet/minecraft/class_3965;)V
      named <init> Lnet/minecraft/item/ItemPlacementContext;<init>(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/item/ItemStack;Lnet/minecraft/util/hit/BlockHitResult;)V
    • ItemPlacementContext

      public ItemPlacementContext(ItemUsageContext context)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbsp;<init>(Lbsr;)V
      intermediary <init> Lnet/minecraft/class_1750;<init>(Lnet/minecraft/class_1838;)V
      named <init> Lnet/minecraft/item/ItemPlacementContext;<init>(Lnet/minecraft/item/ItemUsageContext;)V
    • ItemPlacementContext

      protected ItemPlacementContext(World world, @Nullable @Nullable PlayerEntity player, Hand hand, ItemStack stack, BlockHitResult hit)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbsr;<init>(Lbwp;Lbkd;Larz;Lbqp;Ldmw;)V
      intermediary <init> Lnet/minecraft/class_1838;<init>(Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;Lnet/minecraft/class_1799;Lnet/minecraft/class_3965;)V
      named <init> Lnet/minecraft/item/ItemUsageContext;<init>(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/item/ItemStack;Lnet/minecraft/util/hit/BlockHitResult;)V
  • Method Details

    • offset

      public static ItemPlacementContext offset(ItemPlacementContext context, BlockPos pos, Direction side)
      Mappings:
      Namespace Name Mixin selector
      official a Lbsp;a(Lbsp;Lgg;Lgl;)Lbsp;
      intermediary method_16355 Lnet/minecraft/class_1750;method_16355(Lnet/minecraft/class_1750;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;)Lnet/minecraft/class_1750;
      named offset Lnet/minecraft/item/ItemPlacementContext;offset(Lnet/minecraft/item/ItemPlacementContext;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Lnet/minecraft/item/ItemPlacementContext;
    • getBlockPos

      public BlockPos getBlockPos()
      Overrides:
      getBlockPos in class ItemUsageContext
      Mappings:
      Namespace Name Mixin selector
      official a Lbsr;a()Lgg;
      intermediary method_8037 Lnet/minecraft/class_1838;method_8037()Lnet/minecraft/class_2338;
      named getBlockPos Lnet/minecraft/item/ItemUsageContext;getBlockPos()Lnet/minecraft/util/math/BlockPos;
    • canPlace

      public boolean canPlace()
      Mappings:
      Namespace Name Mixin selector
      official b Lbsp;b()Z
      intermediary method_7716 Lnet/minecraft/class_1750;method_7716()Z
      named canPlace Lnet/minecraft/item/ItemPlacementContext;canPlace()Z
    • canReplaceExisting

      public boolean canReplaceExisting()
      Mappings:
      Namespace Name Mixin selector
      official c Lbsp;c()Z
      intermediary method_7717 Lnet/minecraft/class_1750;method_7717()Z
      named canReplaceExisting Lnet/minecraft/item/ItemPlacementContext;canReplaceExisting()Z
    • getPlayerLookDirection

      public Direction getPlayerLookDirection()
      Mappings:
      Namespace Name Mixin selector
      official d Lbsp;d()Lgl;
      intermediary method_7715 Lnet/minecraft/class_1750;method_7715()Lnet/minecraft/class_2350;
      named getPlayerLookDirection Lnet/minecraft/item/ItemPlacementContext;getPlayerLookDirection()Lnet/minecraft/util/math/Direction;
    • getVerticalPlayerLookDirection

      public Direction getVerticalPlayerLookDirection()
      Mappings:
      Namespace Name Mixin selector
      official e Lbsp;e()Lgl;
      intermediary method_32760 Lnet/minecraft/class_1750;method_32760()Lnet/minecraft/class_2350;
      named getVerticalPlayerLookDirection Lnet/minecraft/item/ItemPlacementContext;getVerticalPlayerLookDirection()Lnet/minecraft/util/math/Direction;
    • getPlacementDirections

      public Direction[] getPlacementDirections()
      Mappings:
      Namespace Name Mixin selector
      official f Lbsp;f()[Lgl;
      intermediary method_7718 Lnet/minecraft/class_1750;method_7718()[Lnet/minecraft/class_2350;
      named getPlacementDirections Lnet/minecraft/item/ItemPlacementContext;getPlacementDirections()[Lnet/minecraft/util/math/Direction;