Model Switcher Information + Cleanup

Removing all attempted methods.

Model Switcher Reasoning: The code Noppes currently has working only allows the basic EntityCustomNpc to have the GUI, Parts and Scaling. If the Model Switcher can simply replace the current model of the EntityCustomNpc  then it will retain all functionality.

SkinUrl and Username are currently still broken with the new model switcher method. Will attempt to fix soon.
This commit is contained in:
KAMKEEL committed 2021-04-29 20:18:46 -04:00
1 parent 97dc3e9f13
commit 82f2323178
6 files changed
-68

No files matched your search

@@ -201,7 +201,6 @@ public class CustomNpcs {
registerNpc(EntityNpcDragon.class, "NpcDragon");
registerNpc(EntityNPCEnderman.class, "npcEnderman");
registerNpc(EntityNPCGolem.class, "npcGolem");
registerNpc(EntityCustomNpc64.class, "CustomNpc64");
registerNpc(EntityCustomNpc.class, "CustomNpc");
@@ -181,11 +181,7 @@ public class ClientProxy extends CommonProxy {
RenderingRegistry.registerEntityRenderingHandler(EntityNpcSlime.class, new RenderNpcSlime(new ModelNpcSlime(16), new ModelNpcSlime(0), 0.25F));
RenderingRegistry.registerEntityRenderingHandler(EntityProjectile.class, new RenderProjectile());
// Changes Made Here:
RenderingRegistry.registerEntityRenderingHandler(EntityCustomNpc.class, new RenderCustomNpc());
RenderingRegistry.registerEntityRenderingHandler(EntityCustomNpc64.class, new RenderCustomNpc(false)); // False for Steve
// RenderingRegistry.registerEntityRenderingHandler(EntityNPCAlex.class, new RenderCustomNpc(true)); // False for Steve
RenderingRegistry.registerEntityRenderingHandler(EntityNPCGolem.class, new RenderNPCHumanMale(
new ModelNPCGolem(0), new ModelNPCGolem(1F), new ModelNPCGolem(0.5F)));
@@ -32,7 +32,6 @@ import noppes.npcs.constants.EnumPacketServer;
import noppes.npcs.controllers.PixelmonHelper;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityFakeLiving;
import noppes.npcs.entity.EntityCustomNpc64;
import noppes.npcs.entity.EntityNPCInterface;
public class GuiCreationScreen extends GuiModelInterface implements ICustomScrollListener{
@@ -63,7 +62,6 @@ public class GuiCreationScreen extends GuiModelInterface implements ICustomScrol
} catch (NoSuchMethodException e) {
}
}
data.put("CustomNPC64", EntityCustomNpc64.class);
list = new ArrayList<String>(data.keySet());
Collections.sort(list,String.CASE_INSENSITIVE_ORDER);
}
@@ -1,18 +0,0 @@
package api.player.model;
import net.minecraft.client.model.ModelBiped;
public class ModelPlayer extends ModelBiped {
public ModelPlayer() {
this(0.0F);
}
public ModelPlayer(float var1) {
this(var1, 0.0F, 64, 32);
}
public ModelPlayer(float var1, float var2, int var3, int var4) {
super(var1, var2, var3, var4);
}
}
@@ -24,7 +24,6 @@ import noppes.npcs.client.model.ModelMPM;
import noppes.npcs.constants.EnumAnimation;
import noppes.npcs.constants.EnumStandingType;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityCustomNpc64;
import noppes.npcs.entity.EntityNPCInterface;
import org.lwjgl.opengl.GL11;
@@ -180,29 +179,6 @@ public class RenderNPCInterface extends RenderLiving{
}
else {
super.rotateCorpse(npc, f, f1, f2);
// if(npc.deathTime > 0)
// {
// float x = (float) -Math.cos(Math.toRadians(180 - f1));
// float y = (float) -Math.sin(Math.toRadians(f1));
// x = (x/ 5f) * npc.getModelSize();
// y = (y/ 5f) * npc.getModelSize();
// GL11.glTranslatef(x, 0, y);
//
//
// float f3 = ((((float)npc.deathTime+ f2) - 1.0F) / 20F) * 1.6F;
// f3 = MathHelper.sqrt_float(f3);
// if(f3 > 1.0F)
// {
// f3 = 1.0F;
// }
// GL11.glRotatef(f1, 0.0F, 1.0F, 0.0F);
// GL11.glRotatef(f3 * getDeathMaxRotation(npc), 0.0F, 0.0F, 1.0F);
// GL11.glRotatef(180F - f1, 0.0F, 1.0F, 0.0F);
// }
// else
// {
// GL11.glRotatef(180F - f1, 0.0F, 1.0F, 0.0F);
// }
}
}
@@ -1,19 +0,0 @@
package noppes.npcs.entity;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import noppes.npcs.CustomNpcs;
import noppes.npcs.ModelData;
import noppes.npcs.ModelPartData;
import noppes.npcs.client.EntityUtil;
public class EntityCustomNpc64 extends EntityCustomNpc{
public EntityCustomNpc64(World world) {
super(world);
display.texture = "customnpcs:textures/entity/humanmale/Steve64.png";
}
}