mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
in HEAT
This commit is contained in:
parent
09d11d49da
commit
805c06c802
@ -38,6 +38,7 @@
|
||||
* Glpyhid hives caught in a fallout zone now turn radioactive
|
||||
* Glyphids spawned by radioactive hives are immune to fire, twice as fast and five times as strong
|
||||
* Radioactive glpyhids however are NOT immune to radiation, and typically die quickly
|
||||
* Radioactive hives are sterile, they will not spawn scouts
|
||||
|
||||
## Fixed
|
||||
* The conveyor grabber should no longer skip over items when used in long lines
|
||||
|
||||
@ -1195,8 +1195,6 @@ public class ModBlocks {
|
||||
|
||||
public static Block dummy_block_vault;
|
||||
public static Block dummy_block_blast;
|
||||
public static Block dummy_block_uf6;
|
||||
public static Block dummy_block_puf6;
|
||||
public static Block dummy_plate_compact_launcher;
|
||||
public static Block dummy_port_compact_launcher;
|
||||
public static Block dummy_plate_launch_table;
|
||||
@ -2316,8 +2314,6 @@ public class ModBlocks {
|
||||
|
||||
dummy_block_vault = new DummyBlockVault(Material.iron).setBlockName("dummy_block_vault").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_block_blast = new DummyBlockBlast(Material.iron).setBlockName("dummy_block_blast").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_block_uf6 = new DummyBlockMachine(Material.iron, machine_uf6_tank, false).setBlockName("dummy_block_uf6").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_titanium");
|
||||
dummy_block_puf6 = new DummyBlockMachine(Material.iron, machine_puf6_tank, false).setBlockName("dummy_block_puf6").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_plate_compact_launcher = new DummyBlockMachine(Material.iron, compact_launcher, false).setBounds(0, 16, 0, 16, 16, 16).setBlockName("dummy_plate_compact_launcher").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_port_compact_launcher = new DummyBlockMachine(Material.iron, compact_launcher, true).setBlockName("dummy_port_compact_launcher").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_plate_launch_table = new DummyBlockMachine(Material.iron, launch_table, false).setBounds(0, 16, 0, 16, 16, 16).setBlockName("dummy_plate_launch_table").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
@ -3409,8 +3405,6 @@ public class ModBlocks {
|
||||
//Multiblock Dummy Blocks
|
||||
GameRegistry.registerBlock(dummy_block_vault, dummy_block_vault.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_block_blast, dummy_block_blast.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_block_uf6, dummy_block_uf6.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_block_puf6, dummy_block_puf6.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_plate_compact_launcher, dummy_plate_compact_launcher.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_port_compact_launcher, dummy_port_compact_launcher.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_plate_launch_table, dummy_plate_launch_table.getUnlocalizedName());
|
||||
|
||||
@ -123,15 +123,16 @@ public class BlockGlyphidSpawner extends BlockContainer implements IBlockMulti {
|
||||
List<EntityGlyphid> list = worldObj.getEntitiesWithinAABB(EntityGlyphid.class, AxisAlignedBB.getBoundingBox(xCoord - 5, yCoord + 1, zCoord - 5, xCoord + 6, yCoord + 7, zCoord + 6));
|
||||
float soot = PollutionHandler.getPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT);
|
||||
|
||||
if(list.size() <= 3) {
|
||||
int subtype = this.getBlockMetadata();
|
||||
if(list.size() <= 3 || subtype == EntityGlyphid.TYPE_RADIOACTIVE) {
|
||||
|
||||
ArrayList<EntityGlyphid> currentSwarm = createSwarm(soot, this.getBlockMetadata());
|
||||
ArrayList<EntityGlyphid> currentSwarm = createSwarm(soot, subtype);
|
||||
|
||||
for(EntityGlyphid glyphid : currentSwarm) {
|
||||
trySpawnEntity(glyphid);
|
||||
}
|
||||
|
||||
if(!initialSpawn && worldObj.rand.nextInt(MobConfig.scoutSwarmSpawnChance + 1) == 0 && soot >= MobConfig.scoutThreshold) {
|
||||
if(!initialSpawn && worldObj.rand.nextInt(MobConfig.scoutSwarmSpawnChance + 1) == 0 && soot >= MobConfig.scoutThreshold && subtype != EntityGlyphid.TYPE_RADIOACTIVE) {
|
||||
EntityGlyphidScout scout = new EntityGlyphidScout(worldObj);
|
||||
if(this.getBlockMetadata() == 1) scout.getDataWatcher().updateObject(EntityGlyphid.DW_SUBTYPE, (byte) EntityGlyphid.TYPE_INFECTED);
|
||||
trySpawnEntity(scout);
|
||||
|
||||
@ -2,28 +2,22 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.MultiblockHandler;
|
||||
import com.hbm.interfaces.IMultiblock;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityMachinePuF6Tank;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class MachinePuF6Tank extends BlockContainer implements IMultiblock {
|
||||
public class MachinePuF6Tank extends BlockContainer {
|
||||
|
||||
public MachinePuF6Tank(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
@ -57,7 +51,7 @@ public class MachinePuF6Tank extends BlockContainer implements IMultiblock {
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
||||
return Item.getItemFromBlock(ModBlocks.machine_puf6_tank);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -76,26 +70,5 @@ public class MachinePuF6Tank extends BlockContainer implements IMultiblock {
|
||||
if(i == 3) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
}
|
||||
|
||||
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.uf6Dimension)) {
|
||||
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.uf6Dimension, ModBlocks.dummy_block_puf6);
|
||||
|
||||
} else
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote) {
|
||||
return true;
|
||||
} else if(!player.isSneaking()) {
|
||||
TileEntityMachinePuF6Tank entity = (TileEntityMachinePuF6Tank) world.getTileEntity(x, y, z);
|
||||
if(entity != null) {
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,28 +2,22 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.MultiblockHandler;
|
||||
import com.hbm.interfaces.IMultiblock;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityMachineUF6Tank;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class MachineUF6Tank extends BlockContainer implements IMultiblock {
|
||||
public class MachineUF6Tank extends BlockContainer {
|
||||
|
||||
public MachineUF6Tank(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
@ -57,7 +51,7 @@ public class MachineUF6Tank extends BlockContainer implements IMultiblock {
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
||||
return Item.getItemFromBlock(ModBlocks.machine_uf6_tank);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -76,26 +70,5 @@ public class MachineUF6Tank extends BlockContainer implements IMultiblock {
|
||||
if(i == 3) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
}
|
||||
|
||||
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.uf6Dimension)) {
|
||||
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.uf6Dimension, ModBlocks.dummy_block_uf6);
|
||||
|
||||
} else
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote) {
|
||||
return true;
|
||||
} else if(!player.isSneaking()) {
|
||||
TileEntityMachineUF6Tank entity = (TileEntityMachineUF6Tank) world.getTileEntity(x, y, z);
|
||||
if(entity != null) {
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,19 +1,14 @@
|
||||
package com.hbm.entity.projectile;
|
||||
|
||||
import com.hbm.items.weapon.sedna.BulletConfig;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.EntityDamageUtil;
|
||||
import com.hbm.util.TrackerUtil;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class EntityBulletBaseMK4 extends EntityThrowableInterp {
|
||||
|
||||
@ -123,81 +118,15 @@ public class EntityBulletBaseMK4 extends EntityThrowableInterp {
|
||||
if(worldObj instanceof WorldServer) TrackerUtil.sendTeleport((WorldServer) worldObj, this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onImpact(MovingObjectPosition mop) {
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(this.config.onImpact != null) this.config.onImpact.accept(this, mop);
|
||||
|
||||
if(this.isDead) return;
|
||||
|
||||
if(mop.typeOfHit == mop.typeOfHit.BLOCK) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(mop.sideHit);
|
||||
Vec3 face = Vec3.createVectorHelper(dir.offsetX, dir.offsetY, dir.offsetZ);
|
||||
Vec3 vel = Vec3.createVectorHelper(motionX, motionY, motionZ).normalize();
|
||||
|
||||
double angle = Math.abs(BobMathUtil.getCrossAngle(vel, face) - 90);
|
||||
|
||||
if(angle <= config.ricochetAngle) {
|
||||
|
||||
this.ricochets++;
|
||||
if(this.ricochets > this.config.maxRicochetCount) {
|
||||
this.setPosition(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord);
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
switch(mop.sideHit) {
|
||||
case 0: case 1: motionY *= -1; break;
|
||||
case 2: case 3: motionZ *= -1; break;
|
||||
case 4: case 5: motionX *= -1; break;
|
||||
}
|
||||
worldObj.playSoundAtEntity(this, "hbm:weapon.ricochet", 0.25F, 1.0F);
|
||||
this.setPosition(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord);
|
||||
//send a teleport so the ricochet is more accurate instead of the interp smoothing fucking everything up
|
||||
if(worldObj instanceof WorldServer) TrackerUtil.sendTeleport((WorldServer) worldObj, this);
|
||||
return;
|
||||
|
||||
} else {
|
||||
this.setPosition(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord);
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
if(mop.typeOfHit == mop.typeOfHit.ENTITY) {
|
||||
Entity entity = mop.entityHit;
|
||||
|
||||
if(entity == this.thrower && this.ticksExisted < this.selfDamageDelay()) return;
|
||||
|
||||
if(entity instanceof EntityLivingBase && ((EntityLivingBase) entity).getHealth() <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
DamageSource damageCalc = this.config.getDamage(this, getThrower(), false);
|
||||
|
||||
if(!(entity instanceof EntityLivingBase)) {
|
||||
EntityDamageUtil.attackEntityFromIgnoreIFrame(entity, damageCalc, this.damage);
|
||||
return;
|
||||
}
|
||||
|
||||
EntityLivingBase living = (EntityLivingBase) entity;
|
||||
float prevHealth = living.getHealth();
|
||||
|
||||
if(this.config.armorPiercingPercent == 0) {
|
||||
EntityDamageUtil.attackEntityFromIgnoreIFrame(entity, damageCalc, this.damage);
|
||||
} else {
|
||||
DamageSource damagePiercing = this.config.getDamage(this, getThrower(), true);
|
||||
EntityDamageUtil.attackArmorPiercing(living, damageCalc, damagePiercing, this.damage, this.config.armorPiercingPercent);
|
||||
}
|
||||
|
||||
float newHealth = living.getHealth();
|
||||
|
||||
if(this.config.damageFalloffByPen) this.damage -= Math.max(prevHealth - newHealth, 0);
|
||||
if(!this.doesPenetrate() || this.damage < 0) {
|
||||
this.setPosition(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord);
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
if(this.config.onRicochet != null) this.config.onRicochet.accept(this, mop);
|
||||
if(this.config.onEntityHit != null) this.config.onEntityHit.accept(this, mop);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -11,12 +11,19 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.EntityDamageUtil;
|
||||
import com.hbm.util.TrackerUtil;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EntityDamageSourceIndirect;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BulletConfig {
|
||||
|
||||
@ -50,6 +57,8 @@ public class BulletConfig {
|
||||
|
||||
public Consumer<EntityBulletBaseMK4> onUpdate;
|
||||
public BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> onImpact;
|
||||
public BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> onRicochet = LAMBDA_STANDARD_RICOCHET;
|
||||
public BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> onEntityHit = LAMBDA_STANDARD_ENTITY_HIT;
|
||||
|
||||
public double gravity = 0;
|
||||
public int expires = 30;
|
||||
@ -92,9 +101,11 @@ public class BulletConfig {
|
||||
public BulletConfig setRenderRotations(boolean rot) { this.renderRotations = rot; return this; }
|
||||
public BulletConfig setCasing(SpentCasing casing) { this.casing = casing; return this; }
|
||||
public BulletConfig setRenderer(BiConsumer<EntityBulletBaseMK4, Float> renderer) { this.renderer = renderer; return this; }
|
||||
|
||||
public BulletConfig setOnUpdate(Consumer<EntityBulletBaseMK4> lambda) { this.onUpdate = lambda; return this; }
|
||||
public BulletConfig setOnImpact(BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> lambda) { this.onImpact = lambda; return this; }
|
||||
|
||||
public BulletConfig setOnUpdate(Consumer<EntityBulletBaseMK4> lambda) { this.onUpdate = lambda; return this; }
|
||||
public BulletConfig setOnRicochet(BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> lambda) { this.onRicochet = lambda; return this; }
|
||||
public BulletConfig setOnImpact(BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> lambda) { this.onImpact = lambda; return this; }
|
||||
public BulletConfig setOnEntityHit(BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> lambda) { this.onEntityHit = lambda; return this; }
|
||||
|
||||
public DamageSource getDamage(EntityBulletBaseMK4 bullet, EntityLivingBase shooter, boolean bypass) {
|
||||
|
||||
@ -110,4 +121,75 @@ public class BulletConfig {
|
||||
|
||||
return dmg;
|
||||
}
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_STANDARD_RICOCHET = (bullet, mop) -> {
|
||||
|
||||
if(mop.typeOfHit == mop.typeOfHit.BLOCK) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(mop.sideHit);
|
||||
Vec3 face = Vec3.createVectorHelper(dir.offsetX, dir.offsetY, dir.offsetZ);
|
||||
Vec3 vel = Vec3.createVectorHelper(bullet.motionX, bullet.motionY, bullet.motionZ).normalize();
|
||||
|
||||
double angle = Math.abs(BobMathUtil.getCrossAngle(vel, face) - 90);
|
||||
|
||||
if(angle <= bullet.config.ricochetAngle) {
|
||||
|
||||
bullet.ricochets++;
|
||||
if(bullet.ricochets > bullet.config.maxRicochetCount) {
|
||||
bullet.setPosition(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord);
|
||||
bullet.setDead();
|
||||
}
|
||||
|
||||
switch(mop.sideHit) {
|
||||
case 0: case 1: bullet.motionY *= -1; break;
|
||||
case 2: case 3: bullet.motionZ *= -1; break;
|
||||
case 4: case 5: bullet.motionX *= -1; break;
|
||||
}
|
||||
bullet.worldObj.playSoundAtEntity(bullet, "hbm:weapon.ricochet", 0.25F, 1.0F);
|
||||
bullet.setPosition(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord);
|
||||
//send a teleport so the ricochet is more accurate instead of the interp smoothing fucking everything up
|
||||
if(bullet.worldObj instanceof WorldServer) TrackerUtil.sendTeleport((WorldServer) bullet.worldObj, bullet);
|
||||
return;
|
||||
|
||||
} else {
|
||||
bullet.setPosition(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord);
|
||||
bullet.setDead();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_STANDARD_ENTITY_HIT = (bullet, mop) -> {
|
||||
|
||||
if(mop.typeOfHit == mop.typeOfHit.ENTITY) {
|
||||
Entity entity = mop.entityHit;
|
||||
|
||||
if(entity == bullet.getThrower() && bullet.ticksExisted < bullet.selfDamageDelay()) return;
|
||||
if(entity instanceof EntityLivingBase && ((EntityLivingBase) entity).getHealth() <= 0) return;
|
||||
|
||||
DamageSource damageCalc = bullet.config.getDamage(bullet, bullet.getThrower(), false);
|
||||
|
||||
if(!(entity instanceof EntityLivingBase)) {
|
||||
EntityDamageUtil.attackEntityFromIgnoreIFrame(entity, damageCalc, bullet.damage);
|
||||
return;
|
||||
}
|
||||
|
||||
EntityLivingBase living = (EntityLivingBase) entity;
|
||||
float prevHealth = living.getHealth();
|
||||
|
||||
if(bullet.config.armorPiercingPercent == 0) {
|
||||
EntityDamageUtil.attackEntityFromIgnoreIFrame(entity, damageCalc, bullet.damage);
|
||||
} else {
|
||||
DamageSource damagePiercing = bullet.config.getDamage(bullet, bullet.getThrower(), true);
|
||||
EntityDamageUtil.attackArmorPiercing(living, damageCalc, damagePiercing, bullet.damage, bullet.config.armorPiercingPercent);
|
||||
}
|
||||
|
||||
float newHealth = living.getHealth();
|
||||
|
||||
if(bullet.config.damageFalloffByPen) bullet.damage -= Math.max(prevHealth - newHealth, 0);
|
||||
if(!bullet.doesPenetrate() || bullet.damage < 0) {
|
||||
bullet.setPosition(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord);
|
||||
bullet.setDead();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.function.BiConsumer;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
import com.hbm.items.weapon.sedna.factory.Lego;
|
||||
import com.hbm.items.weapon.sedna.mags.IMagazine;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -127,4 +128,10 @@ public class Receiver {
|
||||
this.firePitch_DNA = pitch;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Receiver setupStandardFire() {
|
||||
return this
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE)
|
||||
.fire(Lego.LAMBDA_STANDARD_FIRE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ public class GunFactory {
|
||||
G12_BP, G12_BP_MAGNUM, G12_BP_SLUG, G12,
|
||||
R762_SP, R762_FMJ, R762_JHP, R762_AP, R762_DU,
|
||||
G40_FLARE, G40,
|
||||
ROCKET_HE,
|
||||
ROCKET_HE, ROCKET_HEAT,
|
||||
FLAME_DIESEL,
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,6 +71,7 @@ public class GunFactoryClient {
|
||||
g40_flare.setRenderer(LegoClient.RENDER_FLARE);
|
||||
g40.setRenderer(LegoClient.RENDER_GRENADE);
|
||||
rocket_rpzb_he.setRenderer(LegoClient.RENDER_RPZB);
|
||||
rocket_rpzb_heat.setRenderer(LegoClient.RENDER_RPZB);
|
||||
//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);
|
||||
|
||||
@ -225,7 +225,7 @@ public class Lego {
|
||||
.addBus("RELOAD_JOLT", new BusAnimationSequence().addPos(0, 0, 0, 600).addPos(2, 0, 0, 50).addPos(0, 0, 0, 100))
|
||||
.addBus("RELOAD_BULLETS", new BusAnimationSequence().addPos(0, 0, 0, 650).addPos(10, 0, 0, 300).addPos(10, 0, 0, 200).addPos(0, 0, 0, 700))
|
||||
.addBus("RELOAD_BULLETS_CON", new BusAnimationSequence().addPos(1, 0, 0, 0).addPos(1, 0, 0, 950).addPos(0, 0, 0, 1 ) );
|
||||
case INSPECT: //if(ANIM_RAND.nextBoolean()) return new BusAnimation().addBus("ROTATE", new BusAnimationSequence().addPos(-360 * 5, 0, 0, 350 * 5));
|
||||
case INSPECT:
|
||||
case JAMMED: return new BusAnimation()
|
||||
.addBus("RELAOD_TILT", new BusAnimationSequence().addPos(-15, 0, 0, 100).addPos(65, 0, 0, 100).addPos(45, 0, 0, 50).addPos(0, 0, 0, 200).addPos(0, 0, 0, 200).addPos(-80, 0, 0, 100).addPos(-80, 0, 0, 100).addPos(0, 0, 0, 200))
|
||||
.addBus("RELOAD_CYLINDER", new BusAnimationSequence().addPos(0, 0, 0, 200).addPos(90, 0, 0, 100).addPos(90, 0, 0, 450).addPos(0, 0, 0, 70));
|
||||
@ -233,4 +233,12 @@ public class Lego {
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
/*
|
||||
* Be honest. Do you genuinely think posting a random screenshot of your game with absolutely ZERO context of what modpack, what
|
||||
* Shaders if any or literally any context at all would come to a magic solution?
|
||||
* For all we know you accidentally rubbed Vaseline all over your monitor and jizzed in the hdmi socket of your pc
|
||||
*
|
||||
* ~ u/Wolfyy47_, 2024
|
||||
*/
|
||||
}
|
||||
|
||||
@ -574,4 +574,11 @@ public class Orchestras {
|
||||
if(timer == 5) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.shotgunReload", 1F, 1F);
|
||||
}
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_PANERSCHRECK = (stack, ctx) -> {
|
||||
EntityPlayer player = ctx.player;
|
||||
if(player.worldObj.isRemote) return;
|
||||
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
};
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ public class XFactory12ga {
|
||||
.dmg(12F).delay(20).reload(22, 10, 13, 0).jam(24).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineSingleReload(0, 6).addConfigs(g12_bp, g12_bp_magnum, g12_bp_slug, g12))
|
||||
.offset(0.75, -0.0625, -0.1875D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_MARESLEG_ANIMS).orchestra(Orchestras.ORCHESTRA_MARESLEG)
|
||||
).setUnlocalizedName("gun_maresleg").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
@ -56,7 +56,7 @@ public class XFactory12ga {
|
||||
.dmg(12F).delay(20).rounds(4).reload(25, 15, 7, 0).jam(45).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineSingleReload(0, 4).addConfigs(g12_bp, g12_bp_magnum, g12_bp_slug, g12))
|
||||
.offset(0.75, -0.0625, -0.1875D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_LIBERATOR_ANIMS).orchestra(Orchestras.ORCHESTRA_LIBERATOR)
|
||||
).setUnlocalizedName("gun_liberator").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
@ -67,7 +67,7 @@ public class XFactory12ga {
|
||||
.dmg(12F).delay(20).reload(5, 10, 10, 10, 0).jam(24).sound("hbm:weapon.shotgunShoot", 1.0F, 1.0F)
|
||||
.mag(new MagazineSingleReload(0, 8).addConfigs(g12_bp, g12_bp_magnum, g12_bp_slug, g12))
|
||||
.offset(0.75, -0.0625, -0.1875D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration().ps(LAMBDA_SPAS_SECONDARY).pt(null)
|
||||
.anim(LAMBDA_SPAS_ANIMS).orchestra(Orchestras.ORCHESTRA_SPAS)
|
||||
).setUnlocalizedName("gun_spas12").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
|
||||
@ -48,7 +48,7 @@ public class XFactory22lr {
|
||||
.dmg(5F).delay(1).dry(10).auto(true).spread(0.02F).reload(66).jam(30).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 177).addConfigs(p22_sp, p22_fmj, p22_jhp, p22_ap))
|
||||
.offset(1, -0.0625 * 1.5, -0.1875D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_AM180_ANIMS).orchestra(Orchestras.ORCHESTRA_AM180)
|
||||
).setUnlocalizedName("gun_am180").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
|
||||
@ -39,7 +39,7 @@ public class XFactory357 {
|
||||
.dmg(10F).delay(16).reload(55).jam(45).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 6).addConfigs(m357_sp, m357_fmj, m357_jhp, m357_ap, m357_express))
|
||||
.offset(0.75, -0.0625, -0.3125D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_ATLAS_ANIMS).orchestra(Orchestras.ORCHESTRA_ATLAS)
|
||||
).setUnlocalizedName("gun_light_revolver").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
@ -50,7 +50,7 @@ public class XFactory357 {
|
||||
.dmg(10F).delay(11).reload(55).jam(45).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 6).addConfigs(m357_sp, m357_fmj, m357_jhp, m357_ap, m357_express))
|
||||
.offset(0.75, -0.0625, 0.3125D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.pp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).pr(Lego.LAMBDA_STANDARD_RELOAD)
|
||||
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_DANI_ANIMS).orchestra(Orchestras.ORCHESTRA_DANI),
|
||||
@ -59,7 +59,7 @@ public class XFactory357 {
|
||||
.dmg(10F).delay(11).reload(55).jam(45).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(1, 6).addConfigs(m357_sp, m357_fmj, m357_jhp, m357_ap, m357_express))
|
||||
.offset(0.75, -0.0625, -0.3125D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.ps(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).pr(Lego.LAMBDA_STANDARD_RELOAD)
|
||||
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_DANI_ANIMS).orchestra(Orchestras.ORCHESTRA_DANI)
|
||||
|
||||
@ -45,7 +45,7 @@ public class XFactory40mm {
|
||||
.dmg(15F).delay(20).reload(28).jam(33).sound("hbm:weapon.hkShoot", 1.0F, 1.0F)
|
||||
.mag(new MagazineSingleReload(0, 1).addConfigs(g40_flare))
|
||||
.offset(0.75, -0.0625, -0.1875D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_FLAREGUN_ANIMS).orchestra(Orchestras.ORCHESTRA_FLAREGUN)
|
||||
).setUnlocalizedName("gun_flaregun").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
@ -56,7 +56,7 @@ public class XFactory40mm {
|
||||
.dmg(30F).delay(24).reload(16, 16, 16, 0).jam(0).sound("hbm:weapon.glShoot", 1.0F, 1.0F)
|
||||
.mag(new MagazineSingleReload(0, 4).addConfigs(g40, g40_flare))
|
||||
.offset(0.75, -0.0625, -0.1875D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_CONGOLAKE_ANIMS).orchestra(Orchestras.ORCHESTRA_CONGOLAKE)
|
||||
).setUnlocalizedName("gun_congolake").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
|
||||
@ -48,7 +48,7 @@ public class XFactory44 {
|
||||
.dmg(12F).delay(20).reload(25, 11, 14, 8).jam(45).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineSingleReload(0, 14).addConfigs(m44_sp, m44_fmj, m44_jhp, m44_ap, m44_express))
|
||||
.offset(0.75, -0.0625, -0.1875D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_HENRY_ANIMS).orchestra(Orchestras.ORCHESTRA_HENRY)
|
||||
).setUnlocalizedName("gun_henry").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
@ -59,7 +59,7 @@ public class XFactory44 {
|
||||
.dmg(10F).delay(14).reload(46).jam(23).sound("hbm:weapon.44Shoot", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 6).addConfigs(m44_sp, m44_fmj, m44_jhp, m44_ap, m44_express))
|
||||
.offset(0.75, -0.0625, -0.3125D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE))
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.pp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY) .pr(Lego.LAMBDA_STANDARD_RELOAD) .pt(Lego.LAMBDA_TOGGLE_AIM)
|
||||
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_NOPIP_ANIMS).orchestra(Orchestras.ORCHESTRA_NOPIP)
|
||||
|
||||
@ -49,7 +49,7 @@ public class XFactory762mm {
|
||||
.dmg(5F).delay(5).dry(15).spread(0.0F).reload(30, 0, 15, 0).jam(60).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 14).addConfigs(r762_sp, r762_fmj, r762_jhp, r762_ap, r762_du))
|
||||
.offset(1, -0.0625 * 2.5, -0.25D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_CARBINE_ANIMS).orchestra(Orchestras.ORCHESTRA_CARBIBE)
|
||||
).setUnlocalizedName("gun_carbine").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
|
||||
@ -46,7 +46,7 @@ public class XFactory9mm {
|
||||
.dmg(5F).delay(4).dry(40).auto(true).spread(0.015F).reload(60).jam(55).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 30).addConfigs(p9_sp, p9_fmj, p9_jhp, p9_ap))
|
||||
.offset(1, -0.0625 * 2.5, -0.25D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_GREASEGUN_ANIMS).orchestra(Orchestras.ORCHESTRA_GREASEGUN)
|
||||
).setUnlocalizedName("gun_greasegun").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
@ -57,7 +57,7 @@ public class XFactory9mm {
|
||||
.dmg(15F).delay(4).dry(40).spread(0.005F).reload(60).jam(55).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 17).addConfigs(p9_sp, p9_fmj, p9_jhp, p9_ap))
|
||||
.offset(1, -0.0625 * 2.5, -0.25D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_LAG_ANIMS).orchestra(Orchestras.ORCHESTRA_LAG)
|
||||
).setUnlocalizedName("gun_lag").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
@ -68,7 +68,7 @@ public class XFactory9mm {
|
||||
.dmg(7.5F).delay(2).dry(25).auto(true).spread(0.005F).reload(55).jam(50).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 30).addConfigs(p9_sp, p9_fmj, p9_jhp, p9_ap))
|
||||
.offset(1, -0.0625 * 2.5, -0.25D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_UZI_ANIMS).orchestra(Orchestras.ORCHESTRA_UZI)
|
||||
).setUnlocalizedName("gun_uzi").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
|
||||
@ -32,7 +32,7 @@ public class XFactoryBlackPowder {
|
||||
.rec(new Receiver(0)
|
||||
.dmg(5F).delay(27).reload(67).jam(58).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 6).addConfigs(stone, flint, iron, shot))
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_PEPPERBOX_ANIMS).orchestra(Orchestras.ORCHESTRA_PEPPERBOX)
|
||||
).setUnlocalizedName("gun_pepperbox").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
|
||||
@ -44,7 +44,7 @@ public class XFactoryFlamer {
|
||||
.dmg(10F).delay(1).auto(true).reload(90).jam(0)
|
||||
.mag(new MagazineFullReload(0, 300).addConfigs(flame_diesel))
|
||||
.offset(0.75, -0.0625, -0.25D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_FLAMER_ANIMS).orchestra(Orchestras.ORCHESTRA_FLAMER)
|
||||
).setUnlocalizedName("gun_flamer").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
|
||||
@ -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.EntityBulletBaseMK4;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -22,31 +23,40 @@ import net.minecraft.util.MovingObjectPosition;
|
||||
public class XFactoryRocket {
|
||||
|
||||
public static BulletConfig rocket_rpzb_he;
|
||||
public static BulletConfig rocket_rpzb_heat;
|
||||
|
||||
public static Consumer<EntityBulletBaseMK4> LAMBDA_STANDARD_ACCELERATE = (bullet) -> {
|
||||
if(bullet.accel < 7) bullet.accel += 0.4D;
|
||||
};
|
||||
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_STANDARD_EXPLODE = (bullet, mop) -> {
|
||||
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3) return;
|
||||
Lego.standardExplode(bullet, mop, 5F); bullet.setDead();
|
||||
};
|
||||
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_STANDARD_EXPLODE_HEAT = (bullet, mop) -> {
|
||||
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3) return;
|
||||
Lego.standardExplode(bullet, mop, 3F, 0.25F); bullet.setDead();
|
||||
};
|
||||
|
||||
public static void init() {
|
||||
|
||||
rocket_rpzb_he = new BulletConfig().setItem(EnumAmmo.ROCKET_HE).setOnImpact(LAMBDA_STANDARD_EXPLODE).setLife(300).setSelfDamageDelay(10).setVel(0F).setGrav(0D).setOnUpdate((bullet) -> {
|
||||
if(bullet.accel < 7) bullet.accel += 0.4D;
|
||||
});
|
||||
|
||||
rocket_rpzb_he = new BulletConfig().setItem(EnumAmmo.ROCKET_HE).setLife(300).setSelfDamageDelay(10).setVel(0F).setGrav(0D)
|
||||
.setOnImpact(LAMBDA_STANDARD_EXPLODE).setOnEntityHit(null).setOnRicochet(null).setOnUpdate(LAMBDA_STANDARD_ACCELERATE);
|
||||
rocket_rpzb_heat = new BulletConfig().setItem(EnumAmmo.ROCKET_HEAT).setLife(300).setDamage(1.5F).setSelfDamageDelay(10).setVel(0F).setGrav(0D)
|
||||
.setOnImpact(LAMBDA_STANDARD_EXPLODE_HEAT).setOnEntityHit(null).setOnRicochet(null).setOnUpdate(LAMBDA_STANDARD_ACCELERATE);
|
||||
|
||||
ModItems.gun_panzerschreck = new ItemGunBaseNT(new GunConfig()
|
||||
.dura(300).draw(7).inspect(39).crosshair(Crosshair.L_CIRCUMFLEX)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(15F).delay(20).reload(28).jam(33).sound("hbm:weapon.hkShoot", 1.0F, 1.0F)
|
||||
.mag(new MagazineSingleReload(0, 1).addConfigs(rocket_rpzb_he))
|
||||
.mag(new MagazineSingleReload(0, 1).addConfigs(rocket_rpzb_he, rocket_rpzb_heat))
|
||||
.offset(1, -0.0625 * 1.5, -0.1875D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_PANZERSCHRECK_ANIMS).orchestra(Orchestras.ORCHESTRA_FLAREGUN)
|
||||
.anim(LAMBDA_PANZERSCHRECK_ANIMS).orchestra(Orchestras.ORCHESTRA_PANERSCHRECK)
|
||||
).setUnlocalizedName("gun_panzerschreck").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
}
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_PANZERSCHRECK_ANIMS = (stack, type) -> {
|
||||
public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_PANZERSCHRECK_ANIMS = (stack, type) -> {
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
@ -1430,6 +1430,8 @@ public class MainRegistry {
|
||||
ignoreMappings.add("hbm:item.flame_8");
|
||||
ignoreMappings.add("hbm:item.flame_9");
|
||||
ignoreMappings.add("hbm:item.flame_10");
|
||||
ignoreMappings.add("hbm:tile.dummy_block_uf6");
|
||||
ignoreMappings.add("hbm:tile.dummy_block_puf6");
|
||||
|
||||
/// REMAP ///
|
||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||
|
||||
@ -62,8 +62,6 @@ public class NEIConfig implements IConfigureNEI {
|
||||
}
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_vault));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_blast));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_uf6));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_block_puf6));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_compact_launcher));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_port_launch_table));
|
||||
API.hideItem(new ItemStack(ModBlocks.dummy_plate_compact_launcher));
|
||||
|
||||
@ -4295,8 +4295,7 @@ tile.machine_boiler.name=Boiler
|
||||
tile.machine_boiler.desc=Großer Boiler zum Verdampfen von Wasser oder$Erhitzen von Öl. Benötigt externe Hitzequelle.$Wärmestransferrate: ΔT*0.01 TU/t
|
||||
tile.machine_boiler_electric_off.name=Elektrischer Ölwärmer
|
||||
tile.machine_boiler_electric_on.name=Elektrischer Ölwärmer
|
||||
tile.machine_boiler_off.name=Ölwärmer
|
||||
tile.machine_boiler_on.name=Ölwärmer
|
||||
tile.machine_boiler_off.name=Alter Boiler
|
||||
tile.machine_catalytic_cracker.name=Katalytischer Cracking-Turm
|
||||
tile.machine_catalytic_reformer.name=Katalytischer Reformer
|
||||
tile.machine_centrifuge.name=Zentrifuge
|
||||
|
||||
@ -5390,8 +5390,7 @@ tile.machine_boiler.name=Boiler
|
||||
tile.machine_boiler.desc=Large boiler that can boil water or heat up oil.$Requires external heat source.$Heat transfer rate: ΔT*0.01 TU/t
|
||||
tile.machine_boiler_electric_off.name=Electric Oil Heater
|
||||
tile.machine_boiler_electric_on.name=Electric Oil Heater
|
||||
tile.machine_boiler_off.name=Oil Heater
|
||||
tile.machine_boiler_on.name=Oil Heater
|
||||
tile.machine_boiler_off.name=Old Boiler
|
||||
tile.machine_catalytic_cracker.name=Catalytic Cracking Tower
|
||||
tile.machine_catalytic_reformer.name=Catalytic Reformer
|
||||
tile.machine_centrifuge.name=Centrifuge
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 295 B |
Loading…
x
Reference in New Issue
Block a user