Implemented local NPC event scripts.

This commit is contained in:
Luis C.M committed 2023-03-16 04:27:19 -05:00
1 parent 46d668f44c
commit 29935a1c6d
17 files changed
+339 -225

No files matched your search

@@ -1,6 +1,5 @@
package noppes.npcs.client.gui.script;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import noppes.npcs.CustomItems;
@@ -11,7 +10,19 @@ import noppes.npcs.scripted.item.ScriptCustomItem;
public class GuiScriptItem extends GuiScriptInterface {
private ScriptCustomItem item;
public GuiScriptItem(EntityPlayer player) {
public GuiScriptItem() {
hookList.add("init");
hookList.add("tick");
hookList.add("tossed");
hookList.add("pickedUp");
hookList.add("spawn");
hookList.add("interact");
hookList.add("attack");
hookList.add("startItem");
hookList.add("usingItem");
hookList.add("stopItem");
hookList.add("finishItem");
this.handler = this.item = new ScriptCustomItem(new ItemStack(CustomItems.scripted_item));
Client.sendData(EnumPacketServer.ScriptItemDataGet, new Object[0]);
}