mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 19:39:22 +00:00
Added local click position to PlayerInteractEvent.
This commit is contained in:
1 parent
ecfb9accaa
commit
f1ad05dd8e
7 files changed
+65
-6
No files matched your search
@@ -0,0 +1,29 @@
|
||||
package net.minecraftforge.test;
|
||||
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
@Mod(modid="PlayerInteractEventLocalTest", name="PlayerInteractEventLocalTest", version="0.0.0")
|
||||
public class PlayerInteractEventLocalTest
|
||||
{
|
||||
|
||||
public static final boolean ENABLE = false;
|
||||
|
||||
@EventHandler
|
||||
public void init(FMLInitializationEvent event)
|
||||
{
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerInteract(PlayerInteractEvent event)
|
||||
{
|
||||
if(ENABLE && event.localPos != null) {
|
||||
System.out.println(event.localPos.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user