diff --git a/changelog b/changelog index 6ce34c664..99a6ad7a7 100644 --- a/changelog +++ b/changelog @@ -1,73 +1,12 @@ -## Added -* Powered drill - * Gasoline-fueled mining drill with AoE - * Uses the gun system and therefore does not have configurable abilities - * Mining level of iron tools by default - * AoE, melee damage, reach and mining level can be upgraded with drill bits - * Mining speed and fuel used can be changed with engines (diesel, aviation, electric, turbo) - * Fortune can be added as mods (both mods do in fact stack, yielding fortune III) - * Not a precision tool, intended to be used alongside pickaxes instead of replacing them - * Despite this, sneaking allows the AoE to be disabled - * Unlike pickaxes, shows a preview for what area is to be mined - * Due to not being considered a tool like a vanilla one, it's not affected by dig speed penalties from fatigue, being underwater or on a ladder -* Pipe anchor - * Works like a electricity connector but for fluids - * Range of 10 blocks - * Can be connected using a pipe wrench - ## Changed -* Updated russian and chinese localization -* VNT type explosions now track affected block positions when the explosion events fire, this should ensure compatibility with mods that rely on that - * For example, this should make ForgeCreeperHeal work with most of NTM's explosions -* Obliterated standard fluid IDs - * The multi ID is now a lot cheaper - * For convenience in the creative tab, fluid IDs are now listed with all fluids pre-defined, just like how the old IDs were available - * The multi ID now changes metadata based on the selected fluid type, allowing it to be usable for crafting pre-defined pipes -* The multi ID fluid selector now displays fluid traits in addition to the name when hovering over an icon -* Added more values to the data table returned by RBMK consoles via OC integration -* The conveyor ejector now has a "only take maximum possible" toggle - * Enabling this means that, if stack ejection upgrades are installed, only stacks that meet the limit can be ejected - * Items with a lower maximum stacksize will be ejected regardless -* Survey scanners now pick up bedrock oil -* The conveyor sorter filter slots now have directional labels instead of only color coding - * Apparently color blind people exist? -* Conveyor sorters can now process boxes - * All stacks are sorted individually, and each batch of items that comes out of one side is sent as a box -* Conveyor boxers can now accept boxes, this is useful for batching up partial boxes that come out of sorters -* Conveyor inserters can now accept boxes directly instead of causing them to burst open -* Conveyor inserters now have a special rule when supplying an arc furnace where instead of trying a full stack and then one item, the first always failing and the last being too slow, they will supply the slot target amount instead - * Given the cycle delay and the lid's movement speed, the inserters should now be fast enough to fully supply a speed III arc furnace -* Skeletons can now be gibbed by explosions, although it will spawn clean bone particles and omit the gore splash effect -* Polymer power tools now only have AoE 1 instead of AoE 2 -* The fluid container NEI handler now also includes the empty container, making it easier to find what fluids a canister for example is usable for -* Changed Mk2 infinite water barrel to use generic cast parts instead of a very specific type of pipe -* Retextured the multi fluid IDs to look more like the old IDs they replaced -* Logistics provider and requester crates can now only connect to a path node if that path is a dedicated waypoint - * This means that requesters and providers will no longer connect automatically, a logistics net now requires at least one dedicated waypoint - * This also means that in larger networks with many providers and requesters, all the useless connections between them which scale exponentially will no longer exist - * This is a band-aid fix for logistics nets destroying the game even at lower scales due to the path finding being unperformant as hell - * The system will have to be reworked entirely sooner or later (ough) -* PWR parts have been moved fro mthe workbench to the assembler -* Rebalanced a lot of expensive mode recipes - * Some oil proc machines are now a tad cheaper - * Extensive boards now use four rubber bars instead of gold wires - * The CCGT is now considerably cheaper, using similar materials as a turbofan - * Fusion reactors now use welded tc/cd alloy again - * 256k tanks now use half as much steel - * Gerald is now way more expensive - * PWR parts are now subject to expensive mode -* Fluid container items now keep their custom name when filling or emptying -* Pneumatic tube endpoints now have a GUI that allows filters to be defined -* Fortune on drillbits affects the bedrock ore yield now, with each level of fortune adding 25% +* Fortune on a drillbit now affects the quality of mined bedrock ore, each level of fortune adds 10% of the value to the item +* The arc furnace now has a five slot input queue which accepts full stacks + * This removes the need for weird, hacky, buggy special implementations for inserters to work at a reasonable speed + * This also means that pneumatic tubes and other mods' automation systems can now insert into the arc furnace with little issue + * Should the mode change and items in the input queue no longer be usable, they automatically become ejectable via automation + * The input queue slots are always accessible, not just when the lid is open +* Removed all the NTM sand mix blocks and replaced them with a single block that uses metadata +* Removed all tiers of the deprecated PA power plugs except one, leaving the old PAs just barely operational ## Fixed -* Fixed the T-51b set not having radiation resistance -* Potentially fixed a crash on thermos-derived servers involving the flow control pumps -* Fixed crash caused when another tile entity replaces an RBMK component due to an unchecked cast -* Fixed constant cascading chunk gen caused by meteorites and flower patches -* Fixed garbage loot pool sometimes producing "stone wires" -* Fixed mining lasers targeting blocks with the "gas" material -* Fixed gun looping sounds behaving weird when moving while firing -* Fixed an issue where weapon mods with the highest stat change priority would break the mod sorting, leading to inconsistent behavior -* Fixed fluid container items breaking when NBT is attached to them -* Potentially fixed a mod conflict where corium fluid would crash when flowing into water +* Fixed a potential crash caused by inserters connected to multiblocks that don't have a core tile \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index a488b4cad..878ea669b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ mod_version=1.0.27 # Empty build number makes a release type -mod_build_number=5490 +mod_build_number=5491 credits=HbMinecraft,\ \ rodolphito (explosion algorithms),\ diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index 3aedb9c06..8497a0690 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -428,30 +428,30 @@ public class ModBlocks { public static Block steel_grate; public static Block steel_grate_wide; - public static Block deco_pipe; - public static Block deco_pipe_rusted; - public static Block deco_pipe_green; - public static Block deco_pipe_green_rusted; - public static Block deco_pipe_red; - public static Block deco_pipe_marked; - public static Block deco_pipe_rim; - public static Block deco_pipe_rim_rusted; - public static Block deco_pipe_rim_green; - public static Block deco_pipe_rim_green_rusted; - public static Block deco_pipe_rim_red; - public static Block deco_pipe_rim_marked; - public static Block deco_pipe_framed; - public static Block deco_pipe_framed_rusted; - public static Block deco_pipe_framed_green; - public static Block deco_pipe_framed_green_rusted; - public static Block deco_pipe_framed_red; - public static Block deco_pipe_framed_marked; - public static Block deco_pipe_quad; - public static Block deco_pipe_quad_rusted; - public static Block deco_pipe_quad_green; - public static Block deco_pipe_quad_green_rusted; - public static Block deco_pipe_quad_red; - public static Block deco_pipe_quad_marked; + @Deprecated public static Block deco_pipe; + @Deprecated public static Block deco_pipe_rusted; + @Deprecated public static Block deco_pipe_green; + @Deprecated public static Block deco_pipe_green_rusted; + @Deprecated public static Block deco_pipe_red; + @Deprecated public static Block deco_pipe_marked; + @Deprecated public static Block deco_pipe_rim; + @Deprecated public static Block deco_pipe_rim_rusted; + @Deprecated public static Block deco_pipe_rim_green; + @Deprecated public static Block deco_pipe_rim_green_rusted; + @Deprecated public static Block deco_pipe_rim_red; + @Deprecated public static Block deco_pipe_rim_marked; + @Deprecated public static Block deco_pipe_framed; + @Deprecated public static Block deco_pipe_framed_rusted; + @Deprecated public static Block deco_pipe_framed_green; + @Deprecated public static Block deco_pipe_framed_green_rusted; + @Deprecated public static Block deco_pipe_framed_red; + @Deprecated public static Block deco_pipe_framed_marked; + @Deprecated public static Block deco_pipe_quad; + @Deprecated public static Block deco_pipe_quad_rusted; + @Deprecated public static Block deco_pipe_quad_green; + @Deprecated public static Block deco_pipe_quad_green_rusted; + @Deprecated public static Block deco_pipe_quad_red; + @Deprecated public static Block deco_pipe_quad_marked; public static Block broadcaster_pc; public static Block geiger; @@ -459,11 +459,7 @@ public class ModBlocks { public static Block fence_metal; - public static Block sand_boron; - public static Block sand_lead; - public static Block sand_uranium; - public static Block sand_polonium; - public static Block sand_quartz; + public static Block sand_mix; public static Block ash_digamma; public static Block glass_boron; public static Block glass_lead; @@ -729,10 +725,6 @@ public class ModBlocks { public static Block hadron_coil_chlorophyte; public static Block hadron_coil_mese; public static Block hadron_power; - public static Block hadron_power_10m; - public static Block hadron_power_100m; - public static Block hadron_power_1g; - public static Block hadron_power_10g; public static Block hadron_diode; public static Block hadron_analysis; public static Block hadron_analysis_glass; @@ -1641,6 +1633,7 @@ public class ModBlocks { steel_grate = new BlockGrate(Material.iron).setBlockName("steel_grate").setStepSound(ModSoundTypes.grate).setCreativeTab(MainRegistry.blockTab).setHardness(2.0F).setResistance(5.0F); steel_grate_wide = new BlockGrate(Material.iron).setBlockName("steel_grate_wide").setStepSound(ModSoundTypes.grate).setCreativeTab(MainRegistry.blockTab).setHardness(2.0F).setResistance(5.0F); + //TODO: dear god deco_pipe = new BlockPipe(Material.iron, RefStrings.MODID + ":pipe_side", 0).setBlockName("deco_pipe").setStepSound(ModSoundTypes.grate).setCreativeTab(MainRegistry.blockTab).setHardness(2.0F).setResistance(5.0F).setBlockTextureName(RefStrings.MODID + ":pipe_top"); deco_pipe_rusted = new BlockPipe(Material.iron, RefStrings.MODID + ":pipe_side_rusty", 0).setBlockName("deco_pipe_rusted").setStepSound(ModSoundTypes.grate).setCreativeTab(MainRegistry.blockTab).setHardness(2.0F).setResistance(5.0F).setBlockTextureName(RefStrings.MODID + ":pipe_top_rusty"); deco_pipe_green = new BlockPipe(Material.iron, RefStrings.MODID + ":pipe_side_green", 0).setBlockName("deco_pipe_green").setStepSound(ModSoundTypes.grate).setCreativeTab(MainRegistry.blockTab).setHardness(2.0F).setResistance(5.0F).setBlockTextureName(RefStrings.MODID + ":pipe_top_green"); @@ -1673,11 +1666,7 @@ public class ModBlocks { fence_metal = new BlockMetalFence(Material.iron).setBlockName("fence_metal").setCreativeTab(MainRegistry.machineTab).setHardness(15.0F).setResistance(0.25F).setBlockTextureName(RefStrings.MODID + ":fence_metal"); ash_digamma = new BlockAshes(Material.sand).setBlockName("ash_digamma").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F).setResistance(150.0F).setBlockTextureName(RefStrings.MODID + ":ash_digamma"); - sand_boron = new BlockFalling(Material.sand).setBlockName("sand_boron").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":sand_boron"); - sand_lead = new BlockFalling(Material.sand).setBlockName("sand_lead").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":sand_lead"); - sand_uranium = new BlockFalling(Material.sand).setBlockName("sand_uranium").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":sand_uranium"); - sand_polonium = new BlockFalling(Material.sand).setBlockName("sand_polonium").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":sand_polonium"); - sand_quartz = new BlockFalling(Material.sand).setBlockName("sand_quartz").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":sand_quartz"); + sand_mix = new BlockNTMSand(Material.sand).setBlockName("sand_mix").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F); glass_boron = new BlockNTMGlassCT(0, RefStrings.MODID + ":glass_boron", Material.glass).setBlockName("glass_boron").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.machineTab).setHardness(0.3F); glass_lead = new BlockNTMGlassCT(0, RefStrings.MODID + ":glass_lead", Material.glass).setBlockName("glass_lead").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.machineTab).setHardness(0.3F); glass_uranium = new BlockNTMGlassCT(1, RefStrings.MODID + ":glass_uranium", Material.glass).setBlockName("glass_uranium").setLightLevel(5F/15F).setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.machineTab).setHardness(0.3F); @@ -1860,11 +1849,7 @@ public class ModBlocks { hadron_coil_starmetal = new BlockHadronCoil(Material.iron, 1000).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_starmetal").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_starmetal"); hadron_coil_chlorophyte = new BlockHadronCoil(Material.iron, 2500).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_chlorophyte").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_chlorophyte"); hadron_coil_mese = new BlockHadronCoil(Material.iron, 10000).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_mese").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_mese"); - hadron_power = new BlockHadronPower(Material.iron, 1000000L).setStepSound(Block.soundTypeMetal).setBlockName("hadron_power").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_power"); - hadron_power_10m = new BlockHadronPower(Material.iron, 10000000L).setStepSound(Block.soundTypeMetal).setBlockName("hadron_power_10m").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_power"); - hadron_power_100m = new BlockHadronPower(Material.iron, 100000000L).setStepSound(Block.soundTypeMetal).setBlockName("hadron_power_100m").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_power"); - hadron_power_1g = new BlockHadronPower(Material.iron, 1000000000L).setStepSound(Block.soundTypeMetal).setBlockName("hadron_power_1g").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_power"); - hadron_power_10g = new BlockHadronPower(Material.iron, 10000000000L).setStepSound(Block.soundTypeMetal).setBlockName("hadron_power_10g").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_power"); + hadron_power = new BlockHadronPower(Material.iron, 10000000000L).setStepSound(Block.soundTypeMetal).setBlockName("hadron_power").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_power"); hadron_diode = new BlockHadronDiode(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_diode").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null); hadron_analysis = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_analysis").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_analysis"); hadron_analysis_glass = new BlockNTMGlass(0, RefStrings.MODID + ":hadron_analysis_glass", Material.iron, true).setStepSound(Block.soundTypeMetal).setBlockName("hadron_analysis_glass").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_analysis_glass"); @@ -2838,6 +2823,13 @@ public class ModBlocks { GameRegistry.registerBlock(steel_grate, steel_grate.getUnlocalizedName()); register(steel_grate_wide); //register(scaffold_dynamic); + /* + * operation: pipe annihilation + * each pipe has three rotations, and there's four shapes, so in theory, we only need 12 metas + * which leaves color, but that's the least bad thing to break due to tile syncing issues, so we + * can handle that using tile entities. it's unlikely that we add new shapes or invent new spacial + * axis to align them to, so it's also the easiest to extend + */ GameRegistry.registerBlock(deco_pipe, ItemBlockBase.class, deco_pipe.getUnlocalizedName()); GameRegistry.registerBlock(deco_pipe_rusted, ItemBlockBase.class, deco_pipe_rusted.getUnlocalizedName()); GameRegistry.registerBlock(deco_pipe_green, ItemBlockBase.class, deco_pipe_green.getUnlocalizedName()); @@ -3003,11 +2995,7 @@ public class ModBlocks { //Sands, Glass GameRegistry.registerBlock(ash_digamma, ash_digamma.getUnlocalizedName()); - GameRegistry.registerBlock(sand_boron, sand_boron.getUnlocalizedName()); - GameRegistry.registerBlock(sand_lead, sand_lead.getUnlocalizedName()); - GameRegistry.registerBlock(sand_uranium, sand_uranium.getUnlocalizedName()); - GameRegistry.registerBlock(sand_polonium, sand_polonium.getUnlocalizedName()); - GameRegistry.registerBlock(sand_quartz, sand_quartz.getUnlocalizedName()); + register(sand_mix); GameRegistry.registerBlock(glass_boron, glass_boron.getUnlocalizedName()); GameRegistry.registerBlock(glass_lead, glass_lead.getUnlocalizedName()); GameRegistry.registerBlock(glass_uranium, glass_uranium.getUnlocalizedName()); @@ -3161,10 +3149,6 @@ public class ModBlocks { GameRegistry.registerBlock(hadron_coil_chlorophyte, ItemBlockBase.class, hadron_coil_chlorophyte.getUnlocalizedName()); GameRegistry.registerBlock(hadron_coil_mese, ItemBlockBase.class, hadron_coil_mese.getUnlocalizedName()); GameRegistry.registerBlock(hadron_power, hadron_power.getUnlocalizedName()); - GameRegistry.registerBlock(hadron_power_10m, hadron_power_10m.getUnlocalizedName()); - GameRegistry.registerBlock(hadron_power_100m, hadron_power_100m.getUnlocalizedName()); - GameRegistry.registerBlock(hadron_power_1g, hadron_power_1g.getUnlocalizedName()); - GameRegistry.registerBlock(hadron_power_10g, hadron_power_10g.getUnlocalizedName()); GameRegistry.registerBlock(hadron_diode, hadron_diode.getUnlocalizedName()); GameRegistry.registerBlock(hadron_analysis, hadron_analysis.getUnlocalizedName()); GameRegistry.registerBlock(hadron_analysis_glass, hadron_analysis_glass.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/blocks/generic/BlockNTMSand.java b/src/main/java/com/hbm/blocks/generic/BlockNTMSand.java new file mode 100644 index 000000000..7c788bdea --- /dev/null +++ b/src/main/java/com/hbm/blocks/generic/BlockNTMSand.java @@ -0,0 +1,79 @@ +package com.hbm.blocks.generic; + +import java.util.Locale; +import java.util.Random; + +import com.hbm.blocks.BlockEnumMulti; +import com.hbm.lib.RefStrings; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockFalling; +import net.minecraft.block.material.Material; +import net.minecraft.entity.item.EntityFallingBlock; +import net.minecraft.world.World; + +public class BlockNTMSand extends BlockEnumMulti { + + public BlockNTMSand(Material mat) { + super(mat, EnumSandType.class, true, true); + } + + @Override + public void onBlockAdded(World world, int x, int y, int z) { + world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world)); + } + + @Override + public void onNeighborBlockChange(World world, int x, int y, int z, Block b) { + world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world)); + } + + @Override + public void updateTick(World world, int x, int y, int z, Random rand) { + if(!world.isRemote) { + this.fall(world, x, y, z); + } + } + + private void fall(World world, int x, int y, int z) { + if(BlockFalling.func_149831_e(world, x, y - 1, z) && y >= 0) { + byte b0 = 32; + + if(!BlockFalling.fallInstantly && world.checkChunksExist(x - b0, y - b0, z - b0, x + b0, y + b0, z + b0)) { + if(!world.isRemote) { + EntityFallingBlock entityfallingblock = new EntityFallingBlock(world, x + 0.5, y + 0.5, z + 0.5, this, world.getBlockMetadata(x, y, z)); + world.spawnEntityInWorld(entityfallingblock); + } + } else { + world.setBlockToAir(x, y, z); + + while(BlockFalling.func_149831_e(world, x, y - 1, z) && y > 0) { + --y; + } + + if(y > 0) { + world.setBlock(x, y, z, this); + } + } + } + } + + @Override + public int tickRate(World p_149738_1_) { + return 2; + } + + @Override + public String getTextureMultiName(Enum num) { + return RefStrings.MODID + ":sand_" + num.name().toLowerCase(Locale.US); + } + + @Override + public String getUnlocalizedMultiName(Enum num) { + return "tile.sand_" + num.name().toLowerCase(Locale.US); + } + + public static enum EnumSandType { + BORON, LEAD, URANIUM, POLONIUM, QUARTZ + } +} diff --git a/src/main/java/com/hbm/blocks/machine/rbmk/RBMKDebrisBurning.java b/src/main/java/com/hbm/blocks/machine/rbmk/RBMKDebrisBurning.java index edc485dcb..7a39fab78 100644 --- a/src/main/java/com/hbm/blocks/machine/rbmk/RBMKDebrisBurning.java +++ b/src/main/java/com/hbm/blocks/machine/rbmk/RBMKDebrisBurning.java @@ -3,6 +3,7 @@ package com.hbm.blocks.machine.rbmk; import java.util.Random; import com.hbm.blocks.ModBlocks; +import com.hbm.blocks.generic.BlockNTMSand.EnumSandType; import com.hbm.handler.threading.PacketThreading; import com.hbm.main.MainRegistry; import com.hbm.packet.toclient.AuxParticlePacketNT; @@ -38,6 +39,7 @@ public class RBMKDebrisBurning extends RBMKDebris { ForgeDirection dir = ForgeDirection.getOrientation(rand.nextInt(6)); Block block = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ); + int meta = world.getBlockMetadata(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ); if(rand.nextInt(10) == 0 && block == Blocks.air) { world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.gas_meltdown); @@ -45,7 +47,7 @@ public class RBMKDebrisBurning extends RBMKDebris { //Foam helps stop the fire; Boron smothers it. 1.66% chance every 100-120 seconds for one side int chance = block == ModBlocks.foam_layer || block == ModBlocks.block_foam || - block == ModBlocks.sand_boron_layer || block == ModBlocks.sand_boron ? 10 : 100; + block == ModBlocks.sand_boron_layer || (block == ModBlocks.sand_mix && meta == EnumSandType.BORON.ordinal()) ? 10 : 100; if(rand.nextInt(chance) == 0) { world.setBlock(x, y, z, ModBlocks.pribris); diff --git a/src/main/java/com/hbm/blocks/machine/rbmk/RBMKDebrisRadiating.java b/src/main/java/com/hbm/blocks/machine/rbmk/RBMKDebrisRadiating.java index aad8cce75..b10f740a0 100644 --- a/src/main/java/com/hbm/blocks/machine/rbmk/RBMKDebrisRadiating.java +++ b/src/main/java/com/hbm/blocks/machine/rbmk/RBMKDebrisRadiating.java @@ -4,6 +4,7 @@ import java.util.List; import java.util.Random; import com.hbm.blocks.ModBlocks; +import com.hbm.blocks.generic.BlockNTMSand.EnumSandType; import com.hbm.handler.threading.PacketThreading; import com.hbm.items.ModItems; import com.hbm.packet.toclient.AuxParticlePacketNT; @@ -50,13 +51,14 @@ public class RBMKDebrisRadiating extends RBMKDebrisBurning { ForgeDirection dir = ForgeDirection.getOrientation(rand.nextInt(6)); Block block = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ); + int m = world.getBlockMetadata(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ); if(rand.nextInt(10) == 0 && block == Blocks.air) { world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.gas_meltdown); } //Boron sand helps stop the fission reaction; 0.66% chance every 20-40 ticks for one side - int chance = block == ModBlocks.sand_boron_layer || block == ModBlocks.sand_boron ? 25 : 1000; + int chance = block == ModBlocks.sand_boron_layer || (block == ModBlocks.sand_mix && m == EnumSandType.BORON.ordinal()) ? 25 : 1000; if(rand.nextInt(chance) == 0) { diff --git a/src/main/java/com/hbm/crafting/SmeltingRecipes.java b/src/main/java/com/hbm/crafting/SmeltingRecipes.java index ef55934b8..89714db24 100644 --- a/src/main/java/com/hbm/crafting/SmeltingRecipes.java +++ b/src/main/java/com/hbm/crafting/SmeltingRecipes.java @@ -3,6 +3,7 @@ package com.hbm.crafting; import com.hbm.blocks.ModBlocks; import com.hbm.blocks.BlockEnums.EnumMeteorType; import com.hbm.blocks.generic.BlockNTMFlower.EnumFlowerType; +import com.hbm.blocks.generic.BlockNTMSand.EnumSandType; import com.hbm.inventory.OreDictManager.DictFrame; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemArcElectrode.EnumElectrodeType; @@ -125,12 +126,12 @@ public class SmeltingRecipes { GameRegistry.addSmelting(new ItemStack(Blocks.gravel, 1), new ItemStack(Blocks.cobblestone, 1), 0.0F); GameRegistry.addSmelting(new ItemStack(ModBlocks.gravel_obsidian), new ItemStack(Blocks.obsidian), 0.0F); GameRegistry.addSmelting(new ItemStack(ModBlocks.gravel_diamond), new ItemStack(Items.diamond), 3.0F); - GameRegistry.addSmelting(new ItemStack(ModBlocks.sand_uranium), new ItemStack(ModBlocks.glass_uranium), 0.25F); - GameRegistry.addSmelting(new ItemStack(ModBlocks.sand_polonium), new ItemStack(ModBlocks.glass_polonium), 0.75F); + GameRegistry.addSmelting(new ItemStack(ModBlocks.sand_mix, 1, EnumSandType.URANIUM.ordinal()), new ItemStack(ModBlocks.glass_uranium), 0.25F); + GameRegistry.addSmelting(new ItemStack(ModBlocks.sand_mix, 1, EnumSandType.POLONIUM.ordinal()), new ItemStack(ModBlocks.glass_polonium), 0.75F); GameRegistry.addSmelting(new ItemStack(ModBlocks.waste_trinitite), new ItemStack(ModBlocks.glass_trinitite), 0.25F); GameRegistry.addSmelting(new ItemStack(ModBlocks.waste_trinitite_red), new ItemStack(ModBlocks.glass_trinitite), 0.25F); - GameRegistry.addSmelting(new ItemStack(ModBlocks.sand_boron), new ItemStack(ModBlocks.glass_boron), 0.25F); - GameRegistry.addSmelting(new ItemStack(ModBlocks.sand_lead), new ItemStack(ModBlocks.glass_lead), 0.25F); + GameRegistry.addSmelting(new ItemStack(ModBlocks.sand_mix, 1, EnumSandType.BORON.ordinal()), new ItemStack(ModBlocks.glass_boron), 0.25F); + GameRegistry.addSmelting(new ItemStack(ModBlocks.sand_mix, 1, EnumSandType.LEAD.ordinal()), new ItemStack(ModBlocks.glass_lead), 0.25F); GameRegistry.addSmelting(new ItemStack(ModBlocks.ash_digamma), new ItemStack(ModBlocks.glass_ash), 10F); GameRegistry.addSmelting(new ItemStack(ModBlocks.basalt), new ItemStack(ModBlocks.basalt_smooth), 0.1F); diff --git a/src/main/java/com/hbm/crafting/WeaponRecipes.java b/src/main/java/com/hbm/crafting/WeaponRecipes.java index 054f68b29..8f5ff1685 100644 --- a/src/main/java/com/hbm/crafting/WeaponRecipes.java +++ b/src/main/java/com/hbm/crafting/WeaponRecipes.java @@ -1,6 +1,7 @@ package com.hbm.crafting; import com.hbm.blocks.ModBlocks; +import com.hbm.blocks.generic.BlockNTMSand.EnumSandType; import com.hbm.inventory.OreDictManager; import com.hbm.inventory.OreDictManager.DictFrame; import com.hbm.inventory.fluid.Fluids; @@ -254,7 +255,7 @@ public class WeaponRecipes { //Fire Extingusisher Tanks CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_fireext, 1), new Object[] { " P ", "BDB", " P ", 'P', STEEL.plate(), 'B', STEEL.bolt(), 'D', new ItemStack(ModItems.fluid_tank_full, 1, Fluids.WATER.getID()) }); CraftingManager.addRecipeAuto(ModItems.ammo_fireext.stackFromEnum(AmmoFireExt.FOAM), new Object[] { " N ", "NFN", " N ", 'N', KNO.dust(), 'F', ModItems.ammo_fireext }); - CraftingManager.addRecipeAuto(ModItems.ammo_fireext.stackFromEnum(AmmoFireExt.SAND), new Object[] { "NNN", "NFN", "NNN", 'N', ModBlocks.sand_boron, 'F', ModItems.ammo_fireext }); + CraftingManager.addRecipeAuto(ModItems.ammo_fireext.stackFromEnum(AmmoFireExt.SAND), new Object[] { "NNN", "NFN", "NNN", 'N', new ItemStack(ModBlocks.sand_mix, 1, EnumSandType.BORON.ordinal()), 'F', ModItems.ammo_fireext }); //Grenades CraftingManager.addRecipeAuto(new ItemStack(ModItems.grenade_generic, 4), new Object[] { "RS ", "ITI", " I ", 'I', IRON.plate(), 'R', MINGRADE.wireFine(), 'S', STEEL.plate(), 'T', Item.getItemFromBlock(Blocks.tnt) }); diff --git a/src/main/java/com/hbm/inventory/RecipesCommon.java b/src/main/java/com/hbm/inventory/RecipesCommon.java index fd7ed9d36..d13ca1dcf 100644 --- a/src/main/java/com/hbm/inventory/RecipesCommon.java +++ b/src/main/java/com/hbm/inventory/RecipesCommon.java @@ -159,6 +159,11 @@ public class RecipesCommon { this.meta = meta; } + public ComparableStack(Block item, int stacksize, Enum meta) { + this(item, stacksize); + this.meta = meta.ordinal(); + } + public ComparableStack(Item item, int stacksize) { this(item); this.stacksize = stacksize; diff --git a/src/main/java/com/hbm/inventory/container/ContainerMachineArcFurnaceLarge.java b/src/main/java/com/hbm/inventory/container/ContainerMachineArcFurnaceLarge.java index 05109bac9..92258b11a 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerMachineArcFurnaceLarge.java +++ b/src/main/java/com/hbm/inventory/container/ContainerMachineArcFurnaceLarge.java @@ -31,15 +31,17 @@ public class ContainerMachineArcFurnaceLarge extends Container { this.addSlotToContainer(new Slot(tile, 4, 152, 108)); //Inputs for(int i = 0; i < 4; i++) for(int j = 0; j < 5; j++) this.addSlotToContainer(new SlotArcFurnace(tile, 5 + j + i * 5, 44 + j * 18, 54 + i * 18)); + //IO + for(int i = 0; i < 5; i++) this.addSlotToContainer(new SlotNonRetarded(tile, i + 25, 44 + i * 18, 129)); for(int i = 0; i < 3; i++) { for(int j = 0; j < 9; j++) { - this.addSlotToContainer(new Slot(playerInv, j + i * 9 + 9, 8 + j * 18, 158 + i * 18)); + this.addSlotToContainer(new Slot(playerInv, j + i * 9 + 9, 8 + j * 18, 174 + i * 18)); } } for(int i = 0; i < 9; i++) { - this.addSlotToContainer(new Slot(playerInv, i, 8 + i * 18, 216)); + this.addSlotToContainer(new Slot(playerInv, i, 8 + i * 18, 232)); } } @@ -52,8 +54,8 @@ public class ContainerMachineArcFurnaceLarge extends Container { ItemStack stack = slot.getStack(); rStack = stack.copy(); - if(index <= 24) { - if(!this.mergeItemStack(stack, 25, this.inventorySlots.size(), true)) { + if(index <= 29) { + if(!this.mergeItemStack(stack, 30, this.inventorySlots.size(), true)) { return null; } } else { @@ -65,8 +67,7 @@ public class ContainerMachineArcFurnaceLarge extends Container { } else if(rStack.getItem() instanceof ItemMachineUpgrade) { if(!InventoryUtil.mergeItemStack(this.inventorySlots, stack, 4, 5, false)) return null; } else { - stack = furnace.distributeInput(stack, true); - if(stack != null && stack.stackSize == rStack.stackSize) return null; + if(!InventoryUtil.mergeItemStack(this.inventorySlots, stack, 25, 30, false)) return null; } } diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachineArcFurnaceLarge.java b/src/main/java/com/hbm/inventory/gui/GUIMachineArcFurnaceLarge.java index 5c8f9e55c..701b09e2c 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachineArcFurnaceLarge.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachineArcFurnaceLarge.java @@ -35,7 +35,7 @@ public class GUIMachineArcFurnaceLarge extends GuiInfoContainer { this.arc = arc; this.xSize = 176; - this.ySize = 240; + this.ySize = 256; } @Override diff --git a/src/main/java/com/hbm/inventory/recipes/ArcFurnaceRecipes.java b/src/main/java/com/hbm/inventory/recipes/ArcFurnaceRecipes.java index fae8f617f..dbff3e776 100644 --- a/src/main/java/com/hbm/inventory/recipes/ArcFurnaceRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/ArcFurnaceRecipes.java @@ -14,6 +14,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.stream.JsonWriter; import com.hbm.blocks.ModBlocks; +import com.hbm.blocks.generic.BlockNTMSand.EnumSandType; import com.hbm.inventory.OreDictManager; import com.hbm.inventory.RecipesCommon.AStack; import com.hbm.inventory.RecipesCommon.ComparableStack; @@ -60,7 +61,7 @@ public class ArcFurnaceRecipes extends SerializableRecipe { register(new OreDictStack(ASBESTOS.dust()), new ArcFurnaceRecipe().solid(new ItemStack(ModItems.nugget_silicon, 4)) .fluid(new MaterialStack(Mats.MAT_SILICON, MaterialShapes.INGOT.q(1, 2)))); register(new OreDictStack(ASBESTOS.block()), new ArcFurnaceRecipe().solid(new ItemStack(ModItems.nugget_silicon, 40)) .fluid(new MaterialStack(Mats.MAT_SILICON, MaterialShapes.INGOT.q(9, 2)))); - register(new ComparableStack(ModBlocks.sand_quartz), new ArcFurnaceRecipe().solid(new ItemStack(ModBlocks.glass_quartz))); + register(new ComparableStack(ModBlocks.sand_mix, 1, EnumSandType.QUARTZ), new ArcFurnaceRecipe().solid(new ItemStack(ModBlocks.glass_quartz))); register(new OreDictStack(BORAX.dust()), new ArcFurnaceRecipe().solid(new ItemStack(ModItems.powder_boron_tiny, 3)).fluid(new MaterialStack(Mats.MAT_BORON, MaterialShapes.NUGGET.q(3)))); for(BedrockOreType type : BedrockOreType.values()) { diff --git a/src/main/java/com/hbm/inventory/recipes/ChemplantRecipes.java b/src/main/java/com/hbm/inventory/recipes/ChemplantRecipes.java index 487d51983..6cbb878dc 100644 --- a/src/main/java/com/hbm/inventory/recipes/ChemplantRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/ChemplantRecipes.java @@ -270,14 +270,6 @@ public class ChemplantRecipes extends SerializableRecipe { new ItemStack(ModItems.gem_tantalium), new ItemStack(ModItems.dust, 3)) .outputFluids(new FluidStack(Fluids.WATER, 250))); - recipes.add(new ChemRecipe(68, "VIT_LIQUID", 100) - .inputItems(new ComparableStack(ModBlocks.sand_lead)) - .inputFluids(new FluidStack(Fluids.WASTEFLUID, 1000)) - .outputItems(new ItemStack(ModItems.nuclear_waste_vitrified))); - recipes.add(new ChemRecipe(69, "VIT_GAS", 100) - .inputItems(new ComparableStack(ModBlocks.sand_lead)) - .inputFluids(new FluidStack(Fluids.WASTEGAS, 1000)) - .outputItems(new ItemStack(ModItems.nuclear_waste_vitrified))); recipes.add(new ChemRecipe(88, "LUBRICANT", 20) .inputFluids( new FluidStack(Fluids.HEATINGOIL, 500), diff --git a/src/main/java/com/hbm/inventory/recipes/CrystallizerRecipes.java b/src/main/java/com/hbm/inventory/recipes/CrystallizerRecipes.java index 0d7ad1594..7108abae4 100644 --- a/src/main/java/com/hbm/inventory/recipes/CrystallizerRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/CrystallizerRecipes.java @@ -11,6 +11,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.stream.JsonWriter; import com.hbm.blocks.ModBlocks; +import com.hbm.blocks.generic.BlockNTMSand.EnumSandType; import com.hbm.handler.imc.IMCCrystallizer; import com.hbm.inventory.FluidStack; import com.hbm.inventory.OreDictManager; @@ -220,7 +221,7 @@ public class CrystallizerRecipes extends SerializableRecipe { registerRecipe(new ComparableStack(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.PARAFFIN)), new CrystallizerRecipe(new ItemStack(ModItems.pill_red), 200), new FluidStack(Fluids.ESTRADIOL, 250)); registerRecipe(KEY_SAND, new CrystallizerRecipe(Blocks.clay, 20), new FluidStack(Fluids.COLLOID, 1_000)); - registerRecipe(new ComparableStack(ModBlocks.sand_quartz), new CrystallizerRecipe(new ItemStack(ModItems.ball_dynamite, 16), 20), new FluidStack(Fluids.NITROGLYCERIN, 1_000)); + registerRecipe(new ComparableStack(ModBlocks.sand_mix, 1, EnumSandType.QUARTZ), new CrystallizerRecipe(new ItemStack(ModItems.ball_dynamite, 16), 20), new FluidStack(Fluids.NITROGLYCERIN, 1_000)); registerRecipe(NETHERQUARTZ.dust(), new CrystallizerRecipe(new ItemStack(ModItems.ball_dynamite, 4), 20), new FluidStack(Fluids.NITROGLYCERIN, 250)); /// COMPAT CERTUS QUARTZ /// diff --git a/src/main/java/com/hbm/inventory/recipes/PUREXRecipes.java b/src/main/java/com/hbm/inventory/recipes/PUREXRecipes.java index e5fecfa23..7af2b9299 100644 --- a/src/main/java/com/hbm/inventory/recipes/PUREXRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/PUREXRecipes.java @@ -5,6 +5,7 @@ import static com.hbm.inventory.OreDictManager.*; import java.util.ArrayList; import com.hbm.blocks.ModBlocks; +import com.hbm.blocks.generic.BlockNTMSand.EnumSandType; import com.hbm.inventory.FluidStack; import com.hbm.inventory.RecipesCommon.ComparableStack; import com.hbm.inventory.RecipesCommon.OreDictStack; @@ -460,17 +461,17 @@ public class PUREXRecipes extends GenericRecipes { /// Vitrification this.register(new GenericRecipe("purex.vitliquid").setup(100, vitrification) - .inputItems(new ComparableStack(ModBlocks.sand_lead)) + .inputItems(new ComparableStack(ModBlocks.sand_mix, 1, EnumSandType.LEAD)) .inputFluids(new FluidStack(Fluids.WASTEFLUID, 1_000)) .outputItems(new ItemStack(ModItems.nuclear_waste_vitrified))); this.register(new GenericRecipe("purex.vitgaseous").setup(100, vitrification) - .inputItems(new ComparableStack(ModBlocks.sand_lead)) + .inputItems(new ComparableStack(ModBlocks.sand_mix, 1, EnumSandType.LEAD)) .inputFluids(new FluidStack(Fluids.WASTEGAS, 1_000)) .outputItems(new ItemStack(ModItems.nuclear_waste_vitrified))); this.register(new GenericRecipe("purex.vitsolid").setup(300, vitrification) - .inputItems(new ComparableStack(ModBlocks.sand_lead), new ComparableStack(ModItems.nuclear_waste, 4)) + .inputItems(new ComparableStack(ModBlocks.sand_mix, 1, EnumSandType.LEAD), new ComparableStack(ModItems.nuclear_waste, 4)) .outputItems(new ItemStack(ModItems.nuclear_waste_vitrified, 4))); // Schrabidium diff --git a/src/main/java/com/hbm/items/special/ItemBedrockOreBase.java b/src/main/java/com/hbm/items/special/ItemBedrockOreBase.java index 2635d46c3..1077e02ea 100644 --- a/src/main/java/com/hbm/items/special/ItemBedrockOreBase.java +++ b/src/main/java/com/hbm/items/special/ItemBedrockOreBase.java @@ -41,7 +41,7 @@ public class ItemBedrockOreBase extends Item { NBTTagCompound data = stack.getTagCompound(); for(BedrockOreType type : BedrockOreType.values()) { - data.setDouble(type.suffix, getOreLevel(x, z, type)); + data.setDouble(type.suffix, getOreLevel(x, z, type) * mult); } } diff --git a/src/main/java/com/hbm/items/tool/ItemOreDensityScanner.java b/src/main/java/com/hbm/items/tool/ItemOreDensityScanner.java index 5fd3ac58f..8ccbe4163 100644 --- a/src/main/java/com/hbm/items/tool/ItemOreDensityScanner.java +++ b/src/main/java/com/hbm/items/tool/ItemOreDensityScanner.java @@ -47,6 +47,7 @@ public class ItemOreDensityScanner extends Item { if(density <= 0.1) return EnumChatFormatting.DARK_RED; if(density <= 0.35) return EnumChatFormatting.RED; if(density <= 0.75) return EnumChatFormatting.GOLD; + if(density > 2) return EnumChatFormatting.LIGHT_PURPLE; // only for BO items that got mined with fortune if(density >= 1.9) return EnumChatFormatting.AQUA; if(density >= 1.65) return EnumChatFormatting.BLUE; if(density >= 1.25) return EnumChatFormatting.GREEN; diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactoryTool.java b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactoryTool.java index 3237bd1d0..edbc60f20 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactoryTool.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactoryTool.java @@ -5,6 +5,7 @@ import java.util.function.BiFunction; import java.util.function.Consumer; import com.hbm.blocks.ModBlocks; +import com.hbm.blocks.generic.BlockNTMSand.EnumSandType; import com.hbm.entity.projectile.EntityBulletBaseMK4; import com.hbm.explosion.vanillant.ExplosionVNT; import com.hbm.explosion.vanillant.standard.BlockAllocatorBulkie; @@ -168,7 +169,7 @@ public class XFactoryTool { } else { int meta = bullet.worldObj.getBlockMetadata(ix, iy, iz); if(meta < 6) bullet.worldObj.setBlockMetadataWithNotify(ix, iy, iz, meta + 1, 3); - else bullet.worldObj.setBlock(ix, iy, iz, ModBlocks.sand_boron); + else bullet.worldObj.setBlock(ix, iy, iz, ModBlocks.sand_mix, EnumSandType.BORON.ordinal(), 3); } if(b.getMaterial() == Material.fire) bullet.worldObj.playSoundEffect(bullet.posX, bullet.posY, bullet.posZ, "random.fizz", 1.0F, 1.5F + bullet.worldObj.rand.nextFloat() * 0.5F); } @@ -180,7 +181,8 @@ public class XFactoryTool { NBTTagCompound data = new NBTTagCompound(); data.setString("type", "vanillaExt"); data.setString("mode", "blockdust"); - data.setInteger("block", Block.getIdFromBlock(ModBlocks.sand_boron)); + data.setInteger("block", Block.getIdFromBlock(ModBlocks.sand_mix)); + data.setInteger("meta", EnumSandType.BORON.ordinal()); data.setDouble("posX", bullet.posX); data.setDouble("posY", bullet.posY); data.setDouble("posZ", bullet.posZ); data.setDouble("mX", bullet.motionX + bullet.worldObj.rand.nextGaussian() * 0.1); data.setDouble("mY", bullet.motionY - 0.2 + bullet.worldObj.rand.nextGaussian() * 0.1); diff --git a/src/main/java/com/hbm/lib/RefStrings.java b/src/main/java/com/hbm/lib/RefStrings.java index aa64640ec..f39be6a59 100644 --- a/src/main/java/com/hbm/lib/RefStrings.java +++ b/src/main/java/com/hbm/lib/RefStrings.java @@ -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 (5490)"; + public static final String VERSION = "1.0.27 BETA (5491)"; //HBM's Beta Naming Convention: //V T (X) //V -> next release version diff --git a/src/main/java/com/hbm/main/ClientProxy.java b/src/main/java/com/hbm/main/ClientProxy.java index f12e1af29..c45044797 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -1197,7 +1197,8 @@ public class ClientProxy extends ServerProxy { if("blockdust".equals(data.getString("mode"))) { Block b = Block.getBlockById(data.getInteger("block")); - fx = new net.minecraft.client.particle.EntityBlockDustFX(world, x, y, z, mX, mY + 0.2, mZ, b, 0); + int m = data.getByte("meta"); + fx = new net.minecraft.client.particle.EntityBlockDustFX(world, x, y, z, mX, mY + 0.2, mZ, b, m); ReflectionHelper.setPrivateValue(EntityFX.class, fx, 50 + rand.nextInt(50), "particleMaxAge", "field_70547_e"); } diff --git a/src/main/java/com/hbm/main/CraftingManager.java b/src/main/java/com/hbm/main/CraftingManager.java index c1415162d..c2820b3ba 100644 --- a/src/main/java/com/hbm/main/CraftingManager.java +++ b/src/main/java/com/hbm/main/CraftingManager.java @@ -7,6 +7,7 @@ import com.hbm.blocks.generic.BlockConcreteColoredExt.EnumConcreteType; import com.hbm.blocks.generic.BlockGenericStairs; import com.hbm.blocks.generic.BlockMultiSlab; import com.hbm.blocks.generic.BlockNTMFlower.EnumFlowerType; +import com.hbm.blocks.generic.BlockNTMSand.EnumSandType; import com.hbm.blocks.generic.BlockPlushie.PlushieType; import com.hbm.blocks.generic.BlockWoodStructure.EnumWoodStructure; import com.hbm.config.GeneralConfig; @@ -729,11 +730,11 @@ public class CraftingManager { addShapelessAuto(new ItemStack(ModBlocks.waste_trinitite), new Object[] { new ItemStack(Blocks.sand, 1, 0), ModItems.trinitite }); addShapelessAuto(new ItemStack(ModBlocks.waste_trinitite_red), new Object[] { new ItemStack(Blocks.sand, 1, 1), ModItems.trinitite }); - addShapelessAuto(new ItemStack(ModBlocks.sand_uranium, 8), new Object[] { "sand", "sand", "sand", "sand", "sand", "sand", "sand", "sand", U.dust() }); - addShapelessAuto(new ItemStack(ModBlocks.sand_polonium, 8), new Object[] { "sand", "sand", "sand", "sand", "sand", "sand", "sand", "sand", PO210.dust() }); - addShapelessAuto(new ItemStack(ModBlocks.sand_boron, 8), new Object[] { "sand", "sand", "sand", "sand", "sand", "sand", "sand", "sand", B.dust() }); - addShapelessAuto(new ItemStack(ModBlocks.sand_lead, 8), new Object[] { "sand", "sand", "sand", "sand", "sand", "sand", "sand", "sand", PB.dust() }); - addShapelessAuto(new ItemStack(ModBlocks.sand_quartz, 1), new Object[] { "sand", "sand", NETHERQUARTZ.dust(), NETHERQUARTZ.dust() }); + addShapelessAuto(new ItemStack(ModBlocks.sand_mix, 8, EnumSandType.URANIUM.ordinal()), new Object[] { "sand", "sand", "sand", "sand", "sand", "sand", "sand", "sand", U.dust() }); + addShapelessAuto(new ItemStack(ModBlocks.sand_mix, 8, EnumSandType.POLONIUM.ordinal()), new Object[] { "sand", "sand", "sand", "sand", "sand", "sand", "sand", "sand", PO210.dust() }); + addShapelessAuto(new ItemStack(ModBlocks.sand_mix, 8, EnumSandType.BORON.ordinal()), new Object[] { "sand", "sand", "sand", "sand", "sand", "sand", "sand", "sand", B.dust() }); + addShapelessAuto(new ItemStack(ModBlocks.sand_mix, 8, EnumSandType.LEAD.ordinal()), new Object[] { "sand", "sand", "sand", "sand", "sand", "sand", "sand", "sand", PB.dust() }); + addShapelessAuto(new ItemStack(ModBlocks.sand_mix, 1, EnumSandType.QUARTZ.ordinal()), new Object[] { "sand", "sand", NETHERQUARTZ.dust(), NETHERQUARTZ.dust() }); addRecipeAuto(new ItemStack(ModItems.rune_blank, 1), new Object[] { "PSP", "SDS", "PSP", 'P', ModItems.powder_magic, 'S', STAR.ingot(), 'D', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BISMOID) }); addShapelessAuto(new ItemStack(ModItems.rune_isa, 1), new Object[] { ModItems.rune_blank, ModItems.powder_spark_mix, ModItems.singularity_counter_resonant }); diff --git a/src/main/java/com/hbm/main/MainRegistry.java b/src/main/java/com/hbm/main/MainRegistry.java index edbd76d7c..3c70beff3 100644 --- a/src/main/java/com/hbm/main/MainRegistry.java +++ b/src/main/java/com/hbm/main/MainRegistry.java @@ -1432,6 +1432,15 @@ public class MainRegistry { ignoreMappings.add("hbm:item.t45_kit"); ignoreMappings.add("hbm:item.fusion_core_infinite"); ignoreMappings.add("hbm:item.fluid_identifier"); + ignoreMappings.add("hbm:tile.sand_boron"); + ignoreMappings.add("hbm:tile.sand_lead"); + ignoreMappings.add("hbm:tile.sand_uranium"); + ignoreMappings.add("hbm:tile.sand_polonium"); + ignoreMappings.add("hbm:tile.sand_quartz"); + ignoreMappings.add("hbm:tile.hadron_power_10m"); + ignoreMappings.add("hbm:tile.hadron_power_100m"); + ignoreMappings.add("hbm:tile.hadron_power_1g"); + ignoreMappings.add("hbm:tile.hadron_power_10g"); /// REMAP /// remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineArcFurnaceLarge.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineArcFurnaceLarge.java index 6968f8b1a..f39a8c10e 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineArcFurnaceLarge.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineArcFurnaceLarge.java @@ -28,6 +28,7 @@ import com.hbm.sound.AudioWrapper; import com.hbm.tileentity.IGUIProvider; import com.hbm.tileentity.IUpgradeInfoProvider; import com.hbm.tileentity.TileEntityMachineBase; +import com.hbm.util.BobMathUtil; import com.hbm.util.CrucibleUtil; import com.hbm.util.ItemStackUtil; import com.hbm.util.fauxpointtwelve.DirPos; @@ -83,7 +84,7 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase impl public List liquids = new ArrayList(); public TileEntityMachineArcFurnaceLarge() { - super(25); + super(30); } @Override @@ -112,6 +113,8 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase impl this.isProgressing = false; for(DirPos pos : getConPos()) this.trySubscribe(worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); + + if(lid == 1) loadIngredients(); if(power > 0) { @@ -266,6 +269,46 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase impl } } } + + /** Moves items from the input queue to the main grid */ + public void loadIngredients() { + + boolean markDirty = false; + + for(int q /* queue */ = 25; q < 30; q++) { + if(slots[q] == null) continue; + ArcFurnaceRecipe recipe = ArcFurnaceRecipes.getOutput(slots[q], this.liquidMode); + if(recipe == null) continue; + + // add to existing stacks + for(int i /* ingredient */ = 5; i < 25; i++) { + if(slots[i] == null) continue; + int max = this.getMaxInputSize(); + if(!slots[q].isItemEqual(slots[i])) continue; + int toMove = BobMathUtil.min(slots[i].getMaxStackSize() - slots[i].stackSize, slots[q].stackSize, max - slots[i].stackSize); + if(toMove > 0) { + this.decrStackSize(q, toMove); + slots[i].stackSize += toMove; + markDirty = true; + } + if(slots[q] == null) break; + } + + // add to empty slot + if(slots[q] != null) for(int i /* ingredient */ = 5; i < 25; i++) { + if(slots[i] != null) continue; + int max = this.getMaxInputSize(); + int toMove = Math.min(max, slots[q].stackSize); + slots[i] = slots[q].copy(); + slots[i].stackSize = toMove; + this.decrStackSize(q, toMove); + markDirty = true; + if(slots[q] == null) break; + } + } + + if(markDirty) this.markDirty(); + } public void decideElectrodeState() { for(int i = 0; i < 3; i++) { @@ -342,27 +385,19 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase impl @Override public int[] getAccessibleSlotsFromSide(int side) { - return new int[] { 0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}; + return new int[] { + 0, 1, 2, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29}; } @Override public boolean canInsertItem(int slot, ItemStack stack, int side) { - if(lid <= 0) return false; - if(slot < 3) return stack.getItem() == ModItems.arc_electrode; - if(slot > 4) { + if(slot < 3) return lid <= 0 && stack.getItem() == ModItems.arc_electrode; + if(slot >= 25) { ArcFurnaceRecipe recipe = ArcFurnaceRecipes.getOutput(stack, this.liquidMode); if(recipe == null) return false; - if(liquidMode) { - 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; - sta += stack.stackSize; - return sta * recipe.solidOutput.stackSize <= recipe.solidOutput.getMaxStackSize() && sta <= getMaxInputSize(); - } + return true; } return false; } @@ -385,7 +420,8 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase impl @Override public boolean canExtractItem(int slot, ItemStack stack, int side) { if(slot < 3) return lid >= 1 && stack.getItem() != ModItems.arc_electrode; - if(slot > 4) return lid > 0 && ArcFurnaceRecipes.getOutput(stack, this.liquidMode) == null; + if(slot > 4 && slot < 25) return lid > 0 && ArcFurnaceRecipes.getOutput(stack, this.liquidMode) == null; + if(slot >= 25) return ArcFurnaceRecipes.getOutput(stack, this.liquidMode) == null; return false; } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineExcavator.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineExcavator.java index bdf313897..b15835f7e 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineExcavator.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineExcavator.java @@ -334,7 +334,7 @@ public class TileEntityMachineExcavator extends TileEntityMachineBase implements stacks.add(stack); if(stack.getItem() == ModItems.bedrock_ore_base) { - ItemBedrockOreBase.setOreAmount(stack, pos.getX(), pos.getZ(), 1D + this.getInstalledDrill().fortune * 0.25D); + ItemBedrockOreBase.setOreAmount(stack, pos.getX(), pos.getZ(), 1D + this.getInstalledDrill().fortune * 0.1D); } ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10); diff --git a/src/main/java/com/hbm/tileentity/network/TileEntityCraneInserter.java b/src/main/java/com/hbm/tileentity/network/TileEntityCraneInserter.java index 774f466c2..e8030e12a 100644 --- a/src/main/java/com/hbm/tileentity/network/TileEntityCraneInserter.java +++ b/src/main/java/com/hbm/tileentity/network/TileEntityCraneInserter.java @@ -5,8 +5,7 @@ import com.hbm.interfaces.IControlReceiver; import com.hbm.inventory.container.ContainerCraneInserter; import com.hbm.inventory.gui.GUICraneInserter; import com.hbm.tileentity.IGUIProvider; -import com.hbm.tileentity.TileEntityProxyBase; -import com.hbm.tileentity.machine.TileEntityMachineArcFurnaceLarge; +import com.hbm.util.Compat; import com.hbm.util.InventoryUtil; import cpw.mods.fml.relauncher.Side; @@ -43,13 +42,12 @@ public class TileEntityCraneInserter extends TileEntityCraneBase implements IGUI if(!worldObj.isRemote) { if(!this.worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)) {ForgeDirection outputSide = getOutputSide(); - TileEntity te = worldObj.getTileEntity(xCoord + outputSide.offsetX, yCoord + outputSide.offsetY, zCoord + outputSide.offsetZ); + TileEntity te = Compat.getTileStandard(worldObj, xCoord + outputSide.offsetX, yCoord + outputSide.offsetY, zCoord + outputSide.offsetZ); int[] access = null; if(te instanceof ISidedInventory) { ISidedInventory sided = (ISidedInventory) te; - //access = sided.getAccessibleSlotsFromSide(dir.ordinal()); access = InventoryUtil.masquerade(sided, outputSide.getOpposite().ordinal()); } @@ -80,27 +78,12 @@ public class TileEntityCraneInserter extends TileEntityCraneBase implements IGUI if(stack != null) { stack = stack.copy(); - - int overshoot = 0; - if(te instanceof TileEntityProxyBase) te = ((TileEntityProxyBase) te).getTE(); // we can't get this far without some slots being exposed, so the result has to be compatible with IInventory anyway - if(te instanceof TileEntityMachineArcFurnaceLarge) { - int toInsert = Math.min(stack.stackSize, ((TileEntityMachineArcFurnaceLarge) te).getMaxInputSize()); - overshoot = stack.stackSize - toInsert; - stack.stackSize = toInsert; - } else { - stack.stackSize = 1; - } + stack.stackSize = 1; ItemStack ret = CraneInserter.addToInventory((IInventory) te, access, stack.copy(), outputSide.getOpposite().ordinal()); if(ret == null || ret.stackSize != stack.stackSize) { - slots[i] = ret; - if(slots[i] != null) { - slots[i].stackSize += overshoot; - } else if(overshoot > 0){ - slots[i] = stack.copy(); - slots[i].stackSize = overshoot; - } + this.decrStackSize(i, 1); this.markDirty(); didSomething = true; break; diff --git a/src/main/resources/assets/hbm/textures/gui/processing/gui_arc_furnace.png b/src/main/resources/assets/hbm/textures/gui/processing/gui_arc_furnace.png index 8a36a8cd3..05cc15f2e 100644 Binary files a/src/main/resources/assets/hbm/textures/gui/processing/gui_arc_furnace.png and b/src/main/resources/assets/hbm/textures/gui/processing/gui_arc_furnace.png differ