This commit is contained in:
Boblet 2025-10-13 16:47:39 +02:00
parent db9b0501d5
commit fe38e61ba4
15 changed files with 71 additions and 8 deletions

View File

@ -166,7 +166,9 @@ public class GunFactory {
FURNITURE_GREEN, FURNITURE_BLACK, BAYONET,
STACK_MAG, SKIN_SATURNITE, LAS_SHOTGUN,
LAS_CAPACITOR, LAS_AUTO,
NICKEL, DOUBLOONS
NICKEL, DOUBLOONS,
DRILL_HSS, DRILL_WEAPONSTEEL, DRILL_TCALLOY, DRILL_SATURNITE,
ENGINE_DIESEL, ENGINE_AVIATION, ENGINE_ELECTRIC, ENGINE_TURBO,
}
public static enum EnumModCaliber {

View File

@ -1,6 +1,7 @@
package com.hbm.items.weapon.sedna.factory;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.fluid.Fluids;
@ -15,7 +16,11 @@ import com.hbm.items.weapon.sedna.impl.ItemGunDrill;
import com.hbm.items.weapon.sedna.mags.IMagazine;
import com.hbm.items.weapon.sedna.mags.MagazineLiquidEngine;
import com.hbm.items.weapon.sedna.mods.WeaponModManager;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.util.EntityDamageUtil;
import net.minecraft.block.Block;
@ -42,12 +47,12 @@ public class XFactoryDrill {
ModItems.gun_drill = new ItemGunDrill(WeaponQuality.UTILITY, new GunConfig()
.dura(3_000).draw(10).inspect(55).hideCrosshair(false).crosshair(Crosshair.L_CIRCUMFLEX)
.rec(new Receiver(0)
.dmg(10F).delay(20).auto(true).jam(0)
.dmg(10F).delay(20).dry(30).auto(true).jam(0)
.mag(new MagazineLiquidEngine(0, 4_000, Fluids.GASOLINE, Fluids.GASOLINE_LEADED, Fluids.COALGAS, Fluids.COALGAS_LEADED))
.offset(1, -0.0625 * 2.5, -0.25D)
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(LAMBDA_DRILL_FIRE))
.pp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).pr(Lego.LAMBDA_STANDARD_RELOAD).decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
//.anim(LAMBDA_CT_ANIMS).orchestra(Orchestras.ORCHESTRA_CHARGE_THROWER)
.anim(LAMBDA_DRILL_ANIMS)
).setUnlocalizedName("gun_drill");
}
@ -75,7 +80,7 @@ public class XFactoryDrill {
}
if(player != null && mop.typeOfHit == mop.typeOfHit.BLOCK) {
int aoe = getModdableAoE(stack, 1);
int aoe = player.isSneaking() ? 0 : getModdableAoE(stack, 1);
for(int i = -aoe; i <= aoe; i++) for(int j = -aoe; j <= aoe; j++) for(int k = -aoe; k <= aoe; k++) {
breakExtraBlock(player.worldObj, mop.blockX + i, mop.blockY + j, mop.blockZ + k, player, mop.blockX, mop.blockY, mop.blockZ);
}
@ -113,4 +118,24 @@ public class XFactoryDrill {
public static float getModdablePiercing(ItemStack stack, float base) { return WeaponModManager.eval(base, stack, F_PIERCE, ModItems.gun_drill, 0); }
public static int getModdableAoE(ItemStack stack, int base) { return WeaponModManager.eval(base, stack, I_AOE, ModItems.gun_drill, 0); }
public static int getModdableHarvestLevel(ItemStack stack, int base) { return WeaponModManager.eval(base, stack, I_HARVEST, ModItems.gun_drill, 0); }
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_DRILL_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().setPos(-1, 0, 0).addPos(0, 0, 0, 750, IType.SIN_DOWN));
case CYCLE:
double deploy = HbmAnimations.getRelevantTransformation("DEPLOY")[0];
double spin = HbmAnimations.getRelevantTransformation("SPIN")[2] % 360;
return new BusAnimation()
.addBus("DEPLOY", new BusAnimationSequence().setPos(deploy, 0, 0).addPos(1, 0, 0, (int) (500 * (1 - deploy)), IType.SIN_FULL).hold(1000).addPos(0, 0, 0, 500, IType.SIN_FULL))
.addBus("SPIN", new BusAnimationSequence().setPos(spin, 0, 0).addPos(spin + 360 * 1.5, 0, 0, 1500).addPos(spin + 360 * 2, 0, 0, 750, IType.SIN_DOWN));
case CYCLE_DRY: return new BusAnimation()
.addBus("DEPLOY", new BusAnimationSequence().addPos(0.25, 0, 0, 250, IType.SIN_FULL).addPos(0, 0, 0, 250, IType.SIN_FULL))
.addBus("SPIN", new BusAnimationSequence().addPos(360 * 1, 0, 0, 1500, IType.SIN_DOWN));
case INSPECT: return new BusAnimation()
.addBus("LIFT", new BusAnimationSequence().addPos(-45, 0, 0, 500, IType.SIN_FULL).hold(1000).addPos(0, 0, 0, 500, IType.SIN_DOWN));
}
return null;
};
}

View File

@ -47,7 +47,7 @@ public class MagazineLiquidEngine implements IMagazine<FluidType> {
@Override public SpentCasing getCasing(ItemStack stack, IInventory inventory) { return null; }
@Override public ItemStack getIconForHUD(ItemStack stack, EntityPlayer player) { return new ItemStack(ModItems.fluid_icon, 1, this.getType(stack, player.inventory).getID()); }
@Override public String reportAmmoStateForHUD(ItemStack stack, EntityPlayer player) { return getAmount(stack, player.inventory) + "mB"; }
@Override public String reportAmmoStateForHUD(ItemStack stack, EntityPlayer player) { return getAmount(stack, player.inventory) + "/" + this.capacity + "mB"; }
@Override public void setAmountBeforeReload(ItemStack stack, int amount) { ItemGunBaseNT.setValueInt(stack, KEY_MAG_PREV + index, amount); }
@Override public int getAmountBeforeReload(ItemStack stack) { return ItemGunBaseNT.getValueInt(stack, KEY_MAG_PREV + index); }

View File

@ -5,6 +5,7 @@ import org.lwjgl.opengl.GL11;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.items.weapon.sedna.mags.IMagazine;
import com.hbm.main.ResourceManager;
import com.hbm.render.anim.HbmAnimations;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
@ -35,9 +36,26 @@ public class ItemRenderDrill extends ItemRenderWeaponBase {
IMagazine mag = gun.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack);
double gauge = (double) mag.getAmount(stack, null) / (double) mag.getCapacity(stack);
float aimingProgress = ItemGunBaseNT.prevAimingProgress + (ItemGunBaseNT.aimingProgress - ItemGunBaseNT.prevAimingProgress) * interp;
double[] equip = HbmAnimations.getRelevantTransformation("EQUIP");
double[] deploy = HbmAnimations.getRelevantTransformation("DEPLOY");
double[] lift = HbmAnimations.getRelevantTransformation("LIFT");
double[] spin = HbmAnimations.getRelevantTransformation("SPIN");
/*float aimingProgress = ItemGunBaseNT.prevAimingProgress + (ItemGunBaseNT.aimingProgress - ItemGunBaseNT.prevAimingProgress) * interp;
GL11.glRotated(15 * (1 - aimingProgress), 0, 1, 0);
GL11.glRotated(-10 * (1 - aimingProgress), 1, 0, 0);
GL11.glRotated(-10 * (1 - aimingProgress), 1, 0, 0);*/
GL11.glRotated(15 * (1 - deploy[0] * 0.5), 0, 1, 0);
GL11.glRotated(-10 * (1 - deploy[0] * 0.5), 1, 0, 0);
GL11.glTranslated(0, 2, -6);
GL11.glRotated(equip[0] * -45, 0, 1, 0);
GL11.glRotated(equip[0] * -20, 1, 0, 0);
GL11.glTranslated(0, -2, 6);
GL11.glRotated(lift[0], 1, 0, 0);
GL11.glTranslated(0, 0, deploy[0]);
GL11.glShadeModel(GL11.GL_SMOOTH);
ResourceManager.drill.renderPart("Base");
@ -51,7 +69,7 @@ public class ItemRenderDrill extends ItemRenderWeaponBase {
ResourceManager.drill.renderPart("Gauge");
GL11.glPopMatrix();
double rot = System.currentTimeMillis() / 3 % 360D;
double rot = spin[0];
double rot2 = rot * 5;
GL11.glPushMatrix();

View File

@ -2133,6 +2133,7 @@ item.gun_cryolator_ammo.name=Kryozelle
item.gun_detonator.name=Laserzünder
item.gun_double_barrel.name=Ein alter Klassiker
item.gun_double_barrel_sacred_dragon.name=Sacred Dragon
item.gun_drill.name=Motorisierter Bohrer
item.gun_fatman.name=Fat Man
item.gun_fireext.name=Feuerlöscher
item.gun_flamer.name=Flammenwerfer
@ -3659,6 +3660,14 @@ item.weapon_mod_generic.wsteel_dura.name=Langlebige Waffenstahl-Teile
item.weapon_mod_special.bayonet.name=Bayonet
item.weapon_mod_special.choke.name=Choke
item.weapon_mod_special.doubloons.name=Zwei Golddublonen
item.weapon_mod_special.drill_hss.name=Motorisierter Bohrer - Schnellarbeitsstahl-Bohrkopf
item.weapon_mod_special.drill_saturnite.name=Motorisierter Bohrer - Saturnit-Bohrkopf
item.weapon_mod_special.drill_tcalloy.name=Motorisierter Bohrer - Technetiumstahl-Bohrkopf
item.weapon_mod_special.drill_weaponsteel.name=Motorisierter Bohrer - Waffenstahl-Bohrkopf
item.weapon_mod_special.engine_aviation.name=Motorisierter Bohrer - Flugzeugmotor
item.weapon_mod_special.engine_diesel.name=Motorisierter Bohrer - Dieselmotor
item.weapon_mod_special.engine_electric.name=Motorisierter Bohrer - Electromotor
item.weapon_mod_special.engine_turbo.name=Motorisierter Bohrer - Turbomotor
item.weapon_mod_special.furniture_black.name=Polymergriff (Schwarz)
item.weapon_mod_special.furniture_green.name=Polymergriff (Grün)
item.weapon_mod_special.greasegun.name=Grease Gun Modernisierungskit

View File

@ -2975,6 +2975,7 @@ item.gun_cryolator_ammo.name=Cryo Cell
item.gun_detonator.name=Laser Detonator
item.gun_double_barrel.name=An Old Classic
item.gun_double_barrel_sacred_dragon.name=Sacred Dragon
item.gun_drill.name=Powered Drill
item.gun_fatman.name=Fat Man
item.gun_fireext.name=Fire Extinguisher
item.gun_flamer.name=Flamethrower
@ -4806,6 +4807,14 @@ item.weapon_mod_generic.wsteel_dura.name=High-Durability Weapon Steel Parts
item.weapon_mod_special.bayonet.name=Bayonet
item.weapon_mod_special.choke.name=Choke
item.weapon_mod_special.doubloons.name=Two Gold Doubloons
item.weapon_mod_special.drill_hss.name=Powered Drill - High-Speed Steel Drillbit
item.weapon_mod_special.drill_saturnite.name=Powered Drill - Saturnite Drillbit
item.weapon_mod_special.drill_tcalloy.name=Powered Drill - Technetium Steel Drillbit
item.weapon_mod_special.drill_weaponsteel.name=Powered Drill - Weapon Steel Drillbit
item.weapon_mod_special.engine_aviation.name=Powered Drill - Aircraft Engine
item.weapon_mod_special.engine_diesel.name=Powered Drill - Diesel Engine
item.weapon_mod_special.engine_electric.name=Powered Drill - Electric Engine
item.weapon_mod_special.engine_turbo.name=Powered Drill - Turbo Engine
item.weapon_mod_special.furniture_black.name=Polymer Furniture (Black)
item.weapon_mod_special.furniture_green.name=Polymer Furniture (Green)
item.weapon_mod_special.greasegun.name=Grease Gun Modernization Kit

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B