From ff03a1b70d080d35af90a0b3690cee6c00156201 Mon Sep 17 00:00:00 2001 From: stfwi Date: Sun, 28 Apr 2019 15:48:03 +0200 Subject: [PATCH] Added redstone controlled fluid valves. Check valve recipe adapted. --- 1.12/gradle.properties | 2 +- 1.12/meta/update.json | 3 +- 1.12/readme.md | 4 + .../engineersdecor/blocks/BlockDecor.java | 4 +- .../blocks/BlockDecorPipeValve.java | 107 +++++++++++++++--- .../wile/engineersdecor/blocks/ModBlocks.java | 21 +++- .../wile/engineersdecor/detail/ModConfig.java | 21 ++++ .../blockstates/straight_pipe_valve.json | 3 +- .../straight_pipe_valve_redstone.json | 19 ++++ .../straight_pipe_valve_redstone_analog.json | 19 ++++ .../assets/engineersdecor/lang/en_us.lang | 12 +- .../assets/engineersdecor/lang/ru_ru.lang | 12 +- ...ight_pipe_valve_rs_connector_submodel.json | 42 +++++++ .../engineersdecor/recipes/_constants.json | 18 +++ .../recipes/straight_pipe_valve_recipe.json | 5 +- ...ght_pipe_valve_redstone_analog_recipe.json | 16 +++ .../straight_pipe_valve_redstone_recipe.json | 17 +++ ..._pipe_valve_redstone_recipe_backcycle.json | 16 +++ ...ipe_valve_side_redstone_analog_texture.png | Bin 0 -> 624 bytes ...ht_pipe_valve_side_redstone_cn_texture.png | Bin 0 -> 266 bytes ...aight_pipe_valve_side_redstone_texture.png | Bin 0 -> 615 bytes meta/update.json | 3 +- 22 files changed, 317 insertions(+), 27 deletions(-) create mode 100644 1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve_redstone.json create mode 100644 1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve_redstone_analog.json create mode 100644 1.12/src/main/resources/assets/engineersdecor/models/block/pipe/straight_pipe_valve_rs_connector_submodel.json create mode 100644 1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_analog_recipe.json create mode 100644 1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_recipe.json create mode 100644 1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_recipe_backcycle.json create mode 100644 1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_redstone_analog_texture.png create mode 100644 1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_redstone_cn_texture.png create mode 100644 1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_redstone_texture.png diff --git a/1.12/gradle.properties b/1.12/gradle.properties index 8ba36fd..af33e8b 100644 --- a/1.12/gradle.properties +++ b/1.12/gradle.properties @@ -4,4 +4,4 @@ org.gradle.jvmargs=-Xmx8G version_minecraft=1.12.2 version_forge=14.23.5.2768 version_jei=4.10.0.198 -version_engineersdecor=1.0.4-b5 +version_engineersdecor=1.0.4-b6 diff --git a/1.12/meta/update.json b/1.12/meta/update.json index 603bed6..6892ecb 100644 --- a/1.12/meta/update.json +++ b/1.12/meta/update.json @@ -1,6 +1,7 @@ { "homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/", "1.12.2": { + "1.0.4-b6": "[A] Added redstone controlled fluid valve.\n[A] Added redstone controlled analog fluid valve.\n[M] Check valve recipe adapted (thanks majijn).", "1.0.4-b5": "[A] Horizontal steel double-T support beam with pole connections.\n[A] Added fluid pipe check valve (straight, conducts only one way).\n[M] Internal registration block/te handling changed.", "1.0.4-b4": "[F] Clinker/slag brick wall side cullfacing disabled to prevent texture leaks when connecting to concrete walls.\n[F] Unused treated wood pole texture regions filled (optifine).\n[F] Using mipped cutout format for window multi-layer model (issue #19, thanks rixmswey for reporting and details).\n[M] Recipe tuning, added standalone recipe for all mod blocks.\n[M] In-game CTRL-SHIFT tooltip documentation updated.\n[M] Panzer glass block: Ambient occlusion and light opacity tuned.\n[M] Stairs: Light opacity tuned.\n[A] Tooltip documentation added for mod stairs.\n[E] Horizontal steel double-T support beam (config:experimental).", "1.0.4-b3": "[A] Added thin (4x4x16) and thick (6x6x16) steel hollow poles.\n[A] Added support head/foot components for thin and thick steel poles.", @@ -29,6 +30,6 @@ }, "promos": { "1.12.2-recommended": "1.0.3", - "1.12.2-latest": "1.0.4-b5" + "1.12.2-latest": "1.0.4-b6" } } \ No newline at end of file diff --git a/1.12/readme.md b/1.12/readme.md index c1a5ffa..db6b94a 100644 --- a/1.12/readme.md +++ b/1.12/readme.md @@ -10,6 +10,10 @@ Mod sources for Minecraft version 1.12.2. ---- ## Revision history + - v1.0.4-b6 [A] Added redstone controlled fluid valve. + [A] Added redstone controlled analog fluid valve. + [M] Check valve recipe adapted (thanks majijn). + - v1.0.4-b5 [A] Horizontal steel double-T support beam with pole connections. [A] Added fluid pipe check valve (straight, conducts only one way). [M] Internal registration block/te handling changed. diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecor.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecor.java index fb8e184..1032426 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecor.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecor.java @@ -51,7 +51,9 @@ public class BlockDecor extends Block public static final long CFG_TRANSLUCENT = 0x0000000000000040L; // indicates a block/pane is glass like (transparent, etc) public static final long CFG_LIGHT_VALUE_MASK = 0x0000000000000f00L; // fixed value for getLightValue() public static final long CFG_LIGHT_VALUE_SHIFT = 8L; - public static final long CFG_LAB_FURNACE_CRUDE = 0x0000000000010000L; // For DecorFurnace, denotes that it is a crude furnace. + public static final long CFG_ELECTRICAL = 0x0000000000010000L; // Denotes if a component is mainly flux driven. + public static final long CFG_REDSTONE_CONTROLLED = 0x0000000000020000L; // Denotes if a component has somehow a redstone control input + public static final long CFG_ANALOG = 0x0000000000040000L; // Denotes if a component has analog behaviour protected final AxisAlignedBB aabb; diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorPipeValve.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorPipeValve.java index 956c64e..b6577a1 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorPipeValve.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorPipeValve.java @@ -9,6 +9,8 @@ */ package wile.engineersdecor.blocks; +import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.item.ItemStack; import net.minecraft.block.Block; import net.minecraft.block.SoundType; @@ -16,6 +18,8 @@ import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.MathHelper; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.AxisAlignedBB; @@ -26,6 +30,7 @@ import net.minecraftforge.fluids.capability.CapabilityFluidHandler; import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.fluids.capability.IFluidTankProperties; import net.minecraftforge.fluids.FluidStack; +import wile.engineersdecor.ModEngineersDecor; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -33,18 +38,59 @@ import javax.annotation.Nullable; public class BlockDecorPipeValve extends BlockDecorDirected { + public static final PropertyInteger RS_CONNECTION_DIR = PropertyInteger.create("rsdir", 0,4); + + public static void on_config(int container_size_decl, int redstone_slope) + { + BTileEntity.fluid_capacity_mb = MathHelper.clamp(container_size_decl, 1, 10000); + BTileEntity.redstone_flow_slope_mb = MathHelper.clamp(redstone_slope, 1, 10000); + ModEngineersDecor.logger.info("Config pipe valve: maxflow:" + BTileEntity.fluid_capacity_mb + "mb, redstone amp:" + BTileEntity.redstone_flow_slope_mb + "mb/sig"); + } + public BlockDecorPipeValve(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound, @Nonnull AxisAlignedBB unrotatedAABB) { super(registryName, config, material, hardness, resistance, sound, unrotatedAABB); } + @Override + protected BlockStateContainer createBlockState() + { return new BlockStateContainer(this, FACING, RS_CONNECTION_DIR); } + @Override @SuppressWarnings("deprecation") public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { IBlockState state = super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer); - if(!placer.isSneaking()) state = state.withProperty(FACING, state.getValue(FACING).getOpposite()); + if(!placer.isSneaking()) state = state.withProperty(FACING, state.getValue(FACING).getOpposite()).withProperty(RS_CONNECTION_DIR, 0); return state; } + // world to model index transformations. [Facing block][Facing neighbour] -> int 0=nothing, 1=top, 2=right, 3=down, 4=left. + private static final int rsconnectors[][] = { + //D U N S W E + {0, 0, 1, 3, 4, 2}, // D + {0, 0, 3, 1, 4, 2}, // U + {3, 1, 0, 0, 4, 2}, // N + {3, 1, 0, 0, 2, 4}, // S + {3, 1, 2, 4, 0, 0}, // W + {3, 1, 4, 2, 0, 0}, // E + }; + + @Override + public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) + { + if((config & (CFG_REDSTONE_CONTROLLED))==0) return state; + EnumFacing.Axis bfa = state.getValue(FACING).getAxis(); + int bfi = state.getValue(FACING).getIndex(); + for(EnumFacing f:EnumFacing.VALUES) { + if(f.getAxis() == bfa) continue; + BlockPos nbp = pos.offset(f); + IBlockState nbs = world.getBlockState(nbp); + if(nbs.canProvidePower() && (nbs.getBlock().canConnectRedstone(nbs, world, nbp, f))) { + return state.withProperty(RS_CONNECTION_DIR, rsconnectors[state.getValue(FACING).getIndex()][f.getIndex()]); + } + } + return state.withProperty(RS_CONNECTION_DIR, 0); + } + @Override @SuppressWarnings("deprecation") public void neighborChanged(IBlockState state, World world, BlockPos pos, Block block, BlockPos fromPos) @@ -60,6 +106,9 @@ public class BlockDecorPipeValve extends BlockDecorDirected world.notifyNeighborsOfStateChange(pos, this, true); } + public boolean canConnectRedstone(IBlockState state, IBlockAccess world, BlockPos pos, @Nullable EnumFacing side) + { return (side!=null) && (side!=state.getValue(FACING)) && (side!=state.getValue(FACING).getOpposite()); } + @Override public boolean hasTileEntity(IBlockState state) { return true; } @@ -71,7 +120,7 @@ public class BlockDecorPipeValve extends BlockDecorDirected private void update_te(World world, IBlockState state, BlockPos pos) { TileEntity te = world.getTileEntity(pos); - if(te instanceof BlockDecorPipeValve.BTileEntity) ((BlockDecorPipeValve.BTileEntity)te).block_reconfigure(state.getValue(FACING)); + if(te instanceof BlockDecorPipeValve.BTileEntity) ((BlockDecorPipeValve.BTileEntity)te).block_reconfigure(state.getValue(FACING), config); } //-------------------------------------------------------------------------------------------------------------------- @@ -80,17 +129,34 @@ public class BlockDecorPipeValve extends BlockDecorDirected public static class BTileEntity extends TileEntity implements IFluidHandler, IFluidTankProperties, ICapabilityProvider { - public static final int FLUID_CAPACITY_MB = 1000; // likely also the max flow per tick private static final BackFlowHandler back_flow_handler_ = new BackFlowHandler(); + protected static int fluid_capacity_mb = 1000; // likely also the max flow per tick + protected static int redstone_flow_slope_mb = 1000/15; private final IFluidTankProperties[] fluid_props_ = {this}; private EnumFacing block_facing_ = EnumFacing.NORTH; - private boolean filling = false; + private boolean filling_ = false; + private boolean filling_enabled_ = true; + private long block_config_ = 0; public BTileEntity() {} - public void block_reconfigure(EnumFacing facing) - { block_facing_ = facing; } + public void block_reconfigure(EnumFacing facing, long block_config) + { + block_facing_ = facing; + block_config_ = block_config; + filling_enabled_ = false; + IFluidHandler fh = forward_fluid_handler(); + if(fh!=null) { + if(fh.getTankProperties().length==0) { + filling_enabled_ = true; // we don't know, so in doubt try filling. + } else { + for(IFluidTankProperties fp:fh.getTankProperties()) { + if((fp!=null) && (fp.canFill())) { filling_enabled_ = true; break; } + } + } + } + } // TileEntity ------------------------------------------------------------------------------ @@ -104,7 +170,7 @@ public class BlockDecorPipeValve extends BlockDecorDirected if(!hasWorld()) return; final IBlockState state = world.getBlockState(pos); if((!(state.getBlock() instanceof BlockDecorPipeValve))) return; - block_reconfigure(state.getValue(FACING)); + block_reconfigure(state.getValue(FACING), block_config_); } // ICapabilityProvider -------------------------------------------------------------------- @@ -124,17 +190,28 @@ public class BlockDecorPipeValve extends BlockDecorDirected // IFluidHandler/IFluidTankProperties --------------------------------------------------------------- + @Nullable + private IFluidHandler forward_fluid_handler() + { + final TileEntity te = world.getTileEntity(pos.offset(block_facing_)); + if(te == null) return null; + return te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, block_facing_.getOpposite()); + } + @Override public int fill(FluidStack resource, boolean doFill) { - if(filling) return 0; - final TileEntity te = world.getTileEntity(pos.offset(block_facing_)); - if(te == null) return 0; - final IFluidHandler fh = te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, block_facing_.getOpposite()); + if((filling_) || (!filling_enabled_)) return 0; + if((block_config_ & CFG_REDSTONE_CONTROLLED) != 0) { + int rs = world.getRedstonePowerFromNeighbors(pos); + if(rs <= 0) return 0; + if(((block_config_ & CFG_ANALOG) != 0) && (rs < 15)) resource.amount = MathHelper.clamp(rs * redstone_flow_slope_mb, 1, resource.amount); + } + final IFluidHandler fh = forward_fluid_handler(); if(fh==null) return 0; - filling = true; // in case someone does not check the cap, but just "forwards back" what is beeing filled right now. - int n_filled = fh.fill(resource, doFill); - filling = false; + filling_ = true; // in case someone does not check the cap, but just "forwards back" what is beeing filled right now. + int n_filled = forward_fluid_handler().fill(resource, doFill); + filling_ = false; return n_filled; } @@ -160,7 +237,7 @@ public class BlockDecorPipeValve extends BlockDecorDirected { return null; } public int getCapacity() - { return FLUID_CAPACITY_MB; } + { return fluid_capacity_mb; } @Override public boolean canFill() diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/ModBlocks.java b/1.12/src/main/java/wile/engineersdecor/blocks/ModBlocks.java index b188d75..0593125 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/ModBlocks.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/ModBlocks.java @@ -181,13 +181,27 @@ public class ModBlocks ModAuxiliaries.getPixeledAABB(5,11,0, 11,16,16) ); - public static final BlockDecorPipeValve STRAIGHT_PIPE_VALVE = new BlockDecorPipeValve( + public static final BlockDecorPipeValve STRAIGHT_CHECK_VALVE = new BlockDecorPipeValve( "straight_pipe_valve", BlockDecor.CFG_CUTOUT|BlockDecor.CFG_FACING_PLACEMENT, Material.IRON, 1.0f, 15f, SoundType.METAL, ModAuxiliaries.getPixeledAABB(4,4,0, 12,12,16) ); + public static final BlockDecorPipeValve STRAIGHT_REDSTONE_VALVE = new BlockDecorPipeValve( + "straight_pipe_valve_redstone", + BlockDecor.CFG_FACING_PLACEMENT|BlockDecor.CFG_REDSTONE_CONTROLLED, + Material.IRON, 1.0f, 15f, SoundType.METAL, + ModAuxiliaries.getPixeledAABB(4,4,0, 12,12,16) + ); + + public static final BlockDecorPipeValve STRAIGHT_REDSTONE_ANALOG_VALVE = new BlockDecorPipeValve( + "straight_pipe_valve_redstone_analog", + BlockDecor.CFG_FACING_PLACEMENT|BlockDecor.CFG_REDSTONE_CONTROLLED|BlockDecor.CFG_ANALOG, + Material.IRON, 1.0f, 15f, SoundType.METAL, + ModAuxiliaries.getPixeledAABB(4,4,0, 12,12,16) + ); + //-------------------------------------------------------------------------------------------------------------------- //-- Tile entities //-------------------------------------------------------------------------------------------------------------------- @@ -247,11 +261,10 @@ public class ModBlocks THIN_STEEL_POLE_HEAD, THICK_STEEL_POLE_HEAD, STEEL_DOUBLE_T_SUPPORT, - STRAIGHT_PIPE_VALVE, STRAIGHT_PIPE_VALVE_TEI + STRAIGHT_CHECK_VALVE, STRAIGHT_REDSTONE_VALVE, STRAIGHT_REDSTONE_ANALOG_VALVE, STRAIGHT_PIPE_VALVE_TEI }; - private static final Object dev_content[] = { - }; + private static final Object dev_content[] = {}; //-------------------------------------------------------------------------------------------------------------------- //-- Init diff --git a/1.12/src/main/java/wile/engineersdecor/detail/ModConfig.java b/1.12/src/main/java/wile/engineersdecor/detail/ModConfig.java index 30bfffa..71dcf5c 100644 --- a/1.12/src/main/java/wile/engineersdecor/detail/ModConfig.java +++ b/1.12/src/main/java/wile/engineersdecor/detail/ModConfig.java @@ -201,6 +201,26 @@ public class ModConfig }) @Config.Name("Crafting table: Move buttons") public boolean with_crafting_quickmove_buttons = false; + + @Config.Comment({ + "Defines how many millibuckets can be transferred (per tick) through the valves. " + + "That is technically the 'storage size' specified for blocks that want to fill " + + "fluids into the valve (the valve has no container and forward that to the output " + + "block), The value can be changed on-the-fly for tuning. " + }) + @Config.Name("Valves: Max flow rate") + @Config.RangeInt(min=1, max=10000) + public int pipevalve_max_flowrate = 1000; + + @Config.Comment({ + "Defines how many millibuckets per redstone signal strength can be transferred per tick " + + "through the analog redstone controlled valves. Note: power 0 is always off, power 15 is always " + + "the max flow rate. Between power 1 and 14 this scaler will result in a flow = 'redstone slope' * 'current redstone power'. " + + "The value can be changed on-the-fly for tuning. " + }) + @Config.Name("Valves: Redstone slope") + @Config.RangeInt(min=1, max=10000) + public int pipevalve_redstone_slope = 20; } @SuppressWarnings("unused") @@ -268,6 +288,7 @@ public class ModConfig BlockDecorChair.on_config(optout.without_chair_sitting, optout.without_mob_chair_sitting, tweaks.chair_mob_sitting_probability_percent, tweaks.chair_mob_standup_probability_percent); BlockDecorLadder.on_config(optout.without_ladder_speed_boost); BlockDecorCraftingTable.on_config(optout.without_crafting_table_history, false, tweaks.with_crafting_quickmove_buttons); + BlockDecorPipeValve.on_config(tweaks.pipevalve_max_flowrate, tweaks.pipevalve_redstone_slope); } } diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve.json index d3feed0..83d92f0 100644 --- a/1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve.json +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve.json @@ -4,6 +4,7 @@ "variants": { "normal": [{}], "inventory": [{}], - "facing": { "north":{"y":0}, "south":{"y":180}, "west":{"y":270}, "east":{"y":90}, "up": {"x":-90}, "down": {"x":90} } + "facing": { "north":{"y":0}, "south":{"y":180}, "west":{"y":270}, "east":{"y":90}, "up": {"x":-90}, "down": {"x":90} }, + "rsdir": { "0":{},"1":{},"2":{},"3":{},"4":{} } } } diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve_redstone.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve_redstone.json new file mode 100644 index 0000000..1ff17b3 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve_redstone.json @@ -0,0 +1,19 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "engineersdecor:pipe/straight_pipe_valve_model", + "textures": { "side" : "engineersdecor:blocks/pipe/straight_pipe_valve_side_redstone_texture" } + }, + "variants": { + "normal": [{}], + "inventory": [{}], + "facing": { "north":{"y":0}, "south":{"y":180}, "west":{"y":270}, "east":{"y":90}, "up": {"x":-90}, "down": {"x":90} }, + "rsdir": { + "0":{}, + "1":{ "submodel": {"rsdiru": { "model": "engineersdecor:pipe/straight_pipe_valve_rs_connector_submodel", "x": -90 }} }, + "2":{ "submodel": {"rsdirr": { "model": "engineersdecor:pipe/straight_pipe_valve_rs_connector_submodel", "y": 90 }} }, + "3":{ "submodel": {"rsdird": { "model": "engineersdecor:pipe/straight_pipe_valve_rs_connector_submodel", "x": 90 }} }, + "4":{ "submodel": {"rsdirl": { "model": "engineersdecor:pipe/straight_pipe_valve_rs_connector_submodel", "y": -90 }} } + } + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve_redstone_analog.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve_redstone_analog.json new file mode 100644 index 0000000..21f4069 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve_redstone_analog.json @@ -0,0 +1,19 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "engineersdecor:pipe/straight_pipe_valve_model", + "textures": { "side" : "engineersdecor:blocks/pipe/straight_pipe_valve_side_redstone_analog_texture" } + }, + "variants": { + "normal": [{}], + "inventory": [{}], + "facing": { "north":{"y":0}, "south":{"y":180}, "west":{"y":270}, "east":{"y":90}, "up": {"x":-90}, "down": {"x":90} }, + "rsdir": { + "0":{}, + "1":{ "submodel": {"rsdiru": { "model": "engineersdecor:pipe/straight_pipe_valve_rs_connector_submodel", "x": -90 }} }, + "2":{ "submodel": {"rsdirr": { "model": "engineersdecor:pipe/straight_pipe_valve_rs_connector_submodel", "y": 90 }} }, + "3":{ "submodel": {"rsdird": { "model": "engineersdecor:pipe/straight_pipe_valve_rs_connector_submodel", "x": 90 }} }, + "4":{ "submodel": {"rsdirl": { "model": "engineersdecor:pipe/straight_pipe_valve_rs_connector_submodel", "y": -90 }} } + } + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/lang/en_us.lang b/1.12/src/main/resources/assets/engineersdecor/lang/en_us.lang index 72ce51d..cc31fa7 100644 --- a/1.12/src/main/resources/assets/engineersdecor/lang/en_us.lang +++ b/1.12/src/main/resources/assets/engineersdecor/lang/en_us.lang @@ -95,7 +95,17 @@ tile.engineersdecor.small_lab_furnace.help=§6Small metal cased lab kiln.§r Sol smelting speed boost. #----------------------------------------------------------------------------------------------------------- tile.engineersdecor.straight_pipe_valve.name=Fluid pipe check valve -tile.engineersdecor.straight_pipe_valve.help=§6Straight fluid pipe fragment.§r Conducts fluids only in one direction. Does not connect to the sides. Sneak to place in reverse direction. +tile.engineersdecor.straight_pipe_valve.help=§6Straight fluid pipe fragment.§r Conducts fluids only in one direction. \ + Does not connect to the sides. Reduces flow rate. Sneak to place in reverse direction. +tile.engineersdecor.straight_pipe_valve_redstone.name=Redstone controlled fluid valve +tile.engineersdecor.straight_pipe_valve_redstone.help=§6Straight fluid pipe fragment.§r Conducts fluids only in one direction. \ + Does not connect to the sides. Sneak to place in reverse direction. \ + Blocks if not redstone powered. +tile.engineersdecor.straight_pipe_valve_redstone_analog.name=Redstone analog fluid valve +tile.engineersdecor.straight_pipe_valve_redstone_analog.help=§6Straight fluid pipe fragment.§r Conducts fluids only in one direction. \ + Does not connect to the sides. Sneak to place in reverse direction. \ + Blocks if not redstone powered, reduces the flow rate linear from power 1 to 14, \ + opens to maximum possible valve flow rate for power 15. #----------------------------------------------------------------------------------------------------------- tile.engineersdecor.sign_decor.name=Sign plate (Engineer's decor) tile.engineersdecor.sign_decor.help=§6This should not be craftable or visible in JEI. Used for creative tab and screenshots. diff --git a/1.12/src/main/resources/assets/engineersdecor/lang/ru_ru.lang b/1.12/src/main/resources/assets/engineersdecor/lang/ru_ru.lang index 4c3bbeb..e9759ee 100644 --- a/1.12/src/main/resources/assets/engineersdecor/lang/ru_ru.lang +++ b/1.12/src/main/resources/assets/engineersdecor/lang/ru_ru.lang @@ -88,7 +88,17 @@ tile.engineersdecor.small_lab_furnace.name=Компактная лаборато tile.engineersdecor.small_lab_furnace.help=§6Лабораторная печь в металлическом корпусе.§r Подача твёрдого топлива - сверху. Немного горячее чем каменная, поэтому быстрее. Два внутренних слота для ввода, выхода и топлива. #----------------------------------------------------------------------------------------------------------- tile.engineersdecor.straight_pipe_valve.name=Straight fluid valve -#tile.engineersdecor.straight_pipe_valve.help=§6Straight fluid pipe fragment.§r Conducts fluids only in one direction. Does not connect to the sides. Sneak to place in reverse direction. +#tile.engineersdecor.straight_pipe_valve.help=§6Straight fluid pipe fragment.§r Conducts fluids only in one direction. \ + Does not connect to the sides. Reduces flow rate. Sneak to place in reverse direction. +tile.engineersdecor.straight_pipe_valve_redstone.name=Redstone controlled fluid valve +#tile.engineersdecor.straight_pipe_valve_redstone.help=§6Straight fluid pipe fragment.§r Conducts fluids only in one direction. \ + Does not connect to the sides. Sneak to place in reverse direction. \ + Blocks if not redstone powered. +tile.engineersdecor.straight_pipe_valve_redstone_analog.name=Redstone analog fluid valve +#tile.engineersdecor.straight_pipe_valve_redstone_analog.help=§6Straight fluid pipe fragment.§r Conducts fluids only in one direction. \ + Does not connect to the sides. Sneak to place in reverse direction. \ + Blocks if not redstone powered, reduces the flow rate linear from power 1 to 14, \ + opens to maximum possible valve flow rate for power 15. #----------------------------------------------------------------------------------------------------------- tile.engineersdecor.sign_decor.name=Sign plate (Engineer's decor logo) #tile.engineersdecor.sign_decor.help=§6This should not be craftable or visible in JEI. Used for creative tab and screenshots. diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/pipe/straight_pipe_valve_rs_connector_submodel.json b/1.12/src/main/resources/assets/engineersdecor/models/block/pipe/straight_pipe_valve_rs_connector_submodel.json new file mode 100644 index 0000000..c1ed08d --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/pipe/straight_pipe_valve_rs_connector_submodel.json @@ -0,0 +1,42 @@ +{ + "textures": { + "rsside": "engineersdecor:blocks/pipe/straight_pipe_valve_side_redstone_texture", + "particle": "engineersdecor:blocks/pipe/straight_pipe_valve_side_redstone_texture", + "rsend": "engineersdecor:blocks/pipe/straight_pipe_valve_side_redstone_cn_texture" + }, + "elements": [ + { + "from": [5, 5, 0], + "to": [11, 11, 3], + "faces": { + "north": {"uv": [5, 5, 11, 11], "rotation": 90, "texture": "#rsend"}, + "east": {"uv": [13, 5, 16, 11], "texture": "#rsside"}, + "west": {"uv": [13, 5, 16, 11], "rotation": 180, "texture": "#rsside"}, + "up": {"uv": [13, 5, 16, 11], "rotation": 270, "texture": "#rsside"}, + "down": {"uv": [13, 5, 16, 11], "rotation": 90, "texture": "#rsside"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [120, 15, 0], + "translation": [-1, -1, -2], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_righthand": { + "rotation": [120, 30, 0], + "translation": [2, 3, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/_constants.json b/1.12/src/main/resources/assets/engineersdecor/recipes/_constants.json index cfa0394..a83c680 100644 --- a/1.12/src/main/resources/assets/engineersdecor/recipes/_constants.json +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/_constants.json @@ -106,6 +106,20 @@ ], "name": "plateAnyMetal" }, + { + "ingredient": [ + { "item": "immersiveengineering:material", "data": 8 }, + { "item": "immersiveengineering:material", "data": 9 } + ], + "name": "anyMechanicalComponent" + }, + { + "ingredient": [ + { "item": "immersiveengineering:connector", "data": 12 }, + { "item": "immersiveengineering:connector", "data": 13 } + ], + "name": "anyDirectedRedstoneConnector" + }, { "ingredient": [ { "type": "forge:ore_dict", "ore": "ingotBrick" }, @@ -129,6 +143,10 @@ "ingredient": { "type": "forge:ore_dict", "ore": "blockGlass" }, "name": "blockGlass" }, + { + "ingredient": { "type": "forge:ore_dict", "ore": "dustRedstone" }, + "name": "dustRedstone" + }, { "ingredient": { "item": "minecraft:diamond", "data": 0 }, "name": "itemDiamond" diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_recipe.json index 8e7201f..8562a52 100644 --- a/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_recipe.json +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_recipe.json @@ -8,11 +8,14 @@ ], "type": "minecraft:crafting_shaped", "pattern": [ - "PPP" + "PMP" ], "key": { "P": { "item": "#itemFluidPipe" + }, + "M": { + "item": "#anyMechanicalComponent" } }, "result": { diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_analog_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_analog_recipe.json new file mode 100644 index 0000000..9c1c82b --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_analog_recipe.json @@ -0,0 +1,16 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:straight_pipe_valve_redstone_analog", + "required": ["engineersdecor:straight_pipe_valve_redstone"] + } + ], + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { "item": "engineersdecor:straight_pipe_valve_redstone" } + ], + "result": { + "item": "engineersdecor:straight_pipe_valve_redstone_analog" + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_recipe.json new file mode 100644 index 0000000..5931be4 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_recipe.json @@ -0,0 +1,17 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:straight_pipe_valve_redstone", + "required": ["engineersdecor:straight_pipe_valve"] + } + ], + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { "item": "engineersdecor:straight_pipe_valve" }, + { "item": "#anyDirectedRedstoneConnector" } + ], + "result": { + "item": "engineersdecor:straight_pipe_valve_redstone" + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_recipe_backcycle.json b/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_recipe_backcycle.json new file mode 100644 index 0000000..bda3489 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_recipe_backcycle.json @@ -0,0 +1,16 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:straight_pipe_valve_redstone", + "required": ["engineersdecor:straight_pipe_valve_redstone_analog"] + } + ], + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { "item": "engineersdecor:straight_pipe_valve_redstone_analog" } + ], + "result": { + "item": "engineersdecor:straight_pipe_valve_redstone" + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_redstone_analog_texture.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_redstone_analog_texture.png new file mode 100644 index 0000000000000000000000000000000000000000..f0c34e60cd119765d008d1b65aa4b573ffae848e GIT binary patch literal 624 zcmV-$0+0QPP)VGd00Iz6L_t(I%YBngOY1-shM&w#Cb4Lu ztswO-6j2v$^pE({{9A(1tq87^BFJqUZtC^E!)OC&bo~o+2xVQj7@vbCE$g+%sg9EhINGXw0QdJd7DXOX> ziXxt$pOI3wX^8f5baaHZmhpJZY&JtF#qRDdgTa8ht|`lsr>7@E2pk_DcYw~pzgjMr z7-MLfhSh5Isp40C3+VNFY;SLq=Q-9|ilRU%g;MHgz}xLDv2*;%GE4{{1X^p>&f$e% zu~;CSBfq{Tj$;Oc!Dm3TwS_-9AL+eD9aKd#77fbX{|SQ z@9r25=M0B)q?CB?`F(aqK5Xs8lhV4%j&NOwP{{O$~r_4r?t!h|P|C?Pv)!QB1sE}Uf7=lN0000< KMNUMnLSTX_*c9^s literal 0 HcmV?d00001 diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_redstone_cn_texture.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_redstone_cn_texture.png new file mode 100644 index 0000000000000000000000000000000000000000..a21b62511f63b46afc4711b6bd9f0a7adc85df47 GIT binary patch literal 266 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=DjSL74G){)!Z!;3`iS#}JFtPbb-O9dZz8-M_~3#)hd!m^qT3SMF&L-?VZ2hLaO* z9JkyknyhHQyR2!0lap2LU7kJt=KY?lR&nV}NLpAYny}W@g@Hp+K`A18af8V=lVcaI zl+Su_a`P0G&>3Izs+tyQyl88D{?x60UlV`E+UKPgzA~GBU^sTM{;fil)9q~$T6;KNg4AF}BxRTS;D@e+TGl22WQ% Jmvv4FO#s$aY=Zy* literal 0 HcmV?d00001 diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_redstone_texture.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_redstone_texture.png new file mode 100644 index 0000000000000000000000000000000000000000..041866046bc7eba128ebc75ab5615414e1ea387a GIT binary patch literal 615 zcmV-t0+{`YP)VGd00IX|L_t(I%YBo*PUAonMvrI4V0uUo}(QbHDo+U0+`Z zfcyJu1 z(=5Qp#NzV)r;ZJHuMbY&PTd^%bQQM@L7D$79;Ir6>v>9v%oGFquqxK=0sR zRaJ#ChOXv}KaM|}zy4u>2Z9FXTZ)>;;e1xhKDQeOk!Zf=O3W0_@`5I_jD)~ubw z3qe_y2MG_LeNmD2f6h#Q!B|tx-y0 ztz}yO2H;QrovNy^))IS<)*5RqNs_!z0bmdU&N-~LoSR=nM2JW*S^eBN5dx_-Aq1q9 zgb?-}1hL`8QOEq-4*;BVESF0}*8(8734{=v9r@T%e|JY13@F1LUP|yD4d6ZTa!Dj5 ztJMmvHC@+z09;<8fYHebqtS>w&jBckVlzr(HV)$$fW>05--Df`l>OYj_kAhG7|a&( z^z_8b%L~)#^c~Q) zE$j6ftu@|zo}Zs-nufZr5kmC$V2nX)O<9(`gTGg>0apth_IdyS002ovPDHLkV1lqM B2sr=% literal 0 HcmV?d00001 diff --git a/meta/update.json b/meta/update.json index d8ac810..f66de8b 100644 --- a/meta/update.json +++ b/meta/update.json @@ -1,6 +1,7 @@ { "homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/", "1.12.2": { + "1.0.4-b6": "[A] Added redstone controlled fluid valve.\n[A] Added redstone controlled analog fluid valve.\n[M] Check valve recipe adapted (thanks majijn).", "1.0.4-b5": "[A] Horizontal steel double-T support beam with pole connections.\n[A] Added fluid pipe check valve (straight, conducts only one way).\n[M] Internal registration block/te handling changed.", "1.0.4-b4": "[F] Clinker/slag brick wall side cullfacing disabled to prevent texture leaks when connecting to concrete walls.\n[F] Unused treated wood pole texture regions filled (optifine).\n[F] Using mipped cutout format for window multi-layer model (issue #19, thanks rixmswey for reporting and details).\n[M] Recipe tuning, added standalone recipe for all mod blocks.\n[M] In-game CTRL-SHIFT tooltip documentation updated.\n[M] Panzer glass block: Ambient occlusion and light opacity tuned.\n[M] Stairs: Light opacity tuned.\n[A] Tooltip documentation added for mod stairs.\n[E] Horizontal steel double-T support beam (config:experimental).", "1.0.4-b3": "[A] Added thin (4x4x16) and thick (6x6x16) steel hollow poles.\n[A] Added support head/foot components for thin and thick steel poles.", @@ -38,7 +39,7 @@ }, "promos": { "1.12.2-recommended": "1.0.3", - "1.12.2-latest": "1.0.4-b5", + "1.12.2-latest": "1.0.4-b6", "1.13.2-recommended": "", "1.13.2-latest": "1.0.4-b3" }