Fix RightClickBlock ALLOW not being implemented (#7426)

This commit is contained in:
Brennan Ward authored and GitHub committed 2020-12-28 11:54:30 -08:00
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));