mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
bobms
This commit is contained in:
parent
ca9b9f7b6c
commit
71998aca41
@ -100,7 +100,7 @@ public class GunFactory {
|
|||||||
G10, G10_SHRAPNEL, G10_DU, G10_SLUG,
|
G10, G10_SHRAPNEL, G10_DU, G10_SLUG,
|
||||||
R762_HE, BMG50_HE, G10_EXPLOSIVE,
|
R762_HE, BMG50_HE, G10_EXPLOSIVE,
|
||||||
P45_SP, P45_FMJ, P45_JHP, P45_AP, P45_DU,
|
P45_SP, P45_FMJ, P45_JHP, P45_AP, P45_DU,
|
||||||
CT_HOOK,
|
CT_HOOK, CT_MORTAR, CT_MORTAR_CHARGE,
|
||||||
|
|
||||||
//ONLY ADD NEW ENTRIES AT THE BOTTOM TO AVOID SHIFTING!
|
//ONLY ADD NEW ENTRIES AT THE BOTTOM TO AVOID SHIFTING!
|
||||||
;
|
;
|
||||||
@ -127,7 +127,7 @@ public class GunFactory {
|
|||||||
TAU_URANIUM,
|
TAU_URANIUM,
|
||||||
COIL_TUNGSTEN, COIL_FERROURANIUM,
|
COIL_TUNGSTEN, COIL_FERROURANIUM,
|
||||||
NUKE_STANDARD, NUKE_DEMO, NUKE_HIGH, NUKE_TOTS, NUKE_HIVE,
|
NUKE_STANDARD, NUKE_DEMO, NUKE_HIGH, NUKE_TOTS, NUKE_HIVE,
|
||||||
CT_HOOK,
|
CT_HOOK, CT_MORTAR, CT_MORTAR_CHARGE,
|
||||||
};
|
};
|
||||||
|
|
||||||
public Enum[] getOrder() {
|
public Enum[] getOrder() {
|
||||||
|
|||||||
@ -220,6 +220,8 @@ public class GunFactoryClient {
|
|||||||
p35800.setRendererBeam(LegoClient.RENDER_CRACKLE);
|
p35800.setRendererBeam(LegoClient.RENDER_CRACKLE);
|
||||||
|
|
||||||
ct_hook.setRenderer(LegoClient.RENDER_CT_HOOK);
|
ct_hook.setRenderer(LegoClient.RENDER_CT_HOOK);
|
||||||
|
ct_mortar.setRenderer(LegoClient.RENDER_CT_MORTAR);
|
||||||
|
ct_mortar_charge.setRenderer(LegoClient.RENDER_CT_MORTAR_CHARGE);
|
||||||
|
|
||||||
setRendererBulk(LegoClient.RENDER_GRENADE, shell_normal, shell_explosive, shell_ap, shell_du, shell_w9); //TODO: change the sabots
|
setRendererBulk(LegoClient.RENDER_GRENADE, shell_normal, shell_explosive, shell_ap, shell_du, shell_w9); //TODO: change the sabots
|
||||||
|
|
||||||
|
|||||||
@ -576,4 +576,33 @@ public class LegoClient {
|
|||||||
tessellator.addVertexWithUV(a - jX, b, c - jZ, wrap, 1);
|
tessellator.addVertexWithUV(a - jX, b, c - jZ, wrap, 1);
|
||||||
tessellator.addVertexWithUV(a + jX, b, c + jZ, wrap, 0);
|
tessellator.addVertexWithUV(a + jX, b, c + jZ, wrap, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_CT_MORTAR = (bullet, interp) -> {
|
||||||
|
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glScalef(0.125F, 0.125F, 0.125F);
|
||||||
|
GL11.glRotated(90, 0, -1, 0);
|
||||||
|
GL11.glRotated(180, 0, 0, 1);
|
||||||
|
GL11.glTranslatef(0, 0, -6F);
|
||||||
|
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||||
|
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.charge_thrower_mortar_tex);
|
||||||
|
ResourceManager.charge_thrower.renderPart("Mortar");
|
||||||
|
GL11.glShadeModel(GL11.GL_FLAT);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
};
|
||||||
|
|
||||||
|
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_CT_MORTAR_CHARGE = (bullet, interp) -> {
|
||||||
|
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glScalef(0.125F, 0.125F, 0.125F);
|
||||||
|
GL11.glRotated(90, 0, -1, 0);
|
||||||
|
GL11.glRotated(180, 0, 0, 1);
|
||||||
|
GL11.glTranslatef(0, 0, -6F);
|
||||||
|
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||||
|
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.charge_thrower_mortar_tex);
|
||||||
|
ResourceManager.charge_thrower.renderPart("Mortar");
|
||||||
|
ResourceManager.charge_thrower.renderPart("Oomph");
|
||||||
|
GL11.glShadeModel(GL11.GL_FLAT);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,17 @@ import java.util.function.BiConsumer;
|
|||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.entity.projectile.EntityBulletBaseMK4;
|
import com.hbm.entity.projectile.EntityBulletBaseMK4;
|
||||||
|
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||||
|
import com.hbm.explosion.vanillant.standard.BlockAllocatorBulkie;
|
||||||
|
import com.hbm.explosion.vanillant.standard.BlockAllocatorStandard;
|
||||||
|
import com.hbm.explosion.vanillant.standard.BlockMutatorBulkie;
|
||||||
|
import com.hbm.explosion.vanillant.standard.BlockMutatorDebris;
|
||||||
|
import com.hbm.explosion.vanillant.standard.BlockProcessorStandard;
|
||||||
|
import com.hbm.explosion.vanillant.standard.EntityProcessorCrossSmooth;
|
||||||
|
import com.hbm.explosion.vanillant.standard.ExplosionEffectWeapon;
|
||||||
|
import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.weapon.sedna.BulletConfig;
|
import com.hbm.items.weapon.sedna.BulletConfig;
|
||||||
import com.hbm.items.weapon.sedna.Crosshair;
|
import com.hbm.items.weapon.sedna.Crosshair;
|
||||||
@ -16,6 +26,7 @@ import com.hbm.items.weapon.sedna.ItemGunBaseNT.WeaponQuality;
|
|||||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||||
import com.hbm.items.weapon.sedna.impl.ItemGunChargeThrower;
|
import com.hbm.items.weapon.sedna.impl.ItemGunChargeThrower;
|
||||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||||
|
import com.hbm.particle.helper.ExplosionCreator;
|
||||||
import com.hbm.render.anim.BusAnimation;
|
import com.hbm.render.anim.BusAnimation;
|
||||||
import com.hbm.render.anim.BusAnimationSequence;
|
import com.hbm.render.anim.BusAnimationSequence;
|
||||||
import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
||||||
@ -30,6 +41,8 @@ import net.minecraft.util.MovingObjectPosition;
|
|||||||
public class XFactoryTool {
|
public class XFactoryTool {
|
||||||
|
|
||||||
public static BulletConfig ct_hook;
|
public static BulletConfig ct_hook;
|
||||||
|
public static BulletConfig ct_mortar;
|
||||||
|
public static BulletConfig ct_mortar_charge;
|
||||||
|
|
||||||
public static Consumer<Entity> LAMBDA_SET_HOOK = (entity) -> {
|
public static Consumer<Entity> LAMBDA_SET_HOOK = (entity) -> {
|
||||||
EntityBulletBaseMK4 bullet = (EntityBulletBaseMK4) entity;
|
EntityBulletBaseMK4 bullet = (EntityBulletBaseMK4) entity;
|
||||||
@ -50,16 +63,42 @@ public class XFactoryTool {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_MORTAR = (bullet, mop) -> {
|
||||||
|
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3 && mop.entityHit == bullet.getThrower()) return;
|
||||||
|
ExplosionVNT vnt = new ExplosionVNT(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 5, bullet.getThrower());
|
||||||
|
vnt.setBlockAllocator(new BlockAllocatorBulkie(60, 8));
|
||||||
|
vnt.setBlockProcessor(new BlockProcessorStandard());
|
||||||
|
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(1, bullet.damage).setupPiercing(bullet.config.armorThresholdNegation, bullet.config.armorPiercingPercent));
|
||||||
|
vnt.setPlayerProcessor(new PlayerProcessorStandard());
|
||||||
|
vnt.setSFX(new ExplosionEffectWeapon(10, 2.5F, 1F));
|
||||||
|
vnt.explode();
|
||||||
|
};
|
||||||
|
|
||||||
|
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_MORTAR_CHARGE = (bullet, mop) -> {
|
||||||
|
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3 && mop.entityHit == bullet.getThrower()) return;
|
||||||
|
ExplosionVNT vnt = new ExplosionVNT(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 15, bullet.getThrower());
|
||||||
|
vnt.setBlockAllocator(new BlockAllocatorStandard());
|
||||||
|
vnt.setBlockProcessor(new BlockProcessorStandard().setNoDrop().withBlockEffect(new BlockMutatorDebris(ModBlocks.block_slag, 1)));
|
||||||
|
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(1, bullet.damage).setupPiercing(bullet.config.armorThresholdNegation, bullet.config.armorPiercingPercent));
|
||||||
|
vnt.setPlayerProcessor(new PlayerProcessorStandard());
|
||||||
|
ExplosionCreator.composeEffectSmall(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord + 0.5, mop.hitVec.zCoord);
|
||||||
|
vnt.explode();
|
||||||
|
};
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
|
|
||||||
ct_hook = new BulletConfig().setItem(EnumAmmo.CT_HOOK).setRenderRotations(false).setLife(1200).setVel(2F).setGrav(0.035D).setDoesPenetrate(true).setDamageFalloffByPen(false)
|
ct_hook = new BulletConfig().setItem(EnumAmmo.CT_HOOK).setRenderRotations(false).setLife(6_000).setVel(2F).setGrav(0.035D).setDoesPenetrate(true).setDamageFalloffByPen(false)
|
||||||
.setOnUpdate(LAMBDA_SET_HOOK).setOnImpact(LAMBDA_HOOK);
|
.setOnUpdate(LAMBDA_SET_HOOK).setOnImpact(LAMBDA_HOOK);
|
||||||
|
ct_mortar = new BulletConfig().setItem(EnumAmmo.CT_MORTAR).setLife(200).setVel(2F).setGrav(0.035D)
|
||||||
|
.setOnImpact(LAMBDA_MORTAR);
|
||||||
|
ct_mortar_charge = new BulletConfig().setItem(EnumAmmo.CT_MORTAR_CHARGE).setLife(200).setVel(2F).setGrav(0.035D)
|
||||||
|
.setOnImpact(LAMBDA_MORTAR_CHARGE);
|
||||||
|
|
||||||
ModItems.gun_charge_thrower = new ItemGunChargeThrower(WeaponQuality.UTILITY, new GunConfig()
|
ModItems.gun_charge_thrower = new ItemGunChargeThrower(WeaponQuality.UTILITY, new GunConfig()
|
||||||
.dura(3_000).draw(20).inspect(31).reloadChangeType(true).hideCrosshair(false).crosshair(Crosshair.L_CIRCUMFLEX)
|
.dura(3_000).draw(20).inspect(31).reloadChangeType(true).hideCrosshair(false).crosshair(Crosshair.L_CIRCUMFLEX)
|
||||||
.rec(new Receiver(0)
|
.rec(new Receiver(0)
|
||||||
.dmg(5F).delay(4).dry(40).auto(true).spread(0F).spreadHipfire(0F).reload(60).jam(55).sound("hbm:weapon.fire.grenade", 1.0F, 1.0F)
|
.dmg(5F).delay(4).dry(40).auto(true).spread(0F).spreadHipfire(0F).reload(60).jam(55).sound("hbm:weapon.fire.grenade", 1.0F, 1.0F)
|
||||||
.mag(new MagazineFullReload(0, 1).addConfigs(ct_hook))
|
.mag(new MagazineFullReload(0, 1).addConfigs(ct_hook, ct_mortar, ct_mortar_charge))
|
||||||
.offset(1, -0.0625 * 2.5, -0.25D)
|
.offset(1, -0.0625 * 2.5, -0.25D)
|
||||||
.setupStandardFire().recoil(LAMBDA_RECOIL_CT))
|
.setupStandardFire().recoil(LAMBDA_RECOIL_CT))
|
||||||
.setupStandardConfiguration()
|
.setupStandardConfiguration()
|
||||||
|
|||||||
@ -63,9 +63,15 @@ public class ItemRenderChargeThrower extends ItemRenderWeaponBase {
|
|||||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.charge_thrower_hook_tex);
|
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.charge_thrower_hook_tex);
|
||||||
ResourceManager.charge_thrower.renderPart("Hook");
|
ResourceManager.charge_thrower.renderPart("Hook");
|
||||||
}
|
}
|
||||||
//Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.charge_thrower_mortar_tex);
|
if(mag.getType(stack, null) == XFactoryTool.ct_mortar) {
|
||||||
//ResourceManager.charge_thrower.renderPart("Mortar");
|
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.charge_thrower_mortar_tex);
|
||||||
//ResourceManager.charge_thrower.renderPart("Oomph");
|
ResourceManager.charge_thrower.renderPart("Mortar");
|
||||||
|
}
|
||||||
|
if(mag.getType(stack, null) == XFactoryTool.ct_mortar_charge) {
|
||||||
|
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.charge_thrower_mortar_tex);
|
||||||
|
ResourceManager.charge_thrower.renderPart("Mortar");
|
||||||
|
ResourceManager.charge_thrower.renderPart("Oomph");
|
||||||
|
}
|
||||||
//Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.charge_thrower_rocket_tex);
|
//Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.charge_thrower_rocket_tex);
|
||||||
//ResourceManager.charge_thrower.renderPart("Rocket");
|
//ResourceManager.charge_thrower.renderPart("Rocket");
|
||||||
}
|
}
|
||||||
@ -117,6 +123,15 @@ public class ItemRenderChargeThrower extends ItemRenderWeaponBase {
|
|||||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.charge_thrower_hook_tex);
|
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.charge_thrower_hook_tex);
|
||||||
ResourceManager.charge_thrower.renderPart("Hook");
|
ResourceManager.charge_thrower.renderPart("Hook");
|
||||||
}
|
}
|
||||||
|
if(mag.getType(stack, null) == XFactoryTool.ct_mortar) {
|
||||||
|
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.charge_thrower_mortar_tex);
|
||||||
|
ResourceManager.charge_thrower.renderPart("Mortar");
|
||||||
|
}
|
||||||
|
if(mag.getType(stack, null) == XFactoryTool.ct_mortar_charge) {
|
||||||
|
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.charge_thrower_mortar_tex);
|
||||||
|
ResourceManager.charge_thrower.renderPart("Mortar");
|
||||||
|
ResourceManager.charge_thrower.renderPart("Oomph");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glShadeModel(GL11.GL_FLAT);
|
GL11.glShadeModel(GL11.GL_FLAT);
|
||||||
|
|||||||
@ -138,7 +138,6 @@ public class ItemRenderMinigunDual extends ItemRenderWeaponBase {
|
|||||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.minigun_dual_tex);
|
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.minigun_dual_tex);
|
||||||
ResourceManager.minigun.renderPart(index == 0 ? "GunDual" : "Gun");
|
ResourceManager.minigun.renderPart(index == 0 ? "GunDual" : "Gun");
|
||||||
ResourceManager.minigun.renderPart("Grip");
|
|
||||||
ResourceManager.minigun.renderPart("Barrels");
|
ResourceManager.minigun.renderPart("Barrels");
|
||||||
GL11.glShadeModel(GL11.GL_FLAT);
|
GL11.glShadeModel(GL11.GL_FLAT);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user