Merge branch 'master' into more-more-qol
@ -3,6 +3,8 @@
|
||||
* Electric boilers have been completely removed
|
||||
* Fired boilers no longer have an on-state, GUI or functionality
|
||||
* Fired boilers still sometimes spawn in certain structures as loot, they drop 3-6 steel scraps containing 1 ingot worth of steel each
|
||||
* The rare earth chunk texture is now consistent with the bedrock ores
|
||||
* Removed the unused watz control elements
|
||||
|
||||
## Fixed
|
||||
* Fixed automatic crafting table filters being broken
|
||||
|
||||
@ -899,7 +899,6 @@ public class ModBlocks {
|
||||
public static Block watz_pump;
|
||||
|
||||
public static Block watz_element;
|
||||
public static Block watz_control;
|
||||
public static Block watz_cooler;
|
||||
public static Block watz_end;
|
||||
public static Block watz_conductor;
|
||||
@ -2010,7 +2009,6 @@ public class ModBlocks {
|
||||
icf_block = new BlockICF(Material.iron).setBlockName("icf_block").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":icf_block");
|
||||
|
||||
watz_element = new BlockPillar(Material.iron, RefStrings.MODID + ":watz_element_top").setBlockName("watz_element").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_element_side");
|
||||
watz_control = new BlockPillar(Material.iron, RefStrings.MODID + ":watz_control_top").setBlockName("watz_control").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_control_side");
|
||||
watz_cooler = new BlockPillar(Material.iron, RefStrings.MODID + ":watz_cooler_top").setBlockName("watz_cooler").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_cooler_side");
|
||||
watz_end = new BlockToolConversion(Material.iron).addVariant("_bolted").setBlockName("watz_end").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_casing");
|
||||
watz_conductor = new BlockCableConnect(Material.iron).setBlockName("watz_conductor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":watz_conductor_top");
|
||||
@ -3341,7 +3339,6 @@ public class ModBlocks {
|
||||
register(icf);
|
||||
|
||||
GameRegistry.registerBlock(watz_element, watz_element.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(watz_control, watz_control.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(watz_cooler, watz_cooler.getUnlocalizedName());
|
||||
register(watz_end);
|
||||
GameRegistry.registerBlock(watz_conductor, watz_conductor.getUnlocalizedName());
|
||||
|
||||
@ -49,7 +49,7 @@ public class ItemWandD extends Item {
|
||||
vnt.setBlockAllocator(new BlockAllocatorStandard(32));
|
||||
vnt.explode();
|
||||
|
||||
ExplosionCreator.composeEffect(world, pos.blockX + 0.5, pos.blockY + 0.5, pos.blockZ + 0.5, 30, 6.5F, 2F, 65F, 25, 16, 50, 1.25F, 3F, -2F);
|
||||
ExplosionCreator.composeEffectLarge(world, pos.blockX + 0.5, pos.blockY + 0.5, pos.blockZ + 0.5);
|
||||
|
||||
/*for(int i = 0; i < 10; i++) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
|
||||
@ -1345,6 +1345,7 @@ public class MainRegistry {
|
||||
ignoreMappings.add("hbm:tile.machine_boiler_on");
|
||||
ignoreMappings.add("hbm:tile.machine_boiler_electric_off");
|
||||
ignoreMappings.add("hbm:tile.machine_boiler_electric_on");
|
||||
ignoreMappings.add("hbm:tile.watz_control");
|
||||
|
||||
/// REMAP ///
|
||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.main;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
@ -154,6 +155,8 @@ public class ModEventHandlerClient {
|
||||
public static long flashTimestamp;
|
||||
public static final int shakeDuration = 1_500;
|
||||
public static long shakeTimestamp;
|
||||
public static List<DelayedSound> delayedSounds = new ArrayList();
|
||||
public static boolean soundLock = false; // for thread safety or some bullshit
|
||||
|
||||
@SubscribeEvent
|
||||
public void onOverlayRender(RenderGameOverlayEvent.Pre event) {
|
||||
@ -921,7 +924,7 @@ public class ModEventHandlerClient {
|
||||
static boolean isRenderingItems = false;
|
||||
|
||||
@SubscribeEvent
|
||||
public void clentTick(ClientTickEvent event) {
|
||||
public void clientTick(ClientTickEvent event) {
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
ArmorNo9.updateWorldHook(mc.theWorld);
|
||||
@ -1382,6 +1385,23 @@ public class ModEventHandlerClient {
|
||||
client.sendQueue.addToSendQueue(new C0CPacketInput(client.moveStrafing, client.moveForward, client.movementInput.jump, client.movementInput.sneak));
|
||||
}
|
||||
}
|
||||
|
||||
if(event.phase == event.phase.START) {
|
||||
|
||||
while(soundLock);
|
||||
soundLock = true;
|
||||
Iterator<DelayedSound> it = delayedSounds.iterator();
|
||||
|
||||
while(it.hasNext()) {
|
||||
DelayedSound sound = it.next();
|
||||
if(sound.delay == 0) {
|
||||
MainRegistry.proxy.playSoundClient(sound.x, sound.y, sound.z, sound.sound, sound.volume, sound.pitch);
|
||||
it.remove();
|
||||
}
|
||||
sound.delay--;
|
||||
}
|
||||
soundLock = false;
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@ -1412,4 +1432,21 @@ public class ModEventHandlerClient {
|
||||
else if(d < 0.2) main.splashText = "Can someone tell me what corrosive fumes the people on Reddit are huffing so I can avoid those more effectively?";
|
||||
}
|
||||
}
|
||||
|
||||
public static class DelayedSound {
|
||||
public String sound;
|
||||
public int delay;
|
||||
public double x, y, z;
|
||||
public float volume, pitch;
|
||||
|
||||
public DelayedSound(String sound, int delay, double x, double y, double z, float volume, float pitch) {
|
||||
this.sound = sound;
|
||||
this.delay = delay;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.volume = volume;
|
||||
this.pitch = pitch;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,8 @@ package com.hbm.particle.helper;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.main.ModEventHandlerClient;
|
||||
import com.hbm.main.ModEventHandlerClient.DelayedSound;
|
||||
import com.hbm.particle.ParticleDebris;
|
||||
import com.hbm.particle.ParticleMukeWave;
|
||||
import com.hbm.particle.ParticleRocketFlame;
|
||||
@ -20,8 +22,10 @@ import net.minecraft.world.World;
|
||||
|
||||
public class ExplosionCreator implements IParticleCreator {
|
||||
|
||||
public static final double speedOfSound = (17.15D) * 0.33;
|
||||
|
||||
public static void composeEffect(World world, double x, double y, double z, int cloudCount, float cloudScale, float cloudSpeedMult, float waveScale,
|
||||
int debrisCount, int debrisSize, int debrisRetry, float debrisVelocity, float debrisHorizontalDeviation, float debrisVerticalOffset) {
|
||||
int debrisCount, int debrisSize, int debrisRetry, float debrisVelocity, float debrisHorizontalDeviation, float debrisVerticalOffset, float soundRange) {
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "explosionLarge");
|
||||
@ -35,17 +39,18 @@ public class ExplosionCreator implements IParticleCreator {
|
||||
data.setFloat("debrisVelocity", debrisVelocity);
|
||||
data.setFloat("debrisHorizontalDeviation", debrisHorizontalDeviation);
|
||||
data.setFloat("debrisVerticalOffset", debrisVerticalOffset);
|
||||
IParticleCreator.sendPacket(world, x, y, z, 200, data);
|
||||
data.setFloat("soundRange", soundRange);
|
||||
IParticleCreator.sendPacket(world, x, y, z, Math.max(200, (int) soundRange), data);
|
||||
}
|
||||
|
||||
/** Downscaled for small bombs */
|
||||
public static void composeEffectSmall(World world, double x, double y, double z) { composeEffect(world, x, y, z, 10, 2F, 0.5F, 25F, 5, 8, 20, 0.75F, 1F, -2F); }
|
||||
public static void composeEffectSmall(World world, double x, double y, double z) { composeEffect(world, x, y, z, 10, 2F, 0.5F, 25F, 5, 8, 20, 0.75F, 1F, -2F, 150); }
|
||||
|
||||
/** Development version */
|
||||
public static void composeEffectStandard(World world, double x, double y, double z) { composeEffect(world, x, y, z, 15, 5F, 1F, 45F, 10, 16, 50, 1F, 3F, -2F); }
|
||||
public static void composeEffectStandard(World world, double x, double y, double z) { composeEffect(world, x, y, z, 15, 5F, 1F, 45F, 10, 16, 50, 1F, 3F, -2F, 200); }
|
||||
|
||||
/** Upscaled version, ATACMS go brrt */
|
||||
public static void composeEffectLarge(World world, double x, double y, double z) { composeEffect(world, x, y, z, 30, 6.5F, 2F, 65F, 25, 16, 50, 1.25F, 3F, -2F); }
|
||||
public static void composeEffectLarge(World world, double x, double y, double z) { composeEffect(world, x, y, z, 30, 6.5F, 2F, 65F, 25, 16, 50, 1.25F, 3F, -2F, 350); }
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@ -61,6 +66,17 @@ public class ExplosionCreator implements IParticleCreator {
|
||||
float debrisVelocity = data.getFloat("debrisVelocity");
|
||||
float debrisHorizontalDeviation = data.getFloat("debrisHorizontalDeviation");
|
||||
float debrisVerticalOffset = data.getFloat("debrisVerticalOffset");
|
||||
float soundRange = data.getFloat("soundRange");
|
||||
|
||||
float dist = (float) player.getDistance(x, y, z);
|
||||
|
||||
if(dist <= soundRange) {
|
||||
while(ModEventHandlerClient.soundLock);
|
||||
ModEventHandlerClient.soundLock = true;
|
||||
String sound = dist <= soundRange * 0.33 ? "hbm:weapon.explosionLargeNear" : "hbm:weapon.explosionLargeFar";
|
||||
ModEventHandlerClient.delayedSounds.add(new DelayedSound(sound, (int) (dist / speedOfSound), x, y, z, 1000F, 1F));
|
||||
ModEventHandlerClient.soundLock = false;
|
||||
}
|
||||
|
||||
// WAVE
|
||||
ParticleMukeWave wave = new ParticleMukeWave(man, world, x, y + 2, z);
|
||||
|
||||
@ -210,6 +210,8 @@
|
||||
"weapon.44Shoot": {"category": "player", "sounds": [{"name": "weapon/44Shoot", "stream": false}]},
|
||||
"weapon.trainImpact": {"category": "player", "sounds": [{"name": "weapon/trainImpact", "stream": false}]},
|
||||
"weapon.nuclearExplosion": {"category": "player", "sounds": [{"name": "weapon/nuclearExplosion", "stream": true}]},
|
||||
"weapon.explosionLargeNear": {"category": "player", "sounds": [{"name": "weapon/explosionLargeNear", "stream": false}]},
|
||||
"weapon.explosionLargeFar": {"category": "player", "sounds": [{"name": "weapon/explosionLargeFar", "stream": false}]},
|
||||
|
||||
"weapon.dFlash": {"category": "player", "sounds": [{"name": "weapon/dFlash", "stream": false}]},
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 513 B |
|
Before Width: | Height: | Size: 465 B |
|
Before Width: | Height: | Size: 594 B |
|
Before Width: | Height: | Size: 584 B |
|
Before Width: | Height: | Size: 566 B |
|
Before Width: | Height: | Size: 541 B |
|
Before Width: | Height: | Size: 511 B |
|
Before Width: | Height: | Size: 418 B |
|
Before Width: | Height: | Size: 425 B |
|
Before Width: | Height: | Size: 439 B |
|
Before Width: | Height: | Size: 423 B |
|
Before Width: | Height: | Size: 536 B |
|
Before Width: | Height: | Size: 345 B |
|
Before Width: | Height: | Size: 369 B |
|
Before Width: | Height: | Size: 419 B |
|
Before Width: | Height: | Size: 357 B |
|
Before Width: | Height: | Size: 254 B |
|
Before Width: | Height: | Size: 356 B |
|
Before Width: | Height: | Size: 411 B |
|
Before Width: | Height: | Size: 248 B |
|
Before Width: | Height: | Size: 250 B |
|
Before Width: | Height: | Size: 274 B |
|
Before Width: | Height: | Size: 282 B |
|
Before Width: | Height: | Size: 234 B |
|
Before Width: | Height: | Size: 412 B |
|
Before Width: | Height: | Size: 348 B |
|
Before Width: | Height: | Size: 186 B |
|
Before Width: | Height: | Size: 545 B |
|
Before Width: | Height: | Size: 488 B |
|
Before Width: | Height: | Size: 500 B |
|
Before Width: | Height: | Size: 445 B |
|
Before Width: | Height: | Size: 532 B |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 309 B After Width: | Height: | Size: 295 B |
|
Before Width: | Height: | Size: 452 B After Width: | Height: | Size: 444 B |