diff --git a/changelog b/changelog index 0b4c4ebc0..8226bc9a5 100644 --- a/changelog +++ b/changelog @@ -3,8 +3,12 @@ * The new chemical plant can now be used to upgrade the meteorite sword * Fluid containers are now re-registered when using `/ntmreload` which should correctly generate fluid container items for freshly added custom fluids * Recipe configs will no longer try to parse null value recipes, meaing that trailing commas in a recipe config will no longer create an error +* Refinery solid byproducts now build up substantially faster + * This means fracking solution from standard oil is now a lot more viable + * This also makes the volume of oil spent consistent with the NEI handler ## Fixed * Fixed crash caused by breaking a tool while the fortune or silk touch ability is enabled * Fixed NTM adding mob spawns to the mushroom island -# Fixed line break not working on the tip of the day \ No newline at end of file +* Fixed line break not working on the tip of the day +* Fixed an issue where AoE abilities can break bedrock \ No newline at end of file diff --git a/src/main/java/com/hbm/blocks/bomb/BlockVolcano.java b/src/main/java/com/hbm/blocks/bomb/BlockVolcano.java index 6eefdf20e..16110461e 100644 --- a/src/main/java/com/hbm/blocks/bomb/BlockVolcano.java +++ b/src/main/java/com/hbm/blocks/bomb/BlockVolcano.java @@ -151,7 +151,7 @@ public class BlockVolcano extends BlockContainer implements ITooltipProvider, IB @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); - nbt.setInteger("tier", this.volcanoTimer); + nbt.setInteger("timer", this.volcanoTimer); } private boolean shouldGrow() { diff --git a/src/main/java/com/hbm/config/GeneralConfig.java b/src/main/java/com/hbm/config/GeneralConfig.java index c843cde57..b52f58073 100644 --- a/src/main/java/com/hbm/config/GeneralConfig.java +++ b/src/main/java/com/hbm/config/GeneralConfig.java @@ -39,6 +39,7 @@ public class GeneralConfig { public static boolean enableSoundExtension = true; public static boolean enableMekanismChanges = true; public static boolean enableServerRecipeSync = false; + public static boolean enableLoadScreenReplacement = true; public static int normalSoundChannels = 200; public static boolean enableExpensiveMode = false; @@ -120,6 +121,7 @@ public class GeneralConfig { "Note that a value below 28 or above 200 can cause buggy sounds and issues with other mods running out of sound memory.", 100); preferredOutputMod = CommonConfig.createConfigStringList(config,CATEGORY_GENERAL,"1.42_preferredOutputMod", "The mod which is preferred as output when certain machines autogenerate recipes. Currently used for the shredder", new String[] {RefStrings.MODID}); + enableLoadScreenReplacement = config.get(CATEGORY_GENERAL, "1.43_enableLoadScreenReplacement", true, "Tries to replace the vanilla load screen with the 'tip of the day' one, may clash with other mods trying to do the same.").getBoolean(true); enableExpensiveMode = config.get(CATEGORY_GENERAL, "1.99_enableExpensiveMode", false, "It does what the name implies.").getBoolean(false); final String CATEGORY_528 = CommonConfig.CATEGORY_528; diff --git a/src/main/java/com/hbm/items/machine/ItemFluidSiphon.java b/src/main/java/com/hbm/items/machine/ItemFluidSiphon.java index 2a7fc95ce..ecf9797e6 100644 --- a/src/main/java/com/hbm/items/machine/ItemFluidSiphon.java +++ b/src/main/java/com/hbm/items/machine/ItemFluidSiphon.java @@ -10,8 +10,7 @@ import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Unsiphonable; import com.hbm.items.ModItems; import com.hbm.items.tool.ItemPipette; -import api.hbm.fluid.IFluidStandardReceiver; -import api.hbm.fluid.IFluidStandardTransceiver; +import api.hbm.fluidmk2.IFluidStandardReceiverMK2; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -19,78 +18,82 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public class ItemFluidSiphon extends Item { - + @Override public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int i, float f0, float f1, float f2) { TileEntity te = CompatExternal.getCoreFromPos(world, x, y, z); - if(te != null && (te instanceof IFluidStandardReceiver || te instanceof IFluidStandardTransceiver)) { - FluidTank[] tanks; - if (te instanceof IFluidStandardReceiver) { - tanks = ((IFluidStandardReceiver) te).getReceivingTanks(); - } else { - tanks = ((IFluidStandardTransceiver) te).getReceivingTanks(); - } + if(te != null && te instanceof IFluidStandardReceiverMK2) { + FluidTank[] tanks = ((IFluidStandardReceiverMK2) te).getReceivingTanks(); - boolean hasDrainedTank = false; - - // We need to iterate through the inventory for _each_ siphonable tank, so we can handle fluids that can only go into certain containers - // After we successfully siphon any fluid from a tank, we stop further processing, multiple fluid types require multiple clicks - for (FluidTank tank : tanks) { - if (tank.getFill() <= 0) continue; + boolean hasDrainedTank = false; - ItemStack availablePipette = null; - FluidType tankType = tank.getTankType(); + // We need to iterate through the inventory for _each_ siphonable + // tank, so we can handle fluids that can only go into certain containers + // After we successfully siphon any fluid from a tank, we stop + // further processing, multiple fluid types require multiple clicks + for(FluidTank tank : tanks) { + if(tank.getFill() <= 0) + continue; - if (tankType.hasTrait(FT_Unsiphonable.class)) continue; + ItemStack availablePipette = null; + FluidType tankType = tank.getTankType(); - for (int j = 0; j < player.inventory.mainInventory.length; j++) { - ItemStack inventoryStack = player.inventory.mainInventory[j]; - if (inventoryStack == null) continue; + if(tankType.hasTrait(FT_Unsiphonable.class)) + continue; - FluidContainer container = FluidContainerRegistry.getContainer(tankType, inventoryStack); + for(int j = 0; j < player.inventory.mainInventory.length; j++) { + ItemStack inventoryStack = player.inventory.mainInventory[j]; + if(inventoryStack == null) + continue; - if (availablePipette == null && inventoryStack.getItem() instanceof ItemPipette) { - ItemPipette pipette = (ItemPipette) inventoryStack.getItem(); - if (!pipette.willFizzle(tankType) && pipette != ModItems.pipette_laboratory) { // Ignoring laboratory pipettes for now - availablePipette = inventoryStack; - } - } + FluidContainer container = FluidContainerRegistry.getContainer(tankType, inventoryStack); - if (container == null) continue; + if(availablePipette == null && inventoryStack.getItem() instanceof ItemPipette) { + ItemPipette pipette = (ItemPipette) inventoryStack.getItem(); + if(!pipette.willFizzle(tankType) && pipette != ModItems.pipette_laboratory) { // Ignoring laboratory pipettes for now + availablePipette = inventoryStack; + } + } - ItemStack full = FluidContainerRegistry.getFullContainer(inventoryStack, tankType); + if(container == null) + continue; - while (tank.getFill() >= container.content && inventoryStack.stackSize > 0) { - hasDrainedTank = true; + ItemStack full = FluidContainerRegistry.getFullContainer(inventoryStack, tankType); - inventoryStack.stackSize--; - if (inventoryStack.stackSize <= 0) { - player.inventory.mainInventory[j] = null; - } + while(tank.getFill() >= container.content && inventoryStack.stackSize > 0) { + hasDrainedTank = true; - ItemStack filledContainer = full.copy(); - tank.setFill(tank.getFill() - container.content); - player.inventory.addItemStackToInventory(filledContainer); - } - } + inventoryStack.stackSize--; + if(inventoryStack.stackSize <= 0) { + player.inventory.mainInventory[j] = null; + } - // If the remainder of the tank can only fit into a pipette, fill a pipette with the remainder - // Will not auto-fill fizzlable pipettes, there is no feedback for the fizzle in this case, and that's a touch too unfair - if (availablePipette != null && tank.getFill() < 1000) { - ItemPipette pipette = (ItemPipette) availablePipette.getItem(); - - if (pipette.acceptsFluid(tankType, availablePipette)) { - hasDrainedTank = true; - tank.setFill(pipette.tryFill(tankType, tank.getFill(), availablePipette)); - } - } + ItemStack filledContainer = full.copy(); + tank.setFill(tank.getFill() - container.content); + player.inventory.addItemStackToInventory(filledContainer); + } + } - if (hasDrainedTank) return true; - } + // If the remainder of the tank can only fit into a pipette, + // fill a pipette with the remainder + // Will not auto-fill fizzlable pipettes, there is no feedback + // for the fizzle in this case, and that's a touch too unfair + if(availablePipette != null && tank.getFill() < 1000) { + ItemPipette pipette = (ItemPipette) availablePipette.getItem(); + + if(pipette.acceptsFluid(tankType, availablePipette)) { + hasDrainedTank = true; + tank.setFill(pipette.tryFill(tankType, tank.getFill(), availablePipette)); + } + } + + if(hasDrainedTank) + return true; + } } return false; } - + } diff --git a/src/main/java/com/hbm/items/tool/ItemToolAbility.java b/src/main/java/com/hbm/items/tool/ItemToolAbility.java index e055c2b6b..589938c88 100644 --- a/src/main/java/com/hbm/items/tool/ItemToolAbility.java +++ b/src/main/java/com/hbm/items/tool/ItemToolAbility.java @@ -291,14 +291,11 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro Block block = world.getBlock(x, y, z); int meta = world.getBlockMetadata(x, y, z); - - if(!( - canHarvestBlock(block, stack) || - canShearBlock(block, stack, world, x, y, z)) || - block.getPlayerRelativeBlockHardness(player, world, x, y, z) < 0 || - block == ModBlocks.stone_keyhole - ) - return; + + if(!(canHarvestBlock(block, stack) || + canShearBlock(block, stack, world, x, y, z)) || + (block.getBlockHardness(world, x, y, z) == -1.0F && block.getPlayerRelativeBlockHardness(player, world, x, y, z) == 0.0F) || + block == ModBlocks.stone_keyhole) return; Block refBlock = world.getBlock(refX, refY, refZ); float refStrength = ForgeHooks.blockStrength(refBlock, player, world, refX, refY, refZ); diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/LegoClient.java b/src/main/java/com/hbm/items/weapon/sedna/factory/LegoClient.java index b49292c78..0b835d173 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/LegoClient.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/LegoClient.java @@ -383,7 +383,6 @@ public class LegoClient { RenderArcFurnace.fullbright(true); double age = MathHelper.clamp_double(1D - ((double) bullet.ticksExisted - 2 + interp) / (double) bullet.getBulletConfig().expires, 0, 1); - double col = MathHelper.clamp_double(1D - ((double) bullet.ticksExisted + interp) / (double) bullet.getBulletConfig().expires, 0, 1); GL11.glPushMatrix(); GL11.glRotatef(180 - bullet.rotationYaw, 0, 1F, 0); diff --git a/src/main/java/com/hbm/main/ModEventHandlerClient.java b/src/main/java/com/hbm/main/ModEventHandlerClient.java index 88a7441c7..b07736bff 100644 --- a/src/main/java/com/hbm/main/ModEventHandlerClient.java +++ b/src/main/java/com/hbm/main/ModEventHandlerClient.java @@ -1030,14 +1030,19 @@ public class ModEventHandlerClient { public static boolean renderLodeStar = false; public static long lastStarCheck = 0L; + public static long lastLoadScreenReplacement = 0L; @SideOnly(Side.CLIENT) @SubscribeEvent(priority = EventPriority.LOWEST) public void onClientTickLast(ClientTickEvent event) { Minecraft mc = Minecraft.getMinecraft(); - if(!(mc.loadingScreen instanceof LoadingScreenRendererNT)) { + long millis = Clock.get_ms(); + if(millis == 0) millis = System.currentTimeMillis(); + + if(GeneralConfig.enableLoadScreenReplacement && !(mc.loadingScreen instanceof LoadingScreenRendererNT) && millis > lastLoadScreenReplacement + 10_000) { mc.loadingScreen = new LoadingScreenRendererNT(mc); + lastLoadScreenReplacement = millis; } if(event.phase == Phase.START && GeneralConfig.enableSkyboxes) { @@ -1067,7 +1072,6 @@ public class ModEventHandlerClient { } EntityPlayer player = mc.thePlayer; - long millis = Clock.get_ms(); if(lastStarCheck + 200 < millis) { renderLodeStar = false; diff --git a/src/main/java/com/hbm/tileentity/machine/oil/TileEntityMachineRefinery.java b/src/main/java/com/hbm/tileentity/machine/oil/TileEntityMachineRefinery.java index b474ce248..e7ce296c2 100644 --- a/src/main/java/com/hbm/tileentity/machine/oil/TileEntityMachineRefinery.java +++ b/src/main/java/com/hbm/tileentity/machine/oil/TileEntityMachineRefinery.java @@ -49,7 +49,7 @@ public class TileEntityMachineRefinery extends TileEntityMachineBase implements public long power = 0; public int sulfur = 0; - public static final int maxSulfur = 100; + public static final int maxSulfur = 10; public static final long maxPower = 1000; public FluidTank[] tanks; diff --git a/src/main/resources/assets/hbm/textures/models/machines/assembly_machine.png b/src/main/resources/assets/hbm/textures/models/machines/assembly_machine.png new file mode 100644 index 000000000..6fc1a618f Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/assembly_machine.png differ