kill all zebras

This commit is contained in:
Boblet 2025-05-09 14:52:10 +02:00
parent 21088af66f
commit 17de40d7b2
22 changed files with 194 additions and 56 deletions

View File

@ -12,6 +12,7 @@
* This means that reading the fill state of multiple batteries over the same channel should result the combined fill state of all batteries
* Halved base spread of the .22 SMG
* Certain secret guns now have a proper way of being obtained
* Demolition mini nukes now create fire again
## Fixed
* Fixed RoR controller having the wrong recipe

View File

@ -0,0 +1,23 @@
package com.hbm.explosion.vanillant.standard;
import com.hbm.blocks.ModBlocks;
import com.hbm.explosion.vanillant.ExplosionVNT;
import com.hbm.explosion.vanillant.interfaces.IBlockMutator;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
public class BlockMutatorBalefire implements IBlockMutator {
@Override public void mutatePre(ExplosionVNT explosion, Block block, int meta, int x, int y, int z) { }
@Override
public void mutatePost(ExplosionVNT explosion, int x, int y, int z) {
Block block = explosion.world.getBlock(x, y, z);
Block block1 = explosion.world.getBlock(x, y - 1, z);
if(block.getMaterial() == Material.air && block1.func_149730_j() && explosion.world.rand.nextInt(3) == 0) {
explosion.world.setBlock(x, y, z, ModBlocks.balefire);
}
}
}

View File

@ -101,6 +101,7 @@ public class GunFactory {
R762_HE, BMG50_HE, G10_EXPLOSIVE,
P45_SP, P45_FMJ, P45_JHP, P45_AP, P45_DU,
CT_HOOK, CT_MORTAR, CT_MORTAR_CHARGE,
NUKE_BALEFIRE,
//ONLY ADD NEW ENTRIES AT THE BOTTOM TO AVOID SHIFTING!
;
@ -126,7 +127,7 @@ 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, NUKE_BALEFIRE,
CT_HOOK, CT_MORTAR, CT_MORTAR_CHARGE,
};

View File

@ -203,6 +203,7 @@ public class GunFactoryClient {
setRendererBulk(LegoClient.RENDER_NUKE, nuke_standard, nuke_demo, nuke_high);
nuke_tots.setRenderer(LegoClient.RENDER_GRENADE);
nuke_hive.setRenderer(LegoClient.RENDER_HIVE);
nuke_balefire.setRenderer(LegoClient.RENDER_NUKE_BALEFIRE);
setRendererBulkBeam(LegoClient.RENDER_LIGHTNING, energy_tesla, energy_tesla_overcharge, energy_tesla_ir);
setRendererBulkBeam(LegoClient.RENDER_LIGHTNING_SUB, energy_tesla_ir_sub);

View File

@ -12,6 +12,7 @@ import com.hbm.items.weapon.sedna.hud.HUDComponentDurabilityBar;
import com.hbm.items.weapon.sedna.impl.ItemGunChargeThrower;
import com.hbm.lib.RefStrings;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.weapon.sedna.ItemRenderFatMan;
import com.hbm.render.tileentity.RenderArcFurnace;
import com.hbm.render.util.BeamPronter;
import com.hbm.render.util.BeamPronter.EnumBeamType;
@ -435,6 +436,18 @@ public class LegoClient {
GL11.glPopMatrix();
};
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_NUKE_BALEFIRE = (bullet, interp) -> {
GL11.glPushMatrix();
GL11.glScalef(0.125F, 0.125F, 0.125F);
GL11.glRotated(-90, 0, 1, 0);
GL11.glTranslatef(0, -1, 1F);
GL11.glShadeModel(GL11.GL_SMOOTH);
ItemRenderFatMan.renderBalefire(interp);
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
};
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_HIVE = (bullet, interp) -> {
GL11.glPushMatrix();

View File

@ -8,6 +8,8 @@ import com.hbm.entity.logic.EntityNukeExplosionMK5;
import com.hbm.entity.projectile.EntityBulletBaseMK4;
import com.hbm.explosion.vanillant.ExplosionVNT;
import com.hbm.explosion.vanillant.standard.BlockAllocatorStandard;
import com.hbm.explosion.vanillant.standard.BlockMutatorBalefire;
import com.hbm.explosion.vanillant.standard.BlockMutatorFire;
import com.hbm.explosion.vanillant.standard.BlockProcessorStandard;
import com.hbm.explosion.vanillant.standard.EntityProcessorCrossSmooth;
import com.hbm.explosion.vanillant.standard.ExplosionEffectWeapon;
@ -44,6 +46,7 @@ public class XFactoryCatapult {
public static BulletConfig nuke_high;
public static BulletConfig nuke_tots;
public static BulletConfig nuke_hive;
public static BulletConfig nuke_balefire;
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_NUKE_STANDARD = (bullet, mop) -> {
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3 && mop.entityHit == bullet.getThrower()) return;
@ -64,9 +67,9 @@ public class XFactoryCatapult {
if(bullet.isDead) return;
bullet.setDead();
ExplosionVNT vnt = new ExplosionVNT(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 10);
ExplosionVNT vnt = new ExplosionVNT(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 15);
vnt.setBlockAllocator(new BlockAllocatorStandard(64));
vnt.setBlockProcessor(new BlockProcessorStandard());
vnt.setBlockProcessor(new BlockProcessorStandard().withBlockEffect(new BlockMutatorFire()));
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(2, bullet.damage).withRangeMod(1.5F));
vnt.setPlayerProcessor(new PlayerProcessorStandard());
vnt.explode();
@ -83,6 +86,27 @@ public class XFactoryCatapult {
spawnMush(bullet, mop);
};
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_NUKE_BALEFIRE = (bullet, mop) -> {
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3 && mop.entityHit == bullet.getThrower()) return;
if(bullet.isDead) return;
bullet.setDead();
ExplosionVNT vnt = new ExplosionVNT(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 10);
vnt.setBlockAllocator(new BlockAllocatorStandard(64));
vnt.setBlockProcessor(new BlockProcessorStandard().withBlockEffect(new BlockMutatorBalefire()));
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(2, bullet.damage).withRangeMod(1.5F));
vnt.setPlayerProcessor(new PlayerProcessorStandard());
vnt.explode();
incrementRad(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 1.5F);
bullet.worldObj.playSoundEffect(mop.hitVec.xCoord, mop.hitVec.yCoord + 0.5, mop.hitVec.zCoord, "hbm:weapon.mukeExplosion", 15.0F, 1.0F);
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "muke");
data.setBoolean("balefire", true);
PacketThreading.createAllAroundThreadedPacket(new AuxParticlePacketNT(data, mop.hitVec.xCoord, mop.hitVec.yCoord + 0.5, mop.hitVec.zCoord), new TargetPoint(bullet.dimension, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 250));
};
public static void incrementRad(World world, double posX, double posY, double posZ, float mult) {
for(int i = -2; i <= 2; i++) { for(int j = -2; j <= 2; j++) {
if(Math.abs(i) + Math.abs(j) < 4) {
@ -136,12 +160,13 @@ public class XFactoryCatapult {
nuke_high = new BulletConfig().setItem(EnumAmmo.NUKE_HIGH).setLife(300).setVel(3F).setGrav(0.025F).setOnImpact(LAMBDA_NUKE_HIGH);
nuke_tots = new BulletConfig().setItem(EnumAmmo.NUKE_TOTS).setProjectiles(8).setLife(300).setVel(3F).setGrav(0.025F).setSpread(0.1F).setDamage(0.35F).setOnImpact(LAMBDA_NUKE_TINYTOT);
nuke_hive = new BulletConfig().setItem(EnumAmmo.NUKE_HIVE).setProjectiles(12).setLife(300).setVel(1F).setGrav(0.025F).setSpread(0.15F).setDamage(0.25F).setOnImpact(LAMBDA_NUKE_HIVE);
nuke_balefire = new BulletConfig().setItem(EnumAmmo.NUKE_BALEFIRE).setDamage(2.5F).setLife(300).setVel(3F).setGrav(0.025F).setOnImpact(LAMBDA_NUKE_BALEFIRE);
ModItems.gun_fatman = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
.dura(300).draw(20).inspect(30).crosshair(Crosshair.L_CIRCUMFLEX).hideCrosshair(false)
.dura(300).draw(20).inspect(30).reloadChangeType(true).crosshair(Crosshair.L_CIRCUMFLEX).hideCrosshair(false)
.rec(new Receiver(0)
.dmg(100F).spreadHipfire(0F).delay(10).reload(57).jam(40).sound("hbm:weapon.fire.fatman", 1.0F, 1.0F)
.mag(new MagazineSingleReload(0, 1).addConfigs(nuke_standard, nuke_demo, nuke_high, nuke_tots, nuke_hive))
.mag(new MagazineSingleReload(0, 1).addConfigs(nuke_standard, nuke_demo, nuke_high, nuke_tots, nuke_hive, nuke_balefire))
.offset(1, -0.0625 * 1.5, -0.1875D).offsetScoped(1, -0.0625 * 1.5, -0.125D)
.setupStandardFire().recoil(LAMBDA_RECOIL_FATMAN))
.setupStandardConfiguration()

View File

@ -1011,6 +1011,7 @@ public class ResourceManager {
public static final ResourceLocation tau_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/tau.png");
public static final ResourceLocation fatman_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/fatman.png");
public static final ResourceLocation fatman_mininuke_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/fatman_mininuke.png");
public static final ResourceLocation fatman_balefire_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/fatman_balefire.png");
public static final ResourceLocation lasrifle_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lasrifle.png");
public static final ResourceLocation lasrifle_mods_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lasrifle_mods.png");
public static final ResourceLocation hangman_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/hangman.png");

View File

@ -3,8 +3,10 @@ package com.hbm.render.item.weapon.sedna;
import org.lwjgl.opengl.GL11;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.items.weapon.sedna.factory.XFactoryCatapult;
import com.hbm.main.ResourceManager;
import com.hbm.render.anim.HbmAnimations;
import com.hbm.render.util.RenderMiscEffects;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
@ -34,7 +36,7 @@ public class ItemRenderFatMan extends ItemRenderWeaponBase {
@Override
public void renderFirstPerson(ItemStack stack) {
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fatman_tex);
double scale = 0.5D;
@ -81,10 +83,9 @@ public class ItemRenderFatMan extends ItemRenderWeaponBase {
GL11.glPopMatrix();
if(isLoaded || nuke[0] != 0 || nuke[1] != 0 || nuke[2] != 0) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fatman_mininuke_tex);
GL11.glPushMatrix();
GL11.glTranslated(nuke[0], nuke[1], nuke[2]);
ResourceManager.fatman.renderPart("MiniNuke");
renderNuke(gun.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getType(stack, null));
GL11.glPopMatrix();
}
@ -132,8 +133,71 @@ public class ItemRenderFatMan extends ItemRenderWeaponBase {
ResourceManager.fatman.renderPart("Lid");
if(!isLoaded) GL11.glTranslated(0, 0, 3);
ResourceManager.fatman.renderPart("Piston");
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fatman_mininuke_tex);
if(isLoaded) ResourceManager.fatman.renderPart("MiniNuke");
if(isLoaded) renderNuke(gun.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getType(stack, null));
GL11.glShadeModel(GL11.GL_FLAT);
}
public void renderNuke(Object type) {
if(type == XFactoryCatapult.nuke_balefire) {
renderBalefire(interp);
} else {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fatman_mininuke_tex);
ResourceManager.fatman.renderPart("MiniNuke");
}
}
public static void renderBalefire(float interp) {
Minecraft mc = Minecraft.getMinecraft();
mc.renderEngine.bindTexture(ResourceManager.fatman_balefire_tex);
ResourceManager.fatman.renderPart("MiniNuke");
mc.renderEngine.bindTexture(RenderMiscEffects.glintBF);
mc.entityRenderer.disableLightmap(interp);
float scale = 2F;
float r = 0F;
float g = 0.8F;
float b = 0.15F;
float speed = -6;
float glintColor = 0.76F;
int layers = 3;
GL11.glPushMatrix();
float offset = mc.thePlayer.ticksExisted + interp;
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_BLEND);
GL11.glColor4f(1F, 1F, 1F, 1F);
GL11.glDepthFunc(GL11.GL_EQUAL);
GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);
GL11.glDepthMask(false);
for(int k = 0; k < layers; ++k) {
GL11.glColor4f(r * glintColor, g * glintColor, b * glintColor, 1.0F);
GL11.glMatrixMode(GL11.GL_TEXTURE);
GL11.glLoadIdentity();
float movement = offset * (0.001F + (float) k * 0.003F) * speed;
GL11.glScalef(scale, scale, scale);
GL11.glRotatef(30.0F - k * 60.0F, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(0F, movement, 0F);
GL11.glMatrixMode(GL11.GL_MODELVIEW);
ResourceManager.fatman.renderPart("MiniNuke");
}
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glMatrixMode(GL11.GL_TEXTURE);
GL11.glDepthMask(true);
GL11.glLoadIdentity();
GL11.glMatrixMode(GL11.GL_MODELVIEW);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthFunc(GL11.GL_LEQUAL);
GL11.glPopMatrix();
mc.entityRenderer.enableLightmap(interp);
}
}

View File

@ -10,60 +10,61 @@ import net.minecraft.world.World;
import net.minecraftforge.client.model.IModelCustom;
public class RenderMiscEffects {
public static ResourceLocation glint = new ResourceLocation(RefStrings.MODID + ":textures/misc/glint.png");
public static ResourceLocation glintBF = new ResourceLocation(RefStrings.MODID + ":textures/misc/glintBF.png");
public static void renderClassicGlint(World world, float interpol, IModelCustom model, String part, float colorMod, float r, float g, float b, float speed, float scale) {
GL11.glPushMatrix();
float offset = Minecraft.getMinecraft().thePlayer.ticksExisted + interpol;
GL11.glEnable(GL11.GL_BLEND);
float color = colorMod;
GL11.glColor4f(color, color, color, 1.0F);
GL11.glDepthFunc(GL11.GL_EQUAL);
GL11.glDepthMask(false);
GL11.glPushMatrix();
float offset = Minecraft.getMinecraft().thePlayer.ticksExisted + interpol;
GL11.glEnable(GL11.GL_BLEND);
float color = colorMod;
GL11.glColor4f(color, color, color, 1.0F);
GL11.glDepthFunc(GL11.GL_EQUAL);
GL11.glDepthMask(false);
for (int k = 0; k < 2; ++k) {
GL11.glDisable(GL11.GL_LIGHTING);
float glintColor = 0.76F;
GL11.glColor4f(r * glintColor, g * glintColor, b * glintColor, 1.0F);
GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);
GL11.glMatrixMode(GL11.GL_TEXTURE);
GL11.glLoadIdentity();
float movement = offset * (0.001F + (float)k * 0.003F) * speed;
GL11.glScalef(scale, scale, scale);
GL11.glRotatef(30.0F - (float)k * 60.0F, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(0.0F, movement, 0.0F);
GL11.glMatrixMode(GL11.GL_MODELVIEW);
if("all".equals(part))
model.renderAll();
else
model.renderPart(part);
}
for(int k = 0; k < 2; ++k) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glMatrixMode(GL11.GL_TEXTURE);
GL11.glDepthMask(true);
GL11.glLoadIdentity();
GL11.glMatrixMode(GL11.GL_MODELVIEW);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthFunc(GL11.GL_LEQUAL);
GL11.glPopMatrix();
}
GL11.glDisable(GL11.GL_LIGHTING);
float glintColor = 0.76F;
GL11.glColor4f(r * glintColor, g * glintColor, b * glintColor, 1.0F);
GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);
GL11.glMatrixMode(GL11.GL_TEXTURE);
GL11.glLoadIdentity();
float movement = offset * (0.001F + (float) k * 0.003F) * speed;
GL11.glScalef(scale, scale, scale);
GL11.glRotatef(30.0F - (float) k * 60.0F, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(0.0F, movement, 0.0F);
GL11.glMatrixMode(GL11.GL_MODELVIEW);
if("all".equals(part))
model.renderAll();
else
model.renderPart(part);
}
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glMatrixMode(GL11.GL_TEXTURE);
GL11.glDepthMask(true);
GL11.glLoadIdentity();
GL11.glMatrixMode(GL11.GL_MODELVIEW);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthFunc(GL11.GL_LEQUAL);
GL11.glPopMatrix();
}
public static void renderClassicGlint(World world, float interpol, IModelCustom model, String part, float r, float g, float b, float speed, float scale) {
renderClassicGlint(world, interpol, model, part, 0.5F, r, g, b, speed, scale);
}
}
public static void renderClassicGlint(World world, float interpol, IModelCustom model, String part) {
renderClassicGlint(world, interpol, model, part, 0.5F, 0.25F, 0.8F, 20.0F, 1F/3F);
}
renderClassicGlint(world, interpol, model, part, 0.5F, 0.25F, 0.8F, 20.0F, 1F / 3F);
}
}

View File

@ -1072,6 +1072,9 @@ item.ammo_standard.capacitor_ir.name=Capacitor (niedrige Wellenlänge)
item.ammo_standard.capacitor_overcharge.name=Kondensator (Überladung)
item.ammo_standard.coil_ferrouranium.name=Ferrourankugel
item.ammo_standard.coil_tungsten.name=Wolframkugel
item.ammo_standard.ct_hook.name=Enterhaken
item.ammo_standard.ct_mortar.name=Sprengladung
item.ammo_standard.ct_mortar_charge.name=Geballte Ladung
item.ammo_standard.flame_balefire.name=Flammenwerferbrennstoff, Balefire
item.ammo_standard.flame_diesel.name=Flammenwerferbrennstoff, Diesel
item.ammo_standard.flame_gas.name=Flammenwerferbrennstoff, Gas
@ -2071,6 +2074,7 @@ item.gun_b92.name=§9B92 Energiepistole§r
item.gun_b92_ammo.name=§9B92-Energiezelle§r
item.gun_bolter.name=Boltergewehr
item.gun_carbine.name=Karabiner
item.gun_charge_thrower.name=Ladungswerfer
item.gun_chemthrower.name=Chemowerfer
item.gun_coilgun.name=Gaußpistole
item.gun_cryocannon.name=Kyro-Kanone

View File

@ -1797,6 +1797,9 @@ item.ammo_standard.capacitor_ir.name=Capacitor (Low Wavelength)
item.ammo_standard.capacitor_overcharge.name=Capacitor (Overcharge)
item.ammo_standard.coil_ferrouranium.name=Coilgun Ferrouranium Ball
item.ammo_standard.coil_tungsten.name=Coilgun Tungsten Ball
item.ammo_standard.ct_hook.name=Grappling Hook
item.ammo_standard.ct_mortar.name=Demolition Charge
item.ammo_standard.ct_mortar_charge.name=Heavy Demolition Charge
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
@ -2882,6 +2885,7 @@ item.gun_b92.name=§9B92 Energy Pistol§r
item.gun_b92_ammo.name=§9B92 Energy Cell§r
item.gun_bolter.name=Bolter
item.gun_carbine.name=Carbine
item.gun_charge_thrower.name=Charge Thrower
item.gun_chemthrower.name=Chemthrower
item.gun_coilgun.name=Coilgun
item.gun_congolake.name=Congo Lake

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 B

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 549 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 900 B

After

Width:  |  Height:  |  Size: 873 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 333 B