mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 02:37:27 +00:00
Merge branch 'KAMKEEL:master' into master
This commit is contained in:
39 files changed
+54
-30
No files matched your search
@@ -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
-1
@@ -1,4 +1,4 @@
|
||||
package me.luizotavio.compressor;
|
||||
package luizotavio.compressor;
|
||||
|
||||
import com.github.luben.zstd.Zstd;
|
||||
import net.minecraft.nbt.CompressedStreamTools;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package me.luizotavio.compressor.executor;
|
||||
package luizotavio.compressor.executor;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user