New sound files!

Fixed broken parts spawning in wrong places sometimes
Some changes to sound volume/pitch calculation
This commit is contained in:
malte0811 2018-05-26 18:18:53 +02:00
parent d5b537ea98
commit b3fefaa078
42 changed files with 29 additions and 27 deletions

View file

@ -228,11 +228,6 @@ public class TileEntityMechMB extends TileEntityIWMultiblock implements ITickabl
double totalRequested = 0;
for (int i = 0; i < available.length; i++) {
if (availableWf[i].equals(waveform)) {
if (available[i]>requested[i]) {
requested[i] = 0;
} else {
available[i] = 0;
}
totalAvailable += available[i];
} else {
available[i] = 0;

View file

@ -366,9 +366,9 @@ public class ClientProxy extends CommonProxy {
if (energy.getSpeed() > MIN_SPEED) {
boolean adjusting = energy.isAdjusting();
double speedToUse = energy.getSpeed()-MIN_SPEED;//Volume should be zero by the time the sound stops
float lambda = MathHelper.clamp((float) speedToUse / 20 - .5F, 0, 1);
float totalVolume = (float) (energy.weight / 20e3 * Math.sqrt(speedToUse));
totalVolume = Math.min(totalVolume, 2);
float lambda = MathHelper.clamp((float) speedToUse / 50 - .5F, 0, 1);
float totalVolume = (float) (energy.weight / 20e3 * Math.tanh(speedToUse/30));
totalVolume = Math.min(totalVolume, 1.5F);
float pitch = (float) Math.min(Math.sqrt(speedToUse), 3);
if (lambda > 0) {
PositionedSoundRecord sound = new PositionedSoundRecord(turnFast, SoundCategory.BLOCKS, lambda * totalVolume, pitch,

View file

@ -134,7 +134,8 @@ public class EntityBrokenPart extends /*EntityArrow*/ Entity {
if (mop == null || mop.entityHit == null) {
Entity entity = null;
List<Entity> list = this.world.getEntitiesInAABBexcluding(this, this.getEntityBoundingBox().expand(this.motionX, this.motionY, this.motionZ).grow(1), Entity::canBeCollidedWith);
List<Entity> list = this.world.getEntitiesInAABBexcluding(this,
this.getEntityBoundingBox().expand(this.motionX, this.motionY, this.motionZ).grow(1), e -> true);
double d0 = 0.0D;
for (Entity e : list) {
if (e.canBeCollidedWith()) {

View file

@ -59,7 +59,8 @@ public class LocalSidedWorld {
}
public void spawnEntity(Entity e) {
Vec3d pos = getRealPos(e.getPositionVector());
Vec3d posTransf = e.getPositionVector();
Vec3d pos = getRealPos(posTransf);
e.setPosition(pos.x, pos.y, pos.z);
Vec3d motion = getRealDirection(new Vec3d(e.motionX, e.motionY, e.motionZ));
e.motionX = motion.x;
@ -86,7 +87,8 @@ public class LocalSidedWorld {
}
public Vec3d getRealPos(Vec3d relative) {
return MiscUtils.offset(new Vec3d(origin), facing, mirror, relative);
return MiscUtils.offset(new Vec3d(origin.getX()+.5, origin.getY()+.5, origin.getZ()+.5), facing, mirror,
relative.addVector(.5, .5, .5));
}
public Vec3d getRealDirection(Vec3d dir) {

View file

@ -52,28 +52,32 @@
"category": "block",
"subtitle": "industrialwires.subtitle.mech_mb_turning",
"sounds": [
"industrialwires:mech_mb/turn_slow_000",
"industrialwires:mech_mb/turn_slow_001",
"industrialwires:mech_mb/turn_slow_002",
"industrialwires:mech_mb/turn_slow_003",
"industrialwires:mech_mb/turn_slow_004",
"industrialwires:mech_mb/turn_slow_005",
"industrialwires:mech_mb/turn_slow_006",
"industrialwires:mech_mb/turn_slow_007",
"industrialwires:mech_mb/turn_slow_008"
"industrialwires:mech_mb/slow00",
"industrialwires:mech_mb/slow01",
"industrialwires:mech_mb/slow02",
"industrialwires:mech_mb/slow03",
"industrialwires:mech_mb/slow04",
"industrialwires:mech_mb/slow05",
"industrialwires:mech_mb/slow06",
"industrialwires:mech_mb/slow07",
"industrialwires:mech_mb/slow08",
"industrialwires:mech_mb/slow09"
]
},
"mech_mb_fast": {
"category": "block",
"subtitle": "industrialwires.subtitle.mech_mb_turning",
"sounds": [
"industrialwires:mech_mb/turn_fast_000",
"industrialwires:mech_mb/turn_fast_001",
"industrialwires:mech_mb/turn_fast_002",
"industrialwires:mech_mb/turn_fast_003",
"industrialwires:mech_mb/turn_fast_004",
"industrialwires:mech_mb/turn_fast_005",
"industrialwires:mech_mb/turn_fast_006"
"industrialwires:mech_mb/fast00",
"industrialwires:mech_mb/fast01",
"industrialwires:mech_mb/fast02",
"industrialwires:mech_mb/fast03",
"industrialwires:mech_mb/fast04",
"industrialwires:mech_mb/fast05",
"industrialwires:mech_mb/fast06",
"industrialwires:mech_mb/fast07",
"industrialwires:mech_mb/fast08",
"industrialwires:mech_mb/fast09"
]
}
}