diff --git a/src/main/java/malte0811/industrialWires/IndustrialWires.java b/src/main/java/malte0811/industrialWires/IndustrialWires.java index 113419e..3fd6cb7 100644 --- a/src/main/java/malte0811/industrialWires/IndustrialWires.java +++ b/src/main/java/malte0811/industrialWires/IndustrialWires.java @@ -189,6 +189,7 @@ public class IndustrialWires { GameRegistry.registerTileEntity(TileEntityJacobsLadder.class, new ResourceLocation(MODID, "jacobsLadder")); GameRegistry.registerTileEntity(TileEntityMarx.class, new ResourceLocation(MODID, "marx_generator")); GameRegistry.registerTileEntity(TileEntityPanel.class, new ResourceLocation(MODID, "control_panel")); + GameRegistry.registerTileEntity(TileEntityGeneralCP.class, new ResourceLocation(MODID, "gcp")); GameRegistry.registerTileEntity(TileEntityRSPanelIE.class, new ResourceLocation(MODID, "control_panel_rs")); GameRegistry.registerTileEntity(TileEntityRSPanelOthers.class, new ResourceLocation(MODID, "control_panel_rs_compat")); GameRegistry.registerTileEntity(TileEntityPanelCreator.class, new ResourceLocation(MODID, "panel_creator")); diff --git a/src/main/java/malte0811/industrialWires/blocks/controlpanel/BlockTypes_Panel.java b/src/main/java/malte0811/industrialWires/blocks/controlpanel/BlockTypes_Panel.java index 80077e2..0606ce9 100644 --- a/src/main/java/malte0811/industrialWires/blocks/controlpanel/BlockTypes_Panel.java +++ b/src/main/java/malte0811/industrialWires/blocks/controlpanel/BlockTypes_Panel.java @@ -15,6 +15,7 @@ package malte0811.industrialWires.blocks.controlpanel; +import malte0811.industrialWires.compat.Compat; import net.minecraft.util.IStringSerializable; import java.util.Locale; @@ -35,7 +36,7 @@ public enum BlockTypes_Panel implements IStringSerializable { public boolean showInCreative() { if (this==OTHER_RS_WIRES) { - + return Compat.enableOtherRS; } return this != SINGLE_COMP; } diff --git a/src/main/java/malte0811/industrialWires/crafting/factories/OtherBundledRedstone.java b/src/main/java/malte0811/industrialWires/crafting/factories/OtherBundledRedstone.java new file mode 100644 index 0000000..c3d26fe --- /dev/null +++ b/src/main/java/malte0811/industrialWires/crafting/factories/OtherBundledRedstone.java @@ -0,0 +1,31 @@ +/* + * This file is part of Industrial Wires. + * Copyright (C) 2016-2018 malte0811 + * Industrial Wires is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * Industrial Wires is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with Industrial Wires. If not, see . + */ + +package malte0811.industrialWires.crafting.factories; + +import com.google.gson.JsonObject; +import malte0811.industrialWires.compat.Compat; +import net.minecraftforge.common.crafting.IConditionFactory; +import net.minecraftforge.common.crafting.JsonContext; + +import java.util.function.BooleanSupplier; + +public class OtherBundledRedstone implements IConditionFactory { + + @Override + public BooleanSupplier parse(JsonContext context, JsonObject json) { + return () -> Compat.enableOtherRS; + } +} diff --git a/src/main/resources/assets/industrialwires/blockstates/control_panel.json b/src/main/resources/assets/industrialwires/blockstates/control_panel.json index 3ff974c..84ac7a6 100644 --- a/src/main/resources/assets/industrialwires/blockstates/control_panel.json +++ b/src/main/resources/assets/industrialwires/blockstates/control_panel.json @@ -72,8 +72,11 @@ "model": "industrialwires:smartmodel/panel_single_comp" }, "other_rs_wires": { - "model": "cube_all", - "textures": {"all": "industrialwires:blocks/rs_panel_others"} + "model": "industrialwires:rings", + "textures": { + "normal": "industrialwires:blocks/rs_panel_others", + "flipped": "industrialwires:blocks/rs_panel_others_flipped" + } } }, "inventory,type=rs_wire": { @@ -113,8 +116,11 @@ //Doesn't matter, this will be overridden in code }, "inventory,type=other_rs_wires": { - "model": "cube_all", - "textures": {"all": "industrialwires:blocks/rs_panel_others"} + "model": "industrialwires:rings", + "textures": { + "normal": "industrialwires:blocks/rs_panel_others", + "flipped": "industrialwires:blocks/rs_panel_others_flipped" + } } } } diff --git a/src/main/resources/assets/industrialwires/models/block/rings.json b/src/main/resources/assets/industrialwires/models/block/rings.json new file mode 100644 index 0000000..919a75a --- /dev/null +++ b/src/main/resources/assets/industrialwires/models/block/rings.json @@ -0,0 +1,16 @@ +{ + "parent": "block/block", + "elements": [ + { "from": [ 0, 0, 0 ], + "to": [ 16, 16, 16 ], + "faces": { + "down": { "texture": "#flipped", "cullface": "down", "rotation": 90 }, + "up": { "texture": "#normal", "cullface": "up", "rotation": 0 }, + "north": { "texture": "#flipped", "cullface": "north", "rotation": 0 }, + "south": { "texture": "#normal", "cullface": "south", "rotation": 270 }, + "west": { "texture": "#flipped", "cullface": "west", "rotation": 90 }, + "east": { "texture": "#normal", "cullface": "east", "rotation": 180 } + } + } + ] +} diff --git a/src/main/resources/assets/industrialwires/recipes/_factories.json b/src/main/resources/assets/industrialwires/recipes/_factories.json index b5db864..803dae6 100644 --- a/src/main/resources/assets/industrialwires/recipes/_factories.json +++ b/src/main/resources/assets/industrialwires/recipes/_factories.json @@ -1,6 +1,7 @@ { "conditions" : { - "conversion": "malte0811.industrialWires.crafting.factories.IsConversionEnabled" + "conversion": "malte0811.industrialWires.crafting.factories.IsConversionEnabled", + "other_bundled_redstone": "malte0811.industrialWires.crafting.factories.OtherBundledRedstone" }, "recipes": { "component_init": "malte0811.industrialWires.crafting.factories.InitPCFactory", diff --git a/src/main/resources/assets/industrialwires/recipes/control_panel_rs_other.json b/src/main/resources/assets/industrialwires/recipes/control_panel_rs_other.json new file mode 100644 index 0000000..c19170a --- /dev/null +++ b/src/main/resources/assets/industrialwires/recipes/control_panel_rs_other.json @@ -0,0 +1,26 @@ +{ + "result": { + "item": "industrialwires:control_panel", + "data": 6 + }, + "pattern": [ + " r ", + "rdr", + " r " + ], + "type": "minecraft:crafting_shaped", + "key": { + "r": { + "type": "forge:ore_dict", "ore": "dustRedstone" + }, + "d": { + "item": "industrialwires:control_panel", + "data": 2 + } + }, + "conditions": [ + { + "type": "industrialwires:other_bundled_redstone" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/industrialwires/recipes/control_panel_rs_controller.json b/src/main/resources/assets/industrialwires/recipes/control_panel_rs_wire.json similarity index 100% rename from src/main/resources/assets/industrialwires/recipes/control_panel_rs_controller.json rename to src/main/resources/assets/industrialwires/recipes/control_panel_rs_wire.json diff --git a/src/main/resources/assets/industrialwires/textures/blocks/rs_panel_others.png b/src/main/resources/assets/industrialwires/textures/blocks/rs_panel_others.png index 4fa909c..d19230b 100644 Binary files a/src/main/resources/assets/industrialwires/textures/blocks/rs_panel_others.png and b/src/main/resources/assets/industrialwires/textures/blocks/rs_panel_others.png differ diff --git a/src/main/resources/assets/industrialwires/textures/blocks/rs_panel_others_flipped.png b/src/main/resources/assets/industrialwires/textures/blocks/rs_panel_others_flipped.png new file mode 100644 index 0000000..910ab69 Binary files /dev/null and b/src/main/resources/assets/industrialwires/textures/blocks/rs_panel_others_flipped.png differ