Merge branch 'master' into more-more-qol

This commit is contained in:
70000hp 2024-08-03 17:23:35 -04:00
commit 492d6520ae
15 changed files with 14587 additions and 124 deletions

View File

@ -1,15 +1,8 @@
## 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
* The fluid burner, heat exchanging heater and cooling tower now use the single steel pipe items instead of the larger steel pipes
* Reduced the amount of condensers needed for crafting the cooling towers
## Fixed
* Fixed automatic crafting table filters being broken
* Fixed missing localization for black lung death messages
* 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
* Fixed crash caused by decontaminating items with the radiolysis machine
* Fixed ICFs not forming correctly depending on the orientation
* Fixed electrolyzer metal recipe config not working

View File

@ -7,6 +7,7 @@ import com.hbm.tileentity.machine.TileEntityMachineAssembler;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@ -14,6 +15,13 @@ public class MachineAssembler extends BlockDummyable {
public MachineAssembler(Material p_i45386_1_) {
super(p_i45386_1_);
this.bounding.add(AxisAlignedBB.getBoundingBox(-1.0, 0.0, -2.0, 2.0, 2.0, 1.0));
this.bounding.add(AxisAlignedBB.getBoundingBox(-0.14375, 0.34375, -2.5, 0.15625, 0.65625, 1.5));
this.bounding.add(AxisAlignedBB.getBoundingBox(0.85625, 0.34375, -2.5, 1.15625, 0.65625, 1.5));
this.bounding.add(AxisAlignedBB.getBoundingBox(-1.5, 0.0, -0.5, 0.0, 1.0, 0.5));
this.bounding.add(AxisAlignedBB.getBoundingBox(1.0, 0.0, -1.5, 2.5, 1.0, -0.5));
}
@Override

View File

@ -7,6 +7,7 @@ import com.hbm.tileentity.machine.TileEntityMachineChemplant;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@ -14,6 +15,15 @@ public class MachineChemplant extends BlockDummyable {
public MachineChemplant(Material p_i45386_1_) {
super(p_i45386_1_);
this.bounding.add(AxisAlignedBB.getBoundingBox(-1.0, 0.0, -2.0, 2.0, 3.0, 1.0));
// some guy once told me not to use magic numbers
// so I turned him into a newt
this.bounding.add(AxisAlignedBB.getBoundingBox(-0.14375, 0.34375, -2.5, 0.15625, 0.65625, 1.5));
this.bounding.add(AxisAlignedBB.getBoundingBox(0.85625, 0.34375, -2.5, 1.15625, 0.65625, 1.5));
this.bounding.add(AxisAlignedBB.getBoundingBox(-1.5, 0.0, -0.5, 0.0, 1.0, 0.5));
this.bounding.add(AxisAlignedBB.getBoundingBox(1.0, 0.0, -1.5, 2.5, 1.0, -0.5));
}
@Override

View File

@ -15,6 +15,19 @@ public class MachineOreSlopper extends BlockDummyable {
public MachineOreSlopper() {
super(Material.iron);
//Base
this.bounding.add(AxisAlignedBB.getBoundingBox(-3.5, 0, -1.5, 3.5, 1, 1.5));
//Slop bucket
this.bounding.add(AxisAlignedBB.getBoundingBox(0.5, 1, -1.5, 3.5, 3.25, 1.5));
//Shredder
this.bounding.add(AxisAlignedBB.getBoundingBox(-2.25, 1, -1.5, 0.25, 3.25, -0.75));
this.bounding.add(AxisAlignedBB.getBoundingBox(-2.25, 1, 0.75, 0.25, 3.25, 1.5));
this.bounding.add(AxisAlignedBB.getBoundingBox(-2.25, 1, -1.5, -2, 3.25, 1.5));
this.bounding.add(AxisAlignedBB.getBoundingBox(0, 1, -1.5, 0.25, 3.25, 1.5));
this.bounding.add(AxisAlignedBB.getBoundingBox(-2, 1, -0.75, 0, 2, 0.75));
//Outlet
this.bounding.add(AxisAlignedBB.getBoundingBox(-3.25, 1, -1, -2.25, 3, 1));
}
@Override
@ -36,21 +49,6 @@ public class MachineOreSlopper extends BlockDummyable {
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
this.bounding.clear();
//Base
this.bounding.add(AxisAlignedBB.getBoundingBox(-3.5, 0, -1.5, 3.5, 1, 1.5));
//Slop bucket
this.bounding.add(AxisAlignedBB.getBoundingBox(0.5, 1, -1.5, 3.5, 3.25, 1.5));
//Shredder
this.bounding.add(AxisAlignedBB.getBoundingBox(-2.25, 1, -1.5, 0.25, 3.25, -0.75));
this.bounding.add(AxisAlignedBB.getBoundingBox(-2.25, 1, 0.75, 0.25, 3.25, 1.5));
this.bounding.add(AxisAlignedBB.getBoundingBox(-2.25, 1, -1.5, -2, 3.25, 1.5));
this.bounding.add(AxisAlignedBB.getBoundingBox(0, 1, -1.5, 0.25, 3.25, 1.5));
this.bounding.add(AxisAlignedBB.getBoundingBox(-2, 1, -0.75, 0, 2, 0.75));
//Outlet
this.bounding.add(AxisAlignedBB.getBoundingBox(-3.25, 1, -1, -2.25, 3, 1));
return standardOpenBehavior(world, x, y, z, player, side);
}

View File

@ -235,15 +235,22 @@ public class ElectrolyserMetalRecipes extends SerializableRecipe {
AStack input = this.readAStack(obj.get("input").getAsJsonArray());
JsonArray out1 = obj.get("output1").getAsJsonArray();
String name1 = out1.get(0).getAsString();
int amount1 = out1.get(1).getAsInt();
MaterialStack output1 = new MaterialStack(Mats.matByName.get(name1), amount1);
MaterialStack output1 = null;
MaterialStack output2 = null;
JsonArray out2 = obj.get("output2").getAsJsonArray();
String name2 = out2.get(0).getAsString();
int amount2 = out2.get(1).getAsInt();
MaterialStack output2 = new MaterialStack(Mats.matByName.get(name2), amount2);
if(obj.has("output1")) {
JsonArray out1 = obj.get("output1").getAsJsonArray();
String name1 = out1.get(0).getAsString();
int amount1 = out1.get(1).getAsInt();
output1 = new MaterialStack(Mats.matByName.get(name1), amount1);
}
if(obj.has("output2")) {
JsonArray out2 = obj.get("output2").getAsJsonArray();
String name2 = out2.get(0).getAsString();
int amount2 = out2.get(1).getAsInt();
output2 = new MaterialStack(Mats.matByName.get(name2), amount2);
}
ItemStack[] byproducts = new ItemStack[0];
if(obj.has("byproducts")) byproducts = this.readItemStackArray(obj.get("byproducts").getAsJsonArray());
@ -260,19 +267,23 @@ public class ElectrolyserMetalRecipes extends SerializableRecipe {
writer.name("input"); this.writeAStack(rec.getKey(), writer);
writer.name("output1");
writer.beginArray();
writer.setIndent("");
writer.value(rec.getValue().output1.material.names[0]).value(rec.getValue().output1.amount);
writer.endArray();
writer.setIndent(" ");
writer.name("output2");
writer.beginArray();
writer.setIndent("");
writer.value(rec.getValue().output2.material.names[0]).value(rec.getValue().output2.amount);
writer.endArray();
writer.setIndent(" ");
if(rec.getValue().output1 != null) {
writer.name("output1");
writer.beginArray();
writer.setIndent("");
writer.value(rec.getValue().output1.material.names[0]).value(rec.getValue().output1.amount);
writer.endArray();
writer.setIndent(" ");
}
if(rec.getValue().output2 != null) {
writer.name("output2");
writer.beginArray();
writer.setIndent("");
writer.value(rec.getValue().output2.material.names[0]).value(rec.getValue().output2.amount);
writer.endArray();
writer.setIndent(" ");
}
if(rec.getValue().byproduct != null && rec.getValue().byproduct.length > 0) {
writer.name("byproducts").beginArray();

View File

@ -268,7 +268,7 @@ public class AnvilRecipes {
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {
new ComparableStack(ModItems.tank_steel, 4),
new ComparableStack(ModItems.pipes_steel, 1),
new OreDictStack(STEEL.pipe(), 3),
new OreDictStack(TI.ingot(), 12),
new OreDictStack(CU.ingot(), 8)
}, new AnvilOutput(new ItemStack(ModBlocks.heater_oilburner))).setTier(2));
@ -287,7 +287,7 @@ public class AnvilRecipes {
new OreDictStack(RUBBER.ingot(), 4),
new OreDictStack(CU.ingot(), 16),
new OreDictStack(STEEL.plate528(), 16),
new ComparableStack(ModItems.pipes_steel, 1),
new OreDictStack(STEEL.pipe(), 3),
}, new AnvilOutput(new ItemStack(ModBlocks.heater_heatex))).setTier(3));
constructionRecipes.add(new AnvilConstructionRecipe(
@ -406,14 +406,14 @@ public class AnvilRecipes {
new AStack[] {
new ComparableStack(ModBlocks.brick_concrete, 64),
new ComparableStack(Blocks.iron_bars, 128),
new ComparableStack(ModBlocks.machine_condenser, 5),
new ComparableStack(ModBlocks.machine_condenser, 4),
}, new AnvilOutput(new ItemStack(ModBlocks.machine_tower_small))).setTier(3));
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {
new ComparableStack(ModBlocks.concrete_smooth, 128),
new ComparableStack(ModBlocks.steel_scaffold, 32),
new ComparableStack(ModBlocks.machine_condenser, 25),
new ComparableStack(ModItems.pipes_steel, 2)
new ComparableStack(ModBlocks.machine_condenser, 16),
new OreDictStack(STEEL.pipe(), 8),
}, new AnvilOutput(new ItemStack(ModBlocks.machine_tower_large))).setTier(4));
constructionRecipes.add(new AnvilConstructionRecipe(

View File

@ -3,7 +3,6 @@ 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;
@ -155,8 +154,6 @@ 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) {
@ -1385,23 +1382,6 @@ 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
@ -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?";
}
}
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 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;
@ -13,16 +11,18 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
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,
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);
if(dist <= soundRange) {
while(ModEventHandlerClient.soundLock);
ModEventHandlerClient.soundLock = true;
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));
ModEventHandlerClient.soundLock = false;
PositionedSoundRecord positionedsoundrecord = new PositionedSoundRecord(new ResourceLocation(sound), 1000F, 0.9F + rand.nextFloat() * 0.2F, (float) x, (float) y, (float) z);
Minecraft.getMinecraft().getSoundHandler().playDelayedSound(positionedsoundrecord, (int) (dist / speedOfSound));
}
// WAVE

View File

@ -41,12 +41,12 @@ public class TileEntityICFStruct extends TileEntity {
}
/** 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);
int ix = xCoord + dir.offsetX * z + rot.offsetX * z;
int ix = xCoord + rot.offsetX * lengthwiseOffset + dir.offsetX * widthwiseOffset;
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;
}

View File

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

View File

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB