fix missing null check
This commit is contained in:
parent
2581f87f25
commit
b67c9b1e4b
|
@ -43,7 +43,7 @@ def travisbuildnumber = (System.getenv("TRAVIS_BUILD_NUMBER") ?: -111).toInteger
|
|||
version = "${config.mod_version}." + (buildnumber ?: travisbuildnumber)
|
||||
group= "${config.group_id}" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "${config.mod_id}"
|
||||
def numina_version = (System.getenv("NUMINA_VERSION") ?:"0.4.1.101")
|
||||
def numina_version = (System.getenv("NUMINA_VERSION") ?:"0.4.1.104")
|
||||
|
||||
minecraft {
|
||||
version = "${config.minecraft_version}-${config.forge_version}"
|
||||
|
|
|
@ -72,6 +72,8 @@ public class ToolModel extends ModelBase {
|
|||
mainarm.setTextureSize(64, 32);
|
||||
mainarm.mirror = true;
|
||||
setRotation(mainarm, 0.2617994F, 0F, 0F);
|
||||
|
||||
|
||||
armorright = new ModelRenderer(this, 42, 0);
|
||||
armorright.mirror = true;
|
||||
armorright.addBox(1F, -1F, -9F, 3, 5, 8);
|
||||
|
@ -80,42 +82,56 @@ public class ToolModel extends ModelBase {
|
|||
armorright.mirror = true;
|
||||
setRotation(armorright, 0.2617994F, 0F, 0F);
|
||||
armorright.mirror = false;
|
||||
|
||||
|
||||
armorleft = new ModelRenderer(this, 42, 0);
|
||||
armorleft.addBox(-4F, -1F, -9F, 3, 5, 8);
|
||||
armorleft.setRotationPoint(0F, 0F, 0F);
|
||||
armorleft.setTextureSize(64, 32);
|
||||
armorleft.mirror = true;
|
||||
setRotation(armorleft, 0.2617994F, 0F, 0F);
|
||||
|
||||
|
||||
wristtopright = new ModelRenderer(this, 0, 11);
|
||||
wristtopright.addBox(1F, 1F, 2F, 1, 1, 4);
|
||||
wristtopright.setRotationPoint(0F, 0F, 0F);
|
||||
wristtopright.setTextureSize(64, 32);
|
||||
wristtopright.mirror = true;
|
||||
setRotation(wristtopright, 0.2617994F, 0F, 0F);
|
||||
|
||||
|
||||
wristtopleft = new ModelRenderer(this, 0, 11);
|
||||
wristtopleft.addBox(-2F, 1F, 2F, 1, 1, 4);
|
||||
wristtopleft.setRotationPoint(0F, 0F, 0F);
|
||||
wristtopleft.setTextureSize(64, 32);
|
||||
wristtopleft.mirror = true;
|
||||
setRotation(wristtopleft, 0.2617994F, 0F, 0F);
|
||||
|
||||
|
||||
wristbottomright = new ModelRenderer(this, 0, 11);
|
||||
wristbottomright.addBox(1F, 3F, 2F, 1, 1, 4);
|
||||
wristbottomright.setRotationPoint(0F, 0F, 0F);
|
||||
wristbottomright.setTextureSize(64, 32);
|
||||
wristbottomright.mirror = true;
|
||||
setRotation(wristbottomright, 0.2617994F, 0F, 0F);
|
||||
|
||||
|
||||
wristbottomleft = new ModelRenderer(this, 0, 11);
|
||||
wristbottomleft.addBox(-2F, 3F, 2F, 1, 1, 4);
|
||||
wristbottomleft.setRotationPoint(0F, 0F, 0F);
|
||||
wristbottomleft.setTextureSize(64, 32);
|
||||
wristbottomleft.mirror = true;
|
||||
setRotation(wristbottomleft, 0.2617994F, 0F, 0F);
|
||||
|
||||
|
||||
index1 = new ModelRenderer(this, 34, 13);
|
||||
index1.addBox(-.5F, -.5F, 0F, 1, 1, 5);
|
||||
index1.setRotationPoint(-3.5F, -1.5F, 10F);
|
||||
index1.setTextureSize(64, 32);
|
||||
index1.mirror = true;
|
||||
setRotation(index1, 0.2617994F, 0F, 0F);
|
||||
|
||||
|
||||
index2 = new ModelRenderer(this, 34, 13);
|
||||
index2.addBox(-.5F, -.5F, 0F, 1, 1, 4);
|
||||
index2.setRotationPoint(0, 0, 5F);
|
||||
|
@ -123,167 +139,223 @@ public class ToolModel extends ModelBase {
|
|||
index2.mirror = true;
|
||||
index1.addChild(index2);
|
||||
setRotation(index2, -0.2617994F * 2, 0F, 0F);
|
||||
|
||||
|
||||
middlefinger1 = new ModelRenderer(this, 34, 13);
|
||||
middlefinger1.addBox(-.5F, -.5F, 0F, 1, 1, 6);
|
||||
middlefinger1.setRotationPoint(-1.5F, -1.5F, 10F);
|
||||
middlefinger1.setTextureSize(64, 32);
|
||||
middlefinger1.mirror = true;
|
||||
setRotation(middlefinger1, 0.2617994F, 0F, 0F);
|
||||
|
||||
|
||||
middlefinger2 = new ModelRenderer(this, 34, 13);
|
||||
middlefinger2.addBox(-.5F, -.5F, 0F, 1, 1, 4);
|
||||
middlefinger2.setRotationPoint(0, 0, 6F);
|
||||
middlefinger2.setTextureSize(64, 32);
|
||||
middlefinger2.mirror = true;
|
||||
setRotation(middlefinger2, -0.3444116F, 0F, 0F);
|
||||
|
||||
|
||||
ringfinger1 = new ModelRenderer(this, 34, 13);
|
||||
ringfinger1.addBox(-.5F, -.5F, 0F, 1, 1, 5);
|
||||
ringfinger1.setRotationPoint(0.5F, -1.5F, 10F);
|
||||
ringfinger1.setTextureSize(64, 32);
|
||||
ringfinger1.mirror = true;
|
||||
setRotation(ringfinger1, 0.2617994F, 0F, 0F);
|
||||
|
||||
|
||||
ringfinger2 = new ModelRenderer(this, 34, 13);
|
||||
ringfinger2.addBox(-.5F, -.5F, 0F, 1, 1, 4);
|
||||
ringfinger2.setRotationPoint(0, 0, 5F);
|
||||
ringfinger2.setTextureSize(64, 32);
|
||||
ringfinger2.mirror = true;
|
||||
setRotation(ringfinger2, -0.2617994F, 0F, 0F);
|
||||
|
||||
|
||||
pinky1 = new ModelRenderer(this, 34, 13);
|
||||
pinky1.addBox(-.5F, -.5F, 0F, 1, 1, 4);
|
||||
pinky1.setRotationPoint(2.5F, -1.5F, 10F);
|
||||
pinky1.setTextureSize(64, 32);
|
||||
pinky1.mirror = true;
|
||||
setRotation(pinky1, 0.2617994F, 0F, 0F);
|
||||
|
||||
|
||||
pinky2 = new ModelRenderer(this, 34, 13);
|
||||
pinky2.addBox(-.5F, -.5F, 0F, 1, 1, 4);
|
||||
pinky2.setRotationPoint(0, 0, 4F);
|
||||
pinky2.setTextureSize(64, 32);
|
||||
pinky2.mirror = true;
|
||||
setRotation(pinky2, -0.4537856F, 0F, 0F);
|
||||
|
||||
|
||||
thumb1 = new ModelRenderer(this, 16, 9);
|
||||
thumb1.addBox(-.5F, -1F, 0F, 1, 2, 4);
|
||||
thumb1.setRotationPoint(-4F, 1.5F, 8F);
|
||||
thumb1.setTextureSize(64, 32);
|
||||
thumb1.mirror = true;
|
||||
setRotation(thumb1, 0F, -0.4014257F, 0F);
|
||||
|
||||
|
||||
thumb2 = new ModelRenderer(this, 10, 0);
|
||||
thumb2.addBox(-.5F, -.5F, 0F, 1, 1, 3);
|
||||
thumb2.setRotationPoint(0, 0, 4F);
|
||||
thumb2.setTextureSize(64, 32);
|
||||
thumb2.mirror = true;
|
||||
setRotation(thumb2, 0F, 0F, 0F);
|
||||
|
||||
|
||||
fingerguard = new ModelRenderer(this, 28, 9);
|
||||
fingerguard.addBox(-3F, -2F, 8F, 5, 2, 2);
|
||||
fingerguard.setRotationPoint(0F, 0F, 0F);
|
||||
fingerguard.setTextureSize(64, 32);
|
||||
fingerguard.mirror = true;
|
||||
setRotation(fingerguard, 0F, 0F, 0F);
|
||||
|
||||
|
||||
crystalholder = new ModelRenderer(this, 48, 13);
|
||||
crystalholder.addBox(-2F, -1F, -3F, 4, 4, 4);
|
||||
crystalholder.setRotationPoint(0F, 0F, 0F);
|
||||
crystalholder.setTextureSize(64, 32);
|
||||
crystalholder.mirror = true;
|
||||
setRotation(crystalholder, 0F, 0F, 0F);
|
||||
|
||||
|
||||
crystal = new ModelRenderer(this, 32, 27);
|
||||
crystal.addBox(-1F, -2F, -2F, 2, 2, 2);
|
||||
crystal.setRotationPoint(0F, 0F, 0F);
|
||||
crystal.setTextureSize(64, 32);
|
||||
crystal.mirror = true;
|
||||
setRotation(crystal, 0F, 0F, 0F);
|
||||
|
||||
|
||||
supportright1 = new ModelRenderer(this, 54, 27);
|
||||
supportright1.addBox(-1.8F, -0.8F, -6.066667F, 4, 1, 1);
|
||||
supportright1.setRotationPoint(0F, 0F, 0F);
|
||||
supportright1.setTextureSize(64, 32);
|
||||
supportright1.mirror = true;
|
||||
setRotation(supportright1, 0.2722714F, -1.066972F, 0F);
|
||||
|
||||
|
||||
supportright2 = new ModelRenderer(this, 52, 21);
|
||||
supportright2.addBox(4F, 0.4666667F, 2.5F, 2, 2, 1);
|
||||
supportright2.setRotationPoint(0F, 0F, 0F);
|
||||
supportright2.setTextureSize(64, 32);
|
||||
supportright2.mirror = true;
|
||||
setRotation(supportright2, 0F, 0.6329786F, 0F);
|
||||
|
||||
|
||||
supportright3 = new ModelRenderer(this, 52, 21);
|
||||
supportright3.addBox(5.1F, 1F, -0.8333333F, 1, 1, 5);
|
||||
supportright3.setRotationPoint(0F, 0F, 0F);
|
||||
supportright3.setTextureSize(64, 32);
|
||||
supportright3.mirror = true;
|
||||
setRotation(supportright3, 0F, 0F, 0F);
|
||||
|
||||
|
||||
supportright4 = new ModelRenderer(this, 52, 21);
|
||||
supportright4.addBox(5.633333F, 0.4666667F, 1.7F, 2, 2, 1);
|
||||
supportright4.setRotationPoint(0F, 0F, 0F);
|
||||
supportright4.setTextureSize(64, 32);
|
||||
supportright4.mirror = true;
|
||||
setRotation(supportright4, 0F, -0.3688404F, 0F);
|
||||
|
||||
|
||||
supportright5 = new ModelRenderer(this, 54, 27);
|
||||
supportright5.addBox(-2.866667F, 1F, 6.333333F, 4, 1, 1);
|
||||
supportright5.setRotationPoint(0F, 0F, 0F);
|
||||
supportright5.setTextureSize(64, 32);
|
||||
supportright5.mirror = true;
|
||||
setRotation(supportright5, 0F, 0.7714355F, 0F);
|
||||
|
||||
|
||||
supportbaseright = new ModelRenderer(this, 47, 21);
|
||||
supportbaseright.addBox(1.433333F, -0.6666667F, -5.4F, 3, 3, 5);
|
||||
supportbaseright.setRotationPoint(0F, 0F, 0F);
|
||||
supportbaseright.setTextureSize(64, 32);
|
||||
supportbaseright.mirror = true;
|
||||
setRotation(supportbaseright, 0.2617994F, 0F, 0F);
|
||||
|
||||
|
||||
palm = new ModelRenderer(this, 18, 0);
|
||||
palm.addBox(-4F, -1F, 5F, 7, 4, 5);
|
||||
palm.setRotationPoint(0F, 0F, 0F);
|
||||
palm.setTextureSize(64, 32);
|
||||
palm.mirror = true;
|
||||
setRotation(palm, 0F, 0F, 0F);
|
||||
|
||||
|
||||
supportbaseleft = new ModelRenderer(this, 47, 21);
|
||||
supportbaseleft.addBox(-4.4F, -0.6666667F, -5.4F, 3, 3, 5);
|
||||
supportbaseleft.setRotationPoint(0F, 0F, 0F);
|
||||
supportbaseleft.setTextureSize(64, 32);
|
||||
supportbaseleft.mirror = true;
|
||||
setRotation(supportbaseleft, 0.2617994F, 0F, 0F);
|
||||
|
||||
|
||||
supportleftfront = new ModelRenderer(this, 49, 23);
|
||||
supportleftfront.addBox(-4.333333F, 0.3333333F, 4.666667F, 1, 2, 3);
|
||||
supportleftfront.setRotationPoint(0F, 0F, 0F);
|
||||
supportleftfront.setTextureSize(64, 32);
|
||||
supportleftfront.mirror = true;
|
||||
setRotation(supportleftfront, 0F, 0F, 0F);
|
||||
|
||||
|
||||
supportrightfront = new ModelRenderer(this, 49, 23);
|
||||
supportrightfront.addBox(2.3F, 0.3333333F, 4.666667F, 1, 2, 3);
|
||||
supportrightfront.setRotationPoint(0F, 0F, 0F);
|
||||
supportrightfront.setTextureSize(64, 32);
|
||||
supportrightfront.mirror = true;
|
||||
setRotation(supportrightfront, 0F, 0F, 0F);
|
||||
|
||||
|
||||
supportleft1 = new ModelRenderer(this, 54, 27);
|
||||
supportleft1.addBox(-2.2F, -0.4F, -6.066667F, 4, 1, 1);
|
||||
supportleft1.setRotationPoint(0F, 0F, 0F);
|
||||
supportleft1.setTextureSize(64, 32);
|
||||
supportleft1.mirror = true;
|
||||
setRotation(supportleft1, 0.2722714F, 1.066978F, 0F);
|
||||
|
||||
|
||||
supportleft2 = new ModelRenderer(this, 52, 21);
|
||||
supportleft2.addBox(-6F, 0.4666667F, 2.5F, 2, 2, 1);
|
||||
supportleft2.setRotationPoint(0F, 0F, 0F);
|
||||
supportleft2.setTextureSize(64, 32);
|
||||
supportleft2.mirror = true;
|
||||
setRotation(supportleft2, 0F, -0.6329727F, 0F);
|
||||
|
||||
|
||||
supportleft3 = new ModelRenderer(this, 52, 21);
|
||||
supportleft3.addBox(-6.5F, 1F, -0.5F, 1, 1, 5);
|
||||
supportleft3.setRotationPoint(0F, 0F, 0F);
|
||||
supportleft3.setTextureSize(64, 32);
|
||||
supportleft3.mirror = true;
|
||||
setRotation(supportleft3, 0F, 0F, 0F);
|
||||
|
||||
|
||||
supportleft4 = new ModelRenderer(this, 52, 21);
|
||||
supportleft4.addBox(-7.9F, 0.4666667F, 1.7F, 2, 2, 1);
|
||||
supportleft4.setRotationPoint(0F, 0F, 0F);
|
||||
supportleft4.setTextureSize(64, 32);
|
||||
supportleft4.mirror = true;
|
||||
setRotation(supportleft4, 0F, 0.3688462F, 0F);
|
||||
|
||||
|
||||
supportleft5 = new ModelRenderer(this, 54, 27);
|
||||
supportleft5.addBox(-0.8666667F, 1F, 7F, 4, 1, 1);
|
||||
supportleft5.setRotationPoint(0F, 0F, 0F);
|
||||
supportleft5.setTextureSize(64, 32);
|
||||
supportleft5.mirror = true;
|
||||
setRotation(supportleft5, 0F, -0.7714355F, 0F);
|
||||
|
||||
|
||||
index1.addChild(index2);
|
||||
middlefinger1.addChild(middlefinger2);
|
||||
ringfinger1.addChild(ringfinger2);
|
||||
pinky1.addChild(pinky2);
|
||||
thumb1.addChild(thumb2);
|
||||
|
||||
|
||||
palm.addChild(index1);
|
||||
palm.addChild(middlefinger1);
|
||||
palm.addChild(ringfinger1);
|
||||
|
|
|
@ -128,7 +128,6 @@ public class ToolRenderer extends MuseRender implements IItemRenderer {
|
|||
public void renderFirstPersonArm(EntityClientPlayerMP entityclientplayermp, float par1) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
float changeItemProgress = 0;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f4 = 0.8F;
|
||||
float swingProgress = entityclientplayermp.getSwingProgress(par1);
|
||||
|
|
|
@ -67,7 +67,7 @@ public class KeybindKeyHandler {
|
|||
Minecraft.getMinecraft().playerController.updateController();
|
||||
((IModeChangingModularItem)modeChangingModularItem).cycleModeForItem(player.inventory.getStackInSlot(player.inventory.currentItem), player, 1);
|
||||
}
|
||||
if (key == cycleToolForward.getKeyCode()) {
|
||||
if (key == cycleToolForward.getKeyCode() && modeChangingModularItem != null) {
|
||||
Minecraft.getMinecraft().playerController.updateController();
|
||||
((IModeChangingModularItem)modeChangingModularItem).cycleModeForItem(player.inventory.getStackInSlot(player.inventory.currentItem), player, -1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue