Added IDialogImage, a scripted object which is used by IDialog. Used to add dialog images.

IDialog:
-Added several new functions for dialogs' new visual attributes, as well as a way to add, get, create, remove, and clear dialog images.

Global NPC events:
-Added fields and variables from the old ScriptEvent events, in preparation to replace the old events with NpcEvent instances on local NPC scripts.
-Fixed issue where some event hooks would run on remote worlds.

Global NPC killed event:
-Added droppedItems and expDropped fields.

IWorld and NpcAPI:
-Now always uses a non-remove WorldServer object to create ScriptWorld objects and add them to the world cache.
This commit is contained in:
Luis C.M committed 2022-06-10 17:25:58 -05:00
1 parent 486e37cd7f
commit 8f16e6b20f
17 files changed
+710 -128

No files matched your search

@@ -29,6 +29,7 @@ import noppes.npcs.scripted.ScriptBlockPos;
import noppes.npcs.scripted.ScriptWorld;
import noppes.npcs.scripted.constants.EntityType;
import noppes.npcs.scripted.interfaces.IParticle;
import noppes.npcs.scripted.interfaces.IWorld;
import noppes.npcs.scripted.interfaces.entity.IEntity;
import noppes.npcs.scripted.interfaces.INbt;
import noppes.npcs.scripted.interfaces.IPos;
@@ -755,7 +756,7 @@ public class ScriptEntity<T extends Entity> implements IEntity {
}
}
public ScriptWorld getWorld() {
return (ScriptWorld) NpcAPI.Instance().getIWorld((WorldServer) entity.worldObj);
public IWorld getWorld() {
return NpcAPI.Instance().getIWorld(entity.worldObj);
}
}