mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 14:19:13 +00:00
Fixed API interface errors, added casts for custom item script handlers in EventHooks, and added some event interfaces.
This commit is contained in:
1 parent
be9ae94163
commit
aa02e5dcc3
41 files changed
+181
-66
No files matched your search
@@ -18,7 +18,7 @@ import cpw.mods.fml.common.eventhandler.Event;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.NBTTags;
|
||||
import noppes.npcs.api.IScriptHandler;
|
||||
import noppes.npcs.controllers.data.IScriptHandler;
|
||||
import noppes.npcs.constants.EnumScriptType;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ import noppes.npcs.EventHooks;
|
||||
import noppes.npcs.LogWriter;
|
||||
import noppes.npcs.constants.EnumScriptType;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
import noppes.npcs.api.IScriptHandler;
|
||||
import noppes.npcs.controllers.ScriptController;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.scripted.entity.ScriptNpc;
|
||||
|
||||
@@ -19,7 +19,6 @@ import noppes.npcs.EventHooks;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
import noppes.npcs.NBTTags;
|
||||
import noppes.npcs.constants.EnumScriptType;
|
||||
import noppes.npcs.api.IScriptHandler;
|
||||
import noppes.npcs.controllers.ScriptController;
|
||||
|
||||
public class ForgeDataScript implements IScriptHandler {
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.controllers.data;
|
||||
|
||||
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 callScript(EnumScriptType var1, Event var2);
|
||||
|
||||
boolean isClient();
|
||||
|
||||
boolean getEnabled();
|
||||
|
||||
void setEnabled(boolean var1);
|
||||
|
||||
String getLanguage();
|
||||
|
||||
void setLanguage(String var1);
|
||||
|
||||
List<ScriptContainer> getScripts();
|
||||
|
||||
String noticeString();
|
||||
|
||||
Map<Long, String> getConsoleText();
|
||||
|
||||
void clearConsole();
|
||||
}
|
||||
@@ -7,7 +7,6 @@ import net.minecraft.util.math.BlockPos;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.NBTTags;
|
||||
import noppes.npcs.constants.EnumScriptType;
|
||||
import noppes.npcs.api.IScriptHandler;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
import noppes.npcs.controllers.ScriptController;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
@@ -16,7 +16,6 @@ import noppes.npcs.EventHooks;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
import noppes.npcs.NBTTags;
|
||||
import noppes.npcs.constants.EnumScriptType;
|
||||
import noppes.npcs.api.IScriptHandler;
|
||||
import noppes.npcs.controllers.ScriptController;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
|
||||
@@ -49,15 +49,15 @@ public class PlayerItemGiverData implements IPlayerItemGiverData {
|
||||
}
|
||||
|
||||
public long getTime(IJobItemGiver jobItemGiver){
|
||||
return itemgivers.get(((JobItemGiver) jobItemGiver.getJobInterface()).itemGiverId);
|
||||
return itemgivers.get(((JobItemGiver) jobItemGiver).itemGiverId);
|
||||
}
|
||||
|
||||
public void setTime(IJobItemGiver jobItemGiver, long day) {
|
||||
itemgivers.put(((JobItemGiver) jobItemGiver.getJobInterface()).itemGiverId, day);
|
||||
itemgivers.put(((JobItemGiver) jobItemGiver).itemGiverId, day);
|
||||
}
|
||||
|
||||
public boolean hasInteractedBefore(IJobItemGiver jobItemGiver) {
|
||||
return itemgivers.containsKey(((JobItemGiver) jobItemGiver.getJobInterface()).itemGiverId);
|
||||
return itemgivers.containsKey(((JobItemGiver) jobItemGiver).itemGiverId);
|
||||
}
|
||||
|
||||
public IJobItemGiver[] getItemGivers() {
|
||||
|
||||
Reference in new issue
Block a user