Merge branch 'master' into dev

This commit is contained in:
KAMKEEL committed 2022-04-09 02:14:21 -04:00
commit 71216350d8
4 files changed
+12 -14

No files matched your search

@@ -35,10 +35,6 @@ public class ModelPartData {
type = compound.getByte("Type");
color = compound.getInteger("Color");
texture = compound.getString("Texture");
// MPM Texture Fix
if(texture.contains("moreplayermodels:textures")){
texture = texture.replace("moreplayermodels:textures", "customnpcs:textures/parts");
}
playerTexture = compound.getBoolean("PlayerTexture");
location = null;
}
@@ -12,11 +12,21 @@ import noppes.npcs.controllers.Lines;
import noppes.npcs.entity.EntityNPCInterface;
public class VersionCompatibility {
public static int ModRev = 16;
public static int ModRev = 17;
public static void CheckNpcCompatibility(EntityNPCInterface npc, NBTTagCompound compound){
if(npc.npcVersion == ModRev)
return;
if(npc.npcVersion < 17){
// Fix DialogDarkenScreen
if(compound.hasKey("DialogDarkenScreen")){
compound.removeTag("DialogDarkenScreen");
}
// Remove MPM Texture Requirement
String texture = compound.getString("Texture");
texture = texture.replace("moreplayermodels:textures", "customnpcs:textures/parts");
compound.setString("Texture", texture);
}
if(npc.npcVersion < 12){
CompatabilityFix(compound, npc.advanced.writeToNBT(new NBTTagCompound()));
CompatabilityFix(compound, npc.ai.writeToNBT(new NBTTagCompound()));
@@ -67,10 +67,7 @@ public class Dialog implements ICompatibilty, IDialog {
else {
darkenScreen = true;
}
// Temporary Remove after Few Versions
if(compound.hasKey("DialogDarkenScreen")){
compound.removeTag("DialogDarkenScreen");
}
NBTTagList options = compound.getTagList("Options", 10);
HashMap<Integer,DialogOption> newoptions = new HashMap<Integer,DialogOption>();
@@ -104,10 +101,6 @@ public class Dialog implements ICompatibilty, IDialog {
compound.setBoolean("DialogDisableEsc", disableEsc);
compound.setBoolean("DialogDarkScreen", darkenScreen);
// Temporary Remove after Few Versions
if(compound.hasKey("DialogDarkenScreen")){
compound.removeTag("DialogDarkenScreen");
}
if(sound != null && !sound.isEmpty())
compound.setString("DialogSound", sound);
@@ -140,7 +140,6 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
public boolean updateClient = false;
public boolean updateAI = false;
// Fly Change
public FlyingMoveHelper flyMoveHelper = new FlyingMoveHelper(this);
public PathNavigate flyNavigator = new PathNavigateFlying(this, worldObj);