mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-25 06:24:43 +00:00
Fix RightClickBlock ALLOW not being implemented (#7426)
This commit is contained in:
1 parent
74a43877e4
commit
33880331d2
4 files changed
+55
-24
No files matched your search
@@ -783,6 +783,7 @@ public class ForgeHooks
|
||||
return evt;
|
||||
}
|
||||
|
||||
@Deprecated //Use RayTraceResult version. TODO: Remove 1.17
|
||||
public static PlayerInteractEvent.RightClickBlock onRightClickBlock(PlayerEntity player, Hand hand, BlockPos pos, Direction face)
|
||||
{
|
||||
PlayerInteractEvent.RightClickBlock evt = new PlayerInteractEvent.RightClickBlock(player, hand, pos, face);
|
||||
@@ -790,6 +791,13 @@ public class ForgeHooks
|
||||
return evt;
|
||||
}
|
||||
|
||||
public static PlayerInteractEvent.RightClickBlock onRightClickBlock(PlayerEntity player, Hand hand, BlockPos pos, BlockRayTraceResult hitVec)
|
||||
{
|
||||
PlayerInteractEvent.RightClickBlock evt = new PlayerInteractEvent.RightClickBlock(player, hand, pos, hitVec);
|
||||
MinecraftForge.EVENT_BUS.post(evt);
|
||||
return evt;
|
||||
}
|
||||
|
||||
public static void onEmptyClick(PlayerEntity player, Hand hand)
|
||||
{
|
||||
MinecraftForge.EVENT_BUS.post(new PlayerInteractEvent.RightClickEmpty(player, hand));
|
||||
|
||||
Reference in new issue
Block a user