mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 21:09:40 +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()){
|
||||
|
||||
@@ -75,22 +75,26 @@ public class GuiScriptInterface extends GuiNPCInterface implements GuiYesNoCallb
|
||||
list.add("playerscript.interact");
|
||||
list.add("playerscript.damaged");
|
||||
list.add("playerscript.killed");
|
||||
list.add("playerscript.attack");
|
||||
list.add("playerscript.kills");
|
||||
list.add("playerscript.chat");
|
||||
list.add("playerscript.toss");
|
||||
list.add("playerscript.containeropen");
|
||||
list.add("playerscript.containerclosed");
|
||||
list.add("playerscript.drop");
|
||||
list.add("playerscript.containerOpen");
|
||||
list.add("playerscript.login");
|
||||
list.add("playerscript.logout");
|
||||
list.add("playerscript.chat");
|
||||
list.add("playerscript.damagedentity");
|
||||
list.add("playerscript.factionupdate");
|
||||
list.add("playerscript.keyPressed");
|
||||
list.add("playerscript.levelup");
|
||||
list.add("playerscript.pickup");
|
||||
list.add("playerscript.rangedlaunched");
|
||||
//list.add("playerscript.break");
|
||||
list.add("playerscript.mouseClicked");
|
||||
list.add("playerscript.pickUp");
|
||||
list.add("playerscript.rangedLaunched");
|
||||
list.add("playerscript.pickupXP");
|
||||
list.add("playerscript.timer");
|
||||
list.add("playerscript.startItem");
|
||||
list.add("playerscript.usingItem");
|
||||
list.add("playerscript.stopItem");
|
||||
list.add("playerscript.finishItem");
|
||||
list.add("playerscript.fall");
|
||||
list.add("playerscript.break");
|
||||
|
||||
top.active = true;
|
||||
if(this.activeTab > 0) {
|
||||
|
||||
Reference in new issue
Block a user