spontaneous comeback

This commit is contained in:
Bob 2024-12-28 00:16:38 +01:00
parent 89a3a1f9bc
commit dbcb2e2aa2
25 changed files with 5444 additions and 972 deletions

View File

@ -1,3 +1,9 @@
## Added
* Double barrel shotgun
* Special weapon, spawns as part of certain loot pools
* Uses the new 10 gauge caliber
* Will reload after each shot, however it is not belt-fed, if ammo is depleted, the next reload must be triggered manually
## Changed
* Removed the old casing items
* Reduced the flicker on the autoshotgun's holo sights
@ -12,4 +18,8 @@
* Fixed entities (especially players) not being affected at all by their own explosions (rockets, 40mm grenades, etc)
* To keep rocket jumping at least somewhat viable, self-damage from explosions is reduced by 50%, the knockback remains the same
* Fixed missing localization for the casing molds
* Fixed the broken CIWS turret crashing instantly
* Fixed the broken CIWS turret crashing instantly
* Added safeguards to prevent any unnamed casing config from crashing
* Fixed one of the break action revolver's faces having incorrect normals, making it invisible
* Fixed the fluid trait config not loading correctly
* Fluids are now subject to the /ntmreload command

View File

@ -1,6 +1,6 @@
mod_version=1.0.27
# Empty build number makes a release type
mod_build_number=5188
mod_build_number=5193
credits=HbMinecraft,\
\ rodolphito (explosion algorithms),\

View File

@ -232,6 +232,21 @@ public class AmmoPressRecipes extends SerializableRecipe {
null, wp, null,
null, smokeless, null,
null, sShell, null));
recipes.add(new AmmoPressRecipe(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.G10, 4),
null, nugget.copy(8), null,
null, smokeless.copy(2), null,
null, sShell, null));
recipes.add(new AmmoPressRecipe(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.G10_SHRAPNEL, 4),
plastic, nugget.copy(8), null,
null, smokeless.copy(2), null,
null, sShell, null));
recipes.add(new AmmoPressRecipe(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.G10_DU, 4),
null, uranium, null,
null, smokeless.copy(2), null,
null, sShell, null));
recipes.add(new AmmoPressRecipe(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.G26_FLARE, 4),
null, rp, null,

View File

@ -40,6 +40,7 @@ public class ItemPoolsC130 {
weighted(ModItems.gun_carbine, 0, 1, 1, 5),
weighted(ModItems.gun_heavy_revolver, 0, 1, 1, 5),
weighted(ModItems.gun_panzerschreck, 0, 1, 1, 2),
weighted(ModItems.gun_double_barrel, 0, 1, 1, 1),
};
}};

View File

@ -132,7 +132,8 @@ public class ItemPoolsLegacy {
weighted(ModItems.gas_mask_filter, 0, 1, 1, 4),
weighted(ModItems.journal_pip, 0, 1, 1, 1),
weighted(ModItems.journal_bj, 0, 1, 1, 1),
weighted(ModItems.launch_code_piece, 0, 1, 1, 1)
weighted(ModItems.launch_code_piece, 0, 1, 1, 1),
weighted(ModItems.gun_double_barrel, 0, 1, 1, 1),
};
}};

View File

@ -1516,6 +1516,7 @@ public class ModItems {
public static Item gun_hangman;
public static Item gun_bolter;
public static Item gun_folly;
public static Item gun_double_barrel;
public static Item ammo_standard;
public static Item ammo_secret;
@ -6526,6 +6527,7 @@ public class ModItems {
GameRegistry.registerItem(gun_hangman, gun_hangman.getUnlocalizedName());
GameRegistry.registerItem(gun_bolter, gun_bolter.getUnlocalizedName());
GameRegistry.registerItem(gun_folly, gun_folly.getUnlocalizedName());
GameRegistry.registerItem(gun_double_barrel, gun_double_barrel.getUnlocalizedName());
GameRegistry.registerItem(ammo_standard, ammo_standard.getUnlocalizedName());
GameRegistry.registerItem(ammo_secret, ammo_secret.getUnlocalizedName());

View File

@ -28,6 +28,7 @@ public class Receiver {
public static final String B_DOESDRYFIRE = "B_DOESDRYFIRE";
public static final String B_DOESDRYFIREAFTERAUTO = "B_DOESDRYFIREAFTERAUTO";
public static final String B_EJECTONFIRE = "B_EJECTONFIRE";
public static final String B_RELOADONEMPTY = "B_RELOADONEMPTY";
public static final String I_RELOADBEGINDURATION = "I_RELOADBEGINDURATION";
public static final String I_RELOADCYCLEDURATION = "I_RELOADCYCLEDURATION";
public static final String I_RELOADENDDURATION = "I_RELOADENDDURATION";
@ -59,6 +60,7 @@ public class Receiver {
protected boolean doesDryFire_DNA = true;
protected boolean doesDryFireAfterAuto_DNA = false;
protected boolean ejectOnFire_DNA = true;
protected boolean reloadOnEmpty_DNA = false;
protected int reloadBeginDuration_DNA;
protected int reloadCycleDuration_DNA;
protected int reloadEndDuration_DNA;
@ -86,6 +88,7 @@ public class Receiver {
public boolean getDoesDryFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.doesDryFire_DNA, stack, B_DOESDRYFIRE, this); }
public boolean getDoesDryFireAfterAuto(ItemStack stack) { return WeaponUpgradeManager.eval(this.doesDryFireAfterAuto_DNA, stack, B_DOESDRYFIREAFTERAUTO, this); }
public boolean getEjectOnFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.ejectOnFire_DNA, stack, B_EJECTONFIRE, this); }
public boolean getReloadOnEmpty(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadOnEmpty_DNA, stack, B_RELOADONEMPTY, this); }
public int getReloadBeginDuration(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadBeginDuration_DNA, stack, I_RELOADBEGINDURATION, this); }
public int getReloadCycleDuration(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadCycleDuration_DNA, stack, I_RELOADCYCLEDURATION, this); }
public int getReloadEndDuration(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadEndDuration_DNA, stack, I_RELOADENDDURATION, this); }
@ -106,7 +109,7 @@ public class Receiver {
/* SETTERS */
public Receiver dmg(float dmg) { this.baseDamage_DNA = dmg; return this; }
public Receiver delay(int delay) { this.delayAfterFire_DNA = this.delayAfterDryFire_DNA = delay; return this; }
public Receiver dry(int delay) { this.delayAfterDryFire_DNA = delay; return this; }
public Receiver dry(int delay) { this.delayAfterDryFire_DNA = delay; return this; }
public Receiver rounds(int rounds) { this.roundsPerCycle_DNA = rounds; return this; }
public Receiver spread(float spread) { this.spreadModExtra_DNA = spread; return this; }
public Receiver auto(boolean auto) { this.refireOnHold_DNA = auto; return this; }
@ -114,6 +117,7 @@ public class Receiver {
public Receiver dryfire(boolean dryfire) { this.doesDryFire_DNA = dryfire; return this; }
public Receiver dryfireAfterAuto(boolean dryfire) { this.doesDryFireAfterAuto_DNA = dryfire; return this; }
public Receiver ejectOnFire(boolean eject) { this.ejectOnFire_DNA = eject; return this; }
public Receiver reloadOnEmpty(boolean reload) { this.reloadOnEmpty_DNA = reload; return this; }
public Receiver mag(IMagazine magazine) { this.magazine_DNA = magazine; return this; }
public Receiver offset(double f, double u, double s) { this.projectileOffset_DNA = Vec3.createVectorHelper(f, u, s); this.projectileOffsetScoped_DNA = Vec3.createVectorHelper(f, u, 0); return this; }
public Receiver offsetScoped(double f, double u, double s) { this.projectileOffsetScoped_DNA = Vec3.createVectorHelper(f, u, s); return this; }

View File

@ -63,6 +63,7 @@ public class GunFactory {
XFactory75Bolt.init();
XFactoryFolly.init();
XFactoryTurret.init();
XFactory10ga.init();
/// PROXY BULLSHIT ///
MainRegistry.proxy.registerGunCfg();
@ -86,7 +87,8 @@ public class GunFactory {
CAPACITOR, CAPACITOR_OVERCHARGE, CAPACITOR_IR,
TAU_URANIUM,
COIL_TUNGSTEN, COIL_FERROURANIUM,
NUKE_STANDARD, NUKE_DEMO, NUKE_HIGH, NUKE_TOTS, NUKE_HIVE
NUKE_STANDARD, NUKE_DEMO, NUKE_HIGH, NUKE_TOTS, NUKE_HIVE,
G10, G10_SHRAPNEL, G10_DU
}
public static enum EnumAmmoSecret {

View File

@ -1,6 +1,7 @@
package com.hbm.items.weapon.sedna.factory;
import static com.hbm.items.weapon.sedna.factory.GunFactory.*;
import static com.hbm.items.weapon.sedna.factory.XFactory10ga.*;
import static com.hbm.items.weapon.sedna.factory.XFactory12ga.*;
import static com.hbm.items.weapon.sedna.factory.XFactory22lr.*;
import static com.hbm.items.weapon.sedna.factory.XFactory357.*;
@ -80,6 +81,7 @@ public class GunFactoryClient {
MinecraftForgeClient.registerItemRenderer(ModItems.gun_hangman, new ItemRenderHangman());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bolter, new ItemRenderBolter());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_folly, new ItemRenderFolly());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_double_barrel, new ItemRenderDoubleBarrel());
//PROJECTILES
ammo_debug.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
@ -148,6 +150,10 @@ public class GunFactoryClient {
g12_equestrian_bj.setRenderer(LegoClient.RENDER_LEGENDARY_BULLET);
g12_equestrian_tkr.setRenderer(LegoClient.RENDER_LEGENDARY_BULLET);
g10.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
g10_shrapnel.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
g10_du.setRenderer(LegoClient.RENDER_DU_BULLET);
g26_flare.setRenderer(LegoClient.RENDER_FLARE);
g26_flare_supply.setRenderer(LegoClient.RENDER_FLARE_SUPPLY);
g26_flare_weapon.setRenderer(LegoClient.RENDER_FLARE_WEAPON);
@ -218,6 +224,7 @@ public class GunFactoryClient {
((ItemGunBaseNT) ModItems.gun_hangman) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_bolter) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_folly) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_double_barrel) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_light_revolver_dani) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY_MIRROR, LegoClient.HUD_COMPONENT_AMMO_MIRROR);
((ItemGunBaseNT) ModItems.gun_light_revolver_dani) .getConfig(null, 1).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);

View File

@ -132,8 +132,27 @@ public class GunStateDecider {
}
//if not, go idle
} else {
ItemGunBaseNT.setState(stack, gunIndex, GunState.IDLE);
ItemGunBaseNT.setTimer(stack, gunIndex, 0);
//reload on empty, only for non-refiring guns
if(rec.getReloadOnEmpty(stack) && rec.getMagazine(stack).getAmount(stack, ctx.inventory) <= 0) {
ItemGunBaseNT.setIsAiming(stack, false);
IMagazine mag = rec.getMagazine(stack);
if(mag.canReload(stack, ctx.inventory)) {
int loaded = mag.getAmount(stack, ctx.inventory);
mag.setAmountBeforeReload(stack, loaded);
ItemGunBaseNT.setState(stack, ctx.configIndex, GunState.RELOADING);
ItemGunBaseNT.setTimer(stack, ctx.configIndex, rec.getReloadBeginDuration(stack) + (loaded <= 0 ? rec.getReloadCockOnEmptyPre(stack) : 0));
ItemGunBaseNT.playAnimation(player, stack, AnimType.RELOAD, ctx.configIndex);
} else {
ItemGunBaseNT.setState(stack, gunIndex, GunState.IDLE);
ItemGunBaseNT.setTimer(stack, gunIndex, 0);
}
} else {
ItemGunBaseNT.setState(stack, gunIndex, GunState.IDLE);
ItemGunBaseNT.setTimer(stack, gunIndex, 0);
}
}
}
}

View File

@ -1248,4 +1248,33 @@ public class Orchestras {
if(timer == 120) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.screw", 1F, 1F);
}
};
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_DOUBLE_BARREL = (stack, ctx) -> {
EntityLivingBase entity = ctx.entity;
if(entity.worldObj.isRemote) return;
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
if(type == AnimType.RELOAD) {
if(timer == 5) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverCock", 1F, 0.75F);
if(timer == 19) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magSmallInsert", 1F, 0.9F);
if(timer == 29) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 0.8F);
if(timer == 12) {
IMagazine mag = ctx.config.getReceivers(stack)[0].getMagazine(stack);
int toEject = mag.getAmountAfterReload(stack) - mag.getAmount(stack, ctx.inventory);
SpentCasing casing = mag.getCasing(stack, ctx.inventory);
if(casing != null) for(int i = 0; i < toEject; i++) CasingCreator.composeEffect(entity.worldObj, entity, 0, -0.1875, -0.375D, -0.12, 0.18, 0, 0.01, casing.getName(), true, 60, 0.5D, 20);
}
}
if(type == AnimType.INSPECT) {
if(timer == 5) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverCock", 1F, 0.75F);
if(timer == 19) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 0.8F);
}
if(type == AnimType.CYCLE_DRY) {
if(timer == 2) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.dryFireClick", 1F, 1F);
}
};
}

View File

@ -0,0 +1,120 @@
package com.hbm.items.weapon.sedna.factory;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import com.hbm.items.ModItems;
import com.hbm.items.weapon.sedna.BulletConfig;
import com.hbm.items.weapon.sedna.Crosshair;
import com.hbm.items.weapon.sedna.GunConfig;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.items.weapon.sedna.Receiver;
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
import com.hbm.items.weapon.sedna.ItemGunBaseNT.WeaponQuality;
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.item.ItemStack;
public class XFactory10ga {
public static BulletConfig g10;
public static BulletConfig g10_shrapnel;
public static BulletConfig g10_du;
public static void init() {
g10 = new BulletConfig().setItem(EnumAmmo.G10).setProjectiles(10).setDamage(1F/10F).setSpread(0.05F).setRicochetAngle(15).setThresholdNegation(5F).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0xB52B2B, SpentCasing.COLOR_CASE_12GA).setScale(1F).register("10GA"));
g10_shrapnel = new BulletConfig().setItem(EnumAmmo.G10_SHRAPNEL).setProjectiles(10).setDamage(1F/10F).setSpread(0.05F).setRicochetAngle(90).setRicochetCount(15).setThresholdNegation(5F).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0xE5DD00, SpentCasing.COLOR_CASE_12GA).setScale(1F).register("10GAShrapnel"));
g10_du = new BulletConfig().setItem(EnumAmmo.G10_DU).setProjectiles(10).setDamage(1F/4F).setSpread(0.05F).setRicochetAngle(15).setThresholdNegation(10F).setArmorPiercing(0.2F).setDoesPenetrate(true).setDamageFalloutByPen(false).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x538D53, SpentCasing.COLOR_CASE_12GA).setScale(1F).register("10GADU"));
ModItems.gun_double_barrel = new ItemGunBaseNT(WeaponQuality.SPECIAL, new GunConfig()
.dura(1000).draw(10).inspect(39).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
.rec(new Receiver(0)
.dmg(30F).rounds(2).delay(10).reload(41).reloadOnEmpty(true).sound("hbm:weapon.fire.shotgun", 1.0F, 0.9F)
.mag(new MagazineFullReload(0, 2).addConfigs(g10, g10_shrapnel, g10_du))
.offset(0.75, -0.0625, -0.1875)
.setupStandardFire().recoil(LAMBDA_RECOIL_DOUBLE_BARREL))
.setupStandardConfiguration()
.anim(LAMBDA_DOUBLE_BARREL_ANIMS).orchestra(Orchestras.ORCHESTRA_DOUBLE_BARREL)
).setUnlocalizedName("gun_double_barrel");
}
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_DOUBLE_BARREL = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil(10, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5));
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_DOUBLE_BARREL_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-60, 0, 0, 0).addPos(0, 0, -3, 500, IType.SIN_DOWN));
case CYCLE: return new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, -1, 50).addPos(0, 0, 0, 250))
.addBus("BUCKLE", new BusAnimationSequence().addPos(0, -60, 0, 50).addPos(0, 0, 0, 250));
case RELOAD: return new BusAnimation()
.addBus("TURN", new BusAnimationSequence()
.addPos(0, 30, 0, 350, IType.SIN_FULL)
.addPos(0, 30, 0, 1150)
.addPos(0, 0, 0, 350, IType.SIN_FULL))
.addBus("LEVER", new BusAnimationSequence()
.addPos(0, 0, 0, 250)
.addPos(0, 0, -90, 100, IType.SIN_FULL)
.addPos(0, 0, -90, 1300)
.addPos(0, 0, 0, 100, IType.SIN_FULL))
.addBus("BARREL", new BusAnimationSequence()
.addPos(0, 0, 0, 300)
.addPos(60, 0, 0, 150, IType.SIN_UP)
.addPos(60, 0, 0, 1150)
.addPos(0, 0, 0, 150, IType.SIN_UP))
.addBus("LIFT", new BusAnimationSequence()
.addPos(0, 0, 0, 350)
.addPos(-5, 0, 0, 150, IType.SIN_FULL)
.addPos(0, 0, 0, 100, IType.SIN_FULL)
.addPos(0, 0, 0, 700)
.addPos(-5, 0, 0, 100, IType.SIN_FULL)
.addPos(0, 0, 0, 100, IType.SIN_UP) //1500
.addPos(45, 0, 0, 150)
.addPos(45, 0, 0, 150)
.addPos(-5, 0, 0, 150, IType.SIN_DOWN)
.addPos(0, 0, 0, 100, IType.SIN_FULL)) //2050
.addBus("SHELLS", new BusAnimationSequence()
.addPos(0, 0, 0, 450)
.addPos(0, 0, -2.5, 100)
.addPos(0, -5, -5, 350, IType.SIN_DOWN)
.addPos(0, -3, -2, 0)
.addPos(0, 0, -2, 250)
.addPos(0, 0, 0, 150, IType.SIN_UP)) //1300
.addBus("SHELL_FLIP", new BusAnimationSequence().addPos(0, 0, 0, 450).addPos(-360, 0, 0, 450).addPos(0, 0, 0, 0));
case INSPECT: return new BusAnimation()
.addBus("LEVER", new BusAnimationSequence()
.addPos(0, 0, 0, 250)
.addPos(0, 0, -90, 100, IType.SIN_FULL)
.addPos(0, 0, -90, 800)
.addPos(0, 0, 0, 100, IType.SIN_FULL))
.addBus("BARREL", new BusAnimationSequence()
.addPos(0, 0, 0, 300)
.addPos(60, 0, 0, 150, IType.SIN_UP)
.addPos(60, 0, 0, 650)
.addPos(0, 0, 0, 150, IType.SIN_UP))
.addBus("LIFT", new BusAnimationSequence()
.addPos(0, 0, 0, 350)
.addPos(-5, 0, 0, 150, IType.SIN_FULL)
.addPos(0, 0, 0, 100, IType.SIN_FULL)
.addPos(0, 0, 0, 200)
.addPos(-5, 0, 0, 100, IType.SIN_FULL)
.addPos(0, 0, 0, 100, IType.SIN_UP) //1500
.addPos(45, 0, 0, 150)
.addPos(45, 0, 0, 150)
.addPos(-5, 0, 0, 150, IType.SIN_DOWN)
.addPos(0, 0, 0, 100, IType.SIN_FULL));
}
return null;
};
}

View File

@ -3,7 +3,7 @@ package com.hbm.lib;
public class RefStrings {
public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech Mod";
public static final String VERSION = "1.0.27 BETA (5188)";
public static final String VERSION = "1.0.27 BETA (5193)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version

View File

@ -870,6 +870,7 @@ public class ResourceManager {
public static final IModelCustom lasrifle = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/lasrifle.obj")).asVBO();
public static final IModelCustom hangman = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/hangman.obj")).asVBO();
public static final IModelCustom folly = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/folly.obj")).asVBO();
public static final IModelCustom double_barrel = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/sacred_dragon.obj")).asVBO();
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"));
@ -1015,6 +1016,7 @@ public class ResourceManager {
public static final ResourceLocation lasrifle_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lasrifle.png");
public static final ResourceLocation hangman_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/hangman.png");
public static final ResourceLocation folly_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/moonlight.png");
public static final ResourceLocation double_barrel_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/sacred_dragon.png");
public static final ResourceLocation lance_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lance.png");

View File

@ -33,7 +33,7 @@ public class SpentCasing implements Cloneable {
}
}
private String registryName;
private String registryName = "CHANGEME";
private float scaleX = 1F;
private float scaleY = 1F;
private float scaleZ = 1F;

View File

@ -0,0 +1,145 @@
package com.hbm.render.item.weapon.sedna;
import org.lwjgl.opengl.GL11;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.main.ResourceManager;
import com.hbm.render.anim.HbmAnimations;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
public class ItemRenderDoubleBarrel extends ItemRenderWeaponBase {
@Override
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.5F; }
@Override
public float getViewFOV(ItemStack stack, float fov) {
float aimingProgress = ItemGunBaseNT.prevAimingProgress + (ItemGunBaseNT.aimingProgress - ItemGunBaseNT.prevAimingProgress) * interp;
return fov * (1 - aimingProgress * 0.33F);
}
@Override
public void setupFirstPerson(ItemStack stack) {
GL11.glTranslated(0, 0, 0.875);
float offset = 0.8F;
standardAimingTransform(stack,
-1.25F * offset, -1F * offset, 2F * offset,
0, -2 / 8D, 1);
}
@Override
public void renderFirstPerson(ItemStack stack) {
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.double_barrel_tex);
double scale = 0.375D;
GL11.glScaled(scale, scale, scale);
double[] equip = HbmAnimations.getRelevantTransformation("EQUIP");
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
double[] turn = HbmAnimations.getRelevantTransformation("TURN");
double[] barrel = HbmAnimations.getRelevantTransformation("BARREL");
double[] lift = HbmAnimations.getRelevantTransformation("LIFT");
double[] shells = HbmAnimations.getRelevantTransformation("SHELLS");
double[] shellFlip = HbmAnimations.getRelevantTransformation("SHELL_FLIP");
double[] lever = HbmAnimations.getRelevantTransformation("LEVER");
double[] buckle = HbmAnimations.getRelevantTransformation("BUCKLE");
double[] no_ammo = HbmAnimations.getRelevantTransformation("NO_AMMO");
GL11.glShadeModel(GL11.GL_SMOOTH);
GL11.glTranslated(recoil[0] * 3, recoil[1], recoil[2]);
GL11.glRotated(recoil[2] * 10, 1, 0, 0);
GL11.glTranslated(0, 0, -4);
GL11.glRotated(equip[0], -1, 0, 0);
GL11.glTranslated(0, 0, 4);
GL11.glTranslated(0, 0, -4);
GL11.glRotated(turn[1], 0, 1, 0);
GL11.glTranslated(0, 0, 4);
GL11.glTranslated(0, 0, -4);
GL11.glRotated(lift[0], -1, 0, 0);
GL11.glTranslated(0, 0, 4);
ResourceManager.double_barrel.renderPart("Stock");
GL11.glPushMatrix();
GL11.glTranslated(0, -0.4375, -0.875);
GL11.glRotated(barrel[0], 1, 0, 0);
GL11.glTranslated(0, 0.4375, 0.875);
ResourceManager.double_barrel.renderPart("BarrelShort");
ResourceManager.double_barrel.renderPart("Barrel");
GL11.glPushMatrix();
GL11.glTranslated(0.75, 0, -0.6875);
GL11.glRotated(buckle[1], 0, 1, 0);
GL11.glTranslated(-0.75, 0, 0.6875);
ResourceManager.double_barrel.renderPart("Buckle");
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glTranslated(-0.3125, 0.3125, 0);
GL11.glRotated(lever[2], 0, 0, 1);
GL11.glTranslated(0.3125, -0.3125, 0);
ResourceManager.double_barrel.renderPart("Lever");
GL11.glPopMatrix();
if(no_ammo[0] == 0) {
GL11.glPushMatrix();
GL11.glTranslated(shells[0], shells[1], shells[2]);
GL11.glTranslated(0, 0, -1);
GL11.glRotated(shellFlip[0], 1, 0, 0);
GL11.glTranslated(0, 0, 1);
ResourceManager.double_barrel.renderPart("Shells");
GL11.glPopMatrix();
}
GL11.glPopMatrix();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPushMatrix();
GL11.glTranslated(0, 0, 8);
GL11.glRotated(90, 0, 1, 0);
GL11.glRotated(90 * gun.shotRand, 1, 0, 0);
GL11.glScaled(2, 2, 2);
this.renderMuzzleFlash(gun.lastShot[0], 75, 5);
GL11.glPopMatrix();
}
@Override
public void setupThirdPerson(ItemStack stack) {
super.setupThirdPerson(stack);
double scale = 1.75D;
GL11.glScaled(scale, scale, scale);
GL11.glTranslated(0, 1, 3);
}
@Override
public void setupInv(ItemStack stack) {
super.setupInv(stack);
double scale = 1.375D;
GL11.glScaled(scale, scale, scale);
GL11.glRotated(25, 1, 0, 0);
GL11.glRotated(45, 0, 1, 0);
GL11.glTranslated(0, 0.5, 0);
}
@Override
public void renderOther(ItemStack stack, ItemRenderType type) {
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.double_barrel_tex);
ResourceManager.double_barrel.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
}
}

View File

@ -1203,6 +1203,9 @@ item.ammo_standard.flame_balefire.name=Flammenwerferbrennstoff, Balefire
item.ammo_standard.flame_diesel.name=Flammenwerferbrennstoff, Diesel
item.ammo_standard.flame_gas.name=Flammenwerferbrennstoff, Gas
item.ammo_standard.flame_napalm.name=Flammenwerferbrennstoff, Napalm
item.ammo_standard.g10.name=Kaliber 10 Schrot
item.ammo_standard.g10_du.name=Kaliber 10 Uranschrot
item.ammo_standard.g10_shrapnel.name=Kaliber 10 Schrapnell-Schrot
item.ammo_standard.g12.name=Kaliber 12 Schrot
item.ammo_standard.g12_anthrax.name=Kaliber 12 Anthrax
item.ammo_standard.g12_bp.name=Kaliber 12 Schwarzpulver
@ -2206,6 +2209,7 @@ item.gun_deagle.name=Großes Eisen
item.gun_defabricator.name=Defabrikator
item.gun_defabricator_ammo.name=Defabrikator-Energiezelle
item.gun_detonator.name=Laserzünder
item.gun_double_barrel.name=Ein alter Klassiker
item.gun_emp.name=EMP-Waffe
item.gun_emp_ammo.name=Energiezelle
item.gun_euthanasia.name=Euthanasia

View File

@ -1926,6 +1926,9 @@ item.ammo_standard.flame_balefire.name=Flamer Fuel, Balefire
item.ammo_standard.flame_diesel.name=Flamer Fuel, Diesel
item.ammo_standard.flame_gas.name=Flamer Fuel, Gas
item.ammo_standard.flame_napalm.name=Flamer Fuel, Napalm
item.ammo_standard.g10.name=10 Gauge Buckshot
item.ammo_standard.g10_du.name=10 Gauge Uranium Buckshot
item.ammo_standard.g10_shrapnel.name=10 Gauge Shrapnel Buckshot
item.ammo_standard.g12.name=12 Gauge Buckshot
item.ammo_standard.g12_anthrax.name=12 Gauge Anthrax Shell
item.ammo_standard.g12_bp.name=12 Gauge Black Powder Buckshot
@ -3014,6 +3017,7 @@ item.gun_deagle.name=Big Iron
item.gun_defabricator.name=Defabricator
item.gun_defabricator_ammo.name=Defabricator Energy Cell
item.gun_detonator.name=Laser Detonator
item.gun_double_barrel.name=An Old Classic
item.gun_emp.name=EMP Gun
item.gun_emp_ammo.name=Energy Cell
item.gun_euthanasia.name=Euthanasia

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB