mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Add animations to Cursed 357
This commit is contained in:
parent
41759d096d
commit
60de291033
@ -129,6 +129,11 @@ public class Gun357MagnumFactory {
|
||||
config.config = new ArrayList<Integer>();
|
||||
config.config.add(BulletConfigSyncingUtil.CURSED_REVOLVER);
|
||||
config.config.add(BulletConfigSyncingUtil.DESH_REVOLVER);
|
||||
|
||||
config.loadAnimations = i -> {
|
||||
config.animations.put(AnimType.CYCLE, ResourceManager.cursed_anim.get("Fire"));
|
||||
config.animations.put(AnimType.RELOAD, ResourceManager.cursed_anim.get("Reload"));
|
||||
};
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
@ -846,6 +846,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom lilmac = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/lilmac.obj")).asDisplayList();
|
||||
|
||||
public static final HashMap<String, BusAnimation> python_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/python.json"));
|
||||
public static final HashMap<String, BusAnimation> cursed_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/cursed.json"));
|
||||
|
||||
public static final IModelCustom lance = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/lance.obj"));
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.render.item.weapon;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -39,30 +40,52 @@ public class ItemRenderWeaponFFCursed implements IItemRenderer {
|
||||
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
|
||||
double s0 = 0.25D;
|
||||
GL11.glTranslated(0.75, 0.25, 0);
|
||||
double s0 = 1.5D;
|
||||
GL11.glTranslated(0.75, 0.5, 0);
|
||||
GL11.glScaled(s0, s0, s0);
|
||||
GL11.glRotated(170, 0, 1, 0);
|
||||
GL11.glRotated(25, 0, 0, -1);
|
||||
GL11.glRotated(100, 0, -1, 0);
|
||||
GL11.glRotated(20, 1, 0, 0);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
HbmAnimations.applyRelevantTransformation("Body");
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ff_cursed);
|
||||
ResourceManager.cursed_revolver.renderPart("Body");
|
||||
ResourceManager.cursed_revolver.renderPart("Barrel");
|
||||
ResourceManager.cursed_revolver.renderPart("Grip");
|
||||
|
||||
break;
|
||||
GL11.glPushMatrix();
|
||||
HbmAnimations.applyRelevantTransformation("Slide");
|
||||
ResourceManager.cursed_revolver.renderPart("Slide");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
HbmAnimations.applyRelevantTransformation("Magazine");
|
||||
ResourceManager.cursed_revolver.renderPart("Magazine");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
return;
|
||||
|
||||
case EQUIPPED:
|
||||
|
||||
double scale = 0.25D;
|
||||
GL11.glRotated(105, 0, 1, 0);
|
||||
double scale = 1.5D;
|
||||
GL11.glRotated(195, 0, 1, 0);
|
||||
GL11.glRotated(-10, 0, 0, 1);
|
||||
GL11.glRotated(-10, 1, 0, 0);
|
||||
GL11.glRotated(10, 0, 0, 1);
|
||||
GL11.glTranslated(0.2, 0.05, 0.45);
|
||||
GL11.glTranslated(-0.5, 0.1, -0.25);
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
break;
|
||||
|
||||
case ENTITY:
|
||||
|
||||
double s1 = 0.125D;
|
||||
double s1 = 1D;
|
||||
GL11.glScaled(s1, s1, s1);
|
||||
GL11.glTranslated(1, 0, 0);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
|
||||
break;
|
||||
|
||||
@ -70,10 +93,10 @@ public class ItemRenderWeaponFFCursed implements IItemRenderer {
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
double s = 2.75D;
|
||||
double s = 17D;
|
||||
GL11.glTranslated(10, 11.5, 0);
|
||||
GL11.glRotated(-135, 0, 0, 1);
|
||||
GL11.glRotated(180, 0, 1, 0);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glScaled(s, s, -s);
|
||||
|
||||
break;
|
||||
|
||||
@ -0,0 +1 @@
|
||||
{"Fire": {"Body": {"location": {"z": [[-0.0, 0.0], [-0.0, 16.666666666666668], [0.1901400089263916, 50.0], [-0.0, 183.33333333333331]], "y": [[0.0, 0.0], [0.0, 16.666666666666668], [0.040800124406814575, 50.0], [0.0, 183.33333333333331]]}, "rotation_euler": {"x": [[0.0, 33.333333333333336], [38.989947046815615, 66.66666666666666], [0.0, 250.0]]}}, "Slide": {"location": {"z": [[-0.0, 0.0], [0.12989415228366852, 16.666666666666668], [0.12989415228366852, 50.0], [0.09892651438713074, 83.33333333333333], [-0.0, 83.33333333333334]]}}}, "Reload": {"Body": {"location": {"x": [[0.0, 0.0], [0.0, 100.0], [0.017018239945173264, 116.66666666666669], [-0.09787648171186447, 83.33333333333331], [-0.12292511016130447, 266.66666666666663], [-0.10135655850172043, 133.33333333333337], [-0.1491556018590927, 150.0], [-0.13177432119846344, 400.0], [0.0, 283.33333333333326]], "z": [[-0.0, 0.0], [0.08164123445749283, 100.0], [-0.08178003877401352, 116.66666666666669], [-0.09053938835859299, 83.33333333333331], [-0.05708351731300354, 233.33333333333337], [-0.03883926570415497, 166.66666666666663], [0.0013935839524492621, 150.0], [0.006992057431489229, 400.0], [-0.0, 283.33333333333326]], "y": [[0.0, 0.0], [0.18025973439216614, 100.0], [0.44325628876686096, 116.66666666666669], [0.21647267043590546, 83.33333333333331], [0.27539756894111633, 200.0], [0.10282676666975021, 200.0], [0.16902926564216614, 150.0], [-0.034092918038368225, 400.0], [0.0, 283.33333333333326]]}, "rotation_euler": {"x": [[0.0, 0.0], [14.347078728989414, 66.66666666666667], [22.703222659589517, 99.99999999999999], [15.15270124913971, 83.33333333333334], [1.8531396048511795, 100.0], [-18.417429219568255, 266.66666666666674], [-18.417429219568255, 99.99999999999989], [59.33201599901403, 200.0], [72.57186642203102, 216.66666666666663], [62.294070966562636, 116.66666666666674], [54.952785571147, 83.33333333333326], [0.0, 200.0]], "z": [[0.0, 0.0], [-10.592385430902713, 66.66666666666667], [-15.994342771878069, 99.99999999999999], [-11.103182835529408, 83.33333333333334], [-9.371659871492183, 100.0], [-9.698956560103671, 266.66666666666674], [-9.698956560103671, 149.9999999999999], [-50.8729052591287, 150.0], [-75.4402931564371, 216.66666666666663], [-52.8528848919616, 116.66666666666674], [-36.719021845907676, 83.33333333333326], [-0.0, 200.0]], "y": [[0.0, 0.0], [-3.154393948349805, 66.66666666666667], [-4.726022183917031, 99.99999999999999], [-3.3394954899517355, 83.33333333333334], [-2.877424441420499, 100.0], [-5.679812424619238, 266.66666666666674], [-5.679812424619238, 183.33333333333326], [-0.6765985391814631, 116.66666666666663], [21.457408107810238, 216.66666666666663], [34.27835619884117, 116.66666666666674], [43.4361748002513, 83.33333333333326], [0.0, 200.0]]}}, "Magazine": {"location": {"z": [[-0.0, 0.0], [-0.0, 300.0], [0.14596298336982727, 183.33333333333331], [0.41417545080184937, 249.99999999999994], [0.11441206932067871, 200.0000000000001], [-0.0, 133.33333333333337]], "y": [[0.0, 0.0], [0.0, 300.0], [-0.6360859274864197, 183.33333333333331], [-0.6360859274864197, 249.99999999999994], [-0.4159921109676361, 200.0000000000001], [0.0, 133.33333333333337]]}}, "Slide": {"location": {"z": [[-0.0, 0.0], [0.13051199913024902, 16.666666666666668], [0.13051199913024902, 1133.3333333333333], [0.0854932963848114, 66.66666666666652], [-0.0, 50.0]]}}}}
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user