Merge branch 'HbmMods:master' into OC_bugfix

This commit is contained in:
BallOfEnergy 2024-06-10 21:21:07 -05:00 committed by GitHub
commit 3dbb81f337
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 1681 additions and 1499 deletions

View File

@ -1,53 +1,6 @@
## Added
* Asphalt stairs
* Stairs, but fast
* Slabs too
* More circuits
* Control units and advanced control units are exclusively used for nukes
* CUs and ACUs are quite a bit more expensive than standard circuits and also make use of tantalum capacitors
* Nukes are no longer for people who weasel their way through progression and then get 8 uranium, 2 steel and some duct tape, instead every atomic bomb requires a large electronics production capacity
* WMDs are expensive, who woulda thunk
## Changed
* Wires now use recipe autogen for anvils, meaning that all fine wires are now obtainable via tier 4 anvil
* Changed most nuke recipes
* Most assembler recipes have been de-cluttered, no longer using random extra plates or wires
* Nukes now exclusively use control units or ACUs instead of circuits
* CRTs are now crafted in the crafting table instead of via assembler, making use of vacuum tubes
* Chainlink fences now only create posts on edges or intersections
* The new chainlink fence post block will always create a post, emulating the behavior of the old fences
* Removed gold sands (frees up 2 block IDs)
* There's now two new variants of builder's choice concrete, desert storm (the texture from the launch pad) and bronze plating (the old ICF laser texture)
* Microwaves are no longer electric furnace copies, instead their recipes are restricted to things considered food
* Electric furnaces now cause minor pollution (does not connect to smoke stacks!)
* Increased the arc furnace's liquid buffer to 128 blocks (from 24)
* The arc furnace can now accept more items depending on the speed upgrade, extending all the way to 16 with speed 3 (effective cap might be lower to prevent outputs from exceeding 64 items)
* Due to technical limitations, clicking into a slot once will only place a single item, however after the item is present, the slot's capacity extends to the upgraded size
* This is especially apparent when clicking items into slots by hand, and still noticeable when shift clicking by how the items spread out
* This does not affect automation at all, items will stack up nicely without spreading out unnecessarily
* Reduced arc furnace pollution from 15 to 10 soot per cycle
* The way soot spreads has been changed
* The spreading threshold has been decreased from 15 to 10
* Every update, soot will decrease by regardless of whether it can spread or not (instead of only if it cannot spread)
* Batteries no longer transmit in all directions, instead they transmit to their own power node (since they are also considered cables), eliminating any direction-based bias when transmitting
* The base fuel consumption for the soyuz in cargo mode is now only 5,000mB
* The soyuz' fuel consumption in cargo mode is now limited to its max capacity, meaning it can now fly infinitely far
* Less bullshit mode's simple crafting now extends to the soldering station, all circuits, upgrades and control units are substantially cheaper
* There is now an alternate recipe for standard capacitors, using one aluminium dust for two capacitors (i.e. 4.5 aluminium nuggets, vs the standard 1 niobium nugget)
* Shift-clicking steel grates onto the top/bottom of a block now shifts the grate into that block (if there is space, for example for cables or ducts). The effect is only visual, and the block still occupies the position above the block that the grate has been placed at
* This allows for making pipes with grates over them which are flush with the floor
* The ore acidizer has been remodeled
* The ports are now much simpler, having universale ports for all types instead of ppower/fluid being separated from items
* The ports are now all located at the bottom, making it easier to connect power/fluid
* There are now more ports to choose from
* The machine is now one block shorter
* The ladder is now wider and centered on the side
* Centrifuges and refineries now use analog circuits
## Fixed
* Fixed dupe regarding conveyor grabbers
* Fixed soldering stations not saving progress or their fluid tanks
* Fixed a bug where missile debris would always spawn with a stack size of 1 and a meta of 0
* Fixed FM radios disassembling into incorrect parts
* Fixed 256k tanks yielding too much steel when shredded
* Fixed the wire mold only creating 1 wire instead of the intended 8 due to the changes to the wire oredict
* Fixed potential crashes in the arc welder and soldering station GUIs
* Fixed hopper IO ignoring the stack limit on arc furnaces under certain circumstances
* Fixed the watz powerplant not dropping as many HSS bolts as it should

View File

@ -1,6 +1,6 @@
mod_version=1.0.27
# Empty build number makes a release type
mod_build_number=4980
mod_build_number=4991
credits=HbMinecraft,\
\ rodolphito (explosion algorithms),\

View File

@ -94,7 +94,7 @@ public class Watz extends BlockDummyable {
if(i >= 12 && drop) {
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.watz_end, 48)));
for(int j = 0; j < 3; j++) world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, Mats.MAT_DURA.make(ModItems.bolt)));
for(int j = 0; j < 3; j++) world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, Mats.MAT_DURA.make(ModItems.bolt, 64)));
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.watz_element, 36)));
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.watz_cooler, 26)));
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.struct_watz_core, 1)));

View File

@ -42,7 +42,7 @@ public class CraneGrabber extends BlockCraneBase {
this.iconDirectionalSideDownTurnRight = iconRegister.registerIcon(RefStrings.MODID + ":crane_grabber_side_down_turn_right");
}
@Override
@Override
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
this.dropContents(world, x, y, z, block, meta, 9, 11);
super.breakBlock(world, x, y, z, block, meta);

View File

@ -91,7 +91,7 @@ public abstract class RadioTorchBase extends BlockContainer implements IGUIProvi
ForgeDirection dir = ForgeDirection.getOrientation(meta);
Block b = world.getBlock(x - dir.offsetX, y - dir.offsetY, z - dir.offsetZ);
if(!b.isSideSolid(world, x - dir.offsetX, y - dir.offsetY, z - dir.offsetZ, dir) && !b.hasComparatorInputOverride() && (!b.renderAsNormalBlock() || b.isAir(world, x, y, z))) {
if(!canBlockStay(world, x, y, z, dir, b)) {
this.dropBlockAsItem(world, x, y, z, meta, 0);
world.setBlockToAir(x, y, z);
}
@ -104,7 +104,11 @@ public abstract class RadioTorchBase extends BlockContainer implements IGUIProvi
ForgeDirection dir = ForgeDirection.getOrientation(side);
Block b = world.getBlock(x - dir.offsetX, y - dir.offsetY, z - dir.offsetZ);
return b.isSideSolid(world, x - dir.offsetX, y - dir.offsetY, z - dir.offsetZ, dir) || b.hasComparatorInputOverride() || (b.renderAsNormalBlock() && !b.isAir(world, x, y, z));
return canBlockStay(world, x, y, z, dir, b);
}
public boolean canBlockStay(World world, int x, int y, int z, ForgeDirection dir, Block b) {
return b.isSideSolid(world, x - dir.offsetX, y - dir.offsetY, z - dir.offsetZ, dir) || b.hasComparatorInputOverride() || b.canProvidePower() || (b.renderAsNormalBlock() && !b.isAir(world, x, y, z));
}
@Override

View File

@ -8,18 +8,22 @@ import com.hbm.inventory.container.ContainerCounterTorch;
import com.hbm.inventory.gui.GUICounterTorch;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.network.TileEntityRadioTorchCounter;
import com.hbm.util.Compat;
import com.hbm.util.I18nUtil;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
import net.minecraftforge.common.util.ForgeDirection;
public class RadioTorchCounter extends RadioTorchBase {
@ -38,6 +42,13 @@ public class RadioTorchCounter extends RadioTorchBase {
return new TileEntityRadioTorchCounter();
}
@Override
public boolean canBlockStay(World world, int x, int y, int z, ForgeDirection dir, Block b) {
if(b.isSideSolid(world, x - dir.offsetX, y - dir.offsetY, z - dir.offsetZ, dir) || (b.renderAsNormalBlock() && !b.isAir(world, x, y, z))) return true;
TileEntity te = Compat.getTileStandard(world, x - dir.offsetX, y - dir.offsetY, z - dir.offsetZ);
return te instanceof IInventory;
}
@Override
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new ContainerCounterTorch(player.inventory, (TileEntityRadioTorchCounter) world.getTileEntity(x, y, z));

View File

@ -1,15 +1,22 @@
package com.hbm.handler.radiation;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map.Entry;
import com.hbm.lib.Library;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.util.MathHelper;
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.storage.ExtendedBlockStorage;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.event.world.ChunkDataEvent;
import net.minecraftforge.event.world.ChunkEvent;
import net.minecraftforge.event.world.WorldEvent;
/**
* The PRISM system aims to make a semi-realistic containment system with simplified and variable resistance values.
@ -23,6 +30,12 @@ import net.minecraftforge.common.util.ForgeDirection;
* The system's name stems from the "gradient"-like handling of the resistance values per axis, multiple color
* gradients make a rainbow, and rainbows come from prisms. Just like a prism, sub-chunks too handle the radiation
* going through them differently depending on the angle of approach.
* ___
* /\ \
* / \ \
* / \ \
* / \ \
* /________\__\
*
* @author hbm
*
@ -32,6 +45,9 @@ public class ChunkRadiationHandlerPRISM extends ChunkRadiationHandler {
private HashMap<World, RadPerWorld> perWorld = new HashMap();
public static final float MAX_RADIATION = 1_000_000;
private static final String NBT_KEY_CHUNK_RADIATION = "hfr_prism_radiation_";
private static final String NBT_KEY_CHUNK_RESISTANCE = "hfr_prism_resistance_";
private static final String NBT_KEY_CHUNK_EXISTS = "hfr_prism_exists_";
@Override
public float getRadiation(World world, int x, int y, int z) {
@ -54,12 +70,18 @@ public class ChunkRadiationHandlerPRISM extends ChunkRadiationHandler {
@Override
public void setRadiation(World world, int x, int y, int z, float rad) {
if(Float.isNaN(rad)) rad = 0;
RadPerWorld system = perWorld.get(world);
if(system != null) {
ChunkCoordIntPair coords = new ChunkCoordIntPair(x >> 4, z >> 4);
int yReg = MathHelper.clamp_int(y >> 4, 0, 15);
SubChunk[] subChunks = system.radiation.get(coords);
if(subChunks == null) {
subChunks = new SubChunk[16];
system.radiation.put(coords, subChunks);
}
if(subChunks[yReg] == null) subChunks[yReg] = new SubChunk().rebuild(world, x, y, z);
subChunks[yReg].radiation = MathHelper.clamp_float(rad, 0, MAX_RADIATION);
world.getChunkFromBlockCoords(x, z).isModified = true;
@ -76,10 +98,79 @@ public class ChunkRadiationHandlerPRISM extends ChunkRadiationHandler {
setRadiation(world, x, y, z, getRadiation(world, x, y, z) - rad);
}
@Override
public void receiveWorldLoad(WorldEvent.Load event) {
if(!event.world.isRemote) perWorld.put(event.world, new RadPerWorld());
}
@Override
public void receiveWorldUnload(WorldEvent.Unload event) {
if(!event.world.isRemote) perWorld.remove(event.world);
}
@Override
public void receiveChunkLoad(ChunkDataEvent.Load event) {
if(!event.world.isRemote) {
RadPerWorld radWorld = perWorld.get(event.world);
if(radWorld != null) {
SubChunk[] chunk = new SubChunk[16];
for(int i = 0; i < 16; i++) {
if(!event.getData().getBoolean(NBT_KEY_CHUNK_EXISTS + i)) {
chunk[i] = new SubChunk().rebuild(event.world, event.getChunk().xPosition << 4, i << 4, event.getChunk().zPosition << 4);
continue;
}
SubChunk sub = new SubChunk();
chunk[i] = sub;
sub.radiation = event.getData().getFloat(NBT_KEY_CHUNK_RADIATION + i);
for(int j = 0; j < 16; j++) sub.xResist[j] = event.getData().getFloat(NBT_KEY_CHUNK_RESISTANCE + "x_" + j + "_" + i);
for(int j = 0; j < 16; j++) sub.yResist[j] = event.getData().getFloat(NBT_KEY_CHUNK_RESISTANCE + "y_" + j + "_" + i);
for(int j = 0; j < 16; j++) sub.zResist[j] = event.getData().getFloat(NBT_KEY_CHUNK_RESISTANCE + "z_" + j + "_" + i);
}
radWorld.radiation.put(event.getChunk().getChunkCoordIntPair(), chunk);
}
}
}
@Override
public void receiveChunkSave(ChunkDataEvent.Save event) {
if(!event.world.isRemote) {
RadPerWorld radWorld = perWorld.get(event.world);
if(radWorld != null) {
SubChunk[] chunk = radWorld.radiation.get(event.getChunk().getChunkCoordIntPair());
for(int i = 0; i < 16; i++) {
SubChunk sub = chunk[i];
if(sub != null) {
float rad = sub.radiation;
event.getData().setFloat(NBT_KEY_CHUNK_RADIATION + i, rad);
for(int j = 0; j < 16; j++) event.getData().setFloat(NBT_KEY_CHUNK_RESISTANCE + "x_" + j + "_" + i, sub.xResist[j]);
for(int j = 0; j < 16; j++) event.getData().setFloat(NBT_KEY_CHUNK_RESISTANCE + "y_" + j + "_" + i, sub.yResist[j]);
for(int j = 0; j < 16; j++) event.getData().setFloat(NBT_KEY_CHUNK_RESISTANCE + "z_" + j + "_" + i, sub.zResist[j]);
event.getData().setBoolean(NBT_KEY_CHUNK_EXISTS + i, true);
}
}
}
}
}
@Override
public void receiveChunkUnload(ChunkEvent.Unload event) {
if(!event.world.isRemote) {
RadPerWorld radWorld = perWorld.get(event.world);
if(radWorld != null) {
radWorld.radiation.remove(event.getChunk());
}
}
}
@Override
public void updateSystem() {
for(Entry<World, RadPerWorld> entries : perWorld.entrySet()) {
World world = entries.getKey();
RadPerWorld system = entries.getValue();
//it would be way to expensive to replace the sub-chunks entirely like with the old system
@ -89,15 +180,20 @@ public class ChunkRadiationHandlerPRISM extends ChunkRadiationHandler {
sub.radiation = 0;
}
for(Entry<ChunkCoordIntPair, SubChunk[]> chunk : system.radiation.entrySet()) {
//has to support additions while iterating
Iterator<Entry<ChunkCoordIntPair, SubChunk[]>> it = system.radiation.entrySet().iterator();
while(it.hasNext()) {
Entry<ChunkCoordIntPair, SubChunk[]> chunk = it.next();
if(this.getPrevChunkRadiation(chunk.getValue()) <= 0) continue;
for(int i = 0; i < 16; i++) {
SubChunk sub = chunk.getValue()[i];
if(sub != null) {
if(sub.prevRadiation <= 0 || Float.isNaN(sub.prevRadiation)) continue;
float radSpread = 0;
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) radSpread += spreadRadiation(sub, i, chunk.getKey(), system.radiation, dir);
sub.radiation += (sub.prevRadiation - radSpread) * 0.9F;
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) radSpread += spreadRadiation(world, sub, i, chunk.getKey(), chunk.getValue(), system.radiation, dir);
sub.radiation += (sub.prevRadiation - radSpread) * 0.95F;
}
}
}
@ -109,19 +205,45 @@ public class ChunkRadiationHandlerPRISM extends ChunkRadiationHandler {
}
}
private static float spreadRadiation(SubChunk source, int y, ChunkCoordIntPair origin, HashMap<ChunkCoordIntPair, SubChunk[]> map, ForgeDirection dir) {
/** Returns the amount of radiation spread */
private static float spreadRadiation(World world, SubChunk source, int y, ChunkCoordIntPair origin, SubChunk[] chunk, HashMap<ChunkCoordIntPair, SubChunk[]> map, ForgeDirection dir) {
//TODO
float spread = 0.1F;
float amount = source.prevRadiation * spread;
return 0F;
if(amount <= 1F) return 0;
if(dir.offsetY != 0) {
if(dir == Library.POS_Y && y == 15) return amount; // out of world
if(dir == Library.NEG_Y && y == 0) return amount; // out of world
if(chunk[y + dir.offsetY] == null) chunk[y + dir.offsetY] = new SubChunk().rebuild(world, origin.chunkXPos << 4, (y + dir.offsetY) << 4, origin.chunkZPos << 4);
SubChunk to = chunk[y + dir.offsetY];
return spreadRadiationTo(source, to, amount, dir);
} else {
ChunkCoordIntPair newPos = new ChunkCoordIntPair(origin.chunkXPos + dir.offsetX, origin.chunkZPos + dir.offsetZ);
if(!world.getChunkProvider().chunkExists(newPos.chunkXPos, newPos.chunkZPos)) return amount;
SubChunk[] newChunk = map.get(newPos);
if(newChunk == null) {
newChunk = new SubChunk[16];
map.put(newPos, newChunk);
}
if(newChunk[y] == null) newChunk[y] = new SubChunk().rebuild(world, newPos.chunkXPos << 4, y << 4, newPos.chunkZPos << 4);
SubChunk to = newChunk[y];
return spreadRadiationTo(source, to, amount, dir);
}
}
public static float getTotalChunkRadiation(SubChunk[] chunk) {
float rad = 0;
for(SubChunk sub : chunk) if(sub != null) rad += sub.radiation;
return rad;
private static float spreadRadiationTo(SubChunk from, SubChunk to, float amount, ForgeDirection movement) {
float resistance = from.getResistanceValue(movement.getOpposite()) + to.getResistanceValue(movement);
resistance /= 1_000F;
float toMove = Math.min(amount / Math.max(resistance, 1F), amount);
to.radiation += toMove;
return toMove;
}
//private static float getTotalChunkRadiation(SubChunk[] chunk) { float rad = 0; for(SubChunk sub : chunk) if(sub != null) rad += sub.radiation; return rad; }
private static float getPrevChunkRadiation(SubChunk[] chunk) { float rad = 0; for(SubChunk sub : chunk) if(sub != null) rad += sub.prevRadiation; return rad; }
@Override
public void clearSystem(World world) {
RadPerWorld system = perWorld.get(world);
@ -169,6 +291,7 @@ public class ChunkRadiationHandlerPRISM extends ChunkRadiationHandler {
if(iX == sX || iY == sY || iZ == sZ) { //only redo the three affected slices by this position change
Block b = subChunk.getBlockByExtId(iX, iY, iZ);
if(b.getMaterial() == Material.air) continue;
float resistance = b.getExplosionResistance(null, world, tX + iX, tY + iY, tZ + iZ, x, y, z);
if(iX == sX) xResist[iX] += resistance;
if(iY == sY) yResist[iY] += resistance;
@ -202,6 +325,7 @@ public class ChunkRadiationHandlerPRISM extends ChunkRadiationHandler {
for(int iZ = 0; iZ < 16; iZ ++) {
Block b = subChunk.getBlockByExtId(iX, iY, iZ);
if(b.getMaterial() == Material.air) continue;
float resistance = b.getExplosionResistance(null, world, tX + iX, tY + iY, tZ + iZ, x, y, z);
xResist[iX] += resistance;
yResist[iY] += resistance;
@ -215,8 +339,22 @@ public class ChunkRadiationHandlerPRISM extends ChunkRadiationHandler {
}
public float getResistanceValue(ForgeDirection movement) {
//TODO
if(movement == Library.POS_X) return getResistanceFromArray(xResist, false);
if(movement == Library.NEG_X) return getResistanceFromArray(xResist, true);
if(movement == Library.POS_Y) return getResistanceFromArray(yResist, false);
if(movement == Library.NEG_Y) return getResistanceFromArray(yResist, true);
if(movement == Library.POS_Z) return getResistanceFromArray(zResist, false);
if(movement == Library.NEG_Z) return getResistanceFromArray(zResist, true);
return 0;
}
private float getResistanceFromArray(float[] resist, boolean reverse) {
float res = 0F;
for(int i = 0; i < 15; i++) {
int index = reverse ? 15 - i : i;
res += resist[index] / 15F * i;
}
return res;
}
}
}

View File

@ -12,7 +12,7 @@ import net.minecraftforge.event.world.WorldEvent;
public class ChunkRadiationManager {
public static ChunkRadiationHandler proxy = /*new ChunkRadiationHandlerNT();*/ new ChunkRadiationHandlerSimple();
public static ChunkRadiationHandler proxy = /*new ChunkRadiationHandlerNT();*/ new ChunkRadiationHandlerSimple(); /*new ChunkRadiationHandlerPRISM();*/
@SubscribeEvent
public void onWorldLoad(WorldEvent.Load event) {

View File

@ -130,7 +130,7 @@ public class AssemblerRecipes extends SerializableRecipe {
makeRecipe(new ComparableStack(ModBlocks.cmb_brick_reinforced, 8), new AStack[] {new ComparableStack(ModBlocks.block_magnetized_tungsten, 4), new ComparableStack(ModBlocks.brick_concrete, 4), new ComparableStack(ModBlocks.cmb_brick, 1), new OreDictStack(STEEL.plate(), 4), },200);
makeRecipe(new ComparableStack(ModBlocks.seal_frame, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 3), new OreDictStack(AL.wireFine(), 4), new OreDictStack(REDSTONE.dust(), 2), new ComparableStack(ModBlocks.steel_roof, 5), },50);
makeRecipe(new ComparableStack(ModBlocks.seal_controller, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 3), new OreDictStack(ANY_PLASTIC.ingot(), 4), new OreDictStack(MINGRADE.ingot(), 1), new OreDictStack(REDSTONE.dust(), 4), new ComparableStack(ModBlocks.steel_roof, 5), },100);
makeRecipe(new ComparableStack(ModBlocks.machine_centrifuge, 1), new AStack[] {new ComparableStack(ModItems.centrifuge_element, 1), new OreDictStack(ANY_PLASTIC.ingot(), 2), new OreDictStack(STEEL.plate528(), 8), new OreDictStack(CU.plate(), 8), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.VACUUM_TUBE.ordinal()), }, 200);
makeRecipe(new ComparableStack(ModBlocks.machine_centrifuge, 1), new AStack[] {new ComparableStack(ModItems.centrifuge_element, 1), new OreDictStack(ANY_PLASTIC.ingot(), 2), new OreDictStack(STEEL.plate528(), 8), new OreDictStack(CU.plate(), 8), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ANALOG), }, 200);
makeRecipe(new ComparableStack(ModBlocks.machine_gascent, 1), new AStack[] {new ComparableStack(ModItems.centrifuge_element, 4), new OreDictStack(ANY_PLASTIC.ingot(), 4), new OreDictStack(DESH.ingot(), 2), new OreDictStack(STEEL.plate528(), 8), new ComparableStack(ModItems.coil_tungsten, 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()) }, 300);
makeRecipe(new ComparableStack(ModBlocks.machine_rtg_furnace_off, 1), new AStack[] {new ComparableStack(Blocks.furnace, 1), new ComparableStack(ModItems.rtg_unit, 3), new OreDictStack(PB.plate528(), 6), new OreDictStack(OreDictManager.getReflector(), 4), new OreDictStack(CU.plate(), 2), },150);
makeRecipe(new ComparableStack(ModBlocks.machine_diesel, 1), new AStack[] {new OreDictStack(STEEL.shell(), 1), new ComparableStack(ModItems.piston_selenium, 1), new OreDictStack(STEEL.plateCast(), 1), new ComparableStack(ModItems.coil_copper, 4), }, 60);
@ -144,10 +144,10 @@ public class AssemblerRecipes extends SerializableRecipe {
makeRecipe(new ComparableStack(ModBlocks.machine_pumpjack, 1), new AStack[] {new ComparableStack(ModBlocks.steel_scaffold, 8), new OreDictStack(STEEL.plateWelded(), 8), new ComparableStack(ModItems.pipes_steel, 4), new ComparableStack(ModItems.tank_steel, 4), new OreDictStack(STEEL.plate(), 32), new ComparableStack(ModItems.drill_titanium, 1), new ComparableStack(ModItems.motor_desh) }, 400);
makeRecipe(new ComparableStack(ModBlocks.machine_flare, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 12), new OreDictStack(IRON.ingot(), 12), new OreDictStack(CU.plate528(), 4), new ComparableStack(ModItems.tank_steel, 1), new OreDictStack(STEEL.pipe(), 8), new OreDictStack(STEEL.shell(), 4), new ComparableStack(ModItems.thermo_element, 3), },200);
makeRecipe(new ComparableStack(ModBlocks.machine_coker, 1), new AStack[] {!exp ? new OreDictStack(STEEL.plateWelded(), 3) : new OreDictStack(STEEL.heavyComp(), 2), new OreDictStack(IRON.ingot(), 16), new OreDictStack(CU.plate528(), 8), new OreDictStack(RUBBER.ingot(), 4), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModBlocks.steel_grate, 4) },200);
makeRecipe(new ComparableStack(ModBlocks.machine_refinery, 1), new AStack[] {!exp ? new OreDictStack(STEEL.plateWelded(), 3) : new OreDictStack(STEEL.heavyComp(), 1), new OreDictStack(CU.plate528(), 16), new OreDictStack(STEEL.shell(), 6), new OreDictStack(STEEL.pipe(), 12), new ComparableStack(ModItems.plate_polymer, 8), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.VACUUM_TUBE.ordinal()) },350);
makeRecipe(new ComparableStack(ModBlocks.machine_epress, 1), new AStack[] {new OreDictStack(STEEL.plate(), 8), new OreDictStack(ANY_RUBBER.ingot(), 4), new ComparableStack(ModItems.part_generic, 2, EnumPartType.PISTON_HYDRAULIC.ordinal()), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC.ordinal()) }, 100);
makeRecipe(new ComparableStack(ModBlocks.machine_chemplant, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 12), new OreDictStack(CU.plate528(), 6), new ComparableStack(ModItems.tank_steel, 4), new ComparableStack(ModItems.coil_tungsten, 3), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ANALOG.ordinal()), new ComparableStack(ModItems.plate_polymer, 8), },200);
makeRecipe(new ComparableStack(ModBlocks.machine_crystallizer, 1), new AStack[] {new OreDictStack(STEEL.plateWelded(), 2), new OreDictStack(TI.shell(), 3), new OreDictStack(DESH.ingot(), 4), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.BASIC.ordinal()), },200);
makeRecipe(new ComparableStack(ModBlocks.machine_refinery, 1), new AStack[] {!exp ? new OreDictStack(STEEL.plateWelded(), 3) : new OreDictStack(STEEL.heavyComp(), 1), new OreDictStack(CU.plate528(), 16), new OreDictStack(STEEL.shell(), 6), new OreDictStack(STEEL.pipe(), 12), new ComparableStack(ModItems.plate_polymer, 8), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.ANALOG) },350);
makeRecipe(new ComparableStack(ModBlocks.machine_epress, 1), new AStack[] {new OreDictStack(STEEL.plate(), 8), new OreDictStack(ANY_RUBBER.ingot(), 4), new ComparableStack(ModItems.part_generic, 2, EnumPartType.PISTON_HYDRAULIC.ordinal()), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC) }, 100);
makeRecipe(new ComparableStack(ModBlocks.machine_chemplant, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 12), new OreDictStack(CU.plate528(), 6), new ComparableStack(ModItems.tank_steel, 4), new ComparableStack(ModItems.coil_tungsten, 3), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ANALOG), new ComparableStack(ModItems.plate_polymer, 8), },200);
makeRecipe(new ComparableStack(ModBlocks.machine_crystallizer, 1), new AStack[] {new OreDictStack(STEEL.plateWelded(), 2), new OreDictStack(TI.shell(), 3), new OreDictStack(DESH.ingot(), 4), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.BASIC), },200);
makeRecipe(new ComparableStack(ModBlocks.machine_fluidtank, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 2), new OreDictStack(STEEL.plate528(), 6), new OreDictStack(STEEL.shell(), 4), new OreDictStack(ANY_TAR.any(), 4), },150);
makeRecipe(new ComparableStack(ModBlocks.machine_bat9000, 1), new AStack[] {new OreDictStack(STEEL.plate528(), 16), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 2), new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(ANY_TAR.any(), 16), },150);
makeRecipe(new ComparableStack(ModBlocks.machine_orbus, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 12), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 8), new OreDictStack(BIGMT.plate(), 12), new ComparableStack(ModItems.coil_advanced_alloy, 12), new ComparableStack(ModItems.battery_sc_polonium, 1) }, 200);

View File

@ -331,7 +331,7 @@ public class ChemplantRecipes extends SerializableRecipe {
new OreDictStack(F.dust(), 8),
new ComparableStack(ModItems.nugget_bismuth, 4))
.inputFluids(new FluidStack(Fluids.PEROXIDE, 1000, 5))
.outputFluids(new FluidStack(Fluids.DEATH, 1000, GeneralConfig.enable528 ? 5 : 0)));
.outputFluids(new FluidStack(Fluids.DEATH, 1000, 0)));
//one bucket of ethanol equals 275_000 TU using the diesel baseline0
//the coal baseline is 400_000 per piece
//if we assume a burntime of 1.5 ops (300 ticks) for sugar at 100 TU/t that would equal a total of 30_000 TU

View File

@ -108,6 +108,10 @@ public class CrucibleRecipes extends SerializableRecipe {
.inputs(new MaterialStack(Mats.MAT_MAGTUNG, n * 6), new MaterialStack(Mats.MAT_MUD, n * 3))
.outputs(new MaterialStack(Mats.MAT_CMB, i)));
recipes.add(new CrucibleRecipe(16, "crucible.magtung", 3, new ItemStack(ModItems.ingot_magnetized_tungsten))
.inputs(new MaterialStack(Mats.MAT_TUNGSTEN, i), new MaterialStack(Mats.MAT_SCHRABIDIUM, n * 1))
.outputs(new MaterialStack(Mats.MAT_MAGTUNG, i)));
registerMoldsForNEI();
}

View File

@ -47,9 +47,9 @@ public class ItemArcElectrode extends ItemEnumMulti {
public static enum EnumElectrodeType {
GRAPHITE( 10),
LANTHANIUM( 50),
DESH( 250),
SATURNITE( 500);
LANTHANIUM( 100),
DESH( 500),
SATURNITE( 1500);
public int durability;

View File

@ -3,7 +3,7 @@ package com.hbm.lib;
public class RefStrings {
public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech Mod";
public static final String VERSION = "1.0.27 BETA (4980)";
public static final String VERSION = "1.0.27 BETA (4991)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version

View File

@ -7,6 +7,7 @@ import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.tileentity.machine.TileEntityMachineCrystallizer;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
@ -20,7 +21,7 @@ public class RenderCrystallizer extends TileEntitySpecialRenderer implements IIt
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_CULL_FACE);
switch(te.getBlockMetadata() - 10) {
case 2: GL11.glRotatef(90, 0F, 1F, 0F); break;
@ -39,6 +40,16 @@ public class RenderCrystallizer extends TileEntitySpecialRenderer implements IIt
GL11.glRotatef(crys.prevAngle + (crys.angle - crys.prevAngle) * inter, 0, 1, 0);
ResourceManager.crystallizer.renderPart("Spinner");
GL11.glPopMatrix();
if(crys.prevAngle != crys.angle) {
GL11.glEnable(GL11.GL_BLEND);
GL11.glDepthMask(false);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
bindTexture(crys.tank.getTankType().getTexture());
ResourceManager.crystallizer.renderPart("Fluid");
GL11.glDepthMask(true);
GL11.glDisable(GL11.GL_BLEND);
}
GL11.glShadeModel(GL11.GL_FLAT);

View File

@ -199,7 +199,7 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase impl
}
}
if((lid == 1 || lid == 0) && lid != prevLid) {
if((lid == 1 || lid == 0) && lid != prevLid && !(this.prevLid == 0 && this.lid == 1)) {
MainRegistry.proxy.playSoundClient(xCoord, yCoord, zCoord, "hbm:door.wgh_stop", this.getVolume(1), 1F);
}
@ -349,7 +349,10 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase impl
ArcFurnaceRecipe recipe = ArcFurnaceRecipes.getOutput(stack, this.liquidMode);
if(recipe == null) return false;
if(liquidMode) {
return recipe.fluidOutput != null;
if(recipe.fluidOutput == null) return false;
int sta = slots[slot] != null ? slots[slot].stackSize : 0;
sta += stack.stackSize;
return sta <= getMaxInputSize();
} else {
if(recipe.solidOutput == null) return false;
int sta = slots[slot] != null ? slots[slot].stackSize : 0;

View File

@ -2,7 +2,6 @@ package com.hbm.tileentity.machine;
import java.util.List;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ModBlocks;
import com.hbm.extprop.HbmPlayerProps;
import com.hbm.inventory.UpgradeManager;
@ -15,6 +14,7 @@ import com.hbm.inventory.recipes.CrystallizerRecipes.CrystallizerRecipe;
import com.hbm.items.machine.ItemMachineUpgrade;
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
import com.hbm.lib.Library;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.tileentity.IUpgradeInfoProvider;
import com.hbm.tileentity.TileEntityMachineBase;
@ -45,6 +45,7 @@ public class TileEntityMachineCrystallizer extends TileEntityMachineBase impleme
public static final int demand = 1000;
public short progress;
public short duration = 600;
public boolean isOn;
public float angle;
public float prevAngle;
@ -66,6 +67,8 @@ public class TileEntityMachineCrystallizer extends TileEntityMachineBase impleme
if(!worldObj.isRemote) {
this.isOn = false;
this.updateConnections();
power = Library.chargeTEFromItems(slots, 1, power, maxPower);
@ -80,6 +83,7 @@ public class TileEntityMachineCrystallizer extends TileEntityMachineBase impleme
progress++;
power -= getPowerRequired();
isOn = true;
if(progress > getDuration()) {
progress = 0;
@ -97,19 +101,24 @@ public class TileEntityMachineCrystallizer extends TileEntityMachineBase impleme
data.setShort("progress", progress);
data.setShort("duration", getDuration());
data.setLong("power", power);
data.setBoolean("isOn", isOn);
tank.writeToNBT(data, "t");
this.networkPack(data, 25);
} else {
prevAngle = angle;
if(progress > 0) {
if(isOn) {
angle += 5F * this.getCycleCount();
if(angle >= 360) {
angle -= 360;
prevAngle -= 360;
}
if(worldObj.rand.nextInt(20) == 0 && MainRegistry.proxy.me().getDistance(xCoord + 0.5, yCoord + 6, zCoord + 0.5) < 50) {
worldObj.spawnParticle("cloud", xCoord + worldObj.rand.nextDouble(), yCoord + 6.5D, zCoord + worldObj.rand.nextDouble(), 0.0, 0.1, 0.0);
}
}
}
@ -135,7 +144,7 @@ public class TileEntityMachineCrystallizer extends TileEntityMachineBase impleme
return new DirPos[] {
new DirPos(xCoord + 2, yCoord, zCoord + 1, Library.POS_X),
new DirPos(xCoord + 2, yCoord, zCoord - 2, Library.POS_X),
new DirPos(xCoord + 2, yCoord, zCoord - 1, Library.POS_X),
new DirPos(xCoord - 2, yCoord, zCoord + 1, Library.NEG_X),
new DirPos(xCoord - 2, yCoord, zCoord - 1, Library.NEG_X),
new DirPos(xCoord + 1, yCoord, zCoord + 2, Library.POS_Z),
@ -151,6 +160,7 @@ public class TileEntityMachineCrystallizer extends TileEntityMachineBase impleme
this.power = data.getLong("power");
this.progress = data.getShort("progress");
this.duration = data.getShort("duration");
this.isOn = data.getBoolean("isOn");
this.tank.readFromNBT(data, "t");
}

View File

@ -99,6 +99,19 @@ public class TileEntityMachineTurbineGas extends TileEntityMachineBase implement
}
}
if(autoMode) { //power production depending on power requirement
//scales the slider proportionally to the power gauge
int powerSliderTarget = 60 - (int) (60 * power / maxPower);
if(powerSliderTarget > powerSliderPos) { //makes the auto slider slide instead of snapping into position
powerSliderPos++;
}
else if(powerSliderTarget < powerSliderPos) {
powerSliderPos--;
}
}
switch(state) { //what to do when turbine offline, starting up and online
case 0:
shutdown();
@ -115,19 +128,6 @@ public class TileEntityMachineTurbineGas extends TileEntityMachineBase implement
break;
}
if(autoMode) { //power production depending on power requirement
//scales the slider proportionally to the power gauge
int powerSliderTarget = 60 - (int) (60 * power / maxPower);
if(powerSliderTarget > powerSliderPos) { //makes the auto slider slide instead of snapping into position
powerSliderPos++;
}
else if(powerSliderTarget < powerSliderPos) {
powerSliderPos--;
}
}
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);

View File

@ -21,7 +21,7 @@ public class DesertAtom001 extends WorldGenerator
{
Block Block2 = ModBlocks.yellow_barrel;
Block Block3 = ModBlocks.reinforced_sand;
Block Block4 = ModBlocks.nuke_man;
Block Block4 = ModBlocks.crashed_balefire;
Block Block5 = ModBlocks.deco_steel;
Block Block6 = ModBlocks.brick_light;
Block Block7 = ModBlocks.deco_tungsten;

View File

@ -858,6 +858,7 @@ crucible.ferro=Ferrouranium Production
crucible.hematite=Iron Production from Hematite
crucible.hss=High-Speed Steel Production
crucible.malachite=Copper Production from Malachite
crucible.magtung=Magnetized Tungsten Production
crucible.redcopper=Red Copper Production
crucible.steel=Steel Production
crucible.steelMeteoric=Steel Production from Meteoric Iron

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB