Readme, automatic linting run. Factory Dropper: External Redstone mode added. Catwalk default state fixed (issue #140).

This commit is contained in:
stfwi 2020-12-05 09:33:52 +01:00
parent 93df09acd9
commit ed30ee49df
12 changed files with 66 additions and 49 deletions

View file

@ -1,7 +1,8 @@
{
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
"1.16.4": {
"1.1.4-b2": "[A] Steel Catwalks added (top and bottom aligned).\n[A] Steel Railings added.\n[F] Fixed Empty Fluid Barrel crafting crash (ty inflamedsebi).\n[A] Added Solar Panel power balancing.\n[M] GUI Button tooltip delay reduced to 800ms.\n[M] Hopper and Placer: Added \"Redstone ignored\" mode, changed icons from signal-like to Redstone-Torch-like.",
"1.1.4": "[R] Release build v1.1.4.\n[F] Solar Panel balancing threshold tuned.\n[F] Fixed Catwalk default state (issue #140, thx hvdklauw).\n[M] Updated lang ru_ru file (PR#137, Smollet777).\n[M] Factory Dropper: Added Ignore-External-Redstone mode.",
"1.1.4-b2": "[A] Steel Catwalks added (top and bottom aligned).\n[A] Steel Railings added.\n[F] Fixed Empty Fluid Barrel crafting crash (ty inflamedsebi).\n[A] Added Solar Panel power balancing.\n[M] GUI Button tooltip delay reduced to 800ms.\n[M] Hopper and Placer: Added \"Redstone ignored\" mode, changed icons from signal-like to Redstone-Torch-like.\n[M] Treated Wood Ladder now crafted from Old Industrial Wood, as Treated Wood Sticks now count as normal Sticks.",
"1.1.4-b1": "[U] Ported to 1.16.4.",
"1.1.3": "[R] Release build v1.1.3.",
"1.1.3-b3": "[A] Metal Sliding Door added (double door wing style).\n[A] Doors implicitly open/close adjacent wings of double doors.\n[A] Disabled injected buttons from other mods in container GUIs.\n[A] Mob spawning on Rebar/Gas Concrete inhibited (IE Concrete Compliancy).\n[M] Small Tree Cutter chopping improved (loosened tree volume search restrictions).",
@ -18,7 +19,7 @@
"1.1.2-b1": "[U] Ported to MC1.16.2."
},
"promos": {
"1.16.4-recommended": "1.1.3",
"1.16.4-latest": "1.1.4-b2"
"1.16.4-recommended": "1.1.4",
"1.16.4-latest": "1.1.4"
}
}

View file

@ -11,8 +11,11 @@ Mod sources for Minecraft version 1.16.x.
## Version history
~ v1.1.4 [R] Release build v1.1.4.
- v1.1.4 [R] Release build v1.1.4.
[F] Solar Panel balancing threshold tuned.
[F] Fixed Catwalk default state (issue #140, thx hvdklauw).
[M] Updated lang ru_ru file (PR#137, Smollet777).
[M] Factory Dropper: Added Ignore-External-Redstone mode.
- v1.1.4-b2 [A] Steel Catwalks added (top and bottom aligned).
[A] Steel Railings added.

View file

@ -71,7 +71,7 @@ public class EdCatwalkStairsBlock extends DecorBlock.HorizontalWaterLoggable imp
y_rotations.put(Direction.WEST, 3);
y_rotations.put(Direction.UP, 0);
y_rotations.put(Direction.DOWN, 0);
setDefaultState(getStateContainer().getBaseState().with(LEFT_RAILING, false).with(RIGHT_RAILING, false));
setDefaultState(super.getDefaultState().with(LEFT_RAILING, false).with(RIGHT_RAILING, false));
}
@Override

View file

@ -38,7 +38,7 @@ public class EdCatwalkTopAlignedBlock extends DecorBlock.WaterLoggable implement
public EdCatwalkTopAlignedBlock(long config, Block.Properties properties, final VoxelShape[] variant_shapes)
{
super(config, properties, variant_shapes[0]);
setDefaultState(getStateContainer().getBaseState().with(VARIANT, 0));
setDefaultState(super.getDefaultState().with(VARIANT, 0));
this.variant_shapes = VARIANT.getAllowedValues().stream().map(i->(i<variant_shapes.length) ? (variant_shapes[i]) : (VoxelShapes.fullCube())).collect(Collectors.toList());
}

View file

@ -225,6 +225,7 @@ public class EdDropper
public static final int DROPLOGIC_SILENT_DROP = 0x04;
public static final int DROPLOGIC_SILENT_OPEN = 0x08;
public static final int DROPLOGIC_CONTINUOUS = 0x10;
public static final int DROPLOGIC_IGNORE_EXT = 0x20;
///
private int filter_matches_[] = new int[CTRL_SLOTS_SIZE];
private int open_timer_ = 0;
@ -597,7 +598,7 @@ public class EdDropper
if(!(world.getBlockState(pos).getBlock() instanceof DropperBlock)) return;
final boolean continuous_mode = (drop_logic_ & DROPLOGIC_CONTINUOUS)!=0;
boolean dirty = block_power_updated_;
boolean redstone_trigger = (block_power_signal_ && ((block_power_updated_) || (continuous_mode)));
boolean redstone_trigger = (block_power_signal_ && ((block_power_updated_) || (continuous_mode))) || ((drop_logic_ & DROPLOGIC_IGNORE_EXT)!=0);
boolean filter_trigger;
boolean filter_defined;
boolean trigger;
@ -916,7 +917,7 @@ public class EdDropper
@Override
public void render(MatrixStack mx, int mouseX, int mouseY, float partialTicks)
{
renderBackground/*renderBackground*/(mx);
renderBackground(mx);
super.render(mx, mouseX, mouseY, partialTicks);
if(!tooltip_.render(mx, this, mouseX, mouseY)) renderHoveredTooltip(mx, mouseX, mouseY);
}
@ -973,7 +974,15 @@ public class EdDropper
} else if(isPointInRegion(132, 66, 9, 9, mouseX, mouseY)) {
container.onGuiAction("drop_logic", container.field(5) ^ DropperTileEntity.DROPLOGIC_FILTER_ANDGATE);
} else if(isPointInRegion(148, 66, 9, 9, mouseX, mouseY)) {
container.onGuiAction("drop_logic", container.field(5) ^ DropperTileEntity.DROPLOGIC_EXTERN_ANDGATE);
final int mask = (DropperTileEntity.DROPLOGIC_EXTERN_ANDGATE|DropperTileEntity.DROPLOGIC_IGNORE_EXT);
int logic = (container.field(5) & mask);
switch(logic) {
case DropperTileEntity.DROPLOGIC_EXTERN_ANDGATE: logic = 0; break;
case 0: logic = DropperTileEntity.DROPLOGIC_IGNORE_EXT; break;
case DropperTileEntity.DROPLOGIC_IGNORE_EXT: logic = DropperTileEntity.DROPLOGIC_EXTERN_ANDGATE; break;
default: logic = DropperTileEntity.DROPLOGIC_EXTERN_ANDGATE;
}
container.onGuiAction("drop_logic", (container.field(5) & (~mask)) | logic);
}
return true;
}
@ -1051,11 +1060,13 @@ public class EdDropper
}
// trigger logic
{
int filter_gate_offset = ((container.field(5) & DropperTileEntity.DROPLOGIC_FILTER_ANDGATE) != 0) ? 11 : 0;
int extern_gate_offset = ((container.field(5) & DropperTileEntity.DROPLOGIC_EXTERN_ANDGATE) != 0) ? 11 : 0;
int pulse_mode_offset = ((container.field(5) & DropperTileEntity.DROPLOGIC_CONTINUOUS ) != 0) ? 10 : 0;
final int logic = container.field(5);
int filter_gate_offset = ((logic & DropperTileEntity.DROPLOGIC_FILTER_ANDGATE) != 0) ? 11 : 0;
int pulse_mode_offset = ((logic & DropperTileEntity.DROPLOGIC_CONTINUOUS ) != 0) ? 10 : 0;
int extern_gate_offset_x = ((logic & DropperTileEntity.DROPLOGIC_EXTERN_ANDGATE) != 0) ? 11 : 0;
int extern_gate_offset_y = ((logic & DropperTileEntity.DROPLOGIC_IGNORE_EXT) != 0) ? 10 : 0;
blit(mx, x0+132, y0+66, 179+filter_gate_offset, 66, 9, 9);
blit(mx, x0+148, y0+66, 179+extern_gate_offset, 66, 9, 9);
blit(mx, x0+148, y0+66, 179+extern_gate_offset_x, 66+extern_gate_offset_y, 9, 9);
blit(mx, x0+162, y0+66, 200+pulse_mode_offset, 66, 9, 9);
}
// drop timer running indicator

View file

@ -9,12 +9,7 @@
package wile.engineersdecor.blocks;
import com.mojang.blaze3d.matrix.MatrixStack;
import wile.engineersdecor.ModContent;
import wile.engineersdecor.ModEngineersDecor;
import wile.engineersdecor.detail.ExternalObjects;
import wile.engineersdecor.libmc.client.ContainerGui;
import wile.engineersdecor.libmc.detail.Inventories;
import wile.engineersdecor.libmc.detail.Networking;
import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.tileentity.*;
import net.minecraft.inventory.container.*;
import net.minecraft.item.crafting.AbstractCookingRecipe;
@ -59,7 +54,12 @@ import net.minecraftforge.energy.IEnergyStorage;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.wrapper.SidedInvWrapper;
import com.mojang.blaze3d.systems.RenderSystem;
import wile.engineersdecor.ModContent;
import wile.engineersdecor.ModEngineersDecor;
import wile.engineersdecor.detail.ExternalObjects;
import wile.engineersdecor.libmc.client.ContainerGui;
import wile.engineersdecor.libmc.detail.Inventories;
import wile.engineersdecor.libmc.detail.Networking;
import javax.annotation.Nullable;
import java.util.*;

View file

@ -47,7 +47,7 @@ public class EdRoofBlock extends StandardBlocks.HorizontalWaterLoggable implemen
public EdRoofBlock(long config, Block.Properties properties, VoxelShape add, VoxelShape cut)
{
super(config, properties, Auxiliaries.getPixeledAABB(0, 0,0,16, 8, 16));
setDefaultState(stateContainer.getBaseState().with(HORIZONTAL_FACING, Direction.NORTH).with(SHAPE, StairsShape.STRAIGHT).with(WATERLOGGED, false));
setDefaultState(super.getDefaultState().with(HORIZONTAL_FACING, Direction.NORTH).with(SHAPE, StairsShape.STRAIGHT));
shape_cache_ = makeShapes(add, cut);
}

View file

@ -53,7 +53,7 @@ public class EdSolarPanel
public SolarPanelBlock(long config, Block.Properties builder, final AxisAlignedBB[] unrotatedAABB)
{
super(config, builder, unrotatedAABB);
setDefaultState(stateContainer.getBaseState().with(EXPOSITION, 1));
setDefaultState(super.getDefaultState().with(EXPOSITION, 1));
}
@Override

View file

@ -14,7 +14,6 @@ package wile.engineersdecor.libmc.blocks;
import net.minecraft.entity.EntitySpawnPlacementRegistry;
import net.minecraft.pathfinding.PathType;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import net.minecraft.block.*;
import net.minecraft.entity.EntityType;
import net.minecraft.state.DirectionProperty;
@ -48,6 +47,7 @@ import net.minecraft.util.*;
import net.minecraft.util.text.ITextComponent;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import javax.annotation.Nullable;
import java.util.*;
import java.util.function.Supplier;
@ -110,17 +110,19 @@ public class StandardBlocks
{ this(conf, properties, Auxiliaries.getPixeledAABB(0, 0, 0, 16, 16,16 )); }
public BaseBlock(long conf, Block.Properties properties, AxisAlignedBB aabb)
{ super(properties); config = conf; vshape = VoxelShapes.create(aabb); }
public BaseBlock(long conf, Block.Properties properties, VoxelShape voxel_shape)
{ super(properties); config = conf; vshape = voxel_shape; }
{ this(conf, properties, VoxelShapes.create(aabb)); }
public BaseBlock(long conf, Block.Properties properties, AxisAlignedBB[] aabbs)
{ this(conf, properties, Arrays.stream(aabbs).map(aabb->VoxelShapes.create(aabb)).reduce(VoxelShapes.empty(), (shape, aabb)->VoxelShapes.combine(shape, aabb, IBooleanFunction.OR))); }
public BaseBlock(long conf, Block.Properties properties, VoxelShape voxel_shape)
{
super(properties); config = conf;
VoxelShape shape = VoxelShapes.empty();
for(AxisAlignedBB aabb:aabbs) shape = VoxelShapes.combine(shape, VoxelShapes.create(aabb), IBooleanFunction.OR);
vshape = shape;
super(properties);
config = conf;
vshape = voxel_shape;
BlockState state = getStateContainer().getBaseState();
if((conf & CFG_WATERLOGGABLE)!=0) state = state.with(WATERLOGGED, false);
setDefaultState(state);
}
@Override
@ -471,7 +473,7 @@ public class StandardBlocks
}
shapes = build_shapes;
collision_shapes = build_collision_shapes;
setDefaultState(getStateContainer().getBaseState().with(NORTH, false).with(EAST, false).with(SOUTH, false).with(WEST, false).with(WATERLOGGED, false));
setDefaultState(super.getDefaultState().with(NORTH, false).with(EAST, false).with(SOUTH, false).with(WEST, false).with(WATERLOGGED, false));
}
@Override

View file

@ -81,28 +81,28 @@
"block.engineersdecor.dense_grit_sand_block.help": "A compressed sandy soil mixed\n with stone grid, as known from\n machine and storage yards.\n Flowers don't really grow on\n that. Position dependent\n texture variations.",
"block.engineersdecor.factory_dropper": "Factory Dropper",
"block.engineersdecor.factory_dropper.help": "Dropper suitable for advanced\n factory automation. Has twelve\n round-robin selected slots. Drop\n force, angle, stack size, and\n cool-down delay adjustable using\n sliders in the GUI. Three stack\n compare slots (below the\n inventory slots) with logical\n AND or OR can be used as internal\n trigger source. The internal\n trigger can be AND'ed or OR'ed\n with the external redstone signal\n trigger. Pre-opens shutter\n door when ready to drop and waiting\n for the external signal. Drops all\n matching stacks simultaneously.\n Hover buttons 2s for tooltips.",
"block.engineersdecor.factory_dropper.tooltips.direction": "Drop direction x/y (-45° to +45°)",
"block.engineersdecor.factory_dropper.tooltips.direction": "Drop direction x/y (-45° to +45°)§r\n§7See the green-red coordinate system at the front.",
"block.engineersdecor.factory_dropper.tooltips.dropcount": "Drop stack size (1 to 32 items)",
"block.engineersdecor.factory_dropper.tooltips.externgate": "External signal combination logic (AND or OR)§r\n§8AND: Drop only on an external signal.\nOR: Drop filter matches automatically, non-matching items on external trigger.",
"block.engineersdecor.factory_dropper.tooltips.filtergate": "Filter combination gate logic (AND or OR)§r\n§8AND: Drop the stacks as specified in the filters when ALL filters are green.\nOR: Drop the stack of each individual filter when green.",
"block.engineersdecor.factory_dropper.tooltips.externgate": "External signal combination logic§r\n§9AND§7: Drop only on an external signal.\n§9OR§7: Drop filter matches automatically, non-matching items on external trigger.\n§9IGNORE§7: Completely ignores external Redstone (permanent external trigger).",
"block.engineersdecor.factory_dropper.tooltips.filtergate": "Filter combination gate logic§r\n§9AND§7: Drop the stacks as specified in the filters when ALL filters are green.\n§9OR§7: Drop the stack of each individual filter when green.",
"block.engineersdecor.factory_dropper.tooltips.period": "Drop delay (1s to 10s)",
"block.engineersdecor.factory_dropper.tooltips.rssignal": "External Redstone signal indicator\n§8(click to generate a test trigger).",
"block.engineersdecor.factory_dropper.tooltips.triggermode": "Trigger mode (pulse/continuous)§r\n§8Pulse: One drop for each OFF->ON of the external signal.\nContinuous: Drop as long as the external signal is ON.",
"block.engineersdecor.factory_dropper.tooltips.velocity": "Drop velocity (slow to fast speed)",
"block.engineersdecor.factory_dropper.tooltips.rssignal": "External Redstone signal indicator\n§7(click to generate a test trigger).",
"block.engineersdecor.factory_dropper.tooltips.triggermode": "Trigger mode§r\n§9Pulse§7: One drop for each OFF->ON of the external signal.\n§9Continuous§7: Drop as long as the external signal is ON.",
"block.engineersdecor.factory_dropper.tooltips.velocity": "Drop velocity (slow to fast speed)\n§7Spring bias/prestress low at the bottom, high at the top position.",
"block.engineersdecor.factory_hopper": "Factory Hopper",
"block.engineersdecor.factory_hopper.help": "Hopper suitable for advanced factory\n automation. Can transfer half-stacks, max\n collection range 9x9. GUI Slider controls:\n - Collection range (0 to 4)\n - Insertion delay (0.5s to 10s)\n - Insertion stack size (1 to 32).\n GUI Redstone controls:\n Not inverted / inverted (default),\n pulse mode / continuous mode (default).",
"block.engineersdecor.factory_hopper.tooltips.count": "Insertion stack size §8(1 to 32 items)",
"block.engineersdecor.factory_hopper.tooltips.delayindicator": "Delay indicator\n§8Blinks when the insertion delay timer has not expired yet, or when the Hopper cannot insert into the adjacent inventory.",
"block.engineersdecor.factory_hopper.tooltips.inversion": "Redstone mode §8(inverted/not inverted/ignored)",
"block.engineersdecor.factory_hopper.tooltips.period": "Insertion delay §8(1s to 10s)",
"block.engineersdecor.factory_hopper.tooltips.range": "Collection radius §8(0 to 4)",
"block.engineersdecor.factory_hopper.tooltips.count": "Insertion stack size §7(1 to 32 items)",
"block.engineersdecor.factory_hopper.tooltips.delayindicator": "Delay indicator\n§7Blinks when the insertion delay timer has not expired yet, or when the Hopper cannot insert into the adjacent inventory.",
"block.engineersdecor.factory_hopper.tooltips.inversion": "Redstone mode §7(inverted/not inverted/ignored)",
"block.engineersdecor.factory_hopper.tooltips.period": "Insertion delay §7(1s to 10s)",
"block.engineersdecor.factory_hopper.tooltips.range": "Collection radius §7(0 to 4)",
"block.engineersdecor.factory_hopper.tooltips.rssignal": "External Redstone signal indicator",
"block.engineersdecor.factory_hopper.tooltips.triggermode": "Trigger mode §8(continuous/pulse)",
"block.engineersdecor.factory_hopper.tooltips.triggermode": "Trigger mode §7(continuous/pulse)",
"block.engineersdecor.factory_placer": "Factory Block Placer",
"block.engineersdecor.factory_placer.help": "Allows placing blocks and planting\n crops or trees. GUI Redstone controls:\n Not inverted / inverted (default),\n pulse mode / continuous mode (default).\n Also supports spike planing from\n underneath the soil. Spits out items\n that it cannot place or plant.",
"block.engineersdecor.factory_placer.tooltips.inversion": "Redstone mode §8(inverted/not inverted/ignored)",
"block.engineersdecor.factory_placer.tooltips.inversion": "Redstone mode §7(inverted/not inverted/ignored)",
"block.engineersdecor.factory_placer.tooltips.rssignal": "External Redstone signal indicator",
"block.engineersdecor.factory_placer.tooltips.triggermode": "Trigger mode §8(continuous/pulse)",
"block.engineersdecor.factory_placer.tooltips.triggermode": "Trigger mode §7(continuous/pulse)",
"block.engineersdecor.fluid_barrel": "Fluid Barrel",
"block.engineersdecor.fluid_barrel.help": "Simple barrel for storing liquids.\n Has a small built-in pressure-tube\n based level gauge. Default placement\n is standing, sneak-place to\n select a specific direction.\n Transfers fluids in tanks below\n when standing. Supports fluid\n extraction/insertion as item\nSupports Comparator output.",
"block.engineersdecor.fluid_barrel.status": "Filled barrel: §6%1$s§r / %2$s mB of §6%3$s§r",
@ -214,8 +214,8 @@
"block.engineersdecor.small_block_breaker.status": "SOC: %1$s%% of %2$sRF§r | progress: %3$s%%",
"block.engineersdecor.small_electrical_furnace": "Small Electrical Furnace",
"block.engineersdecor.small_electrical_furnace.help": "Small metal cased pass-through furnace.\n Can draw items from the input side,\n puts items into the inventory at\n the output side. Items can be\n inserted or drawn from all sides\n using hoppers. Implicitly bypasses\n items that cannot be smelted or\n cooked. Slightly more energy\n efficient and faster than a heated\n cobblestone furnace. Fifos and\n feeders transfer whole stacks.\n Feeders require a bit of power.\n Place a Hopper into an aux slot\n to automatically draw items from\n inventories on the input side.",
"block.engineersdecor.small_electrical_furnace.tooltips.auxslot": "Auxiliary slot\n§8Place a Hopper here to enable automatic feeding from the input side.",
"block.engineersdecor.small_electrical_furnace.tooltips.speed": "Smelting speed selection §8(OFF/I/II/III)",
"block.engineersdecor.small_electrical_furnace.tooltips.auxslot": "Auxiliary slot\n§7Place a Hopper here to enable automatic feeding from the input side.",
"block.engineersdecor.small_electrical_furnace.tooltips.speed": "Smelting speed selection §7(OFF/I/II/III)",
"block.engineersdecor.small_fluid_funnel": "Small Fluid Collection Funnel",
"block.engineersdecor.small_fluid_funnel.help": "Collects fluids above it. Has an\n internal tank with three buckets\n capacity. Traces flowing fluids\n to nearby source blocks. The\n fluid can be obtained with fluid\n transfer systems or a bucket.\n Fills only tanks below (gravity\n transfer). Compatible with vanilla\n infinite-water-source creation.",
"block.engineersdecor.small_freezer": "Small Water Freezer",

View file

@ -295,4 +295,4 @@
"block.engineersdecor.treated_wood_windowsill": "Обработанный деревянный подоконник",
"block.engineersdecor.treated_wood_windowsill.help": "Простое оформление окон.",
"item.engineersdecor.metal_bar": "Металлический брусок"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After