diff --git a/CNPC+ Texture Pack.zip b/CNPC+ Texture Pack.zip new file mode 100644 index 000000000..55828d10b Binary files /dev/null and b/CNPC+ Texture Pack.zip differ diff --git a/build.gradle b/build.gradle index a4be69890..00d0fbc84 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,7 @@ buildscript { apply plugin: 'forge' -version = "1.5.2" +version = "1.5.3" group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "CustomNPC-Plus" @@ -34,6 +34,16 @@ configurations { compile.extendsFrom shade } +// List of all supported OS for zstd compression (This is include only for anyone which is not using the default compression) +def supportedOS = [ + "linux_amd64", + "linux_i386", + "win_amd64", + "win_x86", + "darwin_x86_64", + "darwin_aarch64" +] + dependencies { // you may put jars on which you depend on in ./libs // or you may define them like so.. @@ -47,7 +57,12 @@ dependencies { // for more info... // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/dependency_management.html - shade 'com.github.luben:zstd-jni:1.5.2-2' +// shade 'com.github.luben:zstd-jni:1.5.2-2' - Remove almost implementations of zstd + + for (os in supportedOS) { + shade ("com.github.luben:zstd-jni:1.5.2-2:${os}") + } + } processResources diff --git a/src/main/java/foxz/command/CmdCompressor.java b/src/main/java/foxz/command/CmdCompressor.java index 4ac05db5e..eb3cc3bcd 100644 --- a/src/main/java/foxz/command/CmdCompressor.java +++ b/src/main/java/foxz/command/CmdCompressor.java @@ -4,7 +4,7 @@ import foxz.commandhelper.ChMcLogger; import foxz.commandhelper.annotations.Command; import foxz.commandhelper.annotations.SubCommand; import foxz.commandhelper.permissions.OpOnly; -import me.luizotavio.compressor.ZstdCompressor; +import luizotavio.compressor.ZstdCompressor; import net.minecraft.nbt.NBTTagCompound; import noppes.npcs.controllers.PlayerDataController; import noppes.npcs.util.NBTJsonUtil; @@ -18,7 +18,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import static me.luizotavio.compressor.executor.IOExecutor.IO_EXECUTOR; +import static luizotavio.compressor.executor.IOExecutor.IO_EXECUTOR; @Command( name = "compressor", diff --git a/src/main/java/me/luizotavio/compressor/ZstdCompressor.java b/src/main/java/luizotavio/compressor/ZstdCompressor.java similarity index 98% rename from src/main/java/me/luizotavio/compressor/ZstdCompressor.java rename to src/main/java/luizotavio/compressor/ZstdCompressor.java index 694229539..eb750d239 100644 --- a/src/main/java/me/luizotavio/compressor/ZstdCompressor.java +++ b/src/main/java/luizotavio/compressor/ZstdCompressor.java @@ -1,4 +1,4 @@ -package me.luizotavio.compressor; +package luizotavio.compressor; import com.github.luben.zstd.Zstd; import net.minecraft.nbt.CompressedStreamTools; diff --git a/src/main/java/me/luizotavio/compressor/executor/IOExecutor.java b/src/main/java/luizotavio/compressor/executor/IOExecutor.java similarity index 90% rename from src/main/java/me/luizotavio/compressor/executor/IOExecutor.java rename to src/main/java/luizotavio/compressor/executor/IOExecutor.java index f0f5da14e..48e1493cb 100644 --- a/src/main/java/me/luizotavio/compressor/executor/IOExecutor.java +++ b/src/main/java/luizotavio/compressor/executor/IOExecutor.java @@ -1,4 +1,4 @@ -package me.luizotavio.compressor.executor; +package luizotavio.compressor.executor; import java.util.concurrent.ExecutorService; diff --git a/src/main/java/noppes/npcs/CustomNpcs.java b/src/main/java/noppes/npcs/CustomNpcs.java index c14ad8f83..be9a85cea 100644 --- a/src/main/java/noppes/npcs/CustomNpcs.java +++ b/src/main/java/noppes/npcs/CustomNpcs.java @@ -10,7 +10,7 @@ import cpw.mods.fml.common.network.FMLEventChannel; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.EntityRegistry; import foxz.command.CommandNoppes; -import me.luizotavio.compressor.executor.IOExecutor; +import luizotavio.compressor.executor.IOExecutor; import net.minecraft.block.Block; import net.minecraft.block.BlockIce; import net.minecraft.block.BlockLeavesBase; @@ -33,7 +33,7 @@ import java.io.File; import java.util.Set; import java.util.concurrent.Executors; -@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.5.2") +@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.5.3") public class CustomNpcs { @ConfigProp(info = "Disable Chat Bubbles") diff --git a/src/main/java/noppes/npcs/ModelPartData.java b/src/main/java/noppes/npcs/ModelPartData.java index 98343d930..2cbe59974 100644 --- a/src/main/java/noppes/npcs/ModelPartData.java +++ b/src/main/java/noppes/npcs/ModelPartData.java @@ -35,9 +35,6 @@ public class ModelPartData { type = compound.getByte("Type"); color = compound.getInteger("Color"); texture = compound.getString("Texture"); - if(texture.contains("moreplayermodels:textures")){ - texture = texture.replace("moreplayermodels:textures", "customnpcs:textures/parts"); - } playerTexture = compound.getBoolean("PlayerTexture"); location = null; } diff --git a/src/main/java/noppes/npcs/VersionCompatibility.java b/src/main/java/noppes/npcs/VersionCompatibility.java index a1f935240..9891c6479 100644 --- a/src/main/java/noppes/npcs/VersionCompatibility.java +++ b/src/main/java/noppes/npcs/VersionCompatibility.java @@ -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())); diff --git a/src/main/java/noppes/npcs/client/renderer/RenderNPCHumanMale.java b/src/main/java/noppes/npcs/client/renderer/RenderNPCHumanMale.java index b8fca8b91..6c1cb85ef 100644 --- a/src/main/java/noppes/npcs/client/renderer/RenderNPCHumanMale.java +++ b/src/main/java/noppes/npcs/client/renderer/RenderNPCHumanMale.java @@ -255,7 +255,13 @@ public class RenderNPCHumanMale extends RenderNPCInterface GL11.glTranslatef(x, cnpc.modelData.getBodyY(), 0); } this.modelBipedMain.bipedRightArm.postRender(0.0625F); - GL11.glTranslatef(-0.0625F, 0.4375F + y, 0.0625F); + + if(npc.getModelType() == 2){ + GL11.glTranslatef(-0.0125F, 0.4375F + y, 0.0625F); + } + else { + GL11.glTranslatef(-0.0625F, 0.4375F + y, 0.0625F); + } IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack2, EQUIPPED); boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack2, BLOCK_3D)); @@ -269,7 +275,6 @@ public class RenderNPCHumanMale extends RenderNPCInterface GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); GL11.glScalef(-var6, -var6, var6); } - // CHANGE HERE else if (itemstack2.getItem() instanceof ItemBow && customRenderer == null) { var6 = 0.625F; @@ -343,8 +348,15 @@ public class RenderNPCHumanMale extends RenderNPCInterface GL11.glTranslatef(x, cnpc.modelData.getBodyY(), 0); } this.modelBipedMain.bipedLeftArm.postRender(0.0625F); - GL11.glTranslatef(0.0625F, 0.4375F + y, 0.0625F); - float var6; + + if(npc.getModelType() == 2){ + GL11.glTranslatef(0.0125F, 0.4375F + y, 0.0625F); + } + else { + GL11.glTranslatef(0.0625F, 0.4375F + y, 0.0625F); + } + + float var6; IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack2, EQUIPPED); boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack2, BLOCK_3D)); @@ -362,7 +374,7 @@ public class RenderNPCHumanMale extends RenderNPCInterface GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); GL11.glScalef(var6, -var6, var6); } - else if (itemstack2.getItem() instanceof ItemBow) + else if (itemstack2.getItem() instanceof ItemBow && customRenderer == null) { var6 = 0.625F; GL11.glTranslatef(0.0F, 0.125F, 0.3125F); diff --git a/src/main/java/noppes/npcs/client/renderer/RenderNPCPony.java b/src/main/java/noppes/npcs/client/renderer/RenderNPCPony.java index 013a77b8c..ccc76d5a7 100644 --- a/src/main/java/noppes/npcs/client/renderer/RenderNPCPony.java +++ b/src/main/java/noppes/npcs/client/renderer/RenderNPCPony.java @@ -219,7 +219,6 @@ public class RenderNPCPony extends RenderNPCInterface float f4 = 0.375F * f; GL11.glScalef(f4, -f4, f4); } else - // CHANGE HERE if(itemstack.getItem() instanceof ItemBow) { GL11.glTranslatef(0.0F, 0.125F, 0.3125F); diff --git a/src/main/java/noppes/npcs/controllers/Dialog.java b/src/main/java/noppes/npcs/controllers/Dialog.java index 05155e347..1a332473e 100644 --- a/src/main/java/noppes/npcs/controllers/Dialog.java +++ b/src/main/java/noppes/npcs/controllers/Dialog.java @@ -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 newoptions = new HashMap(); @@ -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); diff --git a/src/main/java/noppes/npcs/controllers/PlayerDataController.java b/src/main/java/noppes/npcs/controllers/PlayerDataController.java index 345ba4130..5b6df4490 100644 --- a/src/main/java/noppes/npcs/controllers/PlayerDataController.java +++ b/src/main/java/noppes/npcs/controllers/PlayerDataController.java @@ -1,6 +1,6 @@ package noppes.npcs.controllers; -import me.luizotavio.compressor.ZstdCompressor; +import luizotavio.compressor.ZstdCompressor; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.CompressedStreamTools; import net.minecraft.nbt.NBTSizeTracker; @@ -17,7 +17,7 @@ import java.nio.file.StandardOpenOption; import java.util.HashMap; import java.util.Map; -import static me.luizotavio.compressor.executor.IOExecutor.IO_EXECUTOR; +import static luizotavio.compressor.executor.IOExecutor.IO_EXECUTOR; public class PlayerDataController { public static PlayerDataController instance; diff --git a/src/main/java/noppes/npcs/entity/EntityNPCInterface.java b/src/main/java/noppes/npcs/entity/EntityNPCInterface.java index 5307826bf..c8b672a82 100644 --- a/src/main/java/noppes/npcs/entity/EntityNPCInterface.java +++ b/src/main/java/noppes/npcs/entity/EntityNPCInterface.java @@ -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); @@ -1287,7 +1286,6 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti @Override public IIcon getItemIcon(ItemStack par1ItemStack, int par2){ - // Change Here if (par1ItemStack.getItem() instanceof ItemBow){ return par1ItemStack.getItem().getIcon(par1ItemStack, par2); } diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/blackroot.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/blackroot.png new file mode 100644 index 000000000..1b93ff916 Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/blackroot.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/dale.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/dale.png new file mode 100644 index 000000000..a92cda456 Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/dale.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/dorwinionCaptain.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/dorwinionCaptain.png new file mode 100644 index 000000000..41cfd1af9 Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/dorwinionCaptain.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/dorwinionElfCaptain.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/dorwinionElfCaptain.png new file mode 100644 index 000000000..f6bc0dcda Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/dorwinionElfCaptain.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/dunlendingBerserker.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/dunlendingBerserker.png new file mode 100644 index 000000000..94b57c5fc Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/dunlendingBerserker.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/galadhrim.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/galadhrim.png new file mode 100644 index 000000000..4b0f5d14a Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/galadhrim.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/galadhrimTrader.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/galadhrimTrader.png new file mode 100644 index 000000000..035756ff2 Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/galadhrimTrader.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/gandalf.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/gandalf.png new file mode 100644 index 000000000..98bfba459 Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/gandalf.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/gondor.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/gondor.png new file mode 100644 index 000000000..f99af3526 Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/gondor.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/gondorTowerGuard.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/gondorTowerGuard.png new file mode 100644 index 000000000..e883f7ea2 Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/gondorTowerGuard.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/gulf.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/gulf.png new file mode 100644 index 000000000..f02b44af8 Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/gulf.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/haradChampion.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/haradChampion.png new file mode 100644 index 000000000..cf642b4d0 Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/haradChampion.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/highElf.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/highElf.png new file mode 100644 index 000000000..018667e4e Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/highElf.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/lamedon.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/lamedon.png new file mode 100644 index 000000000..4b39fc505 Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/lamedon.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/lossarnach.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/lossarnach.png new file mode 100644 index 000000000..0118fcd9d Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/lossarnach.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/nearHarad.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/nearHarad.png new file mode 100644 index 000000000..f27b23a1c Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/nearHarad.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/pelargir.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/pelargir.png new file mode 100644 index 000000000..adf8f7c8e Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/pelargir.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/pinnathGelin.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/pinnathGelin.png new file mode 100644 index 000000000..8ba4b0dd7 Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/pinnathGelin.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/ranger.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/ranger.png new file mode 100644 index 000000000..e6f2915c3 Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/ranger.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/ranger_ithilien.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/ranger_ithilien.png new file mode 100644 index 000000000..e984b3865 Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/ranger_ithilien.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/rivendell.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/rivendell.png new file mode 100644 index 000000000..cba7cbfa3 Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/rivendell.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/rivendellTrader.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/rivendellTrader.png new file mode 100644 index 000000000..5086ad888 Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/rivendellTrader.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/rohan.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/rohan.png new file mode 100644 index 000000000..60f49baf7 Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/rohan.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/santa.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/santa.png new file mode 100644 index 000000000..e7f708a47 Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/santa.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/taurethrim.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/taurethrim.png new file mode 100644 index 000000000..7bdb9a85b Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/taurethrim.png differ diff --git a/src/main/resources/assets/customnpcs/textures/cloak/LOTR/woodElf.png b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/woodElf.png new file mode 100644 index 000000000..d5b14078f Binary files /dev/null and b/src/main/resources/assets/customnpcs/textures/cloak/LOTR/woodElf.png differ