From f3862c20a9024fd5be4847ddf361adc14a7b703a Mon Sep 17 00:00:00 2001 From: Mgazul Date: Thu, 31 Oct 2024 02:59:11 +0800 Subject: [PATCH] Fix BlockCanBuildEvent --- .../banner/mixin/world/item/MixinStandingAndWallBlockItem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/mohistmc/banner/mixin/world/item/MixinStandingAndWallBlockItem.java b/src/main/java/com/mohistmc/banner/mixin/world/item/MixinStandingAndWallBlockItem.java index 9cce8f062..e1976abfe 100644 --- a/src/main/java/com/mohistmc/banner/mixin/world/item/MixinStandingAndWallBlockItem.java +++ b/src/main/java/com/mohistmc/banner/mixin/world/item/MixinStandingAndWallBlockItem.java @@ -60,7 +60,7 @@ protected BlockState getPlacementState(BlockPlaceContext context) { if (blockState2 != null) { boolean defaultReturn = levelReader.isUnobstructed(blockState2, blockPos, CollisionContext.empty()); org.bukkit.entity.Player player = (context.getPlayer() instanceof ServerPlayer) ? (org.bukkit.entity.Player) context.getPlayer().getBukkitEntity() : null; - BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(context.getLevel(), blockPos), player, CraftBlockData.fromData(blockState), defaultReturn); + BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(context.getLevel(), blockPos), player, CraftBlockData.fromData(blockState2), defaultReturn); context.getLevel().getCraftServer().getPluginManager().callEvent(event); return (event.isBuildable()) ? blockState2 : null; } else {