diff --git a/changelog b/changelog index 2da6c3e7b..3d8a86002 100644 --- a/changelog +++ b/changelog @@ -11,4 +11,8 @@ ## Changed * RoR readers can now read neutron flux from fuel channels and the fill state of boilers and heat exchangers * Canned recursion can now be crafted from canned recursion -* Soldering recipes are now prioritized over anvil recipes in the NEI listing \ No newline at end of file +* Soldering recipes are now prioritized over anvil recipes in the NEI listing +* Paintable blocks now have tooltips explaining all the tools that can be used + +## Fixed +* Fixed barrel connectors appearing between barrels even though they have different fluid types \ 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 fd685f872..c7ea340bf 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -3123,15 +3123,15 @@ public class ModBlocks { GameRegistry.registerBlock(pribris_radiating, pribris_radiating.getUnlocalizedName()); GameRegistry.registerBlock(pribris_digamma, pribris_digamma.getUnlocalizedName()); - GameRegistry.registerBlock(red_cable, red_cable.getUnlocalizedName()); - GameRegistry.registerBlock(red_cable_classic, red_cable_classic.getUnlocalizedName()); - GameRegistry.registerBlock(red_cable_paintable, red_cable_paintable.getUnlocalizedName()); + register(red_cable); + register(red_cable_classic); + register(red_cable_paintable); register(red_cable_gauge); register(red_cable_box); - GameRegistry.registerBlock(red_wire_coated, red_wire_coated.getUnlocalizedName()); + register(red_wire_coated); register(red_connector); register(red_connector_super); - GameRegistry.registerBlock(red_pylon, ItemBlockBase.class, red_pylon.getUnlocalizedName()); + register(red_pylon); register(red_pylon_medium_wood); register(red_pylon_medium_wood_transformer); register(red_pylon_medium_steel); diff --git a/src/main/java/com/hbm/blocks/machine/BlockFluidBarrel.java b/src/main/java/com/hbm/blocks/machine/BlockFluidBarrel.java index 41ab8cba8..7cb8009f6 100644 --- a/src/main/java/com/hbm/blocks/machine/BlockFluidBarrel.java +++ b/src/main/java/com/hbm/blocks/machine/BlockFluidBarrel.java @@ -49,8 +49,8 @@ public class BlockFluidBarrel extends BlockContainer implements ITooltipProvider public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityBarrel(capacity); } - - public static int renderID = RenderingRegistry.getNextAvailableRenderId(); + + public static int renderID = RenderingRegistry.getNextAvailableRenderId(); @Override public int getRenderType(){ diff --git a/src/main/java/com/hbm/blocks/network/BlockCablePaintable.java b/src/main/java/com/hbm/blocks/network/BlockCablePaintable.java index dd92b6940..57e433312 100644 --- a/src/main/java/com/hbm/blocks/network/BlockCablePaintable.java +++ b/src/main/java/com/hbm/blocks/network/BlockCablePaintable.java @@ -1,7 +1,11 @@ package com.hbm.blocks.network; import api.hbm.block.IToolable; + +import java.util.List; + import com.hbm.blocks.IBlockMultiPass; +import com.hbm.blocks.ITooltipProvider; import com.hbm.interfaces.ICopiable; import com.hbm.lib.RefStrings; import com.hbm.render.block.RenderBlockMultipass; @@ -25,7 +29,7 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -public class BlockCablePaintable extends BlockContainer implements IToolable, IBlockMultiPass { +public class BlockCablePaintable extends BlockContainer implements IToolable, IBlockMultiPass, ITooltipProvider { @SideOnly(Side.CLIENT) protected IIcon overlay; @@ -202,4 +206,9 @@ public class BlockCablePaintable extends BlockContainer implements IToolable, IB } } } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { + this.addStandardInfo(stack, player, list, ext); + } } diff --git a/src/main/java/com/hbm/blocks/network/BlockOpenComputersCablePaintable.java b/src/main/java/com/hbm/blocks/network/BlockOpenComputersCablePaintable.java index c865bf0b5..540f547b9 100644 --- a/src/main/java/com/hbm/blocks/network/BlockOpenComputersCablePaintable.java +++ b/src/main/java/com/hbm/blocks/network/BlockOpenComputersCablePaintable.java @@ -2,7 +2,10 @@ package com.hbm.blocks.network; import api.hbm.block.IToolable; +import java.util.List; + import com.hbm.blocks.IBlockMultiPass; +import com.hbm.blocks.ITooltipProvider; import com.hbm.interfaces.ICopiable; import com.hbm.lib.RefStrings; import com.hbm.render.block.RenderBlockMultipass; @@ -36,7 +39,7 @@ import li.cil.oc.api.internal.Colored; import com.hbm.handler.CompatHandler.OCColors; import net.minecraftforge.oredict.OreDictionary; -public class BlockOpenComputersCablePaintable extends BlockContainer implements IToolable, IBlockMultiPass { +public class BlockOpenComputersCablePaintable extends BlockContainer implements IToolable, IBlockMultiPass, ITooltipProvider { @SideOnly(Side.CLIENT) protected IIcon overlay; @SideOnly(Side.CLIENT) protected IIcon overlayColor; @@ -349,4 +352,9 @@ public class BlockOpenComputersCablePaintable extends BlockContainer implements return color.getColor(); } } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { + this.addStandardInfo(stack, player, list, ext); + } } diff --git a/src/main/java/com/hbm/blocks/network/FluidDuctPaintable.java b/src/main/java/com/hbm/blocks/network/FluidDuctPaintable.java index df6b313ae..e1d87653b 100644 --- a/src/main/java/com/hbm/blocks/network/FluidDuctPaintable.java +++ b/src/main/java/com/hbm/blocks/network/FluidDuctPaintable.java @@ -4,6 +4,7 @@ import api.hbm.block.IToolable; import com.hbm.blocks.IBlockMultiPass; import com.hbm.blocks.ILookOverlay; +import com.hbm.blocks.ITooltipProvider; import com.hbm.interfaces.ICopiable; import com.hbm.lib.RefStrings; import com.hbm.render.block.RenderBlockMultipass; @@ -28,7 +29,7 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre; import java.util.ArrayList; import java.util.List; -public class FluidDuctPaintable extends FluidDuctBase implements IToolable, IBlockMultiPass, ILookOverlay { +public class FluidDuctPaintable extends FluidDuctBase implements IToolable, IBlockMultiPass, ILookOverlay, ITooltipProvider { @SideOnly(Side.CLIENT) protected IIcon overlay; @SideOnly(Side.CLIENT) protected IIcon overlayColor; @@ -224,4 +225,9 @@ public class FluidDuctPaintable extends FluidDuctBase implements IToolable, IBlo } } } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { + this.addStandardInfo(stack, player, list, ext); + } } diff --git a/src/main/java/com/hbm/blocks/network/FluidDuctPaintableBlockExhaust.java b/src/main/java/com/hbm/blocks/network/FluidDuctPaintableBlockExhaust.java index 79febabac..cc6c2df6d 100644 --- a/src/main/java/com/hbm/blocks/network/FluidDuctPaintableBlockExhaust.java +++ b/src/main/java/com/hbm/blocks/network/FluidDuctPaintableBlockExhaust.java @@ -4,6 +4,7 @@ import api.hbm.block.IToolable; import com.hbm.blocks.IBlockMultiPass; import com.hbm.blocks.ILookOverlay; +import com.hbm.blocks.ITooltipProvider; import com.hbm.interfaces.ICopiable; import com.hbm.inventory.fluid.Fluids; import com.hbm.lib.RefStrings; @@ -32,7 +33,7 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre; import java.util.ArrayList; import java.util.List; -public class FluidDuctPaintableBlockExhaust extends FluidDuctBase implements IToolable, IBlockMultiPass, ILookOverlay { +public class FluidDuctPaintableBlockExhaust extends FluidDuctBase implements IToolable, IBlockMultiPass, ILookOverlay, ITooltipProvider { @SideOnly(Side.CLIENT) protected IIcon overlay; @@ -212,4 +213,9 @@ public class FluidDuctPaintableBlockExhaust extends FluidDuctBase implements ITo } } } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { + this.addStandardInfo(stack, player, list, ext); + } } diff --git a/src/main/java/com/hbm/blocks/network/PneumoTubePaintableBlock.java b/src/main/java/com/hbm/blocks/network/PneumoTubePaintableBlock.java index 5cd33b2a6..c54baab81 100644 --- a/src/main/java/com/hbm/blocks/network/PneumoTubePaintableBlock.java +++ b/src/main/java/com/hbm/blocks/network/PneumoTubePaintableBlock.java @@ -2,7 +2,10 @@ package com.hbm.blocks.network; import api.hbm.block.IToolable; +import java.util.List; + import com.hbm.blocks.IBlockMultiPass; +import com.hbm.blocks.ITooltipProvider; import com.hbm.interfaces.ICopiable; import com.hbm.lib.RefStrings; import com.hbm.main.MainRegistry; @@ -31,7 +34,7 @@ import net.minecraft.world.World; import net.minecraft.world.WorldServer; import net.minecraftforge.common.util.ForgeDirection; -public class PneumoTubePaintableBlock extends BlockContainer implements IToolable, IBlockMultiPass { +public class PneumoTubePaintableBlock extends BlockContainer implements IToolable, IBlockMultiPass, ITooltipProvider { @SideOnly(Side.CLIENT) public IIcon overlay; @SideOnly(Side.CLIENT) public IIcon overlayIn; @@ -248,4 +251,9 @@ public class PneumoTubePaintableBlock extends BlockContainer implements IToolabl } } } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { + this.addStandardInfo(stack, player, list, ext); + } } diff --git a/src/main/java/com/hbm/render/tileentity/RenderFluidBarrel.java b/src/main/java/com/hbm/render/tileentity/RenderFluidBarrel.java index 242672c6d..ee0758e44 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderFluidBarrel.java +++ b/src/main/java/com/hbm/render/tileentity/RenderFluidBarrel.java @@ -23,70 +23,65 @@ public class RenderFluidBarrel extends TileEntitySpecialRenderer { GL11.glPushMatrix(); GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5); GL11.glEnable(GL11.GL_LIGHTING); - - + if(te instanceof TileEntityBarrel) { - - TileEntityBarrel barrel = (TileEntityBarrel)te; + + TileEntityBarrel barrel = (TileEntityBarrel) te; FluidType type = barrel.tank.getTankType(); - + if(type != Fluids.NONE) { - + GL11.glPushMatrix(); - + int poison = type.poison; int flammability = type.flammability; int reactivity = type.reactivity; EnumSymbol symbol = type.symbol; - - int cx = te.xCoord; - int cy = te.yCoord; - int cz = te.zCoord; - - if(te.getBlockType() == ModBlocks.barrel_plastic) - bindTexture(ResourceManager.barrel_plastic_tex); - else if(te.getBlockType() == ModBlocks.barrel_steel) - bindTexture(ResourceManager.barrel_steel_tex); - else if(te.getBlockType() == ModBlocks.barrel_tcalloy) - bindTexture(ResourceManager.barrel_tcalloy_tex); - else if(te.getBlockType() == ModBlocks.barrel_antimatter) - bindTexture(ResourceManager.barrel_antimatter_tex); - if(Library.canConnectFluid(te.getWorldObj(), cx + 1, cy, cz, Library.POS_X, type)) { - GL11.glTranslatef(0.0F, -0.5F, 0.0F); - GL11.glRotatef(0F, 0F, 0F, 0F); - ResourceManager.barrel.renderPart("Connector"); - GL11.glTranslatef(0.0F, 0.5F, 0.0F); - } - - if(Library.canConnectFluid(te.getWorldObj(), cx - 1, cy, cz, Library.NEG_X, type)) { - GL11.glRotatef(180, 0F, 1F, 0F); - GL11.glTranslatef(0.0F, -0.5F, 0.0F); - ResourceManager.barrel.renderPart("Connector"); - GL11.glTranslatef(0.0F, 0.5F, 0.0F); - GL11.glRotatef(-180, 0F, 1F, 0F); - } + int cx = te.xCoord; + int cy = te.yCoord; + int cz = te.zCoord; - if(Library.canConnectFluid(te.getWorldObj(), cx, cy, cz - 1, Library.NEG_Z, type)) { - GL11.glRotatef(90, 0F, 1F, 0F); - GL11.glTranslatef(0.0F, -0.5F, 0.0F); - ResourceManager.barrel.renderPart("Connector"); - GL11.glTranslatef(0.0F, 0.5F, 0.0F); - GL11.glRotatef(-90, 0F, 1F, 0F); - } + if(te.getBlockType() == ModBlocks.barrel_plastic) bindTexture(ResourceManager.barrel_plastic_tex); + else if(te.getBlockType() == ModBlocks.barrel_steel) bindTexture(ResourceManager.barrel_steel_tex); + else if(te.getBlockType() == ModBlocks.barrel_tcalloy) bindTexture(ResourceManager.barrel_tcalloy_tex); + else if(te.getBlockType() == ModBlocks.barrel_antimatter) bindTexture(ResourceManager.barrel_antimatter_tex); + + if(Library.canConnectFluid(te.getWorldObj(), cx + 1, cy, cz, Library.POS_X, type)) { + GL11.glTranslatef(0.0F, -0.5F, 0.0F); + GL11.glRotatef(0F, 0F, 0F, 0F); + ResourceManager.barrel.renderPart("Connector"); + GL11.glTranslatef(0.0F, 0.5F, 0.0F); + } + + if(Library.canConnectFluid(te.getWorldObj(), cx - 1, cy, cz, Library.NEG_X, type)) { + GL11.glRotatef(180, 0F, 1F, 0F); + GL11.glTranslatef(0.0F, -0.5F, 0.0F); + ResourceManager.barrel.renderPart("Connector"); + GL11.glTranslatef(0.0F, 0.5F, 0.0F); + GL11.glRotatef(-180, 0F, 1F, 0F); + } + + if(Library.canConnectFluid(te.getWorldObj(), cx, cy, cz - 1, Library.NEG_Z, type)) { + GL11.glRotatef(90, 0F, 1F, 0F); + GL11.glTranslatef(0.0F, -0.5F, 0.0F); + ResourceManager.barrel.renderPart("Connector"); + GL11.glTranslatef(0.0F, 0.5F, 0.0F); + GL11.glRotatef(-90, 0F, 1F, 0F); + } + + if(Library.canConnectFluid(te.getWorldObj(), cx, cy, cz + 1, Library.POS_Z, type)) { + GL11.glRotatef(-90, 0F, 1F, 0F); + GL11.glTranslatef(0.0F, -0.5F, 0.0F); + ResourceManager.barrel.renderPart("Connector"); + GL11.glTranslatef(0.0F, 0.5F, 0.0F); + GL11.glRotatef(90, 0F, 1F, 0F); + } - if(Library.canConnectFluid(te.getWorldObj(), cx, cy, cz + 1, Library.POS_Z, type)) { - GL11.glRotatef(-90, 0F, 1F, 0F); - GL11.glTranslatef(0.0F, -0.5F, 0.0F); - ResourceManager.barrel.renderPart("Connector"); - GL11.glTranslatef(0.0F, 0.5F, 0.0F); - GL11.glRotatef(90, 0F, 1F, 0F); - } - RenderHelper.disableStandardItemLighting(); - + for(int j = 0; j < 4; j++) { - + GL11.glPushMatrix(); GL11.glTranslated(0.4, 0.30, -0.24); GL11.glScalef(1.0F, 0.25F, 0.25F); @@ -94,14 +89,13 @@ public class RenderFluidBarrel extends TileEntitySpecialRenderer { GL11.glPopMatrix(); GL11.glRotatef(90, 0, 1, 0); } - - + GL11.glPopMatrix(); RenderHelper.enableStandardItemLighting(); } - + } - + GL11.glPopMatrix(); } diff --git a/src/main/java/com/hbm/tileentity/machine/storage/TileEntityBarrel.java b/src/main/java/com/hbm/tileentity/machine/storage/TileEntityBarrel.java index 5473c0740..49019ccf8 100644 --- a/src/main/java/com/hbm/tileentity/machine/storage/TileEntityBarrel.java +++ b/src/main/java/com/hbm/tileentity/machine/storage/TileEntityBarrel.java @@ -291,7 +291,10 @@ public class TileEntityBarrel extends TileEntityMachineBase implements SimpleCom tank.writeToNBT(nbt, "tank"); } - @Override public boolean canConnect(FluidType fluid, ForgeDirection dir) { return true; } + @Override + public boolean canConnect(FluidType fluid, ForgeDirection dir) { + return fluid == tank.getTankType(); + } @Override public FluidTank[] getSendingTanks() { diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 0604968ca..dd8579c8e 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -5559,10 +5559,12 @@ tile.fluid_duct.name=Universal Fluid Duct (Deprecated) tile.fluid_duct_box.name=Universal Fluid Duct (Boxduct) tile.fluid_duct_exhaust.name=Exhaust Pipe tile.fluid_duct_paintable_block_exhaust.name=Paintable Coated Exhaust Pipe +tile.fluid_duct_paintable_block_exhaust.desc=Right-click with a solid block to set a paint$Paint can be cleared with a screwdriver$Port texture can be disabled with a defuser$Paints can be copied with the copy tool tile.fluid_duct_gauge.name=Flow Gauge Pipe tile.fluid_duct_gauge.desc=Pipe that displays how much fluid$moves within the network per tick.$Split networks connected by barrels$or tanks are considered as one shared network. tile.fluid_duct_neo.name=Universal Fluid Duct tile.fluid_duct_paintable.name=Paintable Coated Universal Fluid Duct +tile.fluid_duct_paintable.desc=Right-click with a solid block to set a paint$Paint can be cleared with a screwdriver$Port texture can be disabled with a defuser$Paints can be copied with the copy tool tile.fluid_duct_solid.name=Coated Universal Fluid Duct (Deprecated) tile.fluid_pump.name=Flow Control Pump tile.fluid_counter_valve.name=Fluid Valve with Counter @@ -5956,6 +5958,7 @@ tile.nuke_prototype.name=The Prototype tile.nuke_solinium.name=The Blue Rinse tile.nuke_tsar.name=Tsar Bomba tile.oc_cable_paintable.name=Paintable Network Cable +tile.oc_cable_paintable.desc=Right-click with a solid block to set a paint$Paint can be cleared with a screwdriver$Port texture can be disabled with a defuser$Paints can be copied with the copy tool tile.oil_duct.name=Oil Pipe tile.oil_duct_solid.name=Coated Oil Pipe tile.oil_pipe.name=Crude Oil Extraction Pipe @@ -6087,6 +6090,7 @@ tile.plushie.name=%s Plushie tile.pneumatic_tube.name=Pneumatic Tube tile.pneumatic_tube.desc=Sends items using compressed air.$Right-click with screwdriver to toggle an input.$Shift right-click with screwdriver to toggle an output.$Inputs can be configured, and connected to compressed air.$Sends up to one stack, four times per second. tile.pneumatic_tube_paintable.name=Paintable Pneumatic Tube +tile.pneumatic_tube_paintable.desc=Right-click with a solid block to set a paint$Paint can be cleared with a screwdriver$Port texture can be disabled with a defuser$Paints can be copied with the copy tool tile.pole_satellite_receiver.name=Satellite Dish tile.pole_top.name=Antenna Top tile.press_preheater.name=Burner Press Preheater @@ -6262,6 +6266,7 @@ tile.red_cable_classic.name=Red Copper Cable (Classic) tile.red_cable_gauge.name=Power Gauge tile.red_cable_gauge.desc=Cable that displays how much power$moves within the network per tick.$Split networks connected by energy$storage blocks are considered as one shared network. tile.red_cable_paintable.name=Paintable Red Copper Cable +tile.red_cable_paintable.desc=Right-click with a solid block to set a paint$Paint can be cleared with a screwdriver$Port texture can be disabled with a defuser$Paints can be copied with the copy tool tile.red_connector.name=Electricity Connector tile.red_connector_super.name=Heavy Duty Electricity Connector tile.red_pylon.name=Electricity Pylon diff --git a/src/main/resources/assets/hbm/manual/STYLEGUIDE.md b/src/main/resources/assets/hbm/manual/STYLEGUIDE.md new file mode 100644 index 000000000..f2d74526a --- /dev/null +++ b/src/main/resources/assets/hbm/manual/STYLEGUIDE.md @@ -0,0 +1,24 @@ +# What is QMAW, anyway? +QMAW stands for *Quick Manual And Wiki*. While the word "wiki" might give the impression that it should be a complete description of certain topics, that is not actually the case. Navigation is handled mostly over hyperlinks in the text, much like a wiki, but the actual content adheres the "quick manual" part of the name. + +# So how should a QMAW page be written? +Concise and informative. It may be enticing to simply write down everything you can think of about a certain topic, but that's not exactly useful. QMAW is primarily a simple to digest guide for starters, and as such, topics should only be described as deeply as they have to be. + +A simple way to explain this concept is as such: Pretend you are a new player, you don't know a whole lot about the mod in general, just the basics that got you as far into progression as you are, and you now for the first time encounter a topic: What information about that topic would be the most useful right now? A player who is reading about crude oil will most likely be in the stage of using crude oil for the first time. That will include drilling for oil, the most important products derived from oil which are required to progress from that step, and a few other oil related things one might expect in the near future, assuming they are important enough to mention. That is it. One could explain every single oil processing step, every recipe, and every machine involved, but that is not exactly useful for people who are only going to be working with a very small set of those machines in the coming hours. + +# What shouldn't a QMAW page contain? +* Things that simply aren't relevant to players who are the most likely to read the given page +* Lengthy explanations of recipes (to some extent that can be useful, for example pointing towards the next progression material derived from the topic in question), since NEI already covers those +* Very fine details on how things are used (ideally, by understanding the subject, people will figure that out themselves), although general instructions on difficult topics are sometimes needed (for example, even with the particle accelerator pages, some people may not manage to build a functioning accelerator, which is why a step-by-step construction guide was included) + +# Conclusion +A lot of people have short attention spans, so don't write an entire novel that no one's going to read. Keep the info short, but include everything that is *actually* relevant at the point when the player is expected to look that page up. And most importantly, double check if your info is correct - no information is better than wrong information. + + _________ ___ ___ _____ ___ ___ + //////// / // /_ _// / ////_/ // / // / + // / // / //// ///// / // / // / // / // / + // / // / // ///_/// / // / // / // / // / + // / // / // / // / //////// / // /___ // / + // ///// / // / // / // / // / // /// /// / + // / //_/_ // / // / // / // / ////_///// / +//////////_/ //_/ //_/ //_/ //_/ //_/ //_/