harbor! harbor!

This commit is contained in:
Bob 2026-01-26 23:08:00 +01:00
parent afeaa9e73c
commit 843d3ea6cd
17 changed files with 3467 additions and 6130 deletions

View File

@ -15,6 +15,11 @@
* Now with extra bone marrow
* Updated the deuterium tower's model
* Increased the energy requirement for welding osmiridium
* Updated most blast door visuals
* RBMKs now have QMAW pages
* Updated the model on the heavy magnetic storage container
* Increased the power draw on the osmiridium welding recipe
* Bullet casings now make sounds when falling to the ground
# Fixed
* Potentially fixed yet another issue regarding crates
@ -24,4 +29,4 @@
* Fixed battery sockets producing junk debug data in the logs
* Fixed an issue where the charging station would crash when trying to charge certain items
* Fixed the DFC's core component not dropping its contents when mined
* Fixed audio problems with guns
* Fixed audio problems with guns

View File

@ -929,7 +929,6 @@ public class ModEventHandlerClient {
//prune other entities' muzzle flashes
if(mc.theWorld.getTotalWorldTime() % 30 == 0) {
Iterator itr = ItemRenderWeaponBase.flashMap.keySet().iterator();
long millis = System.currentTimeMillis();
//dead entities may have later insertion order than actively firing ones, so we be safe
ItemRenderWeaponBase.flashMap.values().removeIf(entry -> millis - entry.longValue() >= 150);

View File

@ -50,8 +50,6 @@ public class MuzzleFlashPacket implements IMessage {
if(stack == null) return null;
if(stack.getItem() instanceof ItemGunBaseNT) {
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
ItemRenderWeaponBase.flashMap.put(entity, System.currentTimeMillis());
}

View File

@ -8,6 +8,7 @@ import java.util.Random;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.hbm.main.MainRegistry;
import com.hbm.main.ResourceManager;
import com.hbm.util.BobMathUtil;
import com.hbm.util.Tuple.Pair;
@ -215,6 +216,10 @@ public class ParticleSpentCasing extends EntityFX {
momentumYaw = (float) rand.nextGaussian() * 10F * this.config.getBounceYaw();
}
if(this.config.getSound() != null && isCollidedVertically && Math.abs(initMoY) >= 0.2) {
MainRegistry.proxy.playSoundClient(posX, posY, posZ, this.config.getSound(), 0.5F, 1F + this.rand.nextFloat() * 0.2F);
}
this.worldObj.theProfiler.endSection();
}

View File

@ -23,8 +23,7 @@ public class SpentCasing implements Cloneable {
public enum CasingType {
STRAIGHT("Straight"),
BOTTLENECK("Bottleneck"),
SHOTGUN("Shotgun", "ShotgunCase"), //plastic shell, brass case
AR2("AR2", "AR2Highlight"); //plug, back detailing
SHOTGUN("Shotgun", "ShotgunCase"); //plastic shell, brass case
public final String[] partNames;
@ -43,9 +42,19 @@ public class SpentCasing implements Cloneable {
private float bounceYaw = 1F;
private float bouncePitch = 1F;
private int maxAge = 240;
public static final String PLINK_SHELL = "hbm:weapon.casing.shell";
public static final String PLINK_SMALL = "hbm:weapon.casing.small";
public static final String PLINK_MEDIUM = "hbm:weapon.casing.medium";
public SpentCasing(CasingType type) {
this.type = type;
if(type == CasingType.SHOTGUN) {
this.setSound(PLINK_SHELL);
} else {
this.setSound(PLINK_SMALL);
}
}
/** Separated from the ctor to allow for easy creation of new casings from templates that don't need to be registered */
@ -56,16 +65,14 @@ public class SpentCasing implements Cloneable {
}
public SpentCasing setScale(float scale) {
this.scaleX = scale;
this.scaleY = scale;
this.scaleZ = scale;
return this;
return setScale(scale, scale, scale);
}
public SpentCasing setScale(float x, float y, float z) {
this.scaleX = x;
this.scaleY = y;
this.scaleZ = z;
if(x * y * z >= 3 && this.type != CasingType.SHOTGUN) this.setSound(PLINK_MEDIUM);
return this;
}

File diff suppressed because it is too large Load Diff

View File

@ -294,6 +294,10 @@
"weapon.reload.screw": {"category": "player", "sounds": ["weapon/reload/screw"]},
"weapon.foley.gunWhack": {"category": "player", "sounds": ["weapon/foley/gunWhack", "weapon/foley/gunWhack2"]},
"weapon.casing.small": {"category": "player", "sounds": ["weapon/casing/small1", "weapon/casing/small2", "weapon/casing/small3"]},
"weapon.casing.medium": {"category": "player", "sounds": ["weapon/casing/medium1", "weapon/casing/medium2", "weapon/casing/medium3"]},
"weapon.casing.shell": {"category": "player", "sounds": ["weapon/casing/shell1", "weapon/casing/shell2", "weapon/casing/shell3"]},
"turret.chekhov_fire": {"category": "block", "sounds": [{"name": "turret/chekhov_fire", "stream": false}]},
"turret.jeremy_fire": {"category": "block", "sounds": ["turret/jeremy_fire1", "turret/jeremy_fire2", "turret/jeremy_fire3", "turret/jeremy_fire4", "turret/jeremy_fire5"]},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB