Compare commits

...
5 Commits
Author SHA1 Message Date
KAMKEEL 3dd8a60702 Version Update 2021-11-29 22:28:54 -05:00
KAMKEEL 71c81bce27 Merge branch 'dev' 2021-11-29 22:26:48 -05:00
Kamron Vaswani f39ed1fd37 Merge pull request #15 from c0508383/master
Critical fix to NBT loading when loading entities into chunks from a …
2021-11-29 22:26:22 -05:00
luisc f3ebf86b1e Critical fix to NBT loading when loading entities into chunks from a different version. 2021-11-29 21:21:49 -06:00
KAMKEEL f64399e40d Create Scripting_Documentation.pdf 2021-11-28 23:48:16 -05:00
5 changed files with 18 additions and 12 deletions

No files matched your search

Binary file not shown.
+1 -1
View File
@@ -17,7 +17,7 @@ buildscript {
apply plugin: 'forge' apply plugin: 'forge'
version = "1.3" version = "1.3.1"
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "CustomNPC-Plus" archivesBaseName = "CustomNPC-Plus"
+1 -1
View File
@@ -61,7 +61,7 @@ import noppes.npcs.entity.old.EntityNpcNagaMale;
import noppes.npcs.entity.old.EntityNpcSkeleton; import noppes.npcs.entity.old.EntityNpcSkeleton;
import noppes.npcs.scripted.wrapper.WrapperNpcAPI; import noppes.npcs.scripted.wrapper.WrapperNpcAPI;
@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.3") @Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.3.1")
public class CustomNpcs { public class CustomNpcs {
@ConfigProp(info = "Disable Chat Bubbles") @ConfigProp(info = "Disable Chat Bubbles")
+9 -5
View File
@@ -87,7 +87,6 @@ public class DataDisplay {
markovGeneratorId = new Random().nextInt(CustomNpcs.MARKOV_GENERATOR.length-1); markovGeneratorId = new Random().nextInt(CustomNpcs.MARKOV_GENERATOR.length-1);
name = getRandomName(); name = getRandomName();
} }
public String getRandomName() { public String getRandomName() {
@@ -168,11 +167,16 @@ public class DataDisplay {
disableLivingAnimation = nbttagcompound.getBoolean("NoLivingAnimation"); disableLivingAnimation = nbttagcompound.getBoolean("NoLivingAnimation");
showBossBar = nbttagcompound.getByte("BossBar"); showBossBar = nbttagcompound.getByte("BossBar");
invisibleToList.clear();
NBTTagList tagList = (NBTTagList)nbttagcompound.getTag("InvisibleToList"); NBTTagList tagList = (NBTTagList)nbttagcompound.getTag("InvisibleToList");
for(int i = 0; i < tagList.tagCount(); i++){ if(tagList != null) {
String nbtTagString = tagList.getStringTagAt(i); invisibleToList.clear();
invisibleToList.add(UUID.fromString(nbtTagString)); for (int i = 0; i < tagList.tagCount(); i++) {
String nbtTagString = tagList.getStringTagAt(i);
invisibleToList.add(UUID.fromString(nbtTagString));
}
}
else {
invisibleToList = new ArrayList<>();
} }
if(prevSkinType != skinType || !texture.equals(prevTexture)) if(prevSkinType != skinType || !texture.equals(prevTexture))
@@ -76,11 +76,13 @@ public class DataTimers implements ITimers {
Map<Integer, DataTimers.Timer> timers = new HashMap(); Map<Integer, DataTimers.Timer> timers = new HashMap();
NBTTagList list = compound.getTagList("NpcsTimers", 10); NBTTagList list = compound.getTagList("NpcsTimers", 10);
for(int i = 0; i < list.tagCount(); ++i) { if(list != null) {
NBTTagCompound c = list.getCompoundTagAt(i); for (int i = 0; i < list.tagCount(); ++i) {
DataTimers.Timer t = new DataTimers.Timer(c.getInteger("ID"), c.getInteger("TimerTicks"), c.getBoolean("Repeat")); NBTTagCompound c = list.getCompoundTagAt(i);
t.ticks = c.getInteger("Ticks"); DataTimers.Timer t = new DataTimers.Timer(c.getInteger("ID"), c.getInteger("TimerTicks"), c.getBoolean("Repeat"));
timers.put(t.id, t); t.ticks = c.getInteger("Ticks");
timers.put(t.id, t);
}
} }
this.timers = timers; this.timers = timers;