Merge branch 'KAMKEEL:master' into master

This commit is contained in:
Luis C.M authored and GitHub committed 2022-04-13 04:27:25 -05:00
commit ff37a8bec2
39 files changed
+54 -30

No files matched your search

Binary file not shown.
+17 -2
View File
@@ -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
@@ -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",
@@ -1,4 +1,4 @@
package me.luizotavio.compressor;
package luizotavio.compressor;
import com.github.luben.zstd.Zstd;
import net.minecraft.nbt.CompressedStreamTools;
@@ -1,4 +1,4 @@
package me.luizotavio.compressor.executor;
package luizotavio.compressor.executor;
import java.util.concurrent.ExecutorService;
+2 -2
View File
@@ -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")
@@ -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;
}
@@ -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()));
@@ -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);
@@ -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);
@@ -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);
@@ -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;
@@ -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);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1016 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 797 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 919 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 769 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 832 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 994 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 943 B