mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-24 19:54:26 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0088f750ee | ||
|
|
63f448b67d | ||
|
|
0a665a46be | ||
|
|
69a85769a4 | ||
|
|
169eba238b | ||
|
|
8d455c329b | ||
|
|
23cae600de | ||
|
|
c1f57ba1ce | ||
|
|
2749637ed6 | ||
|
|
0608068276 | ||
|
|
06df9e015e | ||
|
|
2262639182 |
No files matched your search
+2
-2
@@ -17,9 +17,9 @@ buildscript {
|
|||||||
|
|
||||||
apply plugin: 'forge'
|
apply plugin: 'forge'
|
||||||
|
|
||||||
version = "1.0"
|
version = "1.1"
|
||||||
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||||
archivesBaseName = "modid"
|
archivesBaseName = "CustomNPC-Plus"
|
||||||
|
|
||||||
minecraft {
|
minecraft {
|
||||||
version = "1.7.10-10.13.4.1614-1.7.10"
|
version = "1.7.10-10.13.4.1614-1.7.10"
|
||||||
|
|||||||
@@ -1,65 +0,0 @@
|
|||||||
package kam.npcs;
|
|
||||||
|
|
||||||
import net.minecraft.client.model.ModelBase;
|
|
||||||
import noppes.npcs.client.model.util.Model2DRenderer;
|
|
||||||
|
|
||||||
public class LegacyCode {
|
|
||||||
|
|
||||||
// Old MPM Model : Unused
|
|
||||||
|
|
||||||
// public ModelMPM(float par1) {
|
|
||||||
// super(par1);
|
|
||||||
// isArmor = par1 > 0;
|
|
||||||
// float par2 = 0;
|
|
||||||
// this.bipedCloak = new ModelRenderer(this, 0, 0);
|
|
||||||
// this.bipedCloak.addBox(-5.0F, 0.0F, -1.0F, 10, 16, 1, par1);
|
|
||||||
// this.bipedEars = new ModelRenderer(this, 24, 0);
|
|
||||||
// this.bipedEars.addBox(-3.0F, -6.0F, -1.0F, 6, 6, 1, par1);
|
|
||||||
// this.bipedHead = new ModelScaleRenderer(this, 0, 0);
|
|
||||||
// this.bipedHead.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, par1);
|
|
||||||
// this.bipedHead.setRotationPoint(0.0F, 0.0F + par2, 0.0F);
|
|
||||||
// this.bipedHeadwear = new ModelScaleRenderer(this, 32, 0);
|
|
||||||
// this.bipedHeadwear.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, par1 + 0.5F);
|
|
||||||
// this.bipedHeadwear.setRotationPoint(0.0F, 0.0F + par2, 0.0F);
|
|
||||||
// this.bipedBody = new ModelScaleRenderer(this, 16, 16);
|
|
||||||
// this.bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, par1);
|
|
||||||
// this.bipedBody.setRotationPoint(0.0F, 0.0F + par2, 0.0F);
|
|
||||||
// this.bipedRightArm = new ModelScaleRenderer(this, 40, 16);
|
|
||||||
// this.bipedRightArm.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, par1);
|
|
||||||
// this.bipedRightArm.setRotationPoint(-5.0F, 2.0F + par2, 0.0F);
|
|
||||||
// this.bipedLeftArm = new ModelScaleRenderer(this, 40, 16);
|
|
||||||
// this.bipedLeftArm.mirror = true;
|
|
||||||
// this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, par1);
|
|
||||||
// this.bipedLeftArm.setRotationPoint(5.0F, 2.0F + par2, 0.0F);
|
|
||||||
// this.bipedRightLeg = new ModelScaleRenderer(this, 0, 16);
|
|
||||||
// this.bipedRightLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, par1);
|
|
||||||
// this.bipedRightLeg.setRotationPoint(-1.9F, 12.0F + par2, 0.0F);
|
|
||||||
// this.bipedLeftLeg = new ModelScaleRenderer(this, 0, 16);
|
|
||||||
// this.bipedLeftLeg.mirror = true;
|
|
||||||
// this.bipedLeftLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, par1);
|
|
||||||
// this.bipedLeftLeg.setRotationPoint(1.9F, 12.0F + par2, 0.0F);
|
|
||||||
//
|
|
||||||
// headwear = new ModelHeadwear(this);
|
|
||||||
// legs = new ModelLegs(this, (ModelScaleRenderer)bipedRightLeg, (ModelScaleRenderer)bipedLeftLeg);
|
|
||||||
//
|
|
||||||
// this.bipedBody.addChild(breasts = new ModelBreasts(this));
|
|
||||||
// if(!isArmor){
|
|
||||||
// this.bipedHead.addChild(ears = new ModelEars(this));
|
|
||||||
// this.bipedHead.addChild(mohawk = new ModelMohawk(this));
|
|
||||||
// this.bipedHead.addChild(hair = new ModelHair(this));
|
|
||||||
// this.bipedHead.addChild(beard = new ModelBeard(this));
|
|
||||||
// this.bipedHead.addChild(snout = new ModelSnout(this));
|
|
||||||
// this.bipedHead.addChild(horns = new ModelHorns(this));
|
|
||||||
//
|
|
||||||
// tail = new ModelTail(this);
|
|
||||||
//
|
|
||||||
// this.bipedBody.addChild(wings = new ModelWings(this));
|
|
||||||
// this.bipedBody.addChild(skirt = new ModelSkirt(this));
|
|
||||||
// this.bipedBody.addChild(fin = new ModelFin(this));
|
|
||||||
//
|
|
||||||
// this.bipedLeftArm.addChild(clawsL = new ModelClaws(this, false));
|
|
||||||
// this.bipedRightArm.addChild(clawsR = new ModelClaws(this, true));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -63,7 +63,7 @@ import noppes.npcs.entity.old.EntityNpcNagaFemale;
|
|||||||
import noppes.npcs.entity.old.EntityNpcNagaMale;
|
import noppes.npcs.entity.old.EntityNpcNagaMale;
|
||||||
import noppes.npcs.entity.old.EntityNpcSkeleton;
|
import noppes.npcs.entity.old.EntityNpcSkeleton;
|
||||||
|
|
||||||
@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.7.10f")
|
@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.1")
|
||||||
public class CustomNpcs {
|
public class CustomNpcs {
|
||||||
|
|
||||||
@ConfigProp(info = "Disable Chat Bubbles")
|
@ConfigProp(info = "Disable Chat Bubbles")
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public class DataDisplay {
|
|||||||
public String url = "";
|
public String url = "";
|
||||||
|
|
||||||
public GameProfile playerProfile;
|
public GameProfile playerProfile;
|
||||||
public String texture = "customnpcs:textures/entity/humanmale/Steve.png";;
|
public String texture = "customnpcs:textures/entity/humanmale/Steve.png";
|
||||||
public String cloakTexture = "";
|
public String cloakTexture = "";
|
||||||
public String glowTexture = "";
|
public String glowTexture = "";
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ public class DataDisplay {
|
|||||||
cloakTexture = nbttagcompound.getString("CloakTexture");
|
cloakTexture = nbttagcompound.getString("CloakTexture");
|
||||||
glowTexture = nbttagcompound.getString("GlowTexture");
|
glowTexture = nbttagcompound.getString("GlowTexture");
|
||||||
|
|
||||||
modelSize = ValueUtil.CorrectInt(nbttagcompound.getInteger("Size"), 1, 40);
|
modelSize = ValueUtil.CorrectInt(nbttagcompound.getInteger("Size"), 1, 30);
|
||||||
modelType = nbttagcompound.getInteger("modelType");
|
modelType = nbttagcompound.getInteger("modelType");
|
||||||
|
|
||||||
showName = nbttagcompound.getInteger("ShowName");
|
showName = nbttagcompound.getInteger("ShowName");
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ public class GuiNpcDisplay extends GuiNPCInterface2 implements ITextfieldListene
|
|||||||
}
|
}
|
||||||
if(button.id == 2){
|
if(button.id == 2){
|
||||||
display.skinType = (byte) button.getValue();
|
display.skinType = (byte) button.getValue();
|
||||||
System.out.println("Skin Type set to:" + display.skinType);
|
// System.out.println("Skin Type set to:" + display.skinType);
|
||||||
// SKIN CHANGE
|
// SKIN CHANGE
|
||||||
if (display.skinType != 3){
|
if (display.skinType != 3){
|
||||||
display.url = "";
|
display.url = "";
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import noppes.npcs.controllers.PixelmonHelper;
|
|||||||
import noppes.npcs.entity.EntityCustomNpc;
|
import noppes.npcs.entity.EntityCustomNpc;
|
||||||
import noppes.npcs.entity.EntityFakeLiving;
|
import noppes.npcs.entity.EntityFakeLiving;
|
||||||
import noppes.npcs.entity.EntityNPCInterface;
|
import noppes.npcs.entity.EntityNPCInterface;
|
||||||
|
import org.lwjgl.Sys;
|
||||||
|
|
||||||
public class GuiCreationScreen extends GuiModelInterface implements ICustomScrollListener{
|
public class GuiCreationScreen extends GuiModelInterface implements ICustomScrollListener{
|
||||||
|
|
||||||
@@ -268,6 +269,7 @@ public class GuiCreationScreen extends GuiModelInterface implements ICustomScrol
|
|||||||
}
|
}
|
||||||
|
|
||||||
// New Button for Changing Models
|
// New Button for Changing Models
|
||||||
|
// URL Swapper
|
||||||
if(button.id == 250){
|
if(button.id == 250){
|
||||||
if(npc.display.modelType == 0){
|
if(npc.display.modelType == 0){
|
||||||
if (npc.display.skinType == 2){
|
if (npc.display.skinType == 2){
|
||||||
|
|||||||
@@ -15,6 +15,11 @@ public class GuiModelScale extends GuiModelInterface implements ISliderListener{
|
|||||||
|
|
||||||
private GuiScreen parent;
|
private GuiScreen parent;
|
||||||
private int type = 0;
|
private int type = 0;
|
||||||
|
|
||||||
|
private GuiNpcSlider scaleWidth;
|
||||||
|
private GuiNpcSlider scaleHeight;
|
||||||
|
private GuiNpcSlider scaleDepth;
|
||||||
|
|
||||||
public GuiModelScale(GuiScreen parent, ModelData data, EntityCustomNpc npc){
|
public GuiModelScale(GuiScreen parent, ModelData data, EntityCustomNpc npc){
|
||||||
super(npc);
|
super(npc);
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
@@ -71,24 +76,65 @@ public class GuiModelScale extends GuiModelInterface implements ISliderListener{
|
|||||||
|
|
||||||
private void drawSlider(int y, ModelPartConfig config){
|
private void drawSlider(int y, ModelPartConfig config){
|
||||||
y += 15;
|
y += 15;
|
||||||
addLabel(new GuiNpcLabel(10, "Width", guiLeft, y + 5, 0xFFFFFF));
|
addLabel(new GuiNpcLabel(10, "Width", guiLeft - 25, y + 5, 0xFFFFFF));
|
||||||
addSlider(new GuiNpcSlider(this, 10, guiLeft + 50, y, config.scaleX - 0.5f));
|
scaleWidth = new GuiNpcSlider(this, 10, guiLeft + 50, y, config.scaleX - 0.5f);
|
||||||
|
addSlider(scaleWidth);
|
||||||
|
addButton(new GuiNpcButton(170, guiLeft + 8, y, 40, 20, "Reset"));
|
||||||
y += 22;
|
y += 22;
|
||||||
addLabel(new GuiNpcLabel(11, "Height", guiLeft, y + 5, 0xFFFFFF));
|
addLabel(new GuiNpcLabel(11, "Height", guiLeft - 25, y + 5, 0xFFFFFF));
|
||||||
addSlider(new GuiNpcSlider(this, 11, guiLeft + 50, y, config.scaleY - 0.5f));
|
scaleHeight = new GuiNpcSlider(this, 11, guiLeft + 50, y, config.scaleY - 0.5f);
|
||||||
|
addSlider(scaleHeight);
|
||||||
|
addButton(new GuiNpcButton(171, guiLeft + 8, y, 40, 20, "Reset"));
|
||||||
y += 22;
|
y += 22;
|
||||||
addLabel(new GuiNpcLabel(12, "Depth", guiLeft, y + 5, 0xFFFFFF));
|
addLabel(new GuiNpcLabel(12, "Depth", guiLeft - 25, y + 5, 0xFFFFFF));
|
||||||
addSlider(new GuiNpcSlider(this, 12, guiLeft + 50, y, config.scaleZ - 0.5f));
|
scaleDepth = new GuiNpcSlider(this, 12, guiLeft + 50, y, config.scaleZ - 0.5f);
|
||||||
|
addSlider(scaleDepth);
|
||||||
|
addButton(new GuiNpcButton(172, guiLeft + 8, y, 40, 20, "Reset"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void actionPerformed(GuiButton btn) {
|
protected void actionPerformed(GuiButton btn) {
|
||||||
super.actionPerformed(btn);
|
super.actionPerformed(btn);
|
||||||
|
|
||||||
if(btn.id < 4){
|
if(btn.id < 4){
|
||||||
type = btn.id;
|
type = btn.id;
|
||||||
initGui();
|
initGui();
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
// Resetting Type
|
||||||
|
ModelPartConfig config = playerdata.head;
|
||||||
|
if(type == 1)
|
||||||
|
config = playerdata.body;
|
||||||
|
else if(type == 2)
|
||||||
|
config = playerdata.arms;
|
||||||
|
else if(type == 3)
|
||||||
|
config = playerdata.legs;
|
||||||
|
|
||||||
|
if(btn.id == 170){
|
||||||
|
config.scaleX = 1.0f;
|
||||||
|
scaleWidth.sliderValue = 0.5f;
|
||||||
|
int percent = (int) (50 + scaleWidth.sliderValue * 100);
|
||||||
|
scaleWidth.setString(percent + "%");
|
||||||
|
npc.updateHitbox();
|
||||||
|
}
|
||||||
|
else if(btn.id == 171){
|
||||||
|
config.scaleY = 1.0f;
|
||||||
|
scaleHeight.sliderValue = 0.5f;
|
||||||
|
int percent = (int) (50 + scaleHeight.sliderValue * 100);
|
||||||
|
scaleHeight.setString(percent + "%");
|
||||||
|
npc.updateHitbox();
|
||||||
|
}
|
||||||
|
else if(btn.id == 172){
|
||||||
|
config.scaleZ = 1.0f;
|
||||||
|
scaleDepth.sliderValue = 0.5f;
|
||||||
|
int percent = (int) (50 + scaleDepth.sliderValue * 100);
|
||||||
|
scaleDepth.setString(percent + "%");
|
||||||
|
npc.updateHitbox();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -22,6 +22,10 @@ public class GuiNpcPuppet extends GuiModelInterface implements ISliderListener{
|
|||||||
private int type = 6;
|
private int type = 6;
|
||||||
private JobPuppet job;
|
private JobPuppet job;
|
||||||
private PartConfig part;
|
private PartConfig part;
|
||||||
|
|
||||||
|
private GuiNpcSlider rotateX;
|
||||||
|
private GuiNpcSlider rotateY;
|
||||||
|
private GuiNpcSlider rotateZ;
|
||||||
|
|
||||||
public GuiNpcPuppet(GuiScreen parent, EntityCustomNpc npc){
|
public GuiNpcPuppet(GuiScreen parent, EntityCustomNpc npc){
|
||||||
super(npc);
|
super(npc);
|
||||||
@@ -118,14 +122,20 @@ public class GuiNpcPuppet extends GuiModelInterface implements ISliderListener{
|
|||||||
addButton(new GuiNpcButton(29, guiLeft + 100, y , 80, 20, new String[]{"gui.enabled","gui.disabled"}, config.disabled?1:0));
|
addButton(new GuiNpcButton(29, guiLeft + 100, y , 80, 20, new String[]{"gui.enabled","gui.disabled"}, config.disabled?1:0));
|
||||||
y += 22;
|
y += 22;
|
||||||
addLabel(new GuiNpcLabel(10, "X", guiLeft, y + 5, 0xFFFFFF));
|
addLabel(new GuiNpcLabel(10, "X", guiLeft, y + 5, 0xFFFFFF));
|
||||||
addSlider(new GuiNpcSlider(this, 10, guiLeft + 50, y, config.rotationX + 0.5f));
|
rotateX = new GuiNpcSlider(this, 10, guiLeft + 50, y, config.rotationX + 0.5f);
|
||||||
|
addSlider(rotateX);
|
||||||
|
addButton(new GuiNpcButton(170, guiLeft + 8, y, 40, 20, "Reset"));
|
||||||
y += 22;
|
y += 22;
|
||||||
addLabel(new GuiNpcLabel(11, "Y", guiLeft, y + 5, 0xFFFFFF));
|
addLabel(new GuiNpcLabel(11, "Y", guiLeft, y + 5, 0xFFFFFF));
|
||||||
addSlider(new GuiNpcSlider(this, 11, guiLeft + 50, y, config.rotationY + 0.5f));
|
rotateY = new GuiNpcSlider(this, 11, guiLeft + 50, y, config.rotationY + 0.5f);
|
||||||
|
addSlider(rotateY);
|
||||||
|
addButton(new GuiNpcButton(171, guiLeft + 8, y, 40, 20, "Reset"));
|
||||||
y += 22;
|
y += 22;
|
||||||
addLabel(new GuiNpcLabel(12, "Z", guiLeft, y + 5, 0xFFFFFF));
|
addLabel(new GuiNpcLabel(12, "Z", guiLeft, y + 5, 0xFFFFFF));
|
||||||
addSlider(new GuiNpcSlider(this, 12, guiLeft + 50, y, config.rotationZ + 0.5f));
|
rotateZ = new GuiNpcSlider(this, 12, guiLeft + 50, y, config.rotationZ + 0.5f);
|
||||||
}
|
addSlider(rotateZ);
|
||||||
|
addButton(new GuiNpcButton(172, guiLeft + 8, y, 40, 20, "Reset"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -151,6 +161,29 @@ public class GuiNpcPuppet extends GuiModelInterface implements ISliderListener{
|
|||||||
if(btn.id == 32){
|
if(btn.id == 32){
|
||||||
job.whileAttacking = button.getValue() == 0;
|
job.whileAttacking = button.getValue() == 0;
|
||||||
}
|
}
|
||||||
|
if(btn.id == 170 || btn.id == 171 || btn.id == 172){
|
||||||
|
if(btn.id == 170){
|
||||||
|
System.out.println(part.rotationX);
|
||||||
|
System.out.println(rotateX.sliderValue);
|
||||||
|
part.rotationX = 0.0f;
|
||||||
|
rotateX.sliderValue = 0.5f;
|
||||||
|
int percent = (int) ((rotateX.sliderValue) * 360);
|
||||||
|
rotateX.setString(percent + "%");
|
||||||
|
}
|
||||||
|
else if(btn.id == 171){
|
||||||
|
part.rotationY = 0.0f;
|
||||||
|
rotateY.sliderValue = 0.5f;
|
||||||
|
int percent = (int) ((rotateY.sliderValue) * 360);
|
||||||
|
rotateY.setString(percent + "%");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
part.rotationZ = 0.0f;
|
||||||
|
rotateZ.sliderValue = 0.5f;
|
||||||
|
int percent = (int) ((rotateZ.sliderValue) * 360);
|
||||||
|
rotateZ.setString(percent + "%");
|
||||||
|
}
|
||||||
|
npc.updateHitbox();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public class ImageBufferDownloadAlt extends ImageBufferDownload {
|
|||||||
imageWidth = bufferedimage.getWidth(null);
|
imageWidth = bufferedimage.getWidth(null);
|
||||||
imageHeight = bufferedimage.getHeight(null);
|
imageHeight = bufferedimage.getHeight(null);
|
||||||
|
|
||||||
BufferedImage bufferedimage1 = new BufferedImage(imageWidth, imageWidth, 2);
|
BufferedImage bufferedimage1 = new BufferedImage(imageWidth, imageHeight, 2);
|
||||||
Graphics g = bufferedimage1.getGraphics();
|
Graphics g = bufferedimage1.getGraphics();
|
||||||
g.drawImage(bufferedimage, 0, 0, null);
|
g.drawImage(bufferedimage, 0, 0, null);
|
||||||
g.dispose();
|
g.dispose();
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ public class RenderNPCHumanMale extends RenderNPCInterface
|
|||||||
protected ModelNPCMale modelArmorChestplate;
|
protected ModelNPCMale modelArmorChestplate;
|
||||||
protected ModelNPCMale modelArmor;
|
protected ModelNPCMale modelArmor;
|
||||||
|
|
||||||
|
protected final ModelNPCMale originalBipedMain;
|
||||||
protected final ModelMPM steve = new ModelMPM(0, false);
|
protected final ModelMPM steve = new ModelMPM(0, false);
|
||||||
protected final ModelMPM alex = new ModelMPM(0, true);
|
protected final ModelMPM alex = new ModelMPM(0, true);
|
||||||
|
|
||||||
@@ -45,6 +46,7 @@ public class RenderNPCHumanMale extends RenderNPCInterface
|
|||||||
{
|
{
|
||||||
super(mainmodel, 0.5F);
|
super(mainmodel, 0.5F);
|
||||||
modelBipedMain = mainmodel;
|
modelBipedMain = mainmodel;
|
||||||
|
originalBipedMain = mainmodel;
|
||||||
modelArmorChestplate = armorChest;
|
modelArmorChestplate = armorChest;
|
||||||
modelArmor = armor;
|
modelArmor = armor;
|
||||||
}
|
}
|
||||||
@@ -132,6 +134,7 @@ public class RenderNPCHumanMale extends RenderNPCInterface
|
|||||||
((EntityCustomNpc) npc).modelData.armwear = 0;
|
((EntityCustomNpc) npc).modelData.armwear = 0;
|
||||||
((EntityCustomNpc) npc).modelData.legwear = 0;
|
((EntityCustomNpc) npc).modelData.legwear = 0;
|
||||||
this.mainModel = originalModel;
|
this.mainModel = originalModel;
|
||||||
|
this.modelBipedMain = originalBipedMain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -267,8 +267,11 @@ public class RenderNPCInterface extends RenderLiving{
|
|||||||
|
|
||||||
EntityNPCInterface npc = (EntityNPCInterface) entity;
|
EntityNPCInterface npc = (EntityNPCInterface) entity;
|
||||||
if(npc.textureLocation == null){
|
if(npc.textureLocation == null){
|
||||||
if(npc.display.skinType == 0)
|
if(npc.display.skinType == 0) {
|
||||||
npc.textureLocation = new ResourceLocation(npc.display.texture);
|
if (!(npc.display.texture).equals("")) {
|
||||||
|
npc.textureLocation = new ResourceLocation(npc.display.texture);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if(LastTextureTick < 5){ //fixes request flood somewhat
|
else if(LastTextureTick < 5){ //fixes request flood somewhat
|
||||||
return AbstractClientPlayer.locationStevePng;
|
return AbstractClientPlayer.locationStevePng;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1699,6 +1699,7 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
|||||||
{
|
{
|
||||||
return this.display.modelType;
|
return this.display.modelType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setModelType(int val)
|
public void setModelType(int val)
|
||||||
{
|
{
|
||||||
this.display.modelType = val;
|
this.display.modelType = val;
|
||||||
|
|||||||
@@ -57,6 +57,25 @@ public class ScriptNpc extends ScriptLiving{
|
|||||||
npc.display.modelSize = size;
|
npc.display.modelSize = size;
|
||||||
npc.script.clientNeedsUpdate = true;
|
npc.script.clientNeedsUpdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the current npcs modelType of the NPC
|
||||||
|
*/
|
||||||
|
public int getModelType(){
|
||||||
|
return npc.display.modelType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param modelType The modelType of the NPC. 0: Steve, 1: Steve64, 2: Alex
|
||||||
|
*/
|
||||||
|
public void setModelType(int modelType){
|
||||||
|
if(modelType > 2)
|
||||||
|
modelType = 2;
|
||||||
|
else if(modelType < 0)
|
||||||
|
modelType = 0;
|
||||||
|
npc.display.modelType = modelType;
|
||||||
|
npc.script.clientNeedsUpdate = true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The npcs name
|
* @return The npcs name
|
||||||
@@ -566,7 +585,7 @@ public class ScriptNpc extends ScriptLiving{
|
|||||||
* @since 1.7.10c
|
* @since 1.7.10c
|
||||||
* @param resistance Explosion resistance (0-2) default is 1
|
* @param resistance Explosion resistance (0-2) default is 1
|
||||||
*/
|
*/
|
||||||
public void seExplosionResistance(float resistance){
|
public void setExplosionResistance(float resistance){
|
||||||
npc.stats.resistances.explosion = ValueUtil.correctFloat(resistance, 0, 2);
|
npc.stats.resistances.explosion = ValueUtil.correctFloat(resistance, 0, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user