mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
benelli my beloved wife, smite this unholy glyphid scum
This commit is contained in:
parent
211028b4ef
commit
8408a8e239
@ -226,32 +226,6 @@ public class Gun12GaugeFactory {
|
||||
config.firingSound = "hbm:weapon.deagleShoot";
|
||||
config.firingPitch = 0.75F;
|
||||
config.reloadType = 2;
|
||||
config.reloadSoundEnd = true;
|
||||
|
||||
config.animations.put(AnimType.CYCLE, new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence()
|
||||
.addKeyframePosition(6.25, 0.25, 2.5, 55)
|
||||
.addKeyframePosition(0, 0, 0, 55)
|
||||
)
|
||||
.addBus("EJECT", new BusAnimationSequence()
|
||||
.addKeyframePosition(0, 0, 0, 25)
|
||||
.addKeyframePosition(25, 0, 0, 100)
|
||||
)
|
||||
);
|
||||
|
||||
config.animations.put(AnimType.RELOAD, new BusAnimation()
|
||||
.addBus("RELOAD", new BusAnimationSequence()
|
||||
.addKeyframePosition(60, 0, -10, 400)
|
||||
.addKeyframePosition(60, 125, -10, 200)
|
||||
.addKeyframePosition(60, 125, -10, 300)
|
||||
.addKeyframePosition(0, 0, 0, 300)
|
||||
)
|
||||
.addBus("PUMP", new BusAnimationSequence()
|
||||
.addKeyframePosition(0, 0, 0, 900)
|
||||
.addKeyframePosition(10, 0, 0, 200)
|
||||
.addKeyframePosition(0, 0, 0, 1)
|
||||
)
|
||||
);
|
||||
|
||||
config.name = "benelli";
|
||||
config.manufacturer = EnumGunManufacturer.BENELLI;
|
||||
@ -269,10 +243,18 @@ public class Gun12GaugeFactory {
|
||||
|
||||
config.reloadType = 1;
|
||||
config.ammoCap = 24;
|
||||
config.reloadDuration = 20;
|
||||
config.reloadDuration = 21;
|
||||
config.emptyReloadAdditionalDuration = 15;
|
||||
config.reloadSound = GunConfiguration.RSOUND_MAG;
|
||||
config.reloadSoundEnd = true;
|
||||
config.reloadSoundEnd = false;
|
||||
config.name += "Drum";
|
||||
|
||||
config.loadAnimations = i -> {
|
||||
config.animations.put(AnimType.CYCLE, ResourceManager.benelli_anim.get("Fire"));
|
||||
config.animations.put(AnimType.RELOAD, ResourceManager.benelli_anim.get("Reload"));
|
||||
config.animations.put(AnimType.RELOAD_EMPTY, ResourceManager.benelli_anim.get("ReloadEmpty"));
|
||||
};
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
|
||||
@ -852,6 +852,7 @@ public class ResourceManager {
|
||||
public static final HashMap<String, BusAnimation> ks23_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/ks23.json"));
|
||||
public static final HashMap<String, BusAnimation> spas_12_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/spas12.json"));
|
||||
public static final HashMap<String, BusAnimation> supershotty_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/supershotty.json"));
|
||||
public static final HashMap<String, BusAnimation> benelli_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/benelli.json"));
|
||||
|
||||
public static final IModelCustom lance = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/lance.obj"));
|
||||
|
||||
|
||||
@ -33,14 +33,8 @@ public class ItemRenderBenelli implements IItemRenderer
|
||||
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING);
|
||||
}
|
||||
|
||||
static final String body = "Body.001_Cube.001";
|
||||
static final String frontGrip = "Pump_Cylinder.003";
|
||||
static final String slide = "Cylinder";
|
||||
static final String barrelAndTube = "Body_Cube.002";
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
int magSize = ItemGunBase.getMag(item);
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
GL11.glPushMatrix();
|
||||
|
||||
@ -50,9 +44,6 @@ public class ItemRenderBenelli implements IItemRenderer
|
||||
final float scale1 = 0.2F;
|
||||
final double scale2 = 0.065D;
|
||||
final double scale3 = 0.52D;
|
||||
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
double[] feedNew = HbmAnimations.getRelevantTransformation("PUMP");
|
||||
|
||||
switch (type) {
|
||||
case EQUIPPED_FIRST_PERSON:// In hand from POV
|
||||
@ -63,31 +54,43 @@ public class ItemRenderBenelli implements IItemRenderer
|
||||
GL11.glTranslatef(-1.007F, 0F, -2.5F);
|
||||
}
|
||||
else {
|
||||
GL11.glRotatef(30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -1F, -2.5F);
|
||||
GL11.glRotatef(-10F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.5F, -2.5F);
|
||||
}
|
||||
|
||||
GL11.glScalef(scale1, scale1, scale1);
|
||||
// Move on recoil
|
||||
GL11.glTranslated(0, recoil[1], recoil[2]);
|
||||
GL11.glRotated(recoil[0], 1, 0, 0);
|
||||
// Move up for reload
|
||||
|
||||
HbmAnimations.applyRelevantTransformation("Body");
|
||||
ResourceManager.benelli.renderPart("Body");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
ResourceManager.benelli.renderAll();
|
||||
// Pump new round if empty
|
||||
if (magSize == 0)
|
||||
GL11.glTranslated(feedNew[0], feedNew[1], feedNew[2]);
|
||||
ResourceManager.benelli.renderPart(slide);
|
||||
|
||||
HbmAnimations.applyRelevantTransformation("Bolt");
|
||||
ResourceManager.benelli.renderPart("Bolt");
|
||||
|
||||
GL11.glPopMatrix();
|
||||
// Eject spent shell
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
HbmAnimations.applyRelevantTransformation("Drum");
|
||||
ResourceManager.benelli.renderPart("Drum");
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
HbmAnimations.applyRelevantTransformation("Shell");
|
||||
ResourceManager.benelli.renderPart("Shell");
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
break;
|
||||
case EQUIPPED:// In hand from other's POV
|
||||
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(-0.4F, 0.05F, -0.5F);
|
||||
GL11.glRotated(recoil[0], 1, 0, 0);
|
||||
GL11.glScaled(scale2 - scale2 * 2, scale2, scale2);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user