rather death do us part than shit do its fart

This commit is contained in:
Bob 2024-11-16 20:55:43 +01:00
parent c7f73e2c1d
commit 9e5724fc5f
14 changed files with 177 additions and 9 deletions

View File

@ -182,10 +182,6 @@ public class WeaponRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_remington, 1), new Object[] { "PPM", "S L", 'P', STEEL.plate(), 'M', ModItems.mechanism_rifle_1, 'S', KEY_SLAB, 'L', KEY_LOG });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_benelli), new Object[] { "HHP", "SSM", "AAP", 'H', ModItems.ingot_dura_steel, 'S', STEEL.pipe(), 'A', AL.pipe(), 'P', ANY_PLASTIC.ingot(), 'M', ModItems.mechanism_rifle_2 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_lunatic_marksman), new Object[] { " GN", "SSM", " A", 'G', KEY_ANYPANE, 'N', ModItems.powder_nitan_mix, 'S', BIGMT.plate(), 'M', ModItems.mechanism_special, 'A', ANY_RESISTANTALLOY.plateCast() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_coilgun), new Object[] { "CCC", "SSM", " P", 'C', ModBlocks.capacitor_copper, 'S', BIGMT.plate(), 'M', ModItems.mechanism_special, 'P', ANY_PLASTIC.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_coilgun, 16, 0), new Object[] { " T ", "TST", " T ", 'T', W.ingot(), 'S', BIGMT.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_coilgun, 16, 1), new Object[] { " T ", "TST", " T ", 'T', FERRO.ingot(), 'S', BIGMT.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_coilgun, 16, 2), new Object[] { " T ", "TST", " T ", 'T', RUBBER.ingot(), 'S', ANY_PLASTIC.ingot() });
//TODO: somehow add more variance, 4 gauge is still missing
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_22lr, 16), new Object[] { ModItems.nitra_small });

View File

@ -1548,7 +1548,6 @@ public class ModItems {
public static Item gun_b92;
public static Item gun_b92_ammo;
public static Item gun_b93;
public static Item gun_coilgun;
public static Item gun_xvl1456;
public static Item gun_xvl1456_ammo;
public static Item gun_osipr;
@ -1623,6 +1622,7 @@ public class ModItems {
public static Item gun_tau;
public static Item gun_fatman;
public static Item gun_lasrifle;
public static Item gun_coilgun;
public static Item ammo_standard;
@ -6906,7 +6906,6 @@ public class ModItems {
GameRegistry.registerItem(gun_bolt_action_green, gun_bolt_action_green.getUnlocalizedName());
GameRegistry.registerItem(gun_bolt_action_saturnite, gun_bolt_action_saturnite.getUnlocalizedName());
GameRegistry.registerItem(gun_mymy, gun_mymy.getUnlocalizedName());
GameRegistry.registerItem(gun_coilgun, gun_coilgun.getUnlocalizedName());
GameRegistry.registerItem(gun_xvl1456, gun_xvl1456.getUnlocalizedName());
GameRegistry.registerItem(gun_osipr, gun_osipr.getUnlocalizedName());
GameRegistry.registerItem(gun_immolator, gun_immolator.getUnlocalizedName());
@ -6972,6 +6971,7 @@ public class ModItems {
GameRegistry.registerItem(gun_tau, gun_tau.getUnlocalizedName());
GameRegistry.registerItem(gun_fatman, gun_fatman.getUnlocalizedName());
GameRegistry.registerItem(gun_lasrifle, gun_lasrifle.getUnlocalizedName());
GameRegistry.registerItem(gun_coilgun, gun_coilgun.getUnlocalizedName());
GameRegistry.registerItem(ammo_standard, ammo_standard.getUnlocalizedName());

View File

@ -82,6 +82,7 @@ public class GunFactory {
FLAME_DIESEL, FLAME_GAS, FLAME_NAPALM, FLAME_BALEFIRE,
CAPACITOR, CAPACITOR_OVERCHARGE, CAPACITOR_BLACKLIGHTNING,
TAU_URANIUM,
COIL_TUNGSTEN, COIL_FERROURANIUM,
NUKE_STANDARD, NUKE_DEMO, NUKE_HIGH, NUKE_TOTS, NUKE_HIVE,
M44_EQUESTRIAN, G12_EQUESTRIAN, BMG50_EQUESTRIAN
}

View File

@ -67,6 +67,7 @@ public class GunFactoryClient {
MinecraftForgeClient.registerItemRenderer(ModItems.gun_tau, new ItemRenderTau());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_fatman, new ItemRenderFatMan());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_lasrifle, new ItemRenderLasrifle());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_coilgun, new ItemRenderCoilgun());
//PROJECTILES
ammo_debug.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
ammo_debug_buckshot.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
@ -146,6 +147,9 @@ public class GunFactoryClient {
setRendererBulkBeam(LegoClient.RENDER_TAU, tau_uranium);
setRendererBulkBeam(LegoClient.RENDER_TAU_CHARGE, tau_uranium_charge);
setRendererBulkBeam(LegoClient.RENDER_LASER, energy_las, energy_las_overcharge);
setRendererBulk(LegoClient.RENDER_AP_BULLET, coil_tungsten, coil_ferrouranium);
//HUDS
((ItemGunBaseNT) ModItems.gun_debug) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_pepperbox) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
@ -180,6 +184,7 @@ public class GunFactoryClient {
((ItemGunBaseNT) ModItems.gun_tau) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_fatman) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_lasrifle) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_coilgun) .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

@ -1054,4 +1054,15 @@ public class Orchestras {
if(timer == 30) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1F);
}
};
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_COILGUN = (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 == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.coilgunReload", 1F, 1F);
}
};
}

View File

@ -2,6 +2,7 @@ package com.hbm.items.weapon.sedna.factory;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import java.util.function.Consumer;
import com.hbm.entity.projectile.EntityBulletBeamBase;
import com.hbm.items.ModItems;
@ -14,13 +15,19 @@ 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.MagazineBelt;
import com.hbm.items.weapon.sedna.mags.MagazineSingleReload;
import com.hbm.main.MainRegistry;
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.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.Vec3;
public class XFactoryAccelerator {
@ -29,6 +36,46 @@ public class XFactoryAccelerator {
public static BulletConfig tau_uranium;
public static BulletConfig tau_uranium_charge;
public static BulletConfig coil_tungsten;
public static BulletConfig coil_ferrouranium;
public static Consumer<Entity> LAMBDA_UPDATE_TUNGSTEN = (entity) -> {breakInPath(entity, 1.25F); };
public static Consumer<Entity> LAMBDA_UPDATE_FERRO = (entity) -> { breakInPath(entity, 2.5F); };
public static void breakInPath(Entity entity, float threshold) {
Vec3 vec = Vec3.createVectorHelper(entity.posX - entity.prevPosX, entity.posY - entity.prevPosY, entity.posZ - entity.prevPosZ);
double motion = Math.max(vec.lengthVector(), 0.1);
vec = vec.normalize();
for(double d = 0; d < motion; d += 0.5) {
double dX = entity.posX - vec.xCoord * d;
double dY = entity.posY - vec.yCoord * d;
double dZ = entity.posZ - vec.zCoord * d;
if(entity.worldObj.isRemote) {
NBTTagCompound nbt = new NBTTagCompound();
nbt.setString("type", "vanillaExt");
nbt.setString("mode", "fireworks");
nbt.setDouble("posX", dX);
nbt.setDouble("posY", dY);
nbt.setDouble("posZ", dZ);
MainRegistry.proxy.effectNT(nbt);
} else {
int x = (int) Math.floor(dX);
int y = (int) Math.floor(dY);
int z = (int) Math.floor(dZ);
Block b = entity.worldObj.getBlock(x, y, z);
float hardness = b.getBlockHardness(entity.worldObj, x, y, z);
if(b.getMaterial() != Material.air && hardness >= 0 && hardness < threshold) {
entity.worldObj.func_147480_a(x, y, z, false);
}
}
}
}
public static void init() {
@ -36,6 +83,11 @@ public class XFactoryAccelerator {
.setOnBeamImpact(BulletConfig.LAMBDA_BEAM_HIT);
tau_uranium_charge = new BulletConfig().setItem(EnumAmmo.TAU_URANIUM).setLife(5).setRenderRotations(false).setDoesPenetrate(true).setDamageFalloutByPen(false).setSpectral(true)
.setOnBeamImpact(BulletConfig.LAMBDA_BEAM_HIT);
coil_tungsten = new BulletConfig().setItem(EnumAmmo.COIL_TUNGSTEN).setVel(7.5F).setLife(50).setDoesPenetrate(true).setDamageFalloutByPen(false).setSpectral(true)
.setOnUpdate(LAMBDA_UPDATE_TUNGSTEN);
coil_ferrouranium = new BulletConfig().setItem(EnumAmmo.COIL_FERROURANIUM).setVel(7.5F).setLife(50).setDoesPenetrate(true).setDamageFalloutByPen(false).setSpectral(true)
.setOnUpdate(LAMBDA_UPDATE_FERRO);
tauChargeMag.addConfigs(tau_uranium_charge);
@ -54,6 +106,17 @@ public class XFactoryAccelerator {
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
.anim(LAMBDA_TAU_ANIMS).orchestra(Orchestras.ORCHESTRA_TAU)
).setUnlocalizedName("gun_tau");
ModItems.gun_coilgun = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
.dura(400).draw(5).inspect(39).crosshair(Crosshair.L_CIRCUMFLEX)
.rec(new Receiver(0)
.dmg(15F).delay(5).reload(20).jam(33).sound("hbm:weapon.coilgunShoot", 1.0F, 1.0F)
.mag(new MagazineSingleReload(0, 1).addConfigs(coil_tungsten, coil_ferrouranium))
.offset(0.75, -0.0625, -0.1875D)
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
.setupStandardConfiguration()
.anim(LAMBDA_COILGUN_ANIMS).orchestra(Orchestras.ORCHESTRA_COILGUN)
).setUnlocalizedName("gun_coilgun");
}
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_TAU_PRIMARY_RELEASE = (stack, ctx) -> {
@ -113,11 +176,18 @@ public class XFactoryAccelerator {
case CYCLE_DRY: return new BusAnimation();
case INSPECT: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(2, 0, 0, 150, IType.SIN_DOWN).addPos(0, 0, 0, 100, IType.SIN_FULL))
.addBus("ROTATE", new BusAnimationSequence().addPos(0, 0, -360, 500, IType.SIN_DOWN));
.addBus("ROTATE", new BusAnimationSequence().addPos(0, 0, -360 * 3, 500 * 3, IType.SIN_DOWN));
case SPINUP: return new BusAnimation()
.addBus("ROTATE", new BusAnimationSequence().addPos(0, 0, 360 * 6, 3000, IType.SIN_UP).addPos(0, 0, 0, 0).addPos(0, 0, 360 * 40, 500 * 20));
}
return null;
};
public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_COILGUN_ANIMS = (stack, type) -> {
if(type == AnimType.EQUIP) return new BusAnimation().addBus("RELOAD", new BusAnimationSequence().addPos(1, 0, 0, 0).addPos(0, 0, 0, 250));
if(type == AnimType.CYCLE) return new BusAnimation().addBus("RECOIL", new BusAnimationSequence().addPos(ItemGunBaseNT.getIsAiming(stack) ? 0.5 : 1, 0, 0, 100).addPos(0, 0, 0, 200));
if(type == AnimType.RELOAD) return new BusAnimation().addBus("RELOAD", new BusAnimationSequence().addPos(1, 0, 0, 250).addPos(1, 0, 0, 500).addPos(0, 0, 0, 250));
return null;
};
}

View File

@ -598,7 +598,6 @@ public class ClientProxy extends ServerProxy {
MinecraftForgeClient.registerItemRenderer(ModItems.gun_lunatic_marksman, new ItemRenderLunaticSniper());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_benelli, new ItemRenderBenelli());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_uac_pistol, new ItemRenderUACPistol());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_coilgun, new ItemRenderWeaponCoilgun());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_cryocannon, new ItemRenderWeaponCryoCannon());
//multitool
MinecraftForgeClient.registerItemRenderer(ModItems.multitool_dig, new ItemRenderMultitool());

View File

@ -62,7 +62,7 @@ public class ParticleBlackPowderSmoke extends EntityFXRotating {
double ageScaled = (double) (this.particleAge + interp) / (double) this.particleMaxAge;
Color color = Color.getHSBColor(hue / 255F, Math.max(1F - (float) ageScaled * 2F, 0), MathHelper.clamp_float(1.25F - (float) ageScaled * 2F, 0.7F, 1F));
Color color = Color.getHSBColor(hue / 255F, Math.max(1F - (float) ageScaled * 4F, 0), MathHelper.clamp_float(1.25F - (float) ageScaled * 2F, 0.7F, 1F));
this.particleRed = color.getRed() / 255F;
this.particleGreen = color.getGreen() / 255F;
this.particleBlue = color.getBlue() / 255F;

View File

@ -0,0 +1,82 @@
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 ItemRenderCoilgun extends ItemRenderWeaponBase {
@Override
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.25F; }
@Override
public void setupFirstPerson(ItemStack stack) {
GL11.glTranslated(0, 0, 0.875);
float offset = 0.8F;
standardAimingTransform(stack,
-1.25F * offset, -1.5F * offset, 2.5F * offset,
0, -7.5 / 8D, 1);
}
@Override
public void renderFirstPerson(ItemStack stack) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.flaregun_tex);
double scale = 0.75D;
GL11.glScaled(scale, scale, scale);
GL11.glRotated(-90, 0, 1, 0);
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
GL11.glTranslated(-1.5 - recoil[0] * 0.5, 0, 0);
GL11.glRotated(recoil[0] * 45, 0, 0, 1);
GL11.glTranslated(1.5, 0, 0);
double[] reload = HbmAnimations.getRelevantTransformation("RELOAD");
GL11.glTranslated(-2.5, 0, 0);
GL11.glRotated(reload[0] * -45, 0, 0, 1);
GL11.glTranslated(2.5, 0, 0);
GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.coilgun_tex);
ResourceManager.coilgun.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
}
@Override
public void setupThirdPerson(ItemStack stack) {
super.setupThirdPerson(stack);
double scale = 3D;
GL11.glScaled(scale, scale, scale);
GL11.glTranslated(0, 0.25, 1.25);
}
@Override
public void setupInv(ItemStack stack) {
super.setupInv(stack);
double scale = 4D;
GL11.glScaled(scale, scale, scale);
GL11.glRotated(25, 1, 0, 0);
GL11.glRotated(45, 0, 1, 0);
GL11.glTranslated(-0.25, -0.25, 0);
}
@Override
public void renderOther(ItemStack stack, ItemRenderType type) {
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glRotated(-90, 0, 1, 0);
GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.coilgun_tex);
ResourceManager.coilgun.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
}
}

View File

@ -2184,6 +2184,7 @@ item.gun_ks23.name=Samuel die dicke Flinte
item.gun_lacunae.name=CZ33 Abaddon
item.gun_lacunae_ammo.name=5mm Patrone (LEGACY)
item.gun_lag.name=Komisch lange Pistole
item.gun_lasrifle.name=Lasergewehr
item.gun_lever_action.name=Mare's Leg (Original)
item.gun_lever_action_ammo.name=12x74 Schrotmunition (LEGACY)
item.gun_lever_action_dark.name=Mare's Leg (Dunkel)
@ -2252,6 +2253,7 @@ item.gun_stinger.name=FIM-92 Stinger
item.gun_stinger_ammo.name=Stinger-Rakete (LEGACY)
item.gun_super_shotgun.name=Super Shotgun
item.gun_supershotgun.name=Super Shotgun
item.gun_tau.name=Taukanone
item.gun_tesla_cannon.name=Teslakanone
item.gun_thompson.name=Thompson Maschinenpistole
item.gun_uac_pistol.name=UAC .45 Pistole

View File

@ -2993,6 +2993,7 @@ item.gun_ks23.name=Samuel the Big Shotgun
item.gun_lacunae.name=CZ33 Abaddon
item.gun_lacunae_ammo.name=5mm Round (LEGACY)
item.gun_lag.name=Comically Long Pistol
item.gun_lasrifle.name=Laser Rifle
item.gun_lever_action.name=Mare's Leg (Original)
item.gun_lever_action_ammo.name=12x74 Buckshot (LEGACY)
item.gun_lever_action_dark.name=Mare's Leg (Dark)
@ -3062,6 +3063,7 @@ item.gun_stinger_ammo.name=Stinger Rocket (LEGACY)
item.gun_super_shotgun.name=Super Shotgun
item.gun_super_shotgun.desc=It's super broken!
item.gun_supershotgun.name=Super Shotgun
item.gun_tau.name=Tau Cannon
item.gun_tesla_cannon.name=Tesla Cannon
item.gun_thompson.name=Thompson Submachine Gun
item.gun_uac_pistol.name=UAC .45 Pistol

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B