diff --git a/changelog b/changelog index 9bbc6c83e..67de8712b 100644 --- a/changelog +++ b/changelog @@ -4,7 +4,7 @@ * Can be used to quickly craft standard ammo types in the 2x2 crafting grid * Can also refill empty syringes, making stimpaks * Latex - * Made from crafting dandelions into dandelion milk, then smelting it + * Can be made from dandelions or from pressing jungle wood * Replaces insulator in many recipes where electrical insulation that is potentially made from brick doesn't make sense, like rubber gas masks, jackets, tools and so on * Latex is interchangable with rubber in all recipes where it's used, but not the other way round * The old insulator is now mainly used for electrical and heat insulation as well as PWR rods @@ -12,8 +12,25 @@ ## Changed * Light oil and cracked light oil can now be refomred into large quantities of aromatic hydrocarbons a well as some reformate gas * The painsaw ability no longer drops ammo and syringes, instead it drops nitra +* Radars have been completely rewritten + * Dots will now move smoothly across the screen, instead of jittering and being bound to the pixel grid + * Radars no longer use CPU-intensive full scans of the map, instead of using an optimized search for nearby scannable entities + * There's now a dedicated toggle for detecing artillery shells + * Radars now have a local area map that can be enabled + * The map scans up to 100 points per tick, the display can show 40,000 points + * The map will scan loaded chunks instantly, unloaded chunks have a limit of 5 chunk loads per tick to prevent excessive lag + * The chunk load limit can be adjusted in the machine config file + * The map will show terrain height between Y:50 and Y:128, anything outside that range is truncated +* The turbofan's afterburner now adds a 33% efficiency bonus for every level. This means that instead of the efficiency remaining constant between levels, a tier 3 upgrade will yield double efficiency. +* Reduced the flarestack's base energy efficiency +* Trenchmaster armor is now unbreakable +* The arc welder recipe for advanced circuits now uses simple insulator instead of gold dust +* The arc welder recipes for enhanced and advanced circuits now use only 100mB of fluid instead of 250mB ## Fixed * Fixed thorium bedrock ore using the wrong ore dict key, making it unable to be processed via centrifuge or acidizer * Fixed custom machine NEI slots going out of bounds after the third slot -* Fixed bismuth billets not being oredicted, making BFB PWR rods uncraftable \ No newline at end of file +* Fixed bismuth billets not being oredicted, making BFB PWR rods uncraftable +* Fixed missile chunkloading having rounding issues, sometimes causing them to get stuck in unloaded chunks while crossing chunk borders +* Fixed drones not being listed in the creative tabs +* Fixed pre-defined fluid duct items not being being able to be placed where replacable blocks are, eg. water \ No newline at end of file diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index b531674dd..f0b3ccb90 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -1728,8 +1728,8 @@ public class ModBlocks { mush = new BlockMush(Material.plants).setBlockName("mush").setCreativeTab(MainRegistry.blockTab).setLightLevel(0.5F).setStepSound(Block.soundTypeGrass).setBlockTextureName(RefStrings.MODID + ":mush"); mush_block = new BlockMushHuge(Material.plants).setBlockName("mush_block").setLightLevel(1.0F).setStepSound(Block.soundTypeGrass).setHardness(0.2F).setBlockTextureName(RefStrings.MODID + ":mush_block_skin"); mush_block_stem = new BlockMushHuge(Material.plants).setBlockName("mush_block_stem").setLightLevel(1.0F).setStepSound(Block.soundTypeGrass).setHardness(0.2F).setBlockTextureName(RefStrings.MODID + ":mush_block_stem"); - glyphid_base = new BlockBase(Material.coral).setBlockName("glyphid_base").setStepSound(Block.soundTypeCloth).setHardness(0.5F); - glyphid_spawner = new BlockGlyphidSpawner(Material.coral).setBlockName("glyphid_spawner").setStepSound(Block.soundTypeCloth).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":glyphid_base"); + glyphid_base = new BlockGlyphid(Material.coral).setBlockName("glyphid_base").setStepSound(Block.soundTypeCloth).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":glyphid_base"); + glyphid_spawner = new BlockGlyphidSpawner(Material.coral).setBlockName("glyphid_spawner").setStepSound(Block.soundTypeCloth).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":glyphid_eggs_alt"); plant_flower = new BlockNTMFlower().setBlockName("plant_flower").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeGrass).setHardness(0.0F); plant_tall = new BlockTallPlant().setBlockName("plant_tall").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeGrass).setHardness(0.0F); diff --git a/src/main/java/com/hbm/blocks/generic/BlockGlyphid.java b/src/main/java/com/hbm/blocks/generic/BlockGlyphid.java new file mode 100644 index 000000000..267624e28 --- /dev/null +++ b/src/main/java/com/hbm/blocks/generic/BlockGlyphid.java @@ -0,0 +1,43 @@ +package com.hbm.blocks.generic; + +import com.hbm.lib.RefStrings; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +public class BlockGlyphid extends Block { + + public IIcon[] icons = new IIcon[2]; + + public BlockGlyphid(Material mat) { + super(mat); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) { + long l = (long) (x * 3129871) ^ (long)y * 116129781L ^ (long)z; + l = l * l * 42317861L + l * 11L; + int i = (int)(l >> 16 & 3L); + return icons[(int)(Math.abs(i) % this.icons.length)]; + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) { + return icons[meta % this.icons.length]; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister reg) { + icons[0] = reg.registerIcon(RefStrings.MODID + ":glyphid_base"); + icons[1] = reg.registerIcon(RefStrings.MODID + ":glyphid_base_alt"); + } + +} diff --git a/src/main/java/com/hbm/crafting/MineralRecipes.java b/src/main/java/com/hbm/crafting/MineralRecipes.java index 49b00e0d4..ebd11b692 100644 --- a/src/main/java/com/hbm/crafting/MineralRecipes.java +++ b/src/main/java/com/hbm/crafting/MineralRecipes.java @@ -419,7 +419,7 @@ public class MineralRecipes { GameRegistry.addRecipe(new ItemStack(ModItems.egg_balefire, 1), new Object[] { "###", "###", "###", '#', ModItems.egg_balefire_shard }); GameRegistry.addRecipe(new ItemStack(ModItems.egg_balefire_shard, 9), new Object[] { "#", '#', ModItems.egg_balefire }); GameRegistry.addRecipe(new ItemStack(ModItems.nitra, 1), new Object[] { "##", "##", '#', ModItems.nitra_small }); - GameRegistry.addRecipe(new ItemStack(ModItems.nitra_small, 9), new Object[] { "#", '#', ModItems.nitra }); + GameRegistry.addRecipe(new ItemStack(ModItems.nitra_small, 4), new Object[] { "#", '#', ModItems.nitra }); add1To9Pair(ModItems.powder_paleogenite, ModItems.powder_paleogenite_tiny); add1To9Pair(ModItems.ingot_osmiridium, ModItems.nugget_osmiridium); diff --git a/src/main/java/com/hbm/entity/missile/EntityMissileBaseNT.java b/src/main/java/com/hbm/entity/missile/EntityMissileBaseNT.java index 766950a91..75a1d265b 100644 --- a/src/main/java/com/hbm/entity/missile/EntityMissileBaseNT.java +++ b/src/main/java/com/hbm/entity/missile/EntityMissileBaseNT.java @@ -247,7 +247,7 @@ public abstract class EntityMissileBaseNT extends EntityThrowableInterp implemen loadedChunks.clear(); loadedChunks.add(new ChunkCoordIntPair(newChunkX, newChunkZ)); - loadedChunks.add(new ChunkCoordIntPair(newChunkX + (int) Math.floor((this.posX + this.motionX * this.motionMult()) / 16D), newChunkZ + (int) Math.floor((this.posZ + this.motionZ * this.motionMult()) / 16D))); + //loadedChunks.add(new ChunkCoordIntPair(newChunkX + (int) Math.floor((this.posX + this.motionX * this.motionMult()) / 16D), newChunkZ + (int) Math.floor((this.posZ + this.motionZ * this.motionMult()) / 16D))); for(ChunkCoordIntPair chunk : loadedChunks) { ForgeChunkManager.forceChunk(loaderTicket, chunk); diff --git a/src/main/java/com/hbm/entity/projectile/EntityArtilleryRocket.java b/src/main/java/com/hbm/entity/projectile/EntityArtilleryRocket.java index e8f4a6ad8..0115dbef3 100644 --- a/src/main/java/com/hbm/entity/projectile/EntityArtilleryRocket.java +++ b/src/main/java/com/hbm/entity/projectile/EntityArtilleryRocket.java @@ -150,7 +150,7 @@ public class EntityArtilleryRocket extends EntityThrowableInterp implements IChu loadedChunks.clear(); loadedChunks.add(new ChunkCoordIntPair(newChunkX, newChunkZ)); - loadedChunks.add(new ChunkCoordIntPair(newChunkX + (int) Math.ceil((this.posX + this.motionX) / 16D), newChunkZ + (int) Math.ceil((this.posZ + this.motionZ) / 16D))); + //loadedChunks.add(new ChunkCoordIntPair(newChunkX + (int) Math.floor((this.posX + this.motionX) / 16D), newChunkZ + (int) Math.floor((this.posZ + this.motionZ) / 16D))); for(ChunkCoordIntPair chunk : loadedChunks) { ForgeChunkManager.forceChunk(loaderTicket, chunk); diff --git a/src/main/java/com/hbm/entity/projectile/EntityArtilleryShell.java b/src/main/java/com/hbm/entity/projectile/EntityArtilleryShell.java index b03d3118f..e608b49d5 100644 --- a/src/main/java/com/hbm/entity/projectile/EntityArtilleryShell.java +++ b/src/main/java/com/hbm/entity/projectile/EntityArtilleryShell.java @@ -198,7 +198,7 @@ public class EntityArtilleryShell extends EntityThrowableNT implements IChunkLoa loadedChunks.clear(); loadedChunks.add(new ChunkCoordIntPair(newChunkX, newChunkZ)); - loadedChunks.add(new ChunkCoordIntPair(newChunkX + (int) Math.ceil((this.posX + this.motionX) / 16D), newChunkZ + (int) Math.ceil((this.posZ + this.motionZ) / 16D))); + //loadedChunks.add(new ChunkCoordIntPair(newChunkX + (int) Math.floor((this.posX + this.motionX) / 16D), newChunkZ + (int) Math.floor((this.posZ + this.motionZ) / 16D))); for(ChunkCoordIntPair chunk : loadedChunks) { ForgeChunkManager.forceChunk(loaderTicket, chunk); diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachineRadarNT.java b/src/main/java/com/hbm/inventory/gui/GUIMachineRadarNT.java index 2be6a3266..3674c9ea9 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachineRadarNT.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachineRadarNT.java @@ -103,6 +103,11 @@ public class GUIMachineRadarNT extends GuiScreen { drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); drawTexturedModalRect(guiLeft - 14, guiTop + 84, 224, 0, 14, 66); + if(radar.power > 0) { + int i = (int) (radar.power * 200 / radar.maxPower); + drawTexturedModalRect(guiLeft + 8, guiTop + 221, 0, 234, i, 16); + } + if(radar.scanMissiles ^ (radar.jammed && radar.getWorldObj().rand.nextBoolean())) drawTexturedModalRect(guiLeft - 10, guiTop + 88, 238, 4, 8, 8); if(radar.scanShells ^ (radar.jammed && radar.getWorldObj().rand.nextBoolean())) drawTexturedModalRect(guiLeft - 10, guiTop + 98, 238, 14, 8, 8); if(radar.scanPlayers ^ (radar.jammed && radar.getWorldObj().rand.nextBoolean())) drawTexturedModalRect(guiLeft - 10, guiTop + 108, 238, 24, 8, 8); @@ -110,6 +115,8 @@ public class GUIMachineRadarNT extends GuiScreen { if(radar.redMode ^ (radar.jammed && radar.getWorldObj().rand.nextBoolean())) drawTexturedModalRect(guiLeft - 10, guiTop + 128, 238, 44, 8, 8); if(radar.showMap ^ (radar.jammed && radar.getWorldObj().rand.nextBoolean())) drawTexturedModalRect(guiLeft - 10, guiTop + 138, 238, 54, 8, 8); + if(radar.power < radar.consumption) return; + if(radar.jammed) { for(int i = 0; i < 5; i++) { for(int j = 0; j < 5; j++) { @@ -128,7 +135,7 @@ public class GUIMachineRadarNT extends GuiScreen { int iZ = i / 200; byte b = radar.map[i]; if(b > 0) { - int color = ((b * 8) % 256) << 8; + int color = ((b - 50) * 255 / 78) << 8; tess.setColorOpaque_I(color); tess.addVertex(guiLeft + 8 + iX, guiTop + 18 + iZ, this.zLevel); tess.addVertex(guiLeft + 9 + iX, guiTop + 18 + iZ, this.zLevel); @@ -143,7 +150,7 @@ public class GUIMachineRadarNT extends GuiScreen { Vec3 tr = Vec3.createVectorHelper(100, 0, 0); Vec3 tl = Vec3.createVectorHelper(100, 0, 0); Vec3 bl = Vec3.createVectorHelper(0, -5, 0); - float rot = -(radar.getWorldObj().getTotalWorldTime() + f) / 20F % (float) (Math.PI * 2); + float rot = (float) -Math.toRadians(radar.prevRotation + (radar.rotation - radar.prevRotation) * f + 180F); tr.rotateAroundZ(rot); tl.rotateAroundZ(rot + 0.25F); bl.rotateAroundZ(rot); diff --git a/src/main/java/com/hbm/inventory/recipes/ArcWelderRecipes.java b/src/main/java/com/hbm/inventory/recipes/ArcWelderRecipes.java index d8214f5e3..b7c9be8b6 100644 --- a/src/main/java/com/hbm/inventory/recipes/ArcWelderRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/ArcWelderRecipes.java @@ -40,10 +40,10 @@ public class ArcWelderRecipes extends SerializableRecipe { recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.wire_dense, 1, Mats.MAT_GOLD.id), 100, 10_000L, new ComparableStack(ModItems.wire_gold, 8))); - recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.circuit_copper), 100, 1_000L, new FluidStack(Fluids.GAS, 250), + recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.circuit_copper), 100, 1_000L, new FluidStack(Fluids.GAS, 100), new ComparableStack(ModItems.circuit_aluminium, 1), new OreDictStack(NETHERQUARTZ.dust()), new ComparableStack(ModItems.wire_copper, 8))); - recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.circuit_red_copper), 100, 2_500L, new FluidStack(Fluids.PETROLEUM, 250), - new ComparableStack(ModItems.circuit_copper, 1), new OreDictStack(GOLD.dust()), new ComparableStack(ModItems.wire_red_copper, 8))); + recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.circuit_red_copper), 100, 2_500L, new FluidStack(Fluids.PETROLEUM, 100), + new ComparableStack(ModItems.circuit_copper, 1), new ComparableStack(ModItems.plate_polymer), new ComparableStack(ModItems.wire_red_copper, 8))); recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.circuit_gold), 100, 10_000L, new FluidStack(Fluids.UNSATURATEDS, 250), new ComparableStack(ModItems.circuit_red_copper, 1), new OreDictStack(ANY_PLASTIC.ingot()), new ComparableStack(ModItems.wire_gold, 8))); recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.circuit_schrabidium), 100, 50_000L, new FluidStack(Fluids.SOURGAS, 250), diff --git a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java index 7e498b763..de360a362 100644 --- a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java @@ -384,7 +384,7 @@ public class AssemblerRecipes { makeRecipe(new ComparableStack(ModBlocks.ams_limiter, 1), new AStack[] {new ComparableStack(ModItems.board_copper, 6), new OreDictStack(STEEL.plate(), 24), new ComparableStack(ModBlocks.steel_scaffold, 20), new ComparableStack(ModItems.crystal_diamond, 1)}, 600); makeRecipe(new ComparableStack(ModBlocks.ams_emitter, 1), new AStack[] {new ComparableStack(ModItems.board_copper, 24), new OreDictStack(STEEL.plate(), 32), new ComparableStack(ModBlocks.steel_scaffold, 40), new ComparableStack(ModItems.crystal_redstone, 5), new ComparableStack(ModBlocks.machine_lithium_battery)}, 600); makeRecipe(new ComparableStack(ModBlocks.ams_base, 1), new AStack[] {new ComparableStack(ModItems.board_copper, 12), new OreDictStack(STEEL.plate(), 28), new ComparableStack(ModBlocks.steel_scaffold, 30), new ComparableStack(ModBlocks.steel_grate, 8), new ComparableStack(ModBlocks.barrel_steel, 2)}, 600); - makeRecipe(new ComparableStack(ModBlocks.machine_radar, 1), new AStack[] {new OreDictStack(STEEL.plate528(), 16), new OreDictStack(ANY_PLASTIC.ingot(), 4), new OreDictStack(ANY_RUBBER.ingot(), 24), new ComparableStack(ModItems.magnetron, 10), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit_gold, 4), new ComparableStack(ModItems.coil_copper, 12), new ComparableStack(ModItems.crt_display, 4), },300); + makeRecipe(new ComparableStack(ModBlocks.machine_radar, 1), new AStack[] {new OreDictStack(STEEL.plate528(), 16), new OreDictStack(ANY_PLASTIC.ingot(), 8), new OreDictStack(ANY_RUBBER.ingot(), 8), new ComparableStack(ModItems.magnetron, 10), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit_gold, 4), new ComparableStack(ModItems.coil_copper, 12), new ComparableStack(ModItems.crt_display, 4), },300); makeRecipe(new ComparableStack(ModBlocks.machine_forcefield, 1), new AStack[] {new OreDictStack(ALLOY.plate528(), 8), new ComparableStack(ModItems.plate_desh, 4), new ComparableStack(ModItems.coil_gold_torus, 6), new ComparableStack(ModItems.coil_magnetized_tungsten, 12), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.upgrade_radius, 1), new ComparableStack(ModItems.upgrade_health, 1), new ComparableStack(ModItems.circuit_targeting_tier5, 1), new ComparableStack(ModBlocks.machine_transformer, 1), },1000); makeRecipe(new ComparableStack(ModItems.mp_thruster_10_kerosene, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new ComparableStack(ModBlocks.deco_pipe_quad, 1), new OreDictStack(W.ingot(), 4), new OreDictStack(STEEL.plate(), 4), },100); makeRecipe(new ComparableStack(ModItems.mp_thruster_10_solid, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new ComparableStack(ModItems.coil_tungsten, 1), new OreDictStack(DURA.ingot(), 4), new OreDictStack(STEEL.plate(), 4), },100); diff --git a/src/main/java/com/hbm/inventory/recipes/PressRecipes.java b/src/main/java/com/hbm/inventory/recipes/PressRecipes.java index 76775b3b9..8c6498c8f 100644 --- a/src/main/java/com/hbm/inventory/recipes/PressRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/PressRecipes.java @@ -23,6 +23,7 @@ import com.hbm.items.machine.ItemStamp; import com.hbm.items.machine.ItemStamp.StampType; import com.hbm.util.Tuple.Pair; +import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -61,6 +62,7 @@ public class PressRecipes extends SerializableRecipe { makeRecipe(StampType.FLAT, new ComparableStack(ModItems.biomass), ModItems.biomass_compressed); makeRecipe(StampType.FLAT, new OreDictStack(ANY_COKE.gem()), ModItems.ingot_graphite); makeRecipe(StampType.FLAT, new ComparableStack(ModItems.meteorite_sword_reforged), ModItems.meteorite_sword_hardened); + makeRecipe(StampType.FLAT, new ComparableStack(Blocks.log, 1, 3), ModItems.ball_resin); makeRecipe(StampType.FLAT, new OreDictStack(COAL.dust()), DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.COAL)); makeRecipe(StampType.FLAT, new OreDictStack(LIGNITE.dust()), DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.LIGNITE)); diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index 925d77d11..6d7b52f9f 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -4977,7 +4977,7 @@ public class ModItems { Fluids.DIESEL, Fluids.DIESEL_CRACK, Fluids.KEROSENE, Fluids.BIOFUEL, Fluids.GASOLINE, Fluids.GASOLINE_LEADED, Fluids.PETROIL, Fluids.PETROIL_LEADED, Fluids.COALGAS, Fluids.COALGAS_LEADED) .addBreakAbility(new ToolAbility.SilkAbility()) .addBreakAbility(new ToolAbility.RecursionAbility(5)) - .addHitAbility(new WeaponAbility.ChainsawAbility(4)) + .addHitAbility(new WeaponAbility.ChainsawAbility(10)) .addHitAbility(new WeaponAbility.BeheaderAbility()).setShears().setUnlocalizedName("chainsaw").setTextureName(RefStrings.MODID + ":chainsaw"); schrabidium_sword = new ItemSwordAbility(150, 0, MainRegistry.tMatSchrab) @@ -5085,7 +5085,7 @@ public class ModItems { .addBreakAbility(new ToolAbility.RecursionAbility(5)) .addBreakAbility(new ToolAbility.SilkAbility()) .addBreakAbility(new LuckAbility(2)) - .addHitAbility(new WeaponAbility.ChainsawAbility(6)) + .addHitAbility(new WeaponAbility.ChainsawAbility(15)) .addHitAbility(new WeaponAbility.BeheaderAbility()).setShears().setUnlocalizedName("elec_axe").setTextureName(RefStrings.MODID + ":elec_chainsaw_anim"); elec_shovel = new ItemToolAbilityPower(7.5F, 0, MainRegistry.tMatElec, EnumToolType.SHOVEL, 500000, 1000, 100) diff --git a/src/main/java/com/hbm/items/armor/ArmorTrenchmaster.java b/src/main/java/com/hbm/items/armor/ArmorTrenchmaster.java index 582b44179..0036d36e6 100644 --- a/src/main/java/com/hbm/items/armor/ArmorTrenchmaster.java +++ b/src/main/java/com/hbm/items/armor/ArmorTrenchmaster.java @@ -20,6 +20,7 @@ public class ArmorTrenchmaster extends ArmorFSB { public ArmorTrenchmaster(ArmorMaterial material, int slot, String texture) { super(material, slot, texture); + this.setMaxDamage(0); } @SideOnly(Side.CLIENT) diff --git a/src/main/java/com/hbm/items/machine/ItemFluidDuct.java b/src/main/java/com/hbm/items/machine/ItemFluidDuct.java index f98c79735..e6153e1f5 100644 --- a/src/main/java/com/hbm/items/machine/ItemFluidDuct.java +++ b/src/main/java/com/hbm/items/machine/ItemFluidDuct.java @@ -110,7 +110,7 @@ public class ItemFluidDuct extends Item { ++x; } - if(!world.isAirBlock(x, y, z)) { + if(!world.getBlock(x, y, z).isReplaceable(world, x, y, z)) { return false; } } diff --git a/src/main/java/com/hbm/items/tool/ItemDrone.java b/src/main/java/com/hbm/items/tool/ItemDrone.java index 5ac0d79f0..e2c7b5ffe 100644 --- a/src/main/java/com/hbm/items/tool/ItemDrone.java +++ b/src/main/java/com/hbm/items/tool/ItemDrone.java @@ -2,6 +2,7 @@ package com.hbm.items.tool; import com.hbm.entity.item.EntityDeliveryDrone; import com.hbm.items.ItemEnumMulti; +import com.hbm.main.MainRegistry; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -12,6 +13,7 @@ public class ItemDrone extends ItemEnumMulti { public ItemDrone() { super(EnumDroneType.class, true, true); + this.setCreativeTab(MainRegistry.machineTab); } public static enum EnumDroneType { diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineRadarNT.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineRadarNT.java index e90d861d0..89ef0ec5c 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineRadarNT.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineRadarNT.java @@ -34,6 +34,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraft.world.WorldServer; @@ -109,6 +110,8 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I @Override public void updateEntity() { + if(this.map == null || this.map.length != 40_000) this.map = new byte[40_000]; + if(!worldObj.isRemote) { if(worldObj.getTotalWorldTime() % 20 == 0) this.updateStandardConnections(worldObj, xCoord, yCoord, zCoord); @@ -117,7 +120,10 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I this.jammed = false; allocateTargets(); - if(this.lastPower != getRedPower()) worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType()); + if(this.lastPower != getRedPower()) { + this.markDirty(); + } + lastPower = getRedPower(); if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) != ModBlocks.muffler) { @@ -130,7 +136,6 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I } if(this.showMap) { - int chunkLoadCap = 5; int chunkLoads = 0; for(int i = 0; i < 100; i++) { int index = (int) (worldObj.getTotalWorldTime() % 400) * 100 + i; @@ -141,18 +146,18 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I int z = zCoord - radarRange + iZ; if(worldObj.getChunkProvider().chunkExists(x >> 4, z >> 4)) { - this.map[index] = (byte) worldObj.getHeightValue(x, z); + this.map[index] = (byte) MathHelper.clamp_int(worldObj.getHeightValue(x, z), 50, 128); } else { if(this.map[index] == 0 && chunkLoads < chunkLoadCap) { worldObj.getChunkFromChunkCoords(x >> 4, z >> 4); - this.map[index] = (byte) worldObj.getHeightValue(x, z); + this.map[index] = (byte) MathHelper.clamp_int(worldObj.getHeightValue(x, z), 50, 128); chunkLoads++; } } } } - this.networkPackNT(25); + this.networkPackNT(50); } else { prevRotation = rotation; if(power > 0) rotation += 5F; @@ -212,12 +217,38 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I } } } + + @Override + public void readFromNBT(NBTTagCompound nbt) { + super.readFromNBT(nbt); + this.power = nbt.getLong("power"); + this.scanMissiles = nbt.getBoolean("scanMissiles"); + this.scanShells = nbt.getBoolean("scanShells"); + this.scanPlayers = nbt.getBoolean("scanPlayers"); + this.smartMode = nbt.getBoolean("smartMode"); + this.redMode = nbt.getBoolean("redMode"); + this.showMap = nbt.getBoolean("showMap"); + if(nbt.hasKey("map")) this.map = nbt.getByteArray("map"); + } + + @Override + public void writeToNBT(NBTTagCompound nbt) { + super.writeToNBT(nbt); + nbt.setLong("power", power); + nbt.setBoolean("scanMissiles", scanMissiles); + nbt.setBoolean("scanShells", scanShells); + nbt.setBoolean("scanPlayers", scanPlayers); + nbt.setBoolean("smartMode", smartMode); + nbt.setBoolean("redMode", redMode); + nbt.setBoolean("showMap", showMap); + nbt.setByteArray("map", map); + } protected void allocateTargets() { this.entries.clear(); if(this.yCoord < radarAltitude) return; - if(this.power <= consumption) return; + if(this.power < consumption) return; this.power -= consumption; int scan = this.scanRange(); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineTurbofan.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineTurbofan.java index 53e056569..e1c3d08ba 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineTurbofan.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineTurbofan.java @@ -162,7 +162,7 @@ public class TileEntityMachineTurbofan extends TileEntityMachinePolluting implem if(amountToBurn > 0) { this.wasOn = true; this.tank.setFill(this.tank.getFill() - amountToBurn); - this.power += burnValue * amountToBurn; + this.power += burnValue * amountToBurn * (1 + Math.min(this.afterburner / 3D, 4)); if(worldObj.getTotalWorldTime() % 20 == 0) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND * amountToBurn); } diff --git a/src/main/java/com/hbm/tileentity/machine/oil/TileEntityMachineGasFlare.java b/src/main/java/com/hbm/tileentity/machine/oil/TileEntityMachineGasFlare.java index 39f928faf..b8f52817c 100644 --- a/src/main/java/com/hbm/tileentity/machine/oil/TileEntityMachineGasFlare.java +++ b/src/main/java/com/hbm/tileentity/machine/oil/TileEntityMachineGasFlare.java @@ -133,7 +133,7 @@ public class TileEntityMachineGasFlare extends TileEntityMachineBase implements int eject = Math.min(maxBurn, tank.getFill()); tank.setFill(tank.getFill() - eject); - int penalty = 2; + int penalty = 5; if(!tank.getTankType().hasTrait(FT_Gaseous.class) && !tank.getTankType().hasTrait(FT_Gaseous_ART.class)) penalty = 10; diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index f8684f74d..0d3763b16 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -1156,7 +1156,7 @@ item.balefire_and_steel.name=Balefire-Zeug item.balefire_scrambled.name=Rühr-Balefire-Ei item.ball_dynamite.name=Dynamit item.ball_fireclay.name=Schamott -item.ball_resin.name=Löwenzahn-Kautschuk +item.ball_resin.name=Kautschuk item.ball_tatb.name=TATB item.ball_tnt.name=TNT item.ballistic_gauntlet.name=Ballistischer Panzerhandschuh diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 637a8f7fb..9b3f5732d 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -1888,7 +1888,7 @@ item.balefire_and_steel.name=Balefire and Steel item.balefire_scrambled.name=Scrambled Balefire Egg item.ball_dynamite.name=Dynamite item.ball_fireclay.name=Fireclay -item.ball_resin.name=Dandelion Milk +item.ball_resin.name=Latex item.ball_tatb.name=TATB item.ball_tnt.name=TNT item.ballistic_gauntlet.name=Ballistic Gauntlet @@ -5205,7 +5205,7 @@ tile.machine_excavator.name=Large Mining Drill tile.machine_fel.name=FEL tile.machine_fensu.name=FEnSU tile.machine_flare.name=Flare Stack -tile.machine_flare.desc=Can burn fluids and vent gasses$Burns up to §c10mB/t$Vents up to §c50mB/t$ $§eFuel efficiency:$§e-Flammable Gasses: §c50%%$§e-Flammable Liquids: §c10%% +tile.machine_flare.desc=Can burn fluids and vent gasses$Burns up to §c10mB/t$Vents up to §c50mB/t$ $§eFuel efficiency:$§e-Flammable Gasses: §c20%%$§e-Flammable Liquids: §c10%% tile.machine_fluidtank.name=Tank tile.machine_forcefield.name=Forcefield Emitter tile.machine_fraction_tower.name=Fractioning Tower diff --git a/src/main/resources/assets/hbm/textures/blocks/glyphid_base_alt.png b/src/main/resources/assets/hbm/textures/blocks/glyphid_base_alt.png new file mode 100644 index 000000000..a0fa4d8e6 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/glyphid_base_alt.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/glyphid_eggs.png b/src/main/resources/assets/hbm/textures/blocks/glyphid_eggs.png new file mode 100644 index 000000000..8f1e021e5 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/glyphid_eggs.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/glyphid_eggs_alt.png b/src/main/resources/assets/hbm/textures/blocks/glyphid_eggs_alt.png new file mode 100644 index 000000000..f641f7f24 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/glyphid_eggs_alt.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/glyphid_eggs_base.png b/src/main/resources/assets/hbm/textures/blocks/glyphid_eggs_base.png new file mode 100644 index 000000000..8d0ed4045 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/glyphid_eggs_base.png differ