mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 10:49:07 +00:00
Removed many unnecessary/redundant backported files. Focused only on classes that make events work.
This commit is contained in:
1 parent
5a1c4757cf
commit
8b6e84a8d4
66 files changed
+317
-2714
No files matched your search
@@ -11,11 +11,7 @@ import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import noppes.npcs.scripted.IWorld;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.entity.IEntity;
|
||||
import noppes.npcs.scripted.entity.IEntityItem;
|
||||
import noppes.npcs.scripted.entity.IProjectile;
|
||||
import noppes.npcs.controllers.data.PlayerScriptData;
|
||||
import noppes.npcs.scripted.event.PlayerEvent.AttackEvent;
|
||||
import noppes.npcs.scripted.event.PlayerEvent.ChatEvent;
|
||||
import noppes.npcs.scripted.event.PlayerEvent.ContainerClosed;
|
||||
|
||||
@@ -26,6 +26,7 @@ import noppes.npcs.NBTTags;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import noppes.npcs.constants.EnumScriptType;
|
||||
import noppes.npcs.controllers.IScriptHandler;
|
||||
import noppes.npcs.controllers.ScriptController;
|
||||
import noppes.npcs.scripted.constants.*;
|
||||
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import noppes.npcs.constants.EnumScriptType;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
|
||||
public interface IScriptHandler {
|
||||
void runScript(EnumScriptType var1, Event var2);
|
||||
|
||||
boolean isClient();
|
||||
|
||||
boolean getEnabled();
|
||||
|
||||
void setEnabled(boolean var1);
|
||||
|
||||
String getLanguage();
|
||||
|
||||
void setLanguage(String var1);
|
||||
|
||||
List<EventScriptContainer> getScripts();
|
||||
|
||||
String noticeString();
|
||||
|
||||
Map<Long, String> getConsoleText();
|
||||
|
||||
void clearConsole();
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagDouble;
|
||||
import net.minecraft.nbt.NBTTagInt;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
import noppes.npcs.controllers.IScriptHandler;
|
||||
|
||||
public class NBTTags {
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ package noppes.npcs.controllers;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import noppes.npcs.EventScriptContainer;
|
||||
import noppes.npcs.constants.EnumScriptType;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
|
||||
public interface IScriptHandler {
|
||||
void runScript(EnumScriptType var1, Event var2);
|
||||
@@ -24,7 +24,7 @@ public interface IScriptHandler {
|
||||
|
||||
void setLanguage(String var1);
|
||||
|
||||
List<ScriptContainer> getScripts();
|
||||
List<EventScriptContainer> getScripts();
|
||||
|
||||
String noticeString();
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.monster.EntityMob;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
import net.minecraft.entity.passive.EntityTameable;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
@@ -27,6 +28,7 @@ import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraftforge.event.world.WorldEvent;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.LogWriter;
|
||||
import noppes.npcs.controllers.data.PlayerScriptData;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.scripted.ScriptAnimal;
|
||||
import noppes.npcs.scripted.ScriptEntity;
|
||||
@@ -36,6 +38,7 @@ import noppes.npcs.scripted.ScriptMonster;
|
||||
import noppes.npcs.scripted.ScriptPixelmon;
|
||||
import noppes.npcs.scripted.ScriptPlayer;
|
||||
import noppes.npcs.scripted.ScriptWorld;
|
||||
import noppes.npcs.util.JsonException;
|
||||
import noppes.npcs.util.NBTJsonUtil;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
@@ -49,10 +52,13 @@ public class ScriptController {
|
||||
public long lastLoaded = 0;
|
||||
public File dir;
|
||||
public NBTTagCompound compound = new NBTTagCompound();
|
||||
|
||||
|
||||
private boolean loaded = false;
|
||||
public boolean shouldSave = false;
|
||||
|
||||
|
||||
public PlayerScriptData playerScripts = new PlayerScriptData((EntityPlayer)null);
|
||||
public long lastPlayerUpdate = 0L;
|
||||
|
||||
public ScriptController(){
|
||||
loaded = false;
|
||||
Instance = this;
|
||||
@@ -68,6 +74,42 @@ public class ScriptController {
|
||||
}
|
||||
}
|
||||
|
||||
private File playerScriptsFile() {
|
||||
return new File(this.dir, "player_scripts.json");
|
||||
}
|
||||
|
||||
public boolean loadPlayerScripts() {
|
||||
this.playerScripts.clear();
|
||||
File file = this.playerScriptsFile();
|
||||
|
||||
try {
|
||||
if(!file.exists()) {
|
||||
return false;
|
||||
} else {
|
||||
this.playerScripts.readFromNBT(NBTJsonUtil.LoadFile(file));
|
||||
return true;
|
||||
}
|
||||
} catch (Exception var3) {
|
||||
LogWriter.error("Error loading: " + file.getAbsolutePath(), var3);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void setPlayerScripts(NBTTagCompound compound) {
|
||||
this.playerScripts.readFromNBT(compound);
|
||||
File file = this.playerScriptsFile();
|
||||
|
||||
try {
|
||||
NBTJsonUtil.SaveFile(file, compound);
|
||||
this.lastPlayerUpdate = System.currentTimeMillis();
|
||||
} catch (IOException var4) {
|
||||
var4.printStackTrace();
|
||||
} catch (JsonException var5) {
|
||||
var5.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void loadCategories(){
|
||||
dir = new File(CustomNpcs.getWorldSaveDirectory(), "scripts");
|
||||
if(!dir.exists())
|
||||
|
||||
@@ -17,19 +17,18 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import noppes.npcs.EventHooks;
|
||||
import noppes.npcs.EventScriptContainer;
|
||||
import noppes.npcs.NBTTags;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.entity.IPlayer;
|
||||
import noppes.npcs.scripted.ScriptPlayer;
|
||||
import noppes.npcs.constants.EnumScriptType;
|
||||
import noppes.npcs.controllers.IScriptHandler;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
import noppes.npcs.controllers.ScriptController;
|
||||
|
||||
public class PlayerScriptData implements IScriptHandler {
|
||||
private List<ScriptContainer> scripts = new ArrayList();
|
||||
private List<EventScriptContainer> scripts = new ArrayList();
|
||||
private String scriptLanguage = "ECMAScript";
|
||||
private EntityPlayer player;
|
||||
private IPlayer playerAPI;
|
||||
private ScriptPlayer playerAPI;
|
||||
private long lastPlayerUpdate = 0L;
|
||||
public long lastInited = -1L;
|
||||
public boolean hadInteract = true;
|
||||
@@ -48,23 +47,23 @@ public class PlayerScriptData implements IScriptHandler {
|
||||
}
|
||||
|
||||
public void readFromNBT(NBTTagCompound compound) {
|
||||
this.scripts = NBTTags.GetScript(compound.func_150295_c("Scripts", 10), this);
|
||||
this.scriptLanguage = compound.func_74779_i("ScriptLanguage");
|
||||
this.enabled = compound.func_74767_n("ScriptEnabled");
|
||||
console = NBTTags.GetLongStringMap(compound.func_150295_c("ScriptConsole", 10));
|
||||
this.scripts = NBTTags.GetScript(compound.getTagList("Scripts", 10), this);
|
||||
this.scriptLanguage = compound.getString("ScriptLanguage");
|
||||
this.enabled = compound.getBoolean("ScriptEnabled");
|
||||
console = NBTTags.GetLongStringMap(compound.getTagList("ScriptConsole", 10));
|
||||
}
|
||||
|
||||
public NBTTagCompound writeToNBT(NBTTagCompound compound) {
|
||||
compound.func_74782_a("Scripts", NBTTags.NBTScript(this.scripts));
|
||||
compound.func_74778_a("ScriptLanguage", this.scriptLanguage);
|
||||
compound.func_74757_a("ScriptEnabled", this.enabled);
|
||||
compound.func_74782_a("ScriptConsole", NBTTags.NBTLongStringMap(console));
|
||||
compound.setTag("Scripts", NBTTags.NBTScript(this.scripts));
|
||||
compound.setString("ScriptLanguage", this.scriptLanguage);
|
||||
compound.setBoolean("ScriptEnabled", this.enabled);
|
||||
compound.setTag("ScriptConsole", NBTTags.NBTLongStringMap(console));
|
||||
return compound;
|
||||
}
|
||||
|
||||
public void runScript(EnumScriptType type, Event event) {
|
||||
if(this.isEnabled()) {
|
||||
ScriptContainer script;
|
||||
EventScriptContainer script;
|
||||
if(ScriptController.Instance.lastLoaded > this.lastInited || ScriptController.Instance.lastPlayerUpdate > this.lastPlayerUpdate) {
|
||||
this.lastInited = ScriptController.Instance.lastLoaded;
|
||||
errored.clear();
|
||||
@@ -73,8 +72,8 @@ public class PlayerScriptData implements IScriptHandler {
|
||||
Iterator i = ScriptController.Instance.playerScripts.scripts.iterator();
|
||||
|
||||
while(i.hasNext()) {
|
||||
script = (ScriptContainer)i.next();
|
||||
ScriptContainer s = new ScriptContainer(this);
|
||||
script = ( EventScriptContainer)i.next();
|
||||
EventScriptContainer s = new EventScriptContainer(this);
|
||||
s.readFromNBT(script.writeToNBT(new NBTTagCompound()));
|
||||
this.scripts.add(s);
|
||||
}
|
||||
@@ -87,7 +86,7 @@ public class PlayerScriptData implements IScriptHandler {
|
||||
}
|
||||
|
||||
for(int var7 = 0; var7 < this.scripts.size(); ++var7) {
|
||||
script = (ScriptContainer)this.scripts.get(var7);
|
||||
script = (EventScriptContainer)this.scripts.get(var7);
|
||||
if(!errored.contains(Integer.valueOf(var7))) {
|
||||
script.run(type, event);
|
||||
if(script.errored) {
|
||||
@@ -99,7 +98,7 @@ public class PlayerScriptData implements IScriptHandler {
|
||||
while(var8.hasNext()) {
|
||||
Entry entry = (Entry)var8.next();
|
||||
if(!console.containsKey(entry.getKey())) {
|
||||
console.put(entry.getKey(), " tab " + (var7 + 1) + ":\n" + (String)entry.getValue());
|
||||
console.put((Long)entry.getKey(), " tab " + (var7 + 1) + ":\n" + (String)entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,11 +110,11 @@ public class PlayerScriptData implements IScriptHandler {
|
||||
}
|
||||
|
||||
public boolean isEnabled() {
|
||||
return ScriptController.Instance.playerScripts.enabled && ScriptController.HasStart && (this.player == null || !this.player.field_70170_p.field_72995_K);
|
||||
return ScriptController.Instance.playerScripts.enabled && ScriptController.HasStart && (this.player == null || !this.player.worldObj.isRemote);
|
||||
}
|
||||
|
||||
public boolean isClient() {
|
||||
return !this.player.func_70613_aW();
|
||||
return this.player.isClientWorld();
|
||||
}
|
||||
|
||||
public boolean getEnabled() {
|
||||
@@ -134,7 +133,7 @@ public class PlayerScriptData implements IScriptHandler {
|
||||
this.scriptLanguage = lang;
|
||||
}
|
||||
|
||||
public List<ScriptContainer> getScripts() {
|
||||
public List<EventScriptContainer> getScripts() {
|
||||
return this.scripts;
|
||||
}
|
||||
|
||||
@@ -142,16 +141,15 @@ public class PlayerScriptData implements IScriptHandler {
|
||||
if(this.player == null) {
|
||||
return "Global script";
|
||||
} else {
|
||||
BlockPos pos = this.player.func_180425_c();
|
||||
return MoreObjects.toStringHelper(this.player).add("x", pos.func_177958_n()).add("y", pos.func_177956_o()).add("z", pos.func_177952_p()).toString();
|
||||
BlockPos pos = new BlockPos(this.player);
|
||||
return MoreObjects.toStringHelper(this.player).add("x", pos.getX()).add("y", pos.getY()).add("z", pos.getZ()).toString();
|
||||
}
|
||||
}
|
||||
|
||||
public IPlayer getPlayer() {
|
||||
public ScriptPlayer getPlayer() {
|
||||
if(this.playerAPI == null) {
|
||||
this.playerAPI = (IPlayer)NpcAPI.Instance().getIEntity(this.player);
|
||||
this.playerAPI = (ScriptPlayer) ScriptController.Instance.getScriptForEntity(this.player);
|
||||
}
|
||||
|
||||
return this.playerAPI;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.CommandException;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
//import net.minecraft.util.text.TextComponentTranslation;
|
||||
|
||||
public abstract class CommandNoppesBase extends CommandBase {
|
||||
public Map<String, Method> subcommands = new HashMap();
|
||||
|
||||
public CommandNoppesBase() {
|
||||
Method[] var1 = this.getClass().getDeclaredMethods();
|
||||
int var2 = var1.length;
|
||||
|
||||
for(int var3 = 0; var3 < var2; ++var3) {
|
||||
Method m = var1[var3];
|
||||
CommandNoppesBase.SubCommand sc = (CommandNoppesBase.SubCommand)m.getAnnotation(CommandNoppesBase.SubCommand.class);
|
||||
if(sc != null) {
|
||||
String name = sc.name();
|
||||
if(name.equals("")) {
|
||||
name = m.getName();
|
||||
}
|
||||
|
||||
this.subcommands.put(name.toLowerCase(), m);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void func_184881_a(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException {
|
||||
}
|
||||
|
||||
public String func_71518_a(ICommandSender sender) {
|
||||
return this.getDescription();
|
||||
}
|
||||
|
||||
public abstract String getDescription();
|
||||
|
||||
public String getUsage() {
|
||||
return "";
|
||||
}
|
||||
|
||||
public boolean runSubCommands() {
|
||||
return !this.subcommands.isEmpty();
|
||||
}
|
||||
|
||||
/*
|
||||
protected void sendMessage(ICommandSender sender, String message, Object... obs) {
|
||||
sender.func_145747_a(new TextComponentTranslation(message, obs));
|
||||
}
|
||||
*/
|
||||
|
||||
public void executeSub(MinecraftServer server, ICommandSender sender, String command, String[] args) throws CommandException {
|
||||
Method m = (Method)this.subcommands.get(command.toLowerCase());
|
||||
if(m == null) {
|
||||
throw new CommandException("Unknown subcommand " + command, new Object[0]);
|
||||
} else {
|
||||
CommandNoppesBase.SubCommand sc = (CommandNoppesBase.SubCommand)m.getAnnotation(CommandNoppesBase.SubCommand.class);
|
||||
if(!sender.canCommandSenderUseCommand(sc.permission(), "commands.noppes." + this.getCommandName().toLowerCase() + "." + command.toLowerCase())) {
|
||||
throw new CommandException("You are not allowed to use this command", new Object[0]);
|
||||
} else {
|
||||
this.canRun(server, sender, sc.usage(), args);
|
||||
|
||||
try {
|
||||
m.invoke(this, new Object[]{server, sender, args});
|
||||
} catch (Exception var8) {
|
||||
if(var8.getCause() instanceof CommandException) {
|
||||
throw (CommandException)var8.getCause();
|
||||
}
|
||||
|
||||
var8.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void canRun(MinecraftServer server, ICommandSender sender, String usage, String[] args) throws CommandException {
|
||||
String[] np = usage.split(" ");
|
||||
ArrayList required = new ArrayList();
|
||||
|
||||
for(int i = 0; i < np.length; ++i) {
|
||||
String command = np[i];
|
||||
if(command.startsWith("<")) {
|
||||
required.add(command);
|
||||
}
|
||||
|
||||
if(command.equals("<player>") && args.length > i) {
|
||||
CommandBase.getPlayer(sender, args[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if(args.length < required.size()) {
|
||||
throw new CommandException("Missing parameter: " + (String)required.get(args.length), new Object[0]);
|
||||
}
|
||||
}
|
||||
|
||||
public int func_82362_a() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.METHOD})
|
||||
public @interface SubCommand {
|
||||
String name() default "";
|
||||
|
||||
String usage() default "";
|
||||
|
||||
String desc();
|
||||
|
||||
int permission() default 4;
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted;
|
||||
|
||||
public class CustomNPCsException extends RuntimeException {
|
||||
public CustomNPCsException(String message, Object... obs) {
|
||||
super(String.format(message, obs));
|
||||
}
|
||||
|
||||
public CustomNPCsException(Exception ex, String message, Object... obs) {
|
||||
super(String.format(message, obs), ex);
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted;
|
||||
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import noppes.npcs.scripted.item.IItemStack;
|
||||
|
||||
public interface IContainer {
|
||||
int getSize();
|
||||
|
||||
IItemStack getSlot(int var1);
|
||||
|
||||
void setSlot(int var1, IItemStack var2);
|
||||
|
||||
IInventory getMCInventory();
|
||||
|
||||
Container getMCContainer();
|
||||
|
||||
int count(IItemStack var1, boolean var2, boolean var3);
|
||||
|
||||
IItemStack[] getItems();
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted;
|
||||
|
||||
import net.minecraft.util.DamageSource;
|
||||
import noppes.npcs.scripted.entity.IEntity;
|
||||
|
||||
public interface IDamageSource {
|
||||
String getType();
|
||||
|
||||
boolean isUnblockable();
|
||||
|
||||
boolean isProjectile();
|
||||
|
||||
IEntity getTrueSource();
|
||||
|
||||
IEntity getImmediateSource();
|
||||
|
||||
DamageSource getMCDamageSource();
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted;
|
||||
|
||||
public interface IDimension {
|
||||
int getId();
|
||||
|
||||
String getName();
|
||||
|
||||
String getSuffix();
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public interface INbt {
|
||||
void remove(String var1);
|
||||
|
||||
boolean has(String var1);
|
||||
|
||||
boolean getBoolean(String var1);
|
||||
|
||||
void setBoolean(String var1, boolean var2);
|
||||
|
||||
short getShort(String var1);
|
||||
|
||||
void setShort(String var1, short var2);
|
||||
|
||||
int getInteger(String var1);
|
||||
|
||||
void setInteger(String var1, int var2);
|
||||
|
||||
byte getByte(String var1);
|
||||
|
||||
void setByte(String var1, byte var2);
|
||||
|
||||
long getLong(String var1);
|
||||
|
||||
void setLong(String var1, long var2);
|
||||
|
||||
double getDouble(String var1);
|
||||
|
||||
void setDouble(String var1, double var2);
|
||||
|
||||
float getFloat(String var1);
|
||||
|
||||
void setFloat(String var1, float var2);
|
||||
|
||||
String getString(String var1);
|
||||
|
||||
void setString(String var1, String var2);
|
||||
|
||||
byte[] getByteArray(String var1);
|
||||
|
||||
void setByteArray(String var1, byte[] var2);
|
||||
|
||||
int[] getIntegerArray(String var1);
|
||||
|
||||
void setIntegerArray(String var1, int[] var2);
|
||||
|
||||
Object[] getList(String var1, int var2);
|
||||
|
||||
int getListType(String var1);
|
||||
|
||||
void setList(String var1, Object[] var2);
|
||||
|
||||
INbt getCompound(String var1);
|
||||
|
||||
void setCompound(String var1, INbt var2);
|
||||
|
||||
String[] getKeys();
|
||||
|
||||
int getType(String var1);
|
||||
|
||||
NBTTagCompound getMCNBT();
|
||||
|
||||
String toJsonString();
|
||||
|
||||
boolean isEqual(INbt var1);
|
||||
|
||||
void clear();
|
||||
|
||||
void merge(INbt var1);
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted;
|
||||
|
||||
import noppes.npcs.scripted.IScoreboardObjective;
|
||||
import noppes.npcs.scripted.IScoreboardTeam;
|
||||
|
||||
public interface IScoreboard {
|
||||
IScoreboardObjective[] getObjectives();
|
||||
|
||||
IScoreboardObjective getObjective(String var1);
|
||||
|
||||
boolean hasObjective(String var1);
|
||||
|
||||
void removeObjective(String var1);
|
||||
|
||||
IScoreboardObjective addObjective(String var1, String var2);
|
||||
|
||||
void setPlayerScore(String var1, String var2, int var3, String var4);
|
||||
|
||||
int getPlayerScore(String var1, String var2, String var3);
|
||||
|
||||
boolean hasPlayerObjective(String var1, String var2, String var3);
|
||||
|
||||
void deletePlayerScore(String var1, String var2, String var3);
|
||||
|
||||
IScoreboardTeam[] getTeams();
|
||||
|
||||
boolean hasTeam(String var1);
|
||||
|
||||
IScoreboardTeam addTeam(String var1);
|
||||
|
||||
IScoreboardTeam getTeam(String var1);
|
||||
|
||||
void removeTeam(String var1);
|
||||
|
||||
IScoreboardTeam getPlayerTeam(String var1);
|
||||
|
||||
void removePlayerTeam(String var1);
|
||||
|
||||
String[] getPlayerList();
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted;
|
||||
|
||||
import noppes.npcs.scripted.IScoreboardScore;
|
||||
|
||||
public interface IScoreboardObjective {
|
||||
String getName();
|
||||
|
||||
String getDisplayName();
|
||||
|
||||
void setDisplayName(String var1);
|
||||
|
||||
String getCriteria();
|
||||
|
||||
boolean isReadyOnly();
|
||||
|
||||
IScoreboardScore[] getScores();
|
||||
|
||||
IScoreboardScore getScore(String var1);
|
||||
|
||||
boolean hasScore(String var1);
|
||||
|
||||
IScoreboardScore createScore(String var1);
|
||||
|
||||
void removeScore(String var1);
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted;
|
||||
|
||||
public interface IScoreboardScore {
|
||||
int getValue();
|
||||
|
||||
void setValue(int var1);
|
||||
|
||||
String getPlayerName();
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted;
|
||||
|
||||
public interface IScoreboardTeam {
|
||||
String getName();
|
||||
|
||||
String getDisplayName();
|
||||
|
||||
void setDisplayName(String var1);
|
||||
|
||||
void addPlayer(String var1);
|
||||
|
||||
boolean hasPlayer(String var1);
|
||||
|
||||
void removePlayer(String var1);
|
||||
|
||||
String[] getPlayers();
|
||||
|
||||
void clearPlayers();
|
||||
|
||||
boolean getFriendlyFire();
|
||||
|
||||
void setFriendlyFire(boolean var1);
|
||||
|
||||
void setColor(String var1);
|
||||
|
||||
String getColor();
|
||||
|
||||
void setSeeInvisibleTeamPlayers(boolean var1);
|
||||
|
||||
boolean getSeeInvisibleTeamPlayers();
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted;
|
||||
|
||||
public interface ITimers {
|
||||
void start(int var1, int var2, boolean var3);
|
||||
|
||||
void forceStart(int var1, int var2, boolean var3);
|
||||
|
||||
boolean has(int var1);
|
||||
|
||||
boolean stop(int var1);
|
||||
|
||||
void reset(int var1);
|
||||
|
||||
void clear();
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import noppes.npcs.scripted.IDimension;
|
||||
import noppes.npcs.scripted.INbt;
|
||||
import noppes.npcs.scripted.IScoreboard;
|
||||
import noppes.npcs.scripted.entity.IEntity;
|
||||
import noppes.npcs.scripted.entity.IPlayer;
|
||||
import noppes.npcs.scripted.entity.data.IData;
|
||||
import noppes.npcs.scripted.item.IItemStack;
|
||||
|
||||
public interface IWorld {
|
||||
/** @deprecated */
|
||||
IEntity[] getNearbyEntities(int var1, int var2, int var3, int var4, int var5);
|
||||
|
||||
/** @deprecated */
|
||||
IEntity getClosestEntity(int var1, int var2, int var3, int var4, int var5);
|
||||
|
||||
IEntity[] getAllEntities(int var1);
|
||||
|
||||
long getTime();
|
||||
|
||||
void setTime(long var1);
|
||||
|
||||
long getTotalTime();
|
||||
|
||||
void setBlock(int var1, int var2, int var3, String var4, int var5);
|
||||
|
||||
void removeBlock(int var1, int var2, int var3);
|
||||
|
||||
float getLightValue(int var1, int var2, int var3);
|
||||
|
||||
IPlayer getPlayer(String var1);
|
||||
|
||||
boolean isDay();
|
||||
|
||||
boolean isRaining();
|
||||
|
||||
IDimension getDimension();
|
||||
|
||||
void setRaining(boolean var1);
|
||||
|
||||
void thunderStrike(double var1, double var3, double var5);
|
||||
|
||||
void spawnParticle(String var1, double var2, double var4, double var6, double var8, double var10, double var12, double var14, int var16);
|
||||
|
||||
void broadcast(String var1);
|
||||
|
||||
IScoreboard getScoreboard();
|
||||
|
||||
IData getTempdata();
|
||||
|
||||
IData getStoreddata();
|
||||
|
||||
IItemStack createItem(String var1, int var2, int var3);
|
||||
|
||||
IItemStack createItemFromNbt(INbt var1);
|
||||
|
||||
void explode(double var1, double var3, double var5, float var7, boolean var8, boolean var9);
|
||||
|
||||
IPlayer[] getAllPlayers();
|
||||
|
||||
String getBiomeName(int var1, int var2);
|
||||
|
||||
void spawnEntity(IEntity var1);
|
||||
|
||||
/** @deprecated */
|
||||
@Deprecated
|
||||
IEntity spawnClone(double var1, double var3, double var5, int var7, String var8);
|
||||
|
||||
/** @deprecated */
|
||||
@Deprecated
|
||||
IEntity getClone(int var1, String var2);
|
||||
|
||||
int getRedstonePower(int var1, int var2, int var3);
|
||||
|
||||
WorldServer getMCWorld();
|
||||
|
||||
BlockPos getMCBlockPos(int var1, int var2, int var3);
|
||||
|
||||
IEntity getEntity(String var1);
|
||||
|
||||
IEntity createEntityFromNBT(INbt var1);
|
||||
|
||||
IEntity createEntity(String var1);
|
||||
|
||||
String getName();
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.eventhandler.EventBus;
|
||||
import noppes.npcs.scripted.CommandNoppesBase;
|
||||
import noppes.npcs.scripted.IContainer;
|
||||
import noppes.npcs.scripted.IDamageSource;
|
||||
import noppes.npcs.scripted.INbt;
|
||||
import noppes.npcs.scripted.IWorld;
|
||||
import noppes.npcs.scripted.entity.ICustomNpc;
|
||||
import noppes.npcs.scripted.entity.IEntity;
|
||||
import noppes.npcs.scripted.entity.data.IPlayerMail;
|
||||
import noppes.npcs.scripted.gui.ICustomGui;
|
||||
import noppes.npcs.scripted.handler.ICloneHandler;
|
||||
import noppes.npcs.scripted.handler.IDialogHandler;
|
||||
import noppes.npcs.scripted.handler.IFactionHandler;
|
||||
import noppes.npcs.scripted.handler.IQuestHandler;
|
||||
import noppes.npcs.scripted.handler.IRecipeHandler;
|
||||
import noppes.npcs.scripted.item.IItemStack;
|
||||
|
||||
public abstract class NpcAPI {
|
||||
private static NpcAPI instance = null;
|
||||
|
||||
public NpcAPI() {
|
||||
}
|
||||
|
||||
public abstract ICustomNpc createNPC(World var1);
|
||||
|
||||
public abstract ICustomNpc spawnNPC(World var1, int var2, int var3, int var4);
|
||||
|
||||
public abstract IEntity getIEntity(Entity var1);
|
||||
|
||||
public abstract IContainer getIContainer(IInventory var1);
|
||||
|
||||
public abstract IContainer getIContainer(Container var1);
|
||||
|
||||
public abstract IItemStack getIItemStack(ItemStack var1);
|
||||
|
||||
public abstract IWorld getIWorld(WorldServer var1);
|
||||
|
||||
public abstract IWorld getIWorld(int var1);
|
||||
|
||||
public abstract IWorld[] getIWorlds();
|
||||
|
||||
public abstract INbt getINbt(NBTTagCompound var1);
|
||||
|
||||
public abstract IFactionHandler getFactions();
|
||||
|
||||
public abstract IRecipeHandler getRecipes();
|
||||
|
||||
public abstract IQuestHandler getQuests();
|
||||
|
||||
public abstract IDialogHandler getDialogs();
|
||||
|
||||
public abstract ICloneHandler getClones();
|
||||
|
||||
public abstract IDamageSource getIDamageSource(DamageSource var1);
|
||||
|
||||
public abstract INbt stringToNbt(String var1);
|
||||
|
||||
public abstract IPlayerMail createMail(String var1, String var2);
|
||||
|
||||
public abstract ICustomGui createCustomGui(int var1, int var2, int var3, boolean var4);
|
||||
|
||||
public abstract INbt getRawPlayerData(String var1);
|
||||
|
||||
public abstract EventBus events();
|
||||
|
||||
public abstract void registerCommand(CommandNoppesBase var1);
|
||||
|
||||
public abstract File getGlobalDir();
|
||||
|
||||
public abstract File getWorldDir();
|
||||
|
||||
public static boolean IsAvailable() {
|
||||
return Loader.isModLoaded("customnpcs");
|
||||
}
|
||||
|
||||
public static NpcAPI Instance() {
|
||||
if(instance != null) {
|
||||
return instance;
|
||||
} else if(!IsAvailable()) {
|
||||
return null;
|
||||
} else {
|
||||
try {
|
||||
Class e = Class.forName("noppes.npcs.api.wrapper.WrapperNpcAPI");
|
||||
instance = (NpcAPI)e.getMethod("Instance", new Class[0]).invoke((Object)null, new Object[0]);
|
||||
} catch (Exception var1) {
|
||||
var1.printStackTrace();
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void registerPermissionNode(String var1, int var2);
|
||||
|
||||
public abstract boolean hasPermissionNode(String var1);
|
||||
|
||||
public abstract String executeCommand(IWorld var1, String var2);
|
||||
|
||||
public abstract String getRandomName(int var1, int var2);
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.entity;
|
||||
|
||||
import net.minecraft.entity.EntityCreature;
|
||||
import noppes.npcs.scripted.ITimers;
|
||||
import noppes.npcs.scripted.entity.IEntityLiving;
|
||||
import noppes.npcs.scripted.entity.IEntityLivingBase;
|
||||
import noppes.npcs.scripted.entity.IPlayer;
|
||||
import noppes.npcs.scripted.entity.IProjectile;
|
||||
import noppes.npcs.scripted.entity.data.INPCAdvanced;
|
||||
import noppes.npcs.scripted.entity.data.INPCAi;
|
||||
import noppes.npcs.scripted.entity.data.INPCDisplay;
|
||||
import noppes.npcs.scripted.entity.data.INPCInventory;
|
||||
import noppes.npcs.scripted.entity.data.INPCJob;
|
||||
import noppes.npcs.scripted.entity.data.INPCRole;
|
||||
import noppes.npcs.scripted.entity.data.INPCStats;
|
||||
import noppes.npcs.scripted.handler.data.IDialog;
|
||||
import noppes.npcs.scripted.handler.data.IFaction;
|
||||
import noppes.npcs.scripted.item.IItemStack;
|
||||
|
||||
public interface ICustomNpc<T extends EntityCreature> extends IEntityLiving<T> {
|
||||
INPCDisplay getDisplay();
|
||||
|
||||
INPCInventory getInventory();
|
||||
|
||||
INPCStats getStats();
|
||||
|
||||
INPCAi getAi();
|
||||
|
||||
INPCAdvanced getAdvanced();
|
||||
|
||||
IFaction getFaction();
|
||||
|
||||
void setFaction(int var1);
|
||||
|
||||
INPCRole getRole();
|
||||
|
||||
INPCJob getJob();
|
||||
|
||||
ITimers getTimers();
|
||||
|
||||
int getHomeX();
|
||||
|
||||
int getHomeY();
|
||||
|
||||
int getHomeZ();
|
||||
|
||||
IEntityLivingBase getOwner();
|
||||
|
||||
void setHome(int var1, int var2, int var3);
|
||||
|
||||
void reset();
|
||||
|
||||
void say(String var1);
|
||||
|
||||
void sayTo(IPlayer var1, String var2);
|
||||
|
||||
IProjectile shootItem(IEntityLivingBase var1, IItemStack var2, int var3);
|
||||
|
||||
IProjectile shootItem(double var1, double var3, double var5, IItemStack var7, int var8);
|
||||
|
||||
void giveItem(IPlayer var1, IItemStack var2);
|
||||
|
||||
void setDialog(int var1, IDialog var2);
|
||||
|
||||
IDialog getDialog(int var1);
|
||||
|
||||
void updateClient();
|
||||
|
||||
String executeCommand(String var1);
|
||||
}
|
||||
@@ -1,150 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.entity;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import noppes.npcs.scripted.INbt;
|
||||
import noppes.npcs.scripted.IWorld;
|
||||
import noppes.npcs.scripted.entity.data.IData;
|
||||
import noppes.npcs.scripted.item.IItemStack;
|
||||
|
||||
public interface IEntity<T extends Entity> {
|
||||
double getX();
|
||||
|
||||
void setX(double var1);
|
||||
|
||||
double getY();
|
||||
|
||||
void setY(double var1);
|
||||
|
||||
double getZ();
|
||||
|
||||
void setZ(double var1);
|
||||
|
||||
int getBlockX();
|
||||
|
||||
int getBlockY();
|
||||
|
||||
int getBlockZ();
|
||||
|
||||
void setPosition(double var1, double var3, double var5);
|
||||
|
||||
void setRotation(float var1);
|
||||
|
||||
float getRotation();
|
||||
|
||||
float getHeight();
|
||||
|
||||
float getEyeHeight();
|
||||
|
||||
float getWidth();
|
||||
|
||||
void setPitch(float var1);
|
||||
|
||||
float getPitch();
|
||||
|
||||
IEntity getMount();
|
||||
|
||||
void setMount(IEntity var1);
|
||||
|
||||
IEntity[] getRiders();
|
||||
|
||||
IEntity[] getAllRiders();
|
||||
|
||||
void addRider(IEntity var1);
|
||||
|
||||
void clearRiders();
|
||||
|
||||
void knockback(int var1, float var2);
|
||||
|
||||
boolean isSneaking();
|
||||
|
||||
boolean isSprinting();
|
||||
|
||||
IEntityItem dropItem(IItemStack var1);
|
||||
|
||||
boolean inWater();
|
||||
|
||||
boolean inFire();
|
||||
|
||||
boolean inLava();
|
||||
|
||||
IData getTempdata();
|
||||
|
||||
IData getStoreddata();
|
||||
|
||||
INbt getNbt();
|
||||
|
||||
boolean isAlive();
|
||||
|
||||
long getAge();
|
||||
|
||||
void despawn();
|
||||
|
||||
void spawn();
|
||||
|
||||
void kill();
|
||||
|
||||
boolean isBurning();
|
||||
|
||||
void setBurning(int var1);
|
||||
|
||||
void extinguish();
|
||||
|
||||
IWorld getWorld();
|
||||
|
||||
String getTypeName();
|
||||
|
||||
int getType();
|
||||
|
||||
boolean typeOf(int var1);
|
||||
|
||||
T getMCEntity();
|
||||
|
||||
String getUUID();
|
||||
|
||||
String generateNewUUID();
|
||||
|
||||
void storeAsClone(int var1, String var2);
|
||||
|
||||
INbt getEntityNbt();
|
||||
|
||||
void setEntityNbt(INbt var1);
|
||||
|
||||
IEntity[] rayTraceEntities(double var1, boolean var3, boolean var4);
|
||||
|
||||
String[] getTags();
|
||||
|
||||
void addTag(String var1);
|
||||
|
||||
boolean hasTag(String var1);
|
||||
|
||||
void removeTag(String var1);
|
||||
|
||||
void playAnimation(int var1);
|
||||
|
||||
void damage(float var1);
|
||||
|
||||
double getMotionX();
|
||||
|
||||
double getMotionY();
|
||||
|
||||
double getMotionZ();
|
||||
|
||||
void setMotionX(double var1);
|
||||
|
||||
void setMotionY(double var1);
|
||||
|
||||
void setMotionZ(double var1);
|
||||
|
||||
String getName();
|
||||
|
||||
void setName(String var1);
|
||||
|
||||
boolean hasCustomName();
|
||||
|
||||
String getEntityName();
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.entity;
|
||||
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import noppes.npcs.scripted.entity.IEntity;
|
||||
import noppes.npcs.scripted.item.IItemStack;
|
||||
|
||||
public interface IEntityItem<T extends EntityItem> extends IEntity<T> {
|
||||
String getOwner();
|
||||
|
||||
void setOwner(String var1);
|
||||
|
||||
int getPickupDelay();
|
||||
|
||||
void setPickupDelay(int var1);
|
||||
|
||||
long getAge();
|
||||
|
||||
void setAge(long var1);
|
||||
|
||||
int getLifeSpawn();
|
||||
|
||||
void setLifeSpawn(int var1);
|
||||
|
||||
IItemStack getItem();
|
||||
|
||||
void setItem(IItemStack var1);
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.entity;
|
||||
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import noppes.npcs.scripted.entity.IEntityLivingBase;
|
||||
|
||||
public interface IEntityLiving<T extends EntityLiving> extends IEntityLivingBase<T> {
|
||||
boolean isNavigating();
|
||||
|
||||
void clearNavigation();
|
||||
|
||||
void navigateTo(double var1, double var3, double var5, double var7);
|
||||
|
||||
void jump();
|
||||
|
||||
T getMCEntity();
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.entity;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import noppes.npcs.scripted.entity.IEntity;
|
||||
import noppes.npcs.scripted.item.IItemStack;
|
||||
|
||||
public interface IEntityLivingBase<T extends EntityLivingBase> extends IEntity<T> {
|
||||
float getHealth();
|
||||
|
||||
void setHealth(float var1);
|
||||
|
||||
float getMaxHealth();
|
||||
|
||||
void setMaxHealth(float var1);
|
||||
|
||||
boolean isAttacking();
|
||||
|
||||
void setAttackTarget(IEntityLivingBase var1);
|
||||
|
||||
IEntityLivingBase getAttackTarget();
|
||||
|
||||
IEntityLivingBase getLastAttacked();
|
||||
|
||||
int getLastAttackedTime();
|
||||
|
||||
boolean canSeeEntity(IEntity var1);
|
||||
|
||||
void swingMainhand();
|
||||
|
||||
void swingOffhand();
|
||||
|
||||
IItemStack getMainhandItem();
|
||||
|
||||
void setMainhandItem(IItemStack var1);
|
||||
|
||||
IItemStack getOffhandItem();
|
||||
|
||||
void setOffhandItem(IItemStack var1);
|
||||
|
||||
IItemStack getArmor(int var1);
|
||||
|
||||
void setArmor(int var1, IItemStack var2);
|
||||
|
||||
void addPotionEffect(int var1, int var2, int var3, boolean var4);
|
||||
|
||||
void clearPotionEffects();
|
||||
|
||||
int getPotionEffect(int var1);
|
||||
|
||||
boolean isChild();
|
||||
|
||||
T getMCEntity();
|
||||
|
||||
float getMoveForward();
|
||||
|
||||
void setMoveForward(float var1);
|
||||
|
||||
float getMoveStrafing();
|
||||
|
||||
void setMoveStrafing(float var1);
|
||||
|
||||
float getMoveVertical();
|
||||
|
||||
void setMoveVertical(float var1);
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.entity;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import noppes.npcs.scripted.IContainer;
|
||||
import noppes.npcs.scripted.ITimers;
|
||||
import noppes.npcs.scripted.entity.data.IPlayerMail;
|
||||
import noppes.npcs.scripted.gui.ICustomGui;
|
||||
import noppes.npcs.scripted.handler.data.IQuest;
|
||||
import noppes.npcs.scripted.item.IItemStack;
|
||||
|
||||
public interface IPlayer<T extends EntityPlayerMP> extends IEntityLivingBase<T> {
|
||||
String getDisplayName();
|
||||
|
||||
boolean hasFinishedQuest(int var1);
|
||||
|
||||
boolean hasActiveQuest(int var1);
|
||||
|
||||
void startQuest(int var1);
|
||||
|
||||
int factionStatus(int var1);
|
||||
|
||||
void finishQuest(int var1);
|
||||
|
||||
void stopQuest(int var1);
|
||||
|
||||
void removeQuest(int var1);
|
||||
|
||||
boolean hasReadDialog(int var1);
|
||||
|
||||
void showDialog(int var1, String var2);
|
||||
|
||||
void removeDialog(int var1);
|
||||
|
||||
void addDialog(int var1);
|
||||
|
||||
void addFactionPoints(int var1, int var2);
|
||||
|
||||
int getFactionPoints(int var1);
|
||||
|
||||
void message(String var1);
|
||||
|
||||
int getGamemode();
|
||||
|
||||
void setGamemode(int var1);
|
||||
|
||||
/** @deprecated */
|
||||
int inventoryItemCount(IItemStack var1);
|
||||
|
||||
/** @deprecated */
|
||||
int inventoryItemCount(String var1, int var2);
|
||||
|
||||
IContainer getInventory();
|
||||
|
||||
boolean removeItem(IItemStack var1, int var2);
|
||||
|
||||
boolean removeItem(String var1, int var2, int var3);
|
||||
|
||||
void removeAllItems(IItemStack var1);
|
||||
|
||||
boolean giveItem(IItemStack var1);
|
||||
|
||||
boolean giveItem(String var1, int var2, int var3);
|
||||
|
||||
void setSpawnpoint(int var1, int var2, int var3);
|
||||
|
||||
void resetSpawnpoint();
|
||||
|
||||
boolean hasAchievement(String var1);
|
||||
|
||||
int getExpLevel();
|
||||
|
||||
void setExpLevel(int var1);
|
||||
|
||||
boolean hasPermission(String var1);
|
||||
|
||||
Object getPixelmonData();
|
||||
|
||||
ITimers getTimers();
|
||||
|
||||
void closeGui();
|
||||
|
||||
T getMCEntity();
|
||||
|
||||
int getHunger();
|
||||
|
||||
void setHunger(int var1);
|
||||
|
||||
void kick(String var1);
|
||||
|
||||
void sendNotification(String var1, String var2, int var3);
|
||||
|
||||
void sendMail(IPlayerMail var1);
|
||||
|
||||
void clearData();
|
||||
|
||||
IQuest[] getActiveQuests();
|
||||
|
||||
IQuest[] getFinishedQuests();
|
||||
|
||||
void updatePlayerInventory();
|
||||
|
||||
void playSound(String var1, float var2, float var3);
|
||||
|
||||
/** @deprecated */
|
||||
IContainer showChestGui(int var1);
|
||||
|
||||
IContainer getOpenContainer();
|
||||
|
||||
boolean canQuestBeAccepted(int var1);
|
||||
|
||||
void showCustomGui(ICustomGui var1);
|
||||
|
||||
ICustomGui getCustomGui();
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.entity;
|
||||
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import noppes.npcs.scripted.entity.IEntity;
|
||||
import noppes.npcs.scripted.entity.IThrowable;
|
||||
import noppes.npcs.scripted.item.IItemStack;
|
||||
|
||||
public interface IProjectile<T extends EntityThrowable> extends IThrowable<T> {
|
||||
IItemStack getItem();
|
||||
|
||||
void setItem(IItemStack var1);
|
||||
|
||||
boolean getHasGravity();
|
||||
|
||||
void setHasGravity(boolean var1);
|
||||
|
||||
int getAccuracy();
|
||||
|
||||
void setAccuracy(int var1);
|
||||
|
||||
void setHeading(IEntity var1);
|
||||
|
||||
void setHeading(double var1, double var3, double var5);
|
||||
|
||||
void setHeading(float var1, float var2);
|
||||
|
||||
void enableEvents();
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.entity;
|
||||
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import noppes.npcs.scripted.entity.IEntity;
|
||||
|
||||
public interface IThrowable<T extends EntityThrowable> extends IEntity<T> {
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.entity.data;
|
||||
|
||||
public interface IData {
|
||||
void put(String var1, Object var2);
|
||||
|
||||
Object get(String var1);
|
||||
|
||||
void remove(String var1);
|
||||
|
||||
boolean has(String var1);
|
||||
|
||||
String[] getKeys();
|
||||
|
||||
void clear();
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.entity.data;
|
||||
|
||||
public interface INPCAdvanced {
|
||||
void setLine(int var1, int var2, String var3, String var4);
|
||||
|
||||
String getLine(int var1, int var2);
|
||||
|
||||
int getLineCount(int var1);
|
||||
|
||||
String getSound(int var1);
|
||||
|
||||
void setSound(int var1, String var2);
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.entity.data;
|
||||
|
||||
public interface INPCAi {
|
||||
int getAnimation();
|
||||
|
||||
void setAnimation(int var1);
|
||||
|
||||
int getCurrentAnimation();
|
||||
|
||||
void setReturnsHome(boolean var1);
|
||||
|
||||
boolean getReturnsHome();
|
||||
|
||||
int getRetaliateType();
|
||||
|
||||
void setRetaliateType(int var1);
|
||||
|
||||
int getMovingType();
|
||||
|
||||
void setMovingType(int var1);
|
||||
|
||||
int getNavigationType();
|
||||
|
||||
void setNavigationType(int var1);
|
||||
|
||||
int getStandingType();
|
||||
|
||||
void setStandingType(int var1);
|
||||
|
||||
boolean getAttackInvisible();
|
||||
|
||||
void setAttackInvisible(boolean var1);
|
||||
|
||||
int getWanderingRange();
|
||||
|
||||
void setWanderingRange(int var1);
|
||||
|
||||
boolean getInteractWithNPCs();
|
||||
|
||||
void setInteractWithNPCs(boolean var1);
|
||||
|
||||
boolean getStopOnInteract();
|
||||
|
||||
void setStopOnInteract(boolean var1);
|
||||
|
||||
int getWalkingSpeed();
|
||||
|
||||
void setWalkingSpeed(int var1);
|
||||
|
||||
int getMovingPathType();
|
||||
|
||||
boolean getMovingPathPauses();
|
||||
|
||||
void setMovingPathType(int var1, boolean var2);
|
||||
|
||||
int getDoorInteract();
|
||||
|
||||
void setDoorInteract(int var1);
|
||||
|
||||
boolean getCanSwim();
|
||||
|
||||
void setCanSwim(boolean var1);
|
||||
|
||||
int getSheltersFrom();
|
||||
|
||||
void setSheltersFrom(int var1);
|
||||
|
||||
boolean getAttackLOS();
|
||||
|
||||
void setAttackLOS(boolean var1);
|
||||
|
||||
boolean getAvoidsWater();
|
||||
|
||||
void setAvoidsWater(boolean var1);
|
||||
|
||||
boolean getLeapAtTarget();
|
||||
|
||||
void setLeapAtTarget(boolean var1);
|
||||
|
||||
int getTacticalType();
|
||||
|
||||
void setTacticalType(int var1);
|
||||
|
||||
int getTacticalRange();
|
||||
|
||||
void setTacticalRange(int var1);
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.entity.data;
|
||||
|
||||
public interface INPCDisplay {
|
||||
String getName();
|
||||
|
||||
void setName(String var1);
|
||||
|
||||
String getTitle();
|
||||
|
||||
void setTitle(String var1);
|
||||
|
||||
String getSkinUrl();
|
||||
|
||||
void setSkinUrl(String var1);
|
||||
|
||||
String getSkinPlayer();
|
||||
|
||||
void setSkinPlayer(String var1);
|
||||
|
||||
String getSkinTexture();
|
||||
|
||||
void setSkinTexture(String var1);
|
||||
|
||||
boolean getHasLivingAnimation();
|
||||
|
||||
void setHasLivingAnimation(boolean var1);
|
||||
|
||||
int getVisible();
|
||||
|
||||
void setVisible(int var1);
|
||||
|
||||
int getBossbar();
|
||||
|
||||
void setBossbar(int var1);
|
||||
|
||||
int getSize();
|
||||
|
||||
void setSize(int var1);
|
||||
|
||||
int getTint();
|
||||
|
||||
void setTint(int var1);
|
||||
|
||||
int getShowName();
|
||||
|
||||
void setShowName(int var1);
|
||||
|
||||
void setCapeTexture(String var1);
|
||||
|
||||
String getCapeTexture();
|
||||
|
||||
void setOverlayTexture(String var1);
|
||||
|
||||
String getOverlayTexture();
|
||||
|
||||
void setModelScale(int var1, float var2, float var3, float var4);
|
||||
|
||||
float[] getModelScale(int var1);
|
||||
|
||||
int getBossColor();
|
||||
|
||||
void setBossColor(int var1);
|
||||
|
||||
void setModel(String var1);
|
||||
|
||||
String getModel();
|
||||
|
||||
void setHasHitbox(boolean var1);
|
||||
|
||||
boolean getHasHitbox();
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.entity.data;
|
||||
|
||||
import noppes.npcs.scripted.item.IItemStack;
|
||||
|
||||
public interface INPCInventory {
|
||||
IItemStack getRightHand();
|
||||
|
||||
void setRightHand(IItemStack var1);
|
||||
|
||||
IItemStack getLeftHand();
|
||||
|
||||
void setLeftHand(IItemStack var1);
|
||||
|
||||
IItemStack getProjectile();
|
||||
|
||||
void setProjectile(IItemStack var1);
|
||||
|
||||
IItemStack getArmor(int var1);
|
||||
|
||||
void setArmor(int var1, IItemStack var2);
|
||||
|
||||
void setDropItem(int var1, IItemStack var2, int var3);
|
||||
|
||||
IItemStack getDropItem(int var1);
|
||||
|
||||
int getExpMin();
|
||||
|
||||
int getExpMax();
|
||||
|
||||
int getExpRNG();
|
||||
|
||||
void setExp(int var1, int var2);
|
||||
|
||||
IItemStack[] getItemsRNG();
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.entity.data;
|
||||
|
||||
public interface INPCJob {
|
||||
int getType();
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.entity.data;
|
||||
|
||||
public interface INPCMelee {
|
||||
int getStrength();
|
||||
|
||||
void setStrength(int var1);
|
||||
|
||||
int getDelay();
|
||||
|
||||
void setDelay(int var1);
|
||||
|
||||
int getRange();
|
||||
|
||||
void setRange(int var1);
|
||||
|
||||
int getKnockback();
|
||||
|
||||
void setKnockback(int var1);
|
||||
|
||||
int getEffectType();
|
||||
|
||||
int getEffectTime();
|
||||
|
||||
int getEffectStrength();
|
||||
|
||||
void setEffect(int var1, int var2, int var3);
|
||||
}
|
||||
@@ -1,108 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.entity.data;
|
||||
|
||||
public interface INPCRanged {
|
||||
int getStrength();
|
||||
|
||||
void setStrength(int var1);
|
||||
|
||||
int getSpeed();
|
||||
|
||||
void setSpeed(int var1);
|
||||
|
||||
int getBurst();
|
||||
|
||||
void setBurst(int var1);
|
||||
|
||||
int getBurstDelay();
|
||||
|
||||
void setBurstDelay(int var1);
|
||||
|
||||
int getKnockback();
|
||||
|
||||
void setKnockback(int var1);
|
||||
|
||||
int getSize();
|
||||
|
||||
void setSize(int var1);
|
||||
|
||||
boolean getRender3D();
|
||||
|
||||
void setRender3D(boolean var1);
|
||||
|
||||
boolean getSpins();
|
||||
|
||||
void setSpins(boolean var1);
|
||||
|
||||
boolean getSticks();
|
||||
|
||||
void setSticks(boolean var1);
|
||||
|
||||
boolean getHasGravity();
|
||||
|
||||
void setHasGravity(boolean var1);
|
||||
|
||||
boolean getAccelerate();
|
||||
|
||||
void setAccelerate(boolean var1);
|
||||
|
||||
int getExplodeSize();
|
||||
|
||||
void setExplodeSize(int var1);
|
||||
|
||||
int getEffectType();
|
||||
|
||||
int getEffectTime();
|
||||
|
||||
int getEffectStrength();
|
||||
|
||||
void setEffect(int var1, int var2, int var3);
|
||||
|
||||
boolean getGlows();
|
||||
|
||||
void setGlows(boolean var1);
|
||||
|
||||
int getParticle();
|
||||
|
||||
void setParticle(int var1);
|
||||
|
||||
String getSound(int var1);
|
||||
|
||||
void setSound(int var1, String var2);
|
||||
|
||||
int getShotCount();
|
||||
|
||||
void setShotCount(int var1);
|
||||
|
||||
boolean getHasAimAnimation();
|
||||
|
||||
void setHasAimAnimation(boolean var1);
|
||||
|
||||
int getAccuracy();
|
||||
|
||||
void setAccuracy(int var1);
|
||||
|
||||
int getRange();
|
||||
|
||||
void setRange(int var1);
|
||||
|
||||
int getDelayMin();
|
||||
|
||||
int getDelayMax();
|
||||
|
||||
int getDelayRNG();
|
||||
|
||||
void setDelay(int var1, int var2);
|
||||
|
||||
int getFireType();
|
||||
|
||||
void setFireType(int var1);
|
||||
|
||||
int getMeleeRange();
|
||||
|
||||
void setMeleeRange(int var1);
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.entity.data;
|
||||
|
||||
public interface INPCRole {
|
||||
int getType();
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.entity.data;
|
||||
|
||||
import noppes.npcs.scripted.entity.data.INPCMelee;
|
||||
import noppes.npcs.scripted.entity.data.INPCRanged;
|
||||
|
||||
public interface INPCStats {
|
||||
int getMaxHealth();
|
||||
|
||||
void setMaxHealth(int var1);
|
||||
|
||||
float getResistance(int var1);
|
||||
|
||||
void setResistance(int var1, float var2);
|
||||
|
||||
int getCombatRegen();
|
||||
|
||||
void setCombatRegen(int var1);
|
||||
|
||||
int getHealthRegen();
|
||||
|
||||
void setHealthRegen(int var1);
|
||||
|
||||
INPCMelee getMelee();
|
||||
|
||||
INPCRanged getRanged();
|
||||
|
||||
boolean getImmune(int var1);
|
||||
|
||||
void setImmune(int var1, boolean var2);
|
||||
|
||||
void setCreatureType(int var1);
|
||||
|
||||
int getCreatureType();
|
||||
|
||||
int getRespawnType();
|
||||
|
||||
void setRespawnType(int var1);
|
||||
|
||||
int getRespawnTime();
|
||||
|
||||
void setRespawnTime(int var1);
|
||||
|
||||
boolean getHideDeadBody();
|
||||
|
||||
void setHideDeadBody(boolean var1);
|
||||
|
||||
int getAggroRange();
|
||||
|
||||
void setAggroRange(int var1);
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.entity.data;
|
||||
|
||||
import noppes.npcs.scripted.IContainer;
|
||||
import noppes.npcs.scripted.handler.data.IQuest;
|
||||
|
||||
public interface IPlayerMail {
|
||||
String getSender();
|
||||
|
||||
void setSender(String var1);
|
||||
|
||||
String getSubject();
|
||||
|
||||
void setSubject(String var1);
|
||||
|
||||
String[] getText();
|
||||
|
||||
void setText(String[] var1);
|
||||
|
||||
IQuest getQuest();
|
||||
|
||||
void setQuest(int var1);
|
||||
|
||||
IContainer getContainer();
|
||||
}
|
||||
@@ -0,0 +1,244 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.event;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import noppes.npcs.scripted.IContainer;
|
||||
import noppes.npcs.scripted.IDamageSource;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.block.IBlock;
|
||||
import noppes.npcs.scripted.entity.IEntity;
|
||||
import noppes.npcs.scripted.entity.IEntityLivingBase;
|
||||
import noppes.npcs.scripted.entity.IPlayer;
|
||||
import noppes.npcs.scripted.event.CustomNPCsEvent;
|
||||
import noppes.npcs.scripted.handler.data.IFaction;
|
||||
import noppes.npcs.scripted.item.IItemStack;
|
||||
|
||||
public class PlayerEvent extends CustomNPCsEvent {
|
||||
public final IPlayer player;
|
||||
|
||||
public PlayerEvent(IPlayer player) {
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
public static class FactionUpdateEvent extends PlayerEvent {
|
||||
public final IFaction faction;
|
||||
public int points;
|
||||
public boolean init;
|
||||
|
||||
public FactionUpdateEvent(IPlayer player, IFaction faction, int points, boolean init) {
|
||||
super(player);
|
||||
this.faction = faction;
|
||||
this.points = points;
|
||||
this.init = init;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class ChatEvent extends PlayerEvent {
|
||||
public String message;
|
||||
|
||||
public ChatEvent(IPlayer player, String message) {
|
||||
super(player);
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
|
||||
public static class KeyPressedEvent extends PlayerEvent {
|
||||
public final int key;
|
||||
public final boolean isCtrlPressed;
|
||||
public final boolean isAltPressed;
|
||||
public final boolean isShiftPressed;
|
||||
public final boolean isMetaPressed;
|
||||
|
||||
public KeyPressedEvent(IPlayer player, int key, boolean isCtrlPressed, boolean isAltPressed, boolean isShiftPressed, boolean isMetaPressed) {
|
||||
super(player);
|
||||
this.key = key;
|
||||
this.isCtrlPressed = isCtrlPressed;
|
||||
this.isAltPressed = isAltPressed;
|
||||
this.isShiftPressed = isShiftPressed;
|
||||
this.isMetaPressed = isMetaPressed;
|
||||
}
|
||||
}
|
||||
|
||||
public static class LevelUpEvent extends PlayerEvent {
|
||||
public final int change;
|
||||
|
||||
public LevelUpEvent(IPlayer player, int change) {
|
||||
super(player);
|
||||
this.change = change;
|
||||
}
|
||||
}
|
||||
|
||||
public static class LogoutEvent extends PlayerEvent {
|
||||
public LogoutEvent(IPlayer player) {
|
||||
super(player);
|
||||
}
|
||||
}
|
||||
|
||||
public static class LoginEvent extends PlayerEvent {
|
||||
public LoginEvent(IPlayer player) {
|
||||
super(player);
|
||||
}
|
||||
}
|
||||
|
||||
public static class TimerEvent extends PlayerEvent {
|
||||
public final int id;
|
||||
|
||||
public TimerEvent(IPlayer player, int id) {
|
||||
super(player);
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class DamagedEvent extends PlayerEvent {
|
||||
public final IDamageSource damageSource;
|
||||
public final IEntity source;
|
||||
public float damage;
|
||||
public boolean clearTarget = false;
|
||||
|
||||
public DamagedEvent(IPlayer player, Entity source, float damage, DamageSource damagesource) {
|
||||
super(player);
|
||||
this.source = NpcAPI.Instance().getIEntity(source);
|
||||
this.damage = damage;
|
||||
this.damageSource = NpcAPI.Instance().getIDamageSource(damagesource);
|
||||
}
|
||||
}
|
||||
|
||||
public static class KilledEntityEvent extends PlayerEvent {
|
||||
public final IEntityLivingBase entity;
|
||||
|
||||
public KilledEntityEvent(IPlayer player, EntityLivingBase entity) {
|
||||
super(player);
|
||||
this.entity = (IEntityLivingBase)NpcAPI.Instance().getIEntity(entity);
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class DiedEvent extends PlayerEvent {
|
||||
public final IDamageSource damageSource;
|
||||
public final String type;
|
||||
public final IEntity source;
|
||||
|
||||
public DiedEvent(IPlayer player, DamageSource damagesource, Entity entity) {
|
||||
super(player);
|
||||
this.damageSource = NpcAPI.Instance().getIDamageSource(damagesource);
|
||||
this.type = damagesource.field_76373_n;
|
||||
this.source = NpcAPI.Instance().getIEntity(entity);
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class RangedLaunchedEvent extends PlayerEvent {
|
||||
public RangedLaunchedEvent(IPlayer player) {
|
||||
super(player);
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class DamagedEntityEvent extends PlayerEvent {
|
||||
public final IDamageSource damageSource;
|
||||
public final IEntity target;
|
||||
public float damage;
|
||||
|
||||
public DamagedEntityEvent(IPlayer player, Entity target, float damage, DamageSource damagesource) {
|
||||
super(player);
|
||||
this.target = NpcAPI.Instance().getIEntity(target);
|
||||
this.damage = damage;
|
||||
this.damageSource = NpcAPI.Instance().getIDamageSource(damagesource);
|
||||
}
|
||||
}
|
||||
|
||||
public static class ContainerClosed extends PlayerEvent {
|
||||
public final IContainer container;
|
||||
|
||||
public ContainerClosed(IPlayer player, IContainer container) {
|
||||
super(player);
|
||||
this.container = container;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ContainerOpen extends PlayerEvent {
|
||||
public final IContainer container;
|
||||
|
||||
public ContainerOpen(IPlayer player, IContainer container) {
|
||||
super(player);
|
||||
this.container = container;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class PickUpEvent extends PlayerEvent {
|
||||
public final IItemStack item;
|
||||
|
||||
public PickUpEvent(IPlayer player, IItemStack item) {
|
||||
super(player);
|
||||
this.item = item;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class TossEvent extends PlayerEvent {
|
||||
public final IItemStack item;
|
||||
|
||||
public TossEvent(IPlayer player, IItemStack item) {
|
||||
super(player);
|
||||
this.item = item;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class BreakEvent extends PlayerEvent {
|
||||
public final IBlock block;
|
||||
public int exp;
|
||||
|
||||
public BreakEvent(IPlayer player, IBlock block, int exp) {
|
||||
super(player);
|
||||
this.block = block;
|
||||
this.exp = exp;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class AttackEvent extends PlayerEvent {
|
||||
public final int type;
|
||||
public final Object target;
|
||||
|
||||
public AttackEvent(IPlayer player, int type, Object target) {
|
||||
super(player);
|
||||
this.type = type;
|
||||
this.target = target;
|
||||
}
|
||||
}
|
||||
|
||||
@Cancelable
|
||||
public static class InteractEvent extends PlayerEvent {
|
||||
public final int type;
|
||||
public final Object target;
|
||||
|
||||
public InteractEvent(IPlayer player, int type, Object target) {
|
||||
super(player);
|
||||
this.type = type;
|
||||
this.target = target;
|
||||
}
|
||||
}
|
||||
|
||||
public static class UpdateEvent extends PlayerEvent {
|
||||
public UpdateEvent(IPlayer player) {
|
||||
super(player);
|
||||
}
|
||||
}
|
||||
|
||||
public static class InitEvent extends PlayerEvent {
|
||||
public InitEvent(IPlayer player) {
|
||||
super(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.gui;
|
||||
|
||||
import noppes.npcs.scripted.gui.ICustomGuiComponent;
|
||||
|
||||
public interface IButton extends ICustomGuiComponent {
|
||||
int getWidth();
|
||||
|
||||
int getHeight();
|
||||
|
||||
IButton setSize(int var1, int var2);
|
||||
|
||||
String getLabel();
|
||||
|
||||
IButton setLabel(String var1);
|
||||
|
||||
String getTexture();
|
||||
|
||||
boolean hasTexture();
|
||||
|
||||
IButton setTexture(String var1);
|
||||
|
||||
int getTextureX();
|
||||
|
||||
int getTextureY();
|
||||
|
||||
IButton setTextureOffset(int var1, int var2);
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.gui;
|
||||
|
||||
import java.util.List;
|
||||
import noppes.npcs.scripted.entity.IPlayer;
|
||||
import noppes.npcs.scripted.gui.IButton;
|
||||
import noppes.npcs.scripted.gui.ICustomGuiComponent;
|
||||
import noppes.npcs.scripted.gui.IItemSlot;
|
||||
import noppes.npcs.scripted.gui.ILabel;
|
||||
import noppes.npcs.scripted.gui.IScroll;
|
||||
import noppes.npcs.scripted.gui.ITextField;
|
||||
import noppes.npcs.scripted.gui.ITexturedRect;
|
||||
import noppes.npcs.scripted.item.IItemStack;
|
||||
|
||||
public interface ICustomGui {
|
||||
int getID();
|
||||
|
||||
int getWidth();
|
||||
|
||||
int getHeight();
|
||||
|
||||
List<ICustomGuiComponent> getComponents();
|
||||
|
||||
List<IItemSlot> getSlots();
|
||||
|
||||
void setSize(int var1, int var2);
|
||||
|
||||
void setDoesPauseGame(boolean var1);
|
||||
|
||||
void setBackgroundTexture(String var1);
|
||||
|
||||
IButton addButton(int var1, String var2, int var3, int var4);
|
||||
|
||||
IButton addButton(int var1, String var2, int var3, int var4, int var5, int var6);
|
||||
|
||||
IButton addTexturedButton(int var1, String var2, int var3, int var4, int var5, int var6, String var7);
|
||||
|
||||
IButton addTexturedButton(int var1, String var2, int var3, int var4, int var5, int var6, String var7, int var8, int var9);
|
||||
|
||||
ILabel addLabel(int var1, String var2, int var3, int var4, int var5, int var6);
|
||||
|
||||
ILabel addLabel(int var1, String var2, int var3, int var4, int var5, int var6, int var7);
|
||||
|
||||
ITextField addTextField(int var1, int var2, int var3, int var4, int var5);
|
||||
|
||||
ITexturedRect addTexturedRect(int var1, String var2, int var3, int var4, int var5, int var6);
|
||||
|
||||
ITexturedRect addTexturedRect(int var1, String var2, int var3, int var4, int var5, int var6, int var7, int var8);
|
||||
|
||||
IScroll addScroll(int var1, int var2, int var3, int var4, int var5, String[] var6);
|
||||
|
||||
IItemSlot addItemSlot(int var1, int var2);
|
||||
|
||||
IItemSlot addItemSlot(int var1, int var2, IItemStack var3);
|
||||
|
||||
void showPlayerInventory(int var1, int var2);
|
||||
|
||||
ICustomGuiComponent getComponent(int var1);
|
||||
|
||||
void removeComponent(int var1);
|
||||
|
||||
void updateComponent(ICustomGuiComponent var1);
|
||||
|
||||
void update(IPlayer var1);
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.gui;
|
||||
|
||||
public interface ICustomGuiComponent {
|
||||
int getID();
|
||||
|
||||
ICustomGuiComponent setID(int var1);
|
||||
|
||||
int getPosX();
|
||||
|
||||
int getPosY();
|
||||
|
||||
ICustomGuiComponent setPos(int var1, int var2);
|
||||
|
||||
boolean hasHoverText();
|
||||
|
||||
String[] getHoverText();
|
||||
|
||||
ICustomGuiComponent setHoverText(String var1);
|
||||
|
||||
ICustomGuiComponent setHoverText(String[] var1);
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.gui;
|
||||
|
||||
import net.minecraft.inventory.Slot;
|
||||
import noppes.npcs.scripted.gui.ICustomGuiComponent;
|
||||
import noppes.npcs.scripted.item.IItemStack;
|
||||
|
||||
public interface IItemSlot extends ICustomGuiComponent {
|
||||
boolean hasStack();
|
||||
|
||||
IItemStack getStack();
|
||||
|
||||
IItemSlot setStack(IItemStack var1);
|
||||
|
||||
Slot getMCSlot();
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.gui;
|
||||
|
||||
import noppes.npcs.scripted.gui.ICustomGuiComponent;
|
||||
|
||||
public interface ILabel extends ICustomGuiComponent {
|
||||
String getText();
|
||||
|
||||
ILabel setText(String var1);
|
||||
|
||||
int getWidth();
|
||||
|
||||
int getHeight();
|
||||
|
||||
ILabel setSize(int var1, int var2);
|
||||
|
||||
int getColor();
|
||||
|
||||
ILabel setColor(int var1);
|
||||
|
||||
float getScale();
|
||||
|
||||
ILabel setScale(float var1);
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.gui;
|
||||
|
||||
import noppes.npcs.scripted.gui.ICustomGuiComponent;
|
||||
|
||||
public interface IScroll extends ICustomGuiComponent {
|
||||
int getWidth();
|
||||
|
||||
int getHeight();
|
||||
|
||||
IScroll setSize(int var1, int var2);
|
||||
|
||||
String[] getList();
|
||||
|
||||
IScroll setList(String[] var1);
|
||||
|
||||
int getDefaultSelection();
|
||||
|
||||
IScroll setDefaultSelection(int var1);
|
||||
|
||||
boolean isMultiSelect();
|
||||
|
||||
IScroll setMultiSelect(boolean var1);
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.gui;
|
||||
|
||||
import noppes.npcs.scripted.gui.ICustomGuiComponent;
|
||||
|
||||
public interface ITextField extends ICustomGuiComponent {
|
||||
int getWidth();
|
||||
|
||||
int getHeight();
|
||||
|
||||
ITextField setSize(int var1, int var2);
|
||||
|
||||
String getText();
|
||||
|
||||
ITextField setText(String var1);
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.gui;
|
||||
|
||||
import noppes.npcs.scripted.gui.ICustomGuiComponent;
|
||||
|
||||
public interface ITexturedRect extends ICustomGuiComponent {
|
||||
String getTexture();
|
||||
|
||||
ITexturedRect setTexture(String var1);
|
||||
|
||||
int getWidth();
|
||||
|
||||
int getHeight();
|
||||
|
||||
ITexturedRect setSize(int var1, int var2);
|
||||
|
||||
float getScale();
|
||||
|
||||
ITexturedRect setScale(float var1);
|
||||
|
||||
int getTextureX();
|
||||
|
||||
int getTextureY();
|
||||
|
||||
ITexturedRect setTextureOffset(int var1, int var2);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.handler;
|
||||
|
||||
import noppes.npcs.scripted.IWorld;
|
||||
import noppes.npcs.scripted.entity.IEntity;
|
||||
|
||||
public interface ICloneHandler {
|
||||
IEntity spawn(double var1, double var3, double var5, int var7, String var8, IWorld var9);
|
||||
|
||||
IEntity get(int var1, String var2, IWorld var3);
|
||||
|
||||
void set(int var1, String var2, IEntity var3);
|
||||
|
||||
void remove(int var1, String var2);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.handler;
|
||||
|
||||
import java.util.List;
|
||||
import noppes.npcs.scripted.handler.data.IFaction;
|
||||
|
||||
public interface IFactionHandler {
|
||||
List<IFaction> list();
|
||||
|
||||
IFaction delete(int var1);
|
||||
|
||||
IFaction create(String var1, int var2);
|
||||
|
||||
IFaction get(int var1);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.handler;
|
||||
|
||||
import java.util.List;
|
||||
import noppes.npcs.scripted.handler.data.IQuest;
|
||||
import noppes.npcs.scripted.handler.data.IQuestCategory;
|
||||
|
||||
public interface IQuestHandler {
|
||||
List<IQuestCategory> categories();
|
||||
|
||||
IQuest get(int var1);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.handler;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import noppes.npcs.scripted.handler.data.IRecipe;
|
||||
|
||||
public interface IRecipeHandler {
|
||||
List<IRecipe> getGlobalList();
|
||||
|
||||
List<IRecipe> getCarpentryList();
|
||||
|
||||
IRecipe addRecipe(String var1, boolean var2, ItemStack var3, Object... var4);
|
||||
|
||||
IRecipe addRecipe(String var1, boolean var2, ItemStack var3, int var4, int var5, ItemStack... var6);
|
||||
|
||||
IRecipe delete(int var1);
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.handler.data;
|
||||
|
||||
import noppes.npcs.scripted.entity.IPlayer;
|
||||
|
||||
public interface IAvailability {
|
||||
boolean isAvailable(IPlayer var1);
|
||||
|
||||
int getDaytime();
|
||||
|
||||
void setDaytime(int var1);
|
||||
|
||||
int getMinPlayerLevel();
|
||||
|
||||
void setMinPlayerLevel(int var1);
|
||||
|
||||
int getDialog(int var1);
|
||||
|
||||
void setDialog(int var1, int var2, int var3);
|
||||
|
||||
void removeDialog(int var1);
|
||||
|
||||
int getQuest(int var1);
|
||||
|
||||
void setQuest(int var1, int var2, int var3);
|
||||
|
||||
void removeQuest(int var1);
|
||||
|
||||
void setFaction(int var1, int var2, int var3, int var4);
|
||||
|
||||
void removeFaction(int var1);
|
||||
|
||||
void setScoreboard(int var1, String var2, int var3, int var4);
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.handler.data;
|
||||
|
||||
import java.util.List;
|
||||
import noppes.npcs.scripted.handler.data.IAvailability;
|
||||
import noppes.npcs.scripted.handler.data.IDialogCategory;
|
||||
import noppes.npcs.scripted.handler.data.IDialogOption;
|
||||
import noppes.npcs.scripted.handler.data.IQuest;
|
||||
|
||||
public interface IDialog {
|
||||
int getId();
|
||||
|
||||
String getName();
|
||||
|
||||
void setName(String var1);
|
||||
|
||||
String getText();
|
||||
|
||||
void setText(String var1);
|
||||
|
||||
IQuest getQuest();
|
||||
|
||||
void setQuest(IQuest var1);
|
||||
|
||||
String getCommand();
|
||||
|
||||
void setCommand(String var1);
|
||||
|
||||
List<IDialogOption> getOptions();
|
||||
|
||||
IDialogOption getOption(int var1);
|
||||
|
||||
IAvailability getAvailability();
|
||||
|
||||
IDialogCategory getCategory();
|
||||
|
||||
void save();
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.handler.data;
|
||||
|
||||
import java.util.List;
|
||||
import noppes.npcs.scripted.handler.data.IDialog;
|
||||
|
||||
public interface IDialogCategory {
|
||||
List<IDialog> dialogs();
|
||||
|
||||
String getName();
|
||||
|
||||
IDialog create();
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.handler;
|
||||
|
||||
import java.util.List;
|
||||
import noppes.npcs.scripted.handler.data.IDialog;
|
||||
import noppes.npcs.scripted.handler.data.IDialogCategory;
|
||||
|
||||
public interface IDialogHandler {
|
||||
List<IDialogCategory> categories();
|
||||
|
||||
IDialog get(int var1);
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.handler.data;
|
||||
|
||||
public interface IDialogOption {
|
||||
int getSlot();
|
||||
|
||||
String getName();
|
||||
|
||||
int getType();
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.handler.data;
|
||||
|
||||
import noppes.npcs.scripted.entity.ICustomNpc;
|
||||
import noppes.npcs.scripted.entity.IPlayer;
|
||||
|
||||
public interface IFaction {
|
||||
int getId();
|
||||
|
||||
String getName();
|
||||
|
||||
int getDefaultPoints();
|
||||
|
||||
void setDefaultPoints(int var1);
|
||||
|
||||
int getColor();
|
||||
|
||||
int playerStatus(IPlayer var1);
|
||||
|
||||
boolean hostileToNpc(ICustomNpc var1);
|
||||
|
||||
boolean hostileToFaction(int var1);
|
||||
|
||||
int[] getHostileList();
|
||||
|
||||
void addHostile(int var1);
|
||||
|
||||
void removeHostile(int var1);
|
||||
|
||||
boolean hasHostile(int var1);
|
||||
|
||||
boolean getIsHidden();
|
||||
|
||||
void setIsHidden(boolean var1);
|
||||
|
||||
boolean getAttackedByMobs();
|
||||
|
||||
void setAttackedByMobs(boolean var1);
|
||||
|
||||
void save();
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.handler.data;
|
||||
|
||||
import noppes.npcs.scripted.IContainer;
|
||||
import noppes.npcs.scripted.entity.IPlayer;
|
||||
|
||||
public interface IQuest {
|
||||
int getId();
|
||||
|
||||
String getName();
|
||||
|
||||
void setName(String var1);
|
||||
|
||||
int getType();
|
||||
|
||||
void setType(int var1);
|
||||
|
||||
String getLogText();
|
||||
|
||||
void setLogText(String var1);
|
||||
|
||||
String getCompleteText();
|
||||
|
||||
void setCompleteText(String var1);
|
||||
|
||||
IQuest getNextQuest();
|
||||
|
||||
void setNextQuest(IQuest var1);
|
||||
|
||||
IQuestObjective[] getObjectives(IPlayer var1);
|
||||
|
||||
IQuestCategory getCategory();
|
||||
|
||||
IContainer getRewards();
|
||||
|
||||
String getNpcName();
|
||||
|
||||
void setNpcName(String var1);
|
||||
|
||||
void save();
|
||||
|
||||
boolean getIsRepeatable();
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.handler.data;
|
||||
|
||||
import java.util.List;
|
||||
import noppes.npcs.scripted.handler.data.IQuest;
|
||||
|
||||
public interface IQuestCategory {
|
||||
List<IQuest> quests();
|
||||
|
||||
String getName();
|
||||
|
||||
IQuest create();
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.handler.data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IQuestHandler {
|
||||
List<IQuestCategory> categories();
|
||||
|
||||
IQuest get(int var1);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.handler.data;
|
||||
|
||||
public interface IQuestObjective {
|
||||
int getProgress();
|
||||
|
||||
void setProgress(int var1);
|
||||
|
||||
int getMaxProgress();
|
||||
|
||||
boolean isCompleted();
|
||||
|
||||
String getText();
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.handler.data;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IRecipe {
|
||||
String getName();
|
||||
|
||||
boolean isGlobal();
|
||||
|
||||
void setIsGlobal(boolean var1);
|
||||
|
||||
boolean getIgnoreNBT();
|
||||
|
||||
void setIgnoreNBT(boolean var1);
|
||||
|
||||
boolean getIgnoreDamage();
|
||||
|
||||
void setIgnoreDamage(boolean var1);
|
||||
|
||||
int getWidth();
|
||||
|
||||
int getHeight();
|
||||
|
||||
ItemStack getResult();
|
||||
|
||||
ItemStack[] getRecipe();
|
||||
|
||||
void saves(boolean var1);
|
||||
|
||||
boolean saves();
|
||||
|
||||
void save();
|
||||
|
||||
void delete();
|
||||
|
||||
int getId();
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.item;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import noppes.npcs.scripted.INbt;
|
||||
import noppes.npcs.scripted.entity.IEntityLiving;
|
||||
import noppes.npcs.scripted.entity.data.IData;
|
||||
|
||||
public interface IItemStack {
|
||||
int getStackSize();
|
||||
|
||||
void setStackSize(int var1);
|
||||
|
||||
int getMaxStackSize();
|
||||
|
||||
int getItemDamage();
|
||||
|
||||
void setItemDamage(int var1);
|
||||
|
||||
int getMaxItemDamage();
|
||||
|
||||
double getAttackDamage();
|
||||
|
||||
void damageItem(int var1, IEntityLiving var2);
|
||||
|
||||
void addEnchantment(String var1, int var2);
|
||||
|
||||
boolean isEnchanted();
|
||||
|
||||
boolean hasEnchant(String var1);
|
||||
|
||||
boolean removeEnchant(String var1);
|
||||
|
||||
/** @deprecated */
|
||||
boolean isBlock();
|
||||
|
||||
boolean isWearable();
|
||||
|
||||
boolean hasCustomName();
|
||||
|
||||
void setCustomName(String var1);
|
||||
|
||||
String getDisplayName();
|
||||
|
||||
String getItemName();
|
||||
|
||||
String getName();
|
||||
|
||||
/** @deprecated */
|
||||
boolean isBook();
|
||||
|
||||
IItemStack copy();
|
||||
|
||||
ItemStack getMCItemStack();
|
||||
|
||||
INbt getNbt();
|
||||
|
||||
boolean hasNbt();
|
||||
|
||||
void removeNbt();
|
||||
|
||||
INbt getItemNbt();
|
||||
|
||||
boolean isEmpty();
|
||||
|
||||
int getType();
|
||||
|
||||
String[] getLore();
|
||||
|
||||
void setLore(String[] var1);
|
||||
|
||||
/** @deprecated */
|
||||
void setAttribute(String var1, double var2);
|
||||
|
||||
void setAttribute(String var1, double var2, int var4);
|
||||
|
||||
double getAttribute(String var1);
|
||||
|
||||
boolean hasAttribute(String var1);
|
||||
|
||||
IData getTempdata();
|
||||
|
||||
IData getStoreddata();
|
||||
|
||||
int getFoodLevel();
|
||||
|
||||
boolean compare(IItemStack var1, boolean var2);
|
||||
}
|
||||
@@ -1,247 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.scripted.wrapper;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Map;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
import cpw.mods.fml.common.eventhandler.EventBus;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.scripted.CommandNoppesBase;
|
||||
import noppes.npcs.scripted.CustomNPCsException;
|
||||
import noppes.npcs.scripted.IContainer;
|
||||
import noppes.npcs.scripted.IDamageSource;
|
||||
import noppes.npcs.scripted.INbt;
|
||||
import noppes.npcs.scripted.IWorld;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.entity.ICustomNpc;
|
||||
import noppes.npcs.scripted.entity.IEntity;
|
||||
import noppes.npcs.scripted.entity.data.IPlayerMail;
|
||||
import noppes.npcs.scripted.gui.ICustomGui;
|
||||
import noppes.npcs.scripted.handler.ICloneHandler;
|
||||
import noppes.npcs.scripted.handler.IDialogHandler;
|
||||
import noppes.npcs.scripted.handler.IFactionHandler;
|
||||
import noppes.npcs.scripted.handler.IQuestHandler;
|
||||
import noppes.npcs.scripted.handler.IRecipeHandler;
|
||||
import noppes.npcs.scripted.item.IItemStack;
|
||||
import noppes.npcs.scripted.wrapper.ContainerWrapper;
|
||||
import noppes.npcs.scripted.wrapper.DamageSourceWrapper;
|
||||
import noppes.npcs.scripted.wrapper.ItemStackWrapper;
|
||||
import noppes.npcs.scripted.wrapper.NBTWrapper;
|
||||
import noppes.npcs.scripted.wrapper.WorldWrapper;
|
||||
import noppes.npcs.scripted.wrapper.WrapperEntityData;
|
||||
import noppes.npcs.scripted.wrapper.gui.CustomGuiWrapper;
|
||||
import noppes.npcs.containers.ContainerNpcInterface;
|
||||
import noppes.npcs.controllers.DialogController;
|
||||
import noppes.npcs.controllers.FactionController;
|
||||
import noppes.npcs.controllers.QuestController;
|
||||
import noppes.npcs.controllers.RecipeController;
|
||||
import noppes.npcs.controllers.ServerCloneController;
|
||||
import noppes.npcs.controllers.data.PlayerData;
|
||||
import noppes.npcs.controllers.data.PlayerMail;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.util.LRUHashMap;
|
||||
import noppes.npcs.util.NBTJsonUtil;
|
||||
import noppes.npcs.util.JsonException;
|
||||
|
||||
public class WrapperNpcAPI extends NpcAPI {
|
||||
private static final Map<Integer, WorldWrapper> worldCache = new LRUHashMap(10);
|
||||
public static final EventBus EVENT_BUS = new EventBus();
|
||||
private static NpcAPI instance = null;
|
||||
|
||||
public WrapperNpcAPI() {
|
||||
}
|
||||
|
||||
public static void clearCache() {
|
||||
worldCache.clear();
|
||||
}
|
||||
|
||||
public IEntity getIEntity(Entity entity) {
|
||||
return (IEntity)(entity != null && !entity.field_70170_p.field_72995_K?(entity instanceof EntityNPCInterface?((EntityNPCInterface)entity).wrappedNPC:WrapperEntityData.get(entity)):null);
|
||||
}
|
||||
|
||||
public ICustomNpc createNPC(World world) {
|
||||
if(world.field_72995_K) {
|
||||
return null;
|
||||
} else {
|
||||
EntityCustomNpc npc = new EntityCustomNpc(world);
|
||||
return npc.wrappedNPC;
|
||||
}
|
||||
}
|
||||
|
||||
public ICustomNpc spawnNPC(World world, int x, int y, int z) {
|
||||
if(world.field_72995_K) {
|
||||
return null;
|
||||
} else {
|
||||
EntityCustomNpc npc = new EntityCustomNpc(world);
|
||||
npc.func_70080_a((double)x + 0.5D, (double)y, (double)z + 0.5D, 0.0F, 0.0F);
|
||||
npc.ais.setStartPos((double)x, (double)y, (double)z);
|
||||
npc.func_70606_j(npc.func_110138_aP());
|
||||
world.func_72838_d(npc);
|
||||
return npc.wrappedNPC;
|
||||
}
|
||||
}
|
||||
|
||||
public static NpcAPI Instance() {
|
||||
if(instance == null) {
|
||||
instance = new WrapperNpcAPI();
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
public EventBus events() {
|
||||
return EVENT_BUS;
|
||||
}
|
||||
|
||||
public IItemStack getIItemStack(ItemStack itemstack) {
|
||||
return (IItemStack)(itemstack != null && !itemstack.func_190926_b()?(IItemStack)itemstack.getCapability(ItemStackWrapper.ITEMSCRIPTEDDATA_CAPABILITY, (EnumFacing)null):ItemStackWrapper.AIR);
|
||||
}
|
||||
|
||||
public IWorld getIWorld(WorldServer world) {
|
||||
WorldWrapper w = (WorldWrapper)worldCache.get(Integer.valueOf(world.field_73011_w.getDimension()));
|
||||
if(w != null) {
|
||||
w.world = world;
|
||||
return w;
|
||||
} else {
|
||||
worldCache.put(Integer.valueOf(world.field_73011_w.getDimension()), w = WorldWrapper.createNew(world));
|
||||
return w;
|
||||
}
|
||||
}
|
||||
|
||||
public IWorld getIWorld(int dimensionId) {
|
||||
WorldServer[] var2 = CustomNpcs.Server.field_71305_c;
|
||||
int var3 = var2.length;
|
||||
|
||||
for(int var4 = 0; var4 < var3; ++var4) {
|
||||
WorldServer world = var2[var4];
|
||||
if(world.field_73011_w.getDimension() == dimensionId) {
|
||||
return this.getIWorld(world);
|
||||
}
|
||||
}
|
||||
|
||||
throw new CustomNPCsException("Unknown dimension id: " + dimensionId, new Object[0]);
|
||||
}
|
||||
|
||||
public IContainer getIContainer(IInventory inventory) {
|
||||
return new ContainerWrapper(inventory);
|
||||
}
|
||||
|
||||
public IContainer getIContainer(Container container) {
|
||||
return (IContainer)(container instanceof ContainerNpcInterface?ContainerNpcInterface.getOrCreateIContainer((ContainerNpcInterface)container):new ContainerWrapper(container));
|
||||
}
|
||||
|
||||
public IFactionHandler getFactions() {
|
||||
this.checkWorld();
|
||||
return FactionController.instance;
|
||||
}
|
||||
|
||||
private void checkWorld() {
|
||||
if(CustomNpcs.Server == null || CustomNpcs.Server.func_71241_aa()) {
|
||||
throw new CustomNPCsException("No world is loaded right now", new Object[0]);
|
||||
}
|
||||
}
|
||||
|
||||
public IRecipeHandler getRecipes() {
|
||||
this.checkWorld();
|
||||
return RecipeController.instance;
|
||||
}
|
||||
|
||||
public IQuestHandler getQuests() {
|
||||
this.checkWorld();
|
||||
return QuestController.instance;
|
||||
}
|
||||
|
||||
public IWorld[] getIWorlds() {
|
||||
this.checkWorld();
|
||||
IWorld[] worlds = new IWorld[CustomNpcs.Server.field_71305_c.length];
|
||||
|
||||
for(int i = 0; i < CustomNpcs.Server.field_71305_c.length; ++i) {
|
||||
worlds[i] = this.getIWorld(CustomNpcs.Server.field_71305_c[i]);
|
||||
}
|
||||
|
||||
return worlds;
|
||||
}
|
||||
|
||||
public File getGlobalDir() {
|
||||
return CustomNpcs.Dir;
|
||||
}
|
||||
|
||||
public File getWorldDir() {
|
||||
return CustomNpcs.getWorldSaveDirectory();
|
||||
}
|
||||
|
||||
public void registerCommand(CommandNoppesBase command) {
|
||||
CustomNpcs.NoppesCommand.registerCommand(command);
|
||||
}
|
||||
|
||||
public INbt getINbt(NBTTagCompound compound) {
|
||||
return compound == null?new NBTWrapper(new NBTTagCompound()):new NBTWrapper(compound);
|
||||
}
|
||||
|
||||
public INbt stringToNbt(String str) {
|
||||
if(str != null && !str.isEmpty()) {
|
||||
try {
|
||||
return this.getINbt(NBTJsonUtil.Convert(str));
|
||||
} catch (JsonException var3) {
|
||||
throw new CustomNPCsException(var3, "Failed converting " + str, new Object[0]);
|
||||
}
|
||||
} else {
|
||||
throw new CustomNPCsException("Cant cast empty string to nbt", new Object[0]);
|
||||
}
|
||||
}
|
||||
|
||||
public IDamageSource getIDamageSource(DamageSource damagesource) {
|
||||
return new DamageSourceWrapper(damagesource);
|
||||
}
|
||||
|
||||
public IDialogHandler getDialogs() {
|
||||
return DialogController.instance;
|
||||
}
|
||||
|
||||
public ICloneHandler getClones() {
|
||||
return ServerCloneController.Instance;
|
||||
}
|
||||
|
||||
public String executeCommand(IWorld world, String command) {
|
||||
FakePlayer player = EntityNPCInterface.CommandPlayer;
|
||||
player.func_70029_a(world.getMCWorld());
|
||||
player.func_70107_b(0.0D, 0.0D, 0.0D);
|
||||
return NoppesUtilServer.runCommand(world.getMCWorld(), BlockPos.field_177992_a, "API", command, (EntityPlayer)null, player);
|
||||
}
|
||||
|
||||
public INbt getRawPlayerData(String uuid) {
|
||||
return this.getINbt(PlayerData.loadPlayerData(uuid));
|
||||
}
|
||||
|
||||
public IPlayerMail createMail(String sender, String subject) {
|
||||
PlayerMail mail = new PlayerMail();
|
||||
mail.sender = sender;
|
||||
mail.subject = subject;
|
||||
return mail;
|
||||
}
|
||||
|
||||
public ICustomGui createCustomGui(int id, int width, int height, boolean pauseGame) {
|
||||
return new CustomGuiWrapper(id, width, height, pauseGame);
|
||||
}
|
||||
|
||||
public String getRandomName(int dictionary, int gender) {
|
||||
return CustomNpcs.MARKOV_GENERATOR[dictionary].fetch(gender);
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.util;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class LRUHashMap<K, V> extends LinkedHashMap<K, V> {
|
||||
private final int maxSize;
|
||||
|
||||
public LRUHashMap(int size) {
|
||||
super(size, 0.75F, true);
|
||||
this.maxSize = size;
|
||||
}
|
||||
|
||||
protected boolean removeEldestEntry(Entry<K, V> eldest) {
|
||||
return this.size() > this.maxSize;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user