diff --git a/src/main/java/malte0811/industrialWires/Recipes.java b/src/main/java/malte0811/industrialWires/Recipes.java index 6978fcf..a04536d 100644 --- a/src/main/java/malte0811/industrialWires/Recipes.java +++ b/src/main/java/malte0811/industrialWires/Recipes.java @@ -113,11 +113,13 @@ public class Recipes { ItemStack coil = IC2Items.getItem("crafting", "coil"); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(panel, 1, BlockTypes_Panel.CREATOR.ordinal()), "rmr", "rdr", "rar", 'r', "stickSteel", 'm', motor, 'd', drillHeadIron, 'a', advAlloy)); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(panel, 8, BlockTypes_Panel.DUMMY.ordinal()), + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(panel, 4, BlockTypes_Panel.DUMMY.ordinal()), " r ", "rmr", " r ", 'r', "dustRedstone", 'm', PanelUtils.getPanelBase())); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(panel, 1, BlockTypes_Panel.RS_WIRE.ordinal()), "c", "d", 'd', new ItemStack(panel, 1, BlockTypes_Panel.DUMMY.ordinal()), 'c', new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.CONNECTOR_REDSTONE.ordinal()))); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(panel, 1, BlockTypes_Panel.UNFINISHED.ordinal()), + "ppp", "www", "ppp", 'p', "plateIron", 'w', "wireCopper")); // PANEL COMPONENTS GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(panelComponent, 1, 0), "dustGlowstone", Blocks.STONE_BUTTON, "wireCopper")); diff --git a/src/main/java/malte0811/industrialWires/client/ClientProxy.java b/src/main/java/malte0811/industrialWires/client/ClientProxy.java index c505a45..55b2b90 100644 --- a/src/main/java/malte0811/industrialWires/client/ClientProxy.java +++ b/src/main/java/malte0811/industrialWires/client/ClientProxy.java @@ -222,7 +222,9 @@ public class ClientProxy extends CommonProxy { new ManualPages.Text(m, "industrialwires.intro0"), new ManualPages.Text(m, "industrialwires.intro1"), new ManualPages.Crafting(m, "industrialwires.intro2", new ItemStack(IndustrialWires.panel, 1, BlockTypes_Panel.DUMMY.ordinal())), - new ManualPages.Text(m, "industrialwires.intro3") + new ManualPages.Text(m, "industrialwires.intro3"), + new ManualPages.Crafting(m, "industrialwires.intro4", new ItemStack(IndustrialWires.panel, 1, BlockTypes_Panel.UNFINISHED.ordinal())), + new ManualPages.Text(m, "industrialwires.intro5") ); m.addEntry("industrialwires.panel_creator", "control_panels", new ManualPages.Crafting(m, "industrialwires.panel_creator0", new ItemStack(IndustrialWires.panel, 1, BlockTypes_Panel.CREATOR.ordinal())), diff --git a/src/main/java/malte0811/industrialWires/controlpanel/PanelUtils.java b/src/main/java/malte0811/industrialWires/controlpanel/PanelUtils.java index bd0415d..0ec687f 100644 --- a/src/main/java/malte0811/industrialWires/controlpanel/PanelUtils.java +++ b/src/main/java/malte0811/industrialWires/controlpanel/PanelUtils.java @@ -382,16 +382,18 @@ public final class PanelUtils { public static float getAngle(ItemStack inv) { float angle = 0; - if (inv.hasTagCompound()) { - angle = inv.getTagCompound().getFloat("angle"); + NBTTagCompound nbt = inv.getTagCompound(); + if (nbt != null && nbt.hasKey("angle")) { + angle = nbt.getFloat("angle"); } return angle; } public static float getHeight(ItemStack inv) { - float height = 0; - if (inv.hasTagCompound()) { - height = inv.getTagCompound().getFloat("height"); + float height = .5F; + NBTTagCompound nbt = inv.getTagCompound(); + if (nbt != null && nbt.hasKey("height")) { + height = nbt.getFloat("height"); } return height; } diff --git a/src/main/java/malte0811/industrialWires/controlpanel/PropertyComponents.java b/src/main/java/malte0811/industrialWires/controlpanel/PropertyComponents.java index f8d2db3..fced740 100644 --- a/src/main/java/malte0811/industrialWires/controlpanel/PropertyComponents.java +++ b/src/main/java/malte0811/industrialWires/controlpanel/PropertyComponents.java @@ -96,6 +96,8 @@ public class PropertyComponents implements IUnlistedPropertyButtons, switches, indicator lights and other things that can be placed on a control panel are called §l(Panel) Components§r
To create a control panel you will need a Panel Creator, the individual components and a basic machine casing as the enclosure of the panel. Each -ie.manual.entry.industrialwires.intro1=component is described in the entry "Panel Components". Right-clicking with a panel component opens up a GUI in which the properties of the component, like the redstone channel and ID or the color, can be configured. +ie.manual.entry.industrialwires.intro0=Control Panels allow you to monitor and control a large amount of redstone signals using only a few blocks. Those signals can currently be connected using redstone wires and connectors.
Buttons, switches, indicator lights and other things that can be placed on a control panel are called §l(Panel) Components§r
To create a control panel you will need a Panel Creator, the individual components and an Unfinished Panel (which determines the shape of the +ie.manual.entry.industrialwires.intro1=panel). Each component is described in the entry "Panel Components". Right-clicking with a panel component opens up a GUI in which the properties of the component, like the redstone channel and ID or the color, can be configured. ie.manual.entry.industrialwires.intro2=A §l(panel) network§r is formed by panel blocks connected to each other, directly or through other panel blocks. Panel blocks include the control panel itself, the panel connector and the Redstone Wire Controller. If multiple components in one network are configured to modify the same ie.manual.entry.industrialwires.intro3=redstone signal, the resulting signal will be the highest of the individual signals. Having multiple components accepting the same signal on a network is valid as well. +ie.manual.entry.industrialwires.intro4=The §lUnfinished Control Panel§r is used as the casing of a control panel. It can be configured by putting it into an Engineer's Workbench. The slider labeled "Height" changes the height in the middle of the panel. The "Angle" slider changes the angle of the panel relative to the surface it is +ie.manual.entry.industrialwires.intro5=placed on, creating tilted panels. The sliders will automatically clamp to the highest/lowest angle/height the panel can have without being partially outside the block. The values might not visually clamp due to the way the Workbench works, closing and re-opening the GUI should fix this. ie.manual.entry.industrialwires.panel_creator.name=Panel Creator ie.manual.entry.industrialwires.panel_creator.subtext= ie.manual.entry.industrialwires.panel_creator0=The GUI of the panel creator consists of two major sections: The controls on the left and the panel on the right. Components can be placed on the panel by "placing" the items in the corresponding point in the GUI. If the component is surrounded by a red area, it can not be placed in that -ie.manual.entry.industrialwires.panel_creator1=position on the panel. This usually means that it is either overlapping with an other component or isn't completely on the panel. The top button on the left (D) disassembles an existing control panel when it is placed in the slot beneath the button: The components of that panel are placed in the GUI, allowing them to be repositioned. The machine casing is lost in this process. The next button (C) turns a machine casing in the slot into a control panel with the components as positioned in the right of the GUI. The button -ie.manual.entry.industrialwires.panel_creator2=labeled R removes all components from the GUI panel area and places them in your inventory. Finally the last button (S) changes between being able to place components anywhere on the panel to only being able to place them on a 16x16 grid. +ie.manual.entry.industrialwires.panel_creator1=position on the panel. This usually means that it is either overlapping with an other component or isn't completely on the panel.
The top button on the left (D) disassembles an existing control panel when it is placed in the slot beneath the button: The components of that panel are placed in the GUI, allowing them to be repositioned. The casing is lost in this process.
The next button (C) places the components from the right of the GUI on an Unfinished Control Panel in the slot in the +ie.manual.entry.industrialwires.panel_creator2=left of the GUI, turning it into a regular Control Panel.
The button labeled R removes all components from the GUI panel area and places them in your inventory.
Finally the last button (S) changes between being able to place components anywhere on the panel to only being able to place them on a 16x16 grid. ie.manual.entry.industrialwires.redstone.name=Redstone Connections ie.manual.entry.industrialwires.redstone.subtext=Could also be blood vessels