josh anims :3

This commit is contained in:
70000hp 2023-08-31 10:13:34 -04:00
parent 2ff5096562
commit cb90b2973c
3 changed files with 7910 additions and 8099 deletions

View File

@ -108,6 +108,7 @@ public class Gun50BMGFactory {
config.firingMode = GunConfiguration.FIRE_AUTO;
config.reloadDuration = 20;
config.firingDuration = 0;
config.reloadSoundEnd = false;
config.ammoCap = 50;
config.reloadType = GunConfiguration.RELOAD_FULL;
config.allowsInfinity = true;
@ -135,6 +136,25 @@ public class Gun50BMGFactory {
config.ejector = EJECTOR_BMG;
config.animations.put(AnimType.CYCLE, new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 25))
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 75))
)
);
config.animations.put(AnimType.RELOAD, new BusAnimation()
.addBus("TILT", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 125))
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 750))
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 125))
)
.addBus("MAG", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(0, 0, 1, 200))
.addKeyframe(new BusAnimationKeyframe(1, 0, 1, 200))
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 200))
)
);
return config;
}

View File

@ -1,5 +1,7 @@
package com.hbm.render.item.weapon;
import com.hbm.render.anim.HbmAnimations;
import net.minecraftforge.client.model.IModelCustom;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
@ -36,36 +38,61 @@ public class ItemRenderWeaponAR15 implements IItemRenderer {
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ar15_tex);
IModelCustom model = ResourceManager.ar15;
switch (type) {
case EQUIPPED_FIRST_PERSON:
double s0 = 0.125D;
double s0 = 0.25D;
GL11.glRotated(25, 0, 0, 1);
GL11.glTranslated(1.0, 0.0, -0.5);
GL11.glRotated(80, 0, 1, 0);
GL11.glTranslated(1.25, 0, -0.25);
GL11.glRotated(-100, 0, 1, 0);
GL11.glScaled(s0, s0, s0);
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
GL11.glRotated(recoil[0] * 2.5, 1, 0, 0);
GL11.glTranslated(0, 0, recoil[0]);
double[] tilt = HbmAnimations.getRelevantTransformation("TILT");
GL11.glTranslated(0, tilt[0], 3);
GL11.glRotated(tilt[0] * -35, 0, 0, 1);
GL11.glTranslated(0, 0, -3);
model.renderPart("main");
double[] mag = HbmAnimations.getRelevantTransformation("MAG");
GL11.glPushMatrix();
GL11.glTranslated(0, 0, 5);
GL11.glRotated(mag[0] * 60 * (mag[2] == 1 ? 2.5 : 1), -1, 0, 0);
GL11.glTranslated(0, 0, -5);
model.renderPart("mag");
GL11.glPopMatrix();
break;
case EQUIPPED:
double scale = 0.125D;
double scale = 0.25D;
GL11.glScaled(scale, scale, scale);
GL11.glRotatef(20F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(10, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(15F, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(4F, -2F, 5F);
GL11.glRotatef(15F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(-170, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-15F, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(-2F, -0.9F, -0.75F);
break;
case ENTITY:
double s1 = 0.1D;
double s1 = 0.2D;
GL11.glScaled(s1, s1, s1);
GL11.glTranslated(0, 1, 0);
GL11.glRotatef(90, 0, 1, 0);
break;
@ -73,21 +100,24 @@ public class ItemRenderWeaponAR15 implements IItemRenderer {
GL11.glEnable(GL11.GL_LIGHTING);
double s = 0.75D;
double s = 1.45D;
GL11.glTranslated(6, 9, 0);
GL11.glRotated(-90, 0, 1, 0);
GL11.glRotated(-135, 1, 0, 0);
GL11.glRotated(90, 0, 1, 0);
GL11.glRotated(135, 1, 0, 0);
GL11.glScaled(s, s, -s);
break;
default: break;
default:
break;
}
GL11.glShadeModel(GL11.GL_SMOOTH);
ResourceManager.ar15.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
if (type != ItemRenderType.EQUIPPED_FIRST_PERSON) {
model.renderAll();
}
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
}
}

File diff suppressed because it is too large Load Diff