Several bugfixes for PlayerInteractEvent (#2943)

* Don't change Result if setCanceled(false) called

* Fix RightClickEmpty firing even when targeting a block or entity

* Add a left click empty event

* Move hook point for EntityInteractSpecific to the right place

* Fix LeftClickBlock not firing clientside in creative, and clarify docs about creative
This commit is contained in:
Vincent Lee authored and LexManos committed 2016-06-03 18:52:01 -07:00
1 parent 92914f82ae
commit 35cd9fe212
4 files changed
+66 -15

No files matched your search

@@ -987,6 +987,11 @@ public class ForgeHooks
MinecraftForge.EVENT_BUS.post(new PlayerInteractEvent.RightClickEmpty(player, hand));
}
public static void onEmptyLeftClick(EntityPlayer player, ItemStack stack)
{
MinecraftForge.EVENT_BUS.post(new PlayerInteractEvent.LeftClickEmpty(player, stack));
}
private static ThreadLocal<Deque<LootTableContext>> lootContext = new ThreadLocal<Deque<LootTableContext>>();
private static LootTableContext getLootTableContext()
{