This commit is contained in:
Bob 2024-08-02 23:43:19 +02:00
parent 7ba7f8c6c6
commit f97076bb94
6 changed files with 23 additions and 85 deletions

View File

@ -1,15 +1,3 @@
## Changed
* Removed most legacy boilers
* 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
* Fixed automatic crafting table filters being broken * Fixed crash caused by decontaminating items with the radiolysis machine
* Fixed missing localization for black lung death messages * Fixed ICFs not forming correctly depending on the orientation
* Fixed disconnect caused by using a filter on the autocrafter's template output slot
* Fixed sentry turret "Brown" being uncraftable
* Fixed instant crash caused by processing some bedrock ores in an electrolyzer
* Disabled unused debug code for reflection testing

View File

@ -3,7 +3,6 @@ package com.hbm.main;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Random; import java.util.Random;
@ -155,8 +154,6 @@ public class ModEventHandlerClient {
public static long flashTimestamp; public static long flashTimestamp;
public static final int shakeDuration = 1_500; public static final int shakeDuration = 1_500;
public static long shakeTimestamp; public static long shakeTimestamp;
public static List<DelayedSound> delayedSounds = new ArrayList();
public static boolean soundLock = false; // for thread safety or some bullshit
@SubscribeEvent @SubscribeEvent
public void onOverlayRender(RenderGameOverlayEvent.Pre event) { public void onOverlayRender(RenderGameOverlayEvent.Pre event) {
@ -1385,23 +1382,6 @@ public class ModEventHandlerClient {
client.sendQueue.addToSendQueue(new C0CPacketInput(client.moveStrafing, client.moveForward, client.movementInput.jump, client.movementInput.sneak)); 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 @SubscribeEvent
@ -1432,21 +1412,4 @@ 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?"; 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;
}
}
} }

View File

@ -2,8 +2,6 @@ package com.hbm.particle.helper;
import java.util.Random; import java.util.Random;
import com.hbm.main.ModEventHandlerClient;
import com.hbm.main.ModEventHandlerClient.DelayedSound;
import com.hbm.particle.ParticleDebris; import com.hbm.particle.ParticleDebris;
import com.hbm.particle.ParticleMukeWave; import com.hbm.particle.ParticleMukeWave;
import com.hbm.particle.ParticleRocketFlame; import com.hbm.particle.ParticleRocketFlame;
@ -13,16 +11,18 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Vec3; import net.minecraft.util.Vec3;
import net.minecraft.world.World; import net.minecraft.world.World;
public class ExplosionCreator implements IParticleCreator { public class ExplosionCreator implements IParticleCreator {
public static final double speedOfSound = (17.15D) * 0.33; public static final double speedOfSound = (17.15D) * 0.5;
public static void composeEffect(World world, double x, double y, double z, int cloudCount, float cloudScale, float cloudSpeedMult, float waveScale, 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, float soundRange) { int debrisCount, int debrisSize, int debrisRetry, float debrisVelocity, float debrisHorizontalDeviation, float debrisVerticalOffset, float soundRange) {
@ -71,11 +71,9 @@ public class ExplosionCreator implements IParticleCreator {
float dist = (float) player.getDistance(x, y, z); float dist = (float) player.getDistance(x, y, z);
if(dist <= soundRange) { if(dist <= soundRange) {
while(ModEventHandlerClient.soundLock);
ModEventHandlerClient.soundLock = true;
String sound = dist <= soundRange * 0.4 ? "hbm:weapon.explosionLargeNear" : "hbm:weapon.explosionLargeFar"; String sound = dist <= soundRange * 0.4 ? "hbm:weapon.explosionLargeNear" : "hbm:weapon.explosionLargeFar";
ModEventHandlerClient.delayedSounds.add(new DelayedSound(sound, (int) (dist / speedOfSound), x, y, z, 1000F, 0.9F + rand.nextFloat() * 0.2F)); PositionedSoundRecord positionedsoundrecord = new PositionedSoundRecord(new ResourceLocation(sound), 1000F, 0.9F + rand.nextFloat() * 0.2F, (float) x, (float) y, (float) z);
ModEventHandlerClient.soundLock = false; Minecraft.getMinecraft().getSoundHandler().playDelayedSound(positionedsoundrecord, (int) (dist / speedOfSound));
} }
// WAVE // WAVE

View File

@ -41,12 +41,12 @@ public class TileEntityICFStruct extends TileEntity {
} }
/** check block at relative position */ /** check block at relative position */
public boolean cbarp(Block block, int meta, int x, int y, int z, ForgeDirection dir) { public boolean cbarp(Block block, int meta, int widthwiseOffset, int y, int lengthwiseOffset, ForgeDirection dir) {
ForgeDirection rot = dir.getRotation(ForgeDirection.UP); ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
int ix = xCoord + dir.offsetX * z + rot.offsetX * z; int ix = xCoord + rot.offsetX * lengthwiseOffset + dir.offsetX * widthwiseOffset;
int iy = yCoord + y; int iy = yCoord + y;
int iz = zCoord + dir.offsetZ * x + rot.offsetZ * x; int iz = zCoord + rot.offsetZ * lengthwiseOffset + dir.offsetZ * widthwiseOffset;
return worldObj.getBlock(ix, iy, iz) == block && worldObj.getBlockMetadata(ix, iy, iz) == meta; return worldObj.getBlock(ix, iy, iz) == block && worldObj.getBlockMetadata(ix, iy, iz) == meta;
} }

View File

@ -210,50 +210,38 @@ public class TileEntityMachineRadiolysis extends TileEntityMachineBase implement
private void sterilize() { private void sterilize() {
if(slots[12] != null) { if(slots[12] != null) {
if(slots[12].getItem() instanceof ItemFood && !(slots[12].getItem() == ModItems.pancake)) { if(slots[12].getItem() instanceof ItemFood && !(slots[12].getItem() == ModItems.pancake)) {
slots[12].stackSize -= 1; this.decrStackSize(12, 1);
if(slots[12].stackSize <= 0)
slots[12] = null;
} }
if(!checkIfValid()) if(!checkIfValid()) return;
return;
ItemStack output = slots[12].copy(); ItemStack output = slots[12].copy();
output.stackSize = 1; output.stackSize = 1;
if(slots[13] == null) { if(slots[13] == null) {
slots[12].stackSize -= output.stackSize; this.decrStackSize(12, output.stackSize);
if(slots[12].stackSize <= 0)
slots[12] = null;
slots[13] = output; slots[13] = output;
slots[13].stackTagCompound.removeTag("ntmContagion"); slots[13].stackTagCompound.removeTag("ntmContagion");
if(slots[13].stackTagCompound.hasNoTags()) { if(slots[13].stackTagCompound.hasNoTags()) {
slots[13].stackTagCompound = null; slots[13].stackTagCompound = null;
} }
} else if(slots[13].isItemEqual(output) && slots[13].stackSize + output.stackSize <= slots[13].getMaxStackSize()) { } else if(slots[13].isItemEqual(output) && slots[13].stackSize + output.stackSize <= slots[13].getMaxStackSize()) {
slots[12].stackSize -= output.stackSize; this.decrStackSize(12, output.stackSize);
if(slots[12].stackSize <= 0)
slots[12] = null;
slots[13].stackSize += output.stackSize; slots[13].stackSize += output.stackSize;
slots[13].stackTagCompound.removeTag("ntmContagion"); if(slots[13].hasTagCompound()) { // redundant but just to be sure
if(slots[13].stackTagCompound.hasNoTags()) { slots[13].stackTagCompound.removeTag("ntmContagion");
slots[13].stackTagCompound = null; if(slots[13].stackTagCompound.hasNoTags()) {
slots[13].stackTagCompound = null;
}
} }
} }
} }
} }
private boolean checkIfValid() { private boolean checkIfValid() {
if(slots[12] == null) if(slots[12] == null) return false;
return false; if(!slots[12].hasTagCompound()) return false;
if(!slots[12].getTagCompound().getBoolean("ntmContagion")) return false;
if(!slots[12].hasTagCompound())
return false;
if(!slots[12].getTagCompound().getBoolean("ntmContagion"))
return false;
return true; return true;
} }

View File

@ -72,6 +72,7 @@ public class ShadyUtil {
public static Set<String> contributors = Sets.newHashSet(new String[] { public static Set<String> contributors = Sets.newHashSet(new String[] {
"06ab7c03-55ce-43f8-9d3c-2850e3c652de", //mustang_rudolf "06ab7c03-55ce-43f8-9d3c-2850e3c652de", //mustang_rudolf
"5bf069bc-5b46-4179-aafe-35c0a07dee8b", //JMF781 "5bf069bc-5b46-4179-aafe-35c0a07dee8b", //JMF781
"ccd9aa1c-26b9-4dde-8f37-b96f8d99de22", //kakseao
}); });
// simple cryptographic utils // simple cryptographic utils