This commit is contained in:
Bob 2025-03-09 22:03:34 +01:00
parent 3da9f7c56f
commit 0ca1be3d6f
25 changed files with 303 additions and 23 deletions

View File

@ -26,4 +26,6 @@
* Fixed animation error on the MAS-36
* Fixed drone docks, requester and provider crates not dropping their contents when broken
* Fixed all missing texture errors that appear in the startup log
* Potentially fixed a crash with mekanism during the recipe change phase
* Potentially fixed a crash with mekanism during the recipe change phase
* Removed the coke to heavy oil recipe for allowing infinite oil loops
* Coke to syngas and coalgas recipes should be fine though, so they stay

View File

@ -0,0 +1,9 @@
package api.hbm.fluidmk2;
import com.hbm.inventory.fluid.FluidType;
public interface IFluidConductorMK2 extends IFluidConnectorMK2 {
public FluidNetMK2 getPipeNet(FluidType type);
public void setPipeNet(FluidType type, FluidNetMK2 network);
}

View File

@ -4,8 +4,9 @@ import com.hbm.inventory.fluid.FluidType;
import com.hbm.uninos.IGenProvider;
import com.hbm.uninos.networkproviders.FluidNetProvider;
public interface IFluidProviderMK2 extends IGenProvider<FluidNetProvider> {
public interface IFluidProviderMK2 extends IFluidUserMK2, IGenProvider<FluidNetProvider> {
public void useUpFluid(FluidType type, int pressure, long amount);
public long getProviderSpeed(FluidType type, int pressure);
public long getFluidAvailable(FluidType type, int pressure);
}

View File

@ -4,9 +4,10 @@ import com.hbm.inventory.fluid.FluidType;
import com.hbm.uninos.IGenReceiver;
import com.hbm.uninos.networkproviders.FluidNetProvider;
public interface IFluidReceiverMK2 extends IGenReceiver<FluidNetProvider> {
public interface IFluidReceiverMK2 extends IFluidUserMK2, IGenReceiver<FluidNetProvider> {
/** Sends fluid of the desired type and pressure to the receiver, returns the remainder */
public long transferFluid(FluidType type, int pressure, long amount);
public long getReceiverSpeed(FluidType type, int pressure);
public long getDemand(FluidType type, int pressure);
}

View File

@ -0,0 +1,87 @@
package api.hbm.fluidmk2;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.util.Compat;
import com.hbm.util.fauxpointtwelve.DirPos;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public interface IFluidStandardReceiver extends IFluidReceiverMK2 {
public default void trySubscribe(FluidType type, World world, DirPos pos) { trySubscribe(type, world, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); }
public default void trySubscribe(FluidType type, World world, int x, int y, int z, ForgeDirection dir) {
TileEntity te = Compat.getTileStandard(world, x, y, z);
boolean red = false;
if(te instanceof IFluidConductorMK2) {
IFluidConductorMK2 con = (IFluidConductorMK2) te;
if(!con.canConnect(type, dir)) return;
if(con.getPipeNet(type) != null && !con.getPipeNet(type).isSubscribed(this))
con.getPipeNet(type).addReceiver(this);
if(con.getPipeNet(type) != null) red = true;
}
if(particleDebug) {
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "network");
data.setString("mode", "fluid");
data.setInteger("color", type.getColor());
double posX = x + 0.5 + dir.offsetX * 0.5 + world.rand.nextDouble() * 0.5 - 0.25;
double posY = y + 0.5 + dir.offsetY * 0.5 + world.rand.nextDouble() * 0.5 - 0.25;
double posZ = z + 0.5 + dir.offsetZ * 0.5 + world.rand.nextDouble() * 0.5 - 0.25;
data.setDouble("mX", -dir.offsetX * (red ? 0.025 : 0.1));
data.setDouble("mY", -dir.offsetY * (red ? 0.025 : 0.1));
data.setDouble("mZ", -dir.offsetZ * (red ? 0.025 : 0.1));
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, posX, posY, posZ), new TargetPoint(world.provider.dimensionId, posX, posY, posZ, 25));
}
}
public FluidTank[] getReceivingTanks();
@Override
public default long getDemand(FluidType type, int pressure) {
long amount = 0;
for(FluidTank tank : getReceivingTanks()) {
if(tank.getTankType() == type && tank.getPressure() == pressure) amount += (tank.getMaxFill() - tank.getFill());
}
return amount;
}
@Override
public default long transferFluid(FluidType type, int pressure, long amount) {
int tanks = 0;
for(FluidTank tank : getReceivingTanks()) {
if(tank.getTankType() == type && tank.getPressure() == pressure) tanks++;
}
if(tanks > 1) {
int firstRound = (int) Math.floor((double) amount / (double) tanks);
for(FluidTank tank : getReceivingTanks()) {
if(tank.getTankType() == type && tank.getPressure() == pressure) {
int toAdd = Math.min(firstRound, tank.getMaxFill() - tank.getFill());
tank.setFill(tank.getFill() + toAdd);
amount -= toAdd;
}
}
}
if(amount > 0) for(FluidTank tank : getReceivingTanks()) {
if(tank.getTankType() == type && tank.getPressure() == pressure) {
int toAdd = (int) Math.min(amount, tank.getMaxFill() - tank.getFill());
tank.setFill(tank.getFill() + toAdd);
amount -= toAdd;
}
}
return amount;
}
}

View File

@ -0,0 +1,106 @@
package api.hbm.fluidmk2;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.uninos.GenNode;
import com.hbm.uninos.UniNodespace;
import com.hbm.util.Compat;
import com.hbm.util.fauxpointtwelve.DirPos;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public interface IFluidStandardSenderMK2 extends IFluidProviderMK2 {
public default void tryProvide(FluidTank tank, World world, DirPos pos) { tryProvide(tank.getTankType(), tank.getPressure(), world, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); }
public default void tryProvide(FluidType type, World world, DirPos pos) { tryProvide(type, 0, world, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); }
public default void tryProvide(FluidType type, int pressure, World world, DirPos pos) { tryProvide(type, pressure, world, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); }
public default void tryProvide(FluidTank tank, World world, int x, int y, int z, ForgeDirection dir) { tryProvide(tank.getTankType(), tank.getPressure(), world, x, y, z, dir); }
public default void tryProvide(FluidType type, World world, int x, int y, int z, ForgeDirection dir) { tryProvide(type, 0, world, x, y, z, dir); }
public default void tryProvide(FluidType type, int pressure, World world, int x, int y, int z, ForgeDirection dir) {
TileEntity te = Compat.getTileStandard(world, x, y, z);
boolean red = false;
if(te instanceof IFluidConductorMK2) {
IFluidConductorMK2 con = (IFluidConductorMK2) te;
if(con.canConnect(type, dir.getOpposite())) {
GenNode<FluidNetMK2> node = UniNodespace.getNode(world, x, y, z, type.getNetworkProvider());
if(node != null && node.net != null) {
node.net.addProvider(this);
red = true;
}
}
}
if(te instanceof IFluidReceiverMK2 && te != this) {
IFluidReceiverMK2 rec = (IFluidReceiverMK2) te;
if(rec.canConnect(type, dir.getOpposite())) {
long provides = Math.min(this.getFluidAvailable(type, pressure), this.getProviderSpeed(type, pressure));
long receives = Math.min(rec.getDemand(type, pressure), rec.getReceiverSpeed(type, pressure));
long toTransfer = Math.min(provides, receives);
toTransfer -= rec.transferFluid(type, pressure, toTransfer);
this.useUpFluid(type, pressure, toTransfer);
}
}
if(particleDebug) {
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "network");
data.setString("mode", "fluid");
data.setInteger("color", type.getColor());
double posX = x + 0.5 - dir.offsetX * 0.5 + world.rand.nextDouble() * 0.5 - 0.25;
double posY = y + 0.5 - dir.offsetY * 0.5 + world.rand.nextDouble() * 0.5 - 0.25;
double posZ = z + 0.5 - dir.offsetZ * 0.5 + world.rand.nextDouble() * 0.5 - 0.25;
data.setDouble("mX", dir.offsetX * (red ? 0.025 : 0.1));
data.setDouble("mY", dir.offsetY * (red ? 0.025 : 0.1));
data.setDouble("mZ", dir.offsetZ * (red ? 0.025 : 0.1));
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, posX, posY, posZ), new TargetPoint(world.provider.dimensionId, posX, posY, posZ, 25));
}
}
public FluidTank[] getSendingTanks();
@Override
public default long getFluidAvailable(FluidType type, int pressure) {
long amount = 0;
for(FluidTank tank : getSendingTanks()) {
if(tank.getTankType() == type && tank.getPressure() == pressure) amount += tank.getFill();
}
return amount;
}
@Override
public default void useUpFluid(FluidType type, int pressure, long amount) {
int tanks = 0;
for(FluidTank tank : getSendingTanks()) {
if(tank.getTankType() == type && tank.getPressure() == pressure) tanks++;
}
if(tanks > 1) {
int firstRound = (int) Math.floor((double) amount / (double) tanks);
for(FluidTank tank : getSendingTanks()) {
if(tank.getTankType() == type && tank.getPressure() == pressure) {
int toRem = Math.min(firstRound, tank.getFill());
tank.setFill(tank.getFill() - toRem);
amount -= toRem;
}
}
}
if(amount > 0) for(FluidTank tank : getSendingTanks()) {
if(tank.getTankType() == type && tank.getPressure() == pressure) {
int toRem = (int) Math.min(amount, tank.getFill());
tank.setFill(tank.getFill() - toRem);
amount -= toRem;
}
}
}
}

View File

@ -0,0 +1,10 @@
package api.hbm.fluidmk2;
import com.hbm.inventory.fluid.tank.FluidTank;
public interface IFluidUserMK2 extends IFluidConnectorMK2 {
public static final boolean particleDebug = false;
public FluidTank[] getAllTanks();
}

View File

@ -28,6 +28,7 @@ public class EntityProcessorCross implements IEntityProcessor {
protected double nodeDist = 2D;
protected IEntityRangeMutator range;
protected ICustomDamageHandler damage;
protected double knockbackMult = 1D;
protected boolean allowSelfDamage = false;
public EntityProcessorCross(double nodeDist) {
@ -38,6 +39,11 @@ public class EntityProcessorCross implements IEntityProcessor {
this.allowSelfDamage = true;
return this;
}
public EntityProcessorCross setKnockback(double mult) {
this.knockbackMult = mult;
return this;
}
@Override
public HashMap<EntityPlayer, Vec3> process(ExplosionVNT explosion, World world, double x, double y, double z, float size) {
@ -104,13 +110,13 @@ public class EntityProcessorCross implements IEntityProcessor {
double enchKnockback = EnchantmentProtection.func_92092_a(entity, knockback);
if(!(entity instanceof EntityBulletBaseMK4)) {
entity.motionX += deltaX * enchKnockback;
entity.motionY += deltaY * enchKnockback;
entity.motionZ += deltaZ * enchKnockback;
entity.motionX += deltaX * enchKnockback * knockbackMult;
entity.motionY += deltaY * enchKnockback * knockbackMult;
entity.motionZ += deltaZ * enchKnockback * knockbackMult;
}
if(entity instanceof EntityPlayer) {
affectedPlayers.put((EntityPlayer) entity, Vec3.createVectorHelper(deltaX * knockback, deltaY * knockback, deltaZ * knockback));
affectedPlayers.put((EntityPlayer) entity, Vec3.createVectorHelper(deltaX * knockback * knockbackMult, deltaY * knockback * knockbackMult, deltaZ * knockback * knockbackMult));
}
}
}

View File

@ -0,0 +1,27 @@
package com.hbm.explosion.vanillant.standard;
import com.hbm.explosion.vanillant.ExplosionVNT;
import com.hbm.explosion.vanillant.interfaces.IExplosionSFX;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
public class ExplosionEffectTiny implements IExplosionSFX {
@Override
public void doEffect(ExplosionVNT explosion, World world, double x, double y, double z, float size) {
if(world.isRemote) return;
world.playSoundEffect(x, y, z, "hbm:weapon.explosionTiny", 15.0F, 1.0F);
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "vanillaExt");
data.setString("mode", "largeexplode");
data.setFloat("size", 1.5F);
data.setByte("count", (byte)1);
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, x, y, z), new TargetPoint(world.provider.dimensionId, x, y, z, 100));
}
}

View File

@ -128,7 +128,6 @@ public class SatelliteHandler extends TemplateRecipeHandler implements ICompatNH
public RecipeSet(Object in, List<ItemStack> out) {
//not the prettiest of solutions but certainly the most pleasant to work with
int inLine = 1;
int outLine = 1;
int inOX = 0;
int inOY = 0;

View File

@ -101,9 +101,6 @@ public class PyroOvenRecipes extends SerializableRecipe {
recipes.add(new PyroOvenRecipe(100)
.in(new FluidStack(Fluids.HYDROGEN, 500)).in(new OreDictStack(COAL.dust()))
.out(new FluidStack(Fluids.HEAVYOIL, 1_000)));
recipes.add(new PyroOvenRecipe(100)
.in(new FluidStack(Fluids.HYDROGEN, 250)).in(new OreDictStack(ANY_COKE.gem()))
.out(new FluidStack(Fluids.HEAVYOIL, 1_000)));
//coalgas from coal
recipes.add(new PyroOvenRecipe(50)
.in(new FluidStack(Fluids.HEAVYOIL, 500)).in(new OreDictStack(COAL.gem()))

View File

@ -91,6 +91,7 @@ public class GunFactory {
COIL_TUNGSTEN, COIL_FERROURANIUM,
NUKE_STANDARD, NUKE_DEMO, NUKE_HIGH, NUKE_TOTS, NUKE_HIVE,
G10, G10_SHRAPNEL, G10_DU, G10_SLUG,
R762_HE,
//ONLY ADD NEW ENTRIES AT THE BOTTOM TO AVOID SHIFTING!
;
@ -103,7 +104,7 @@ public class GunFactory {
P22_SP, P22_FMJ, P22_JHP, P22_AP,
P9_SP, P9_FMJ, P9_JHP, P9_AP,
R556_SP, R556_FMJ, R556_JHP, R556_AP,
R762_SP, R762_FMJ, R762_JHP, R762_AP, R762_DU,
R762_SP, R762_FMJ, R762_JHP, R762_AP, R762_DU, R762_HE,
BMG50_SP, BMG50_FMJ, BMG50_JHP, BMG50_AP, BMG50_DU,
B75, B75_INC, B75_EXP,
G12_BP, G12_BP_MAGNUM, G12_BP_SLUG, G12, G12_SLUG, G12_FLECHETTE, G12_MAGNUM, G12_EXPLOSIVE, G12_PHOSPHORUS,

View File

@ -132,6 +132,7 @@ public class GunFactoryClient {
r762_jhp.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
r762_ap.setRenderer(LegoClient.RENDER_AP_BULLET);
r762_du.setRenderer(LegoClient.RENDER_DU_BULLET);
r762_he.setRenderer(LegoClient.RENDER_HE_BULLET);
bmg50_sp.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
bmg50_fmj.setRenderer(LegoClient.RENDER_STANDARD_BULLET);

View File

@ -10,6 +10,7 @@ import com.hbm.entity.projectile.EntityBulletBaseMK4CL;
import com.hbm.entity.projectile.EntityBulletBeamBase;
import com.hbm.explosion.vanillant.ExplosionVNT;
import com.hbm.explosion.vanillant.standard.EntityProcessorCrossSmooth;
import com.hbm.explosion.vanillant.standard.ExplosionEffectTiny;
import com.hbm.explosion.vanillant.standard.ExplosionEffectWeapon;
import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
import com.hbm.interfaces.NotableComments;
@ -33,6 +34,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraftforge.common.util.ForgeDirection;
/**
* "LEGO" - i.e. standardized building blocks which can be used to set up gun configs easily.
@ -283,6 +285,20 @@ public class Lego {
vnt.setSFX(new ExplosionEffectWeapon(10, 2.5F, 1F));
vnt.explode();
}
public static void tinyExplode(EntityBulletBaseMK4 bullet, MovingObjectPosition mop, float range) { tinyExplode(bullet, mop, range, 1F); }
public static void tinyExplode(EntityBulletBaseMK4 bullet, MovingObjectPosition mop, float range, float damageMod) {
ForgeDirection dir = ForgeDirection.getOrientation(mop.sideHit);
double x = mop.hitVec.xCoord + dir.offsetX * 0.25D;
double y = mop.hitVec.yCoord + dir.offsetY * 0.25D;
double z = mop.hitVec.zCoord + dir.offsetZ * 0.25D;
ExplosionVNT vnt = new ExplosionVNT(bullet.worldObj, x, y, z, range, bullet.getThrower());
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(1, bullet.damage * damageMod)
.setupPiercing(bullet.config.armorThresholdNegation, bullet.config.armorPiercingPercent).setKnockback(0.25D));
vnt.setPlayerProcessor(new PlayerProcessorStandard());
vnt.setSFX(new ExplosionEffectTiny());
vnt.explode();
}
/** anims for the DEBUG revolver, mostly a copy of the li'lpip but with some fixes regarding the cylinder movement */
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_DEBUG_ANIMS = (stack, type) -> {

View File

@ -62,6 +62,12 @@ public class LegoClient {
renderBulletStandard(Tessellator.instance, 0x5CCD41, 0xE9FF8D, length, false);
};
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_HE_BULLET = (bullet, interp) -> {
double length = bullet.prevVelocity + (bullet.velocity - bullet.prevVelocity) * interp;
if(length <= 0) return;
renderBulletStandard(Tessellator.instance, 0xD8CA00, 0xFFF19D, length, true);
};
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_TRACER_BULLET = (bullet, interp) -> {
double length = bullet.prevVelocity + (bullet.velocity - bullet.prevVelocity) * interp;
if(length <= 0) return;

View File

@ -3,6 +3,7 @@ package com.hbm.items.weapon.sedna.factory;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import com.hbm.entity.projectile.EntityBulletBaseMK4;
import com.hbm.items.ModItems;
import com.hbm.items.ItemEnums.EnumCasingType;
import com.hbm.items.weapon.sedna.BulletConfig;
@ -25,6 +26,7 @@ import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.DamageResistanceHandler.DamageClass;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition;
public class XFactory762mm {
@ -33,10 +35,16 @@ public class XFactory762mm {
public static BulletConfig r762_jhp;
public static BulletConfig r762_ap;
public static BulletConfig r762_du;
public static BulletConfig r762_he;
public static BulletConfig energy_lacunae;
public static BulletConfig energy_lacunae_overcharge;
public static BulletConfig energy_lacunae_ir;
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_TINY_EXPLODE = (bullet, mop) -> {
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3 && mop.entityHit == bullet.getThrower()) return;
Lego.tinyExplode(bullet, mop, 2F); bullet.setDead();
};
public static void init() {
SpentCasing casing762 = new SpentCasing(CasingType.BOTTLENECK).setColor(SpentCasing.COLOR_CASE_BRASS);
@ -50,6 +58,8 @@ public class XFactory762mm {
.setCasing(casing762.clone().setColor(SpentCasing.COLOR_CASE_44).register("r762ap"));
r762_du = new BulletConfig().setItem(EnumAmmo.R762_DU).setCasing(EnumCasingType.SMALL_STEEL, 6).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(2.5F).setThresholdNegation(15F).setArmorPiercing(0.25F)
.setCasing(casing762.clone().setColor(SpentCasing.COLOR_CASE_44).register("r762du"));
r762_he = new BulletConfig().setItem(EnumAmmo.R762_HE).setCasing(EnumCasingType.SMALL_STEEL, 6).setDamage(2F).setOnImpact(LAMBDA_TINY_EXPLODE)
.setCasing(casing762.clone().setColor(SpentCasing.COLOR_CASE_44).register("r762he"));
energy_lacunae = new BulletConfig().setItem(EnumAmmo.CAPACITOR).setCasing(new ItemStack(ModItems.ingot_polymer, 2), 4 * 40).setupDamageClass(DamageClass.LASER).setBeam().setReloadCount(40).setSpread(0.0F).setLife(5).setRenderRotations(false).setOnBeamImpact(BulletConfig.LAMBDA_STANDARD_BEAM_HIT);
energy_lacunae_overcharge = new BulletConfig().setItem(EnumAmmo.CAPACITOR_OVERCHARGE).setCasing(new ItemStack(ModItems.ingot_polymer, 2), 4 * 40).setupDamageClass(DamageClass.LASER).setBeam().setReloadCount(40).setSpread(0.0F).setLife(5).setRenderRotations(false).setDoesPenetrate(true).setOnBeamImpact(BulletConfig.LAMBDA_STANDARD_BEAM_HIT);
@ -59,7 +69,7 @@ public class XFactory762mm {
.dura(3_000).draw(10).inspect(31).reloadSequential(true).crosshair(Crosshair.CIRCLE).smoke(LAMBDA_SMOKE)
.rec(new Receiver(0)
.dmg(15F).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))
.mag(new MagazineFullReload(0, 14).addConfigs(r762_sp, r762_fmj, r762_jhp, r762_ap, r762_du, r762_he))
.offset(1, -0.0625 * 2.5, -0.25D)
.setupStandardFire().recoil(LAMBDA_RECOIL_CARBINE))
.setupStandardConfiguration()
@ -70,7 +80,7 @@ public class XFactory762mm {
.dura(50_000).draw(20).inspect(20).crosshair(Crosshair.L_CIRCLE).smoke(LAMBDA_SMOKE)
.rec(new Receiver(0)
.dmg(6F).delay(1).auto(true).dry(15).spread(0.01F).sound("hbm:weapon.calShoot", 1.0F, 1.0F)
.mag(new MagazineBelt().addConfigs(r762_sp, r762_fmj, r762_jhp, r762_ap, r762_du))
.mag(new MagazineBelt().addConfigs(r762_sp, r762_fmj, r762_jhp, r762_ap, r762_du, r762_he))
.offset(1, -0.0625 * 2.5, -0.25D)
.setupStandardFire().recoil(LAMBDA_RECOIL_MINIGUN))
.setupStandardConfiguration()
@ -91,7 +101,7 @@ public class XFactory762mm {
.dura(5_000).draw(20).inspect(31).reloadSequential(true).crosshair(Crosshair.CIRCLE).smoke(LAMBDA_SMOKE)
.rec(new Receiver(0)
.dmg(30F).delay(25).dry(25).spread(0.0F).reload(43).jam(43).sound("hbm:weapon.fire.rifleHeavy", 1.0F, 1.0F)
.mag(new MagazineFullReload(0, 7).addConfigs(r762_sp, r762_fmj, r762_jhp, r762_ap, r762_du))
.mag(new MagazineFullReload(0, 7).addConfigs(r762_sp, r762_fmj, r762_jhp, r762_ap, r762_du, r762_he))
.offset(1, -0.0625 * 1.5, -0.25D)
.setupStandardFire().recoil(LAMBDA_RECOIL_CARBINE))
.setupStandardConfiguration()

View File

@ -49,11 +49,11 @@ public class TileEntityMachineRotaryFurnace extends TileEntityMachinePolluting i
public boolean isProgressing;
public float progress;
public int burnTime;
public double burnHeat = 1D;
public int maxBurnTime;
public int steamUsed = 0;
public boolean isVenting;
public MaterialStack output;
public ItemStack lastFuel;
public static final int maxOutput = MaterialShapes.BLOCK.q(16);
public int anim;
@ -131,14 +131,14 @@ public class TileEntityMachineRotaryFurnace extends TileEntityMachinePolluting i
if(recipe != null) {
if(this.burnTime <= 0 && slots[4] != null && TileEntityFurnace.isItemFuel(slots[4])) {
lastFuel = slots[4];
this.maxBurnTime = this.burnTime = burnModule.getBurnTime(lastFuel) / 2;
this.burnHeat = burnModule.getMod(slots[4], burnModule.getModHeat());
this.maxBurnTime = this.burnTime = burnModule.getBurnTime(slots[4]) / 2;
this.decrStackSize(4, 1);
this.markChanged();
}
if(this.canProcess(recipe)) {
float speed = Math.max((float) burnModule.getMod(lastFuel, burnModule.getModHeat()), 1);
float speed = Math.max((float) burnHeat, 1);
this.progress += speed / recipe.duration;
speed = (float)(13 * Math.log10(speed) + 1);
@ -256,14 +256,12 @@ public class TileEntityMachineRotaryFurnace extends TileEntityMachinePolluting i
this.tanks[2].readFromNBT(nbt, "t2");
this.progress = nbt.getFloat("prog");
this.burnTime = nbt.getInteger("burn");
this.burnHeat = nbt.getDouble("heat");
this.maxBurnTime = nbt.getInteger("maxBurn");
if (nbt.hasKey("outType")) {
NTMMaterial mat = Mats.matById.get(nbt.getInteger("outType"));
this.output = new MaterialStack(mat, nbt.getInteger("outAmount"));
}
ItemStack nbtFuel = ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("lastFuel"));
if(nbtFuel != null)
this.lastFuel = nbtFuel;
}
@Override
@ -274,8 +272,8 @@ public class TileEntityMachineRotaryFurnace extends TileEntityMachinePolluting i
this.tanks[2].writeToNBT(nbt, "t2");
nbt.setFloat("prog", progress);
nbt.setInteger("burn", burnTime);
nbt.setDouble("heat", burnHeat);
nbt.setInteger("maxBurn", maxBurnTime);
nbt.setTag("lastFuel", lastFuel.writeToNBT(new NBTTagCompound()));
if (this.output != null) {
nbt.setInteger("outType", this.output.material.id);
nbt.setInteger("outAmount", this.output.amount);

View File

@ -1275,6 +1275,7 @@ item.ammo_standard.r556_sp.name=5,56mm Patrone (Teilmantelgeschoss)
item.ammo_standard.r762_ap.name=7,62mm Patrone (Panzerbrechend)
item.ammo_standard.r762_du.name=7,62mm Patrone (Urangeschoss)
item.ammo_standard.r762_fmj.name=7,62mm Patrone (Vollmantelgeschoss)
item.ammo_standard.r762_he.name=7,62mm Patrone (Explosiv)
item.ammo_standard.r762_jhp.name=7,62mm Patrone (Hohlspitz)
item.ammo_standard.r762_sp.name=7,62mm Patrone (Teilmantelgeschoss)
item.ammo_standard.rocket_demo.name=Abrissrakete

View File

@ -1999,6 +1999,7 @@ item.ammo_standard.r556_sp.name=5.56mm Round (Soft Point)
item.ammo_standard.r762_ap.name=7.62mm Round (Armor Piercing)
item.ammo_standard.r762_du.name=7.62mm Round (Depleted Uranium)
item.ammo_standard.r762_fmj.name=7.62mm Round (Full Metal Jacket)
item.ammo_standard.r762_he.name=7.62mm Round (High-Explosive)
item.ammo_standard.r762_jhp.name=7.62mm Round (Jacketed Hollow Point)
item.ammo_standard.r762_sp.name=7.62mm Round (Soft Point)
item.ammo_standard.rocket_demo.name=Rocket, Demolition

View File

@ -217,6 +217,7 @@
"weapon.explosionLargeFar": {"category": "player", "sounds": [{"name": "weapon/explosionLargeFar", "stream": false}]},
"weapon.explosionSmallNear": {"category": "player", "sounds": ["weapon/explosionSmallNear1", "weapon/explosionSmallNear2", "weapon/explosionSmallNear3"]},
"weapon.explosionSmallFar": {"category": "player", "sounds": ["weapon/explosionSmallFar1", "weapon/explosionSmallFar2"]},
"weapon.explosionTiny": {"category": "player", "sounds": ["weapon/explosionTiny1", "weapon/explosionTiny2"]},
"weapon.dFlash": {"category": "player", "sounds": [{"name": "weapon/dFlash", "stream": false}]},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 B