mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 08:24:46 +00:00
Implemented several more events for players, including a click event, key event, fall event, and the basic entity living hurt, killed, and kills events, among others.
This commit is contained in:
1 parent
6c8c7671b8
commit
6752f8baec
38 files changed
+763
-249
No files matched your search
@@ -15,6 +15,7 @@ import cpw.mods.fml.common.gameevent.InputEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
public class ClientTickHandler{
|
||||
private World prevWorld;
|
||||
@@ -44,6 +45,15 @@ public class ClientTickHandler{
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onMouse(InputEvent.MouseInputEvent event){
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
if(mc.currentScreen != null || (Mouse.getEventButton() == -1 && Mouse.getDWheel() == 0))
|
||||
return;
|
||||
|
||||
NoppesUtilPlayer.sendData(EnumPlayerPacket.MouseClicked, new Object[]{Mouse.getEventButton(),Mouse.getEventDWheel()});
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onKey(InputEvent.KeyInputEvent event){
|
||||
if(ClientProxy.QuestLog.isPressed()){
|
||||
|
||||
Reference in new issue
Block a user