API Changes:

-Implemented interfaces for all jobs & roles.

ScriptPlayer:
-Added getData() function, which returns player data objects.

IPlayerData: New class that holds all player data for modification.
-Holds dialog, bank, quest, transport, faction, item giver, and mail data.
-Also holds companion data, with functions has/set/getCompanion, and a getCompanionID function to differentiate companions.
This commit is contained in:
Luis C.M committed 2022-06-12 01:26:23 -05:00
1 parent 587f63396f
commit 63a1525ee2
66 files changed
+1418 -207

No files matched your search

@@ -1,9 +1,6 @@
package noppes.npcs.scripted;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.*;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
@@ -181,6 +178,15 @@ public class ScriptWorld implements IWorld {
return world.countEntities(entity.getMCEntity().getClass());
}
public IEntity[] getLoadedEntities() {
ArrayList<IEntity> list = new ArrayList<>();
for (Object obj : world.loadedEntityList) {
list.add(NpcAPI.Instance().getIEntity((Entity) obj));
}
return list.toArray(new IEntity[0]);
}
public void setTileEntity(int x, int y, int z, ITileEntity tileEntity){
world.setTileEntity(x,y,z,tileEntity.getMCTileEntity());
}