mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 15:27:29 +00:00
Merge pull request #22 from c0508383/master
Added collision options for CNPCs.
This commit is contained in:
5 files changed
+88
-6
No files matched your search
@@ -52,6 +52,9 @@ public class DataDisplay {
|
||||
|
||||
public ArrayList<UUID> invisibleToList = new ArrayList<>();
|
||||
|
||||
//0 - Yes, 1 - No, 2 - Only NPCs, 3 - Only Players, 4 - NPCs and Players
|
||||
public int collidesWith = 1;
|
||||
|
||||
public DataDisplay(EntityNPCInterface npc){
|
||||
this.npc = npc;
|
||||
markovGeneratorId = new Random().nextInt(CustomNpcs.MARKOV_GENERATOR.length-1);
|
||||
@@ -89,6 +92,8 @@ public class DataDisplay {
|
||||
nbttagcompound.setBoolean("NoLivingAnimation", disableLivingAnimation);
|
||||
nbttagcompound.setByte("BossBar", showBossBar);
|
||||
|
||||
nbttagcompound.setInteger("CollidesWith",collidesWith);
|
||||
|
||||
NBTTagList list = new NBTTagList();
|
||||
for(UUID uuid : invisibleToList){
|
||||
list.appendTag(new NBTTagString(uuid.toString()));
|
||||
@@ -148,6 +153,11 @@ public class DataDisplay {
|
||||
invisibleToList = new ArrayList<>();
|
||||
}
|
||||
|
||||
if(nbttagcompound.hasKey("CollidesWith"))
|
||||
collidesWith = nbttagcompound.getInteger("CollidesWith");
|
||||
else
|
||||
collidesWith = 1;
|
||||
|
||||
if(prevSkinType != skinType || !texture.equals(prevTexture))
|
||||
npc.textureLocation = null;
|
||||
npc.textureGlowLocation = null;
|
||||
|
||||
Reference in new issue
Block a user