From 52eed2bab38d5415a1615f9cb6e555f5f9c96030 Mon Sep 17 00:00:00 2001 From: JozsefA Date: Mon, 15 Mar 2021 14:20:13 -0700 Subject: [PATCH 1/4] Instanced Gauges and Valves, DRY lighting. --- .../com/simibubi/create/AllTileEntities.java | 7 +- .../contraptions/base/KineticData.java | 5 +- .../base/KineticTileInstance.java | 6 - .../base/SingleRotatingInstance.java | 6 +- .../components/fan/FanInstance.java | 13 +- .../components/flywheel/FlyWheelInstance.java | 14 +- .../flywheel/engine/EngineInstance.java | 5 +- .../components/mixer/MixerInstance.java | 9 +- .../components/press/PressInstance.java | 4 +- .../chassis/StickerInstance.java | 4 +- .../gantry/GantryCarriageInstance.java | 4 +- .../fluids/pipes/FluidValveBlock.java | 7 +- .../fluids/pipes/FluidValveInstance.java | 91 +++++++++ .../fluids/pipes/FluidValveRenderer.java | 4 + .../relays/belt/BeltInstance.java | 11 +- .../relays/encased/SplitShaftInstance.java | 7 +- .../relays/gauge/GaugeInstance.java | 173 ++++++++++++++++++ .../relays/gauge/GaugeRenderer.java | 9 +- .../relays/gearbox/GearboxInstance.java | 9 +- .../block/mechanicalArm/ArmInstance.java | 9 +- .../block/SchematicannonInstance.java | 11 +- .../backend/instancing/InstancedModel.java | 8 + .../instancing/InstancedTileRenderer.java | 6 + .../instancing/TileEntityInstance.java | 20 +- .../backend/instancing/impl/IFlatLight.java | 26 +++ .../backend/instancing/impl/ModelData.java | 4 +- .../create/foundation/utility/Couple.java | 5 + .../foundation/utility/MatrixStacker.java | 9 + .../utility/animation/LerpedFloat.java | 4 + 29 files changed, 383 insertions(+), 107 deletions(-) create mode 100644 src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveInstance.java create mode 100644 src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeInstance.java create mode 100644 src/main/java/com/simibubi/create/foundation/render/backend/instancing/impl/IFlatLight.java diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java index f65fa76ea..256d46aa9 100644 --- a/src/main/java/com/simibubi/create/AllTileEntities.java +++ b/src/main/java/com/simibubi/create/AllTileEntities.java @@ -77,6 +77,7 @@ import com.simibubi.create.content.contraptions.relays.belt.BeltRenderer; import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.contraptions.relays.elementary.SimpleKineticTileEntity; import com.simibubi.create.content.contraptions.relays.encased.*; +import com.simibubi.create.content.contraptions.relays.gauge.GaugeInstance; import com.simibubi.create.content.contraptions.relays.gauge.GaugeRenderer; import com.simibubi.create.content.contraptions.relays.gauge.SpeedGaugeTileEntity; import com.simibubi.create.content.contraptions.relays.gauge.StressGaugeTileEntity; @@ -260,7 +261,7 @@ public class AllTileEntities { public static final TileEntityEntry FLUID_VALVE = Create.registrate() .tileEntity("fluid_valve", FluidValveTileEntity::new) - .instance(() -> ShaftInstance::new) + .instance(() -> FluidValveInstance::new) .validBlocks(AllBlocks.FLUID_VALVE) .renderer(() -> FluidValveRenderer::new) .register(); @@ -515,14 +516,14 @@ public class AllTileEntities { public static final TileEntityEntry SPEEDOMETER = Create.registrate() .tileEntity("speedometer", SpeedGaugeTileEntity::new) - .instance(() -> ShaftInstance::new) + .instance(() -> GaugeInstance.Speed::new) .validBlocks(AllBlocks.SPEEDOMETER) .renderer(() -> GaugeRenderer::speed) .register(); public static final TileEntityEntry STRESSOMETER = Create.registrate() .tileEntity("stressometer", StressGaugeTileEntity::new) - .instance(() -> ShaftInstance::new) + .instance(() -> GaugeInstance.Stress::new) .validBlocks(AllBlocks.STRESSOMETER) .renderer(() -> GaugeRenderer::stress) .register(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java b/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java index 36ce074fd..944223f5c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java @@ -4,12 +4,13 @@ import java.nio.ByteBuffer; import com.simibubi.create.foundation.render.backend.instancing.InstanceData; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; +import com.simibubi.create.foundation.render.backend.instancing.impl.IFlatLight; import com.simibubi.create.foundation.utility.ColorHelper; import net.minecraft.client.renderer.Vector3f; import net.minecraft.util.math.BlockPos; -public class KineticData> extends InstanceData { +public class KineticData> extends InstanceData implements IFlatLight { private float x; private float y; private float z; @@ -65,11 +66,13 @@ public class KineticData> extends InstanceData { return (D) this; } + @Override public D setBlockLight(int blockLight) { this.blockLight = (byte) ((blockLight & 0xF) << 4); return (D) this; } + @Override public D setSkyLight(int skyLight) { this.skyLight = (byte) ((skyLight & 0xF) << 4); return (D) this; diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileInstance.java b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileInstance.java index 71cdb735d..be44b81f3 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileInstance.java @@ -36,12 +36,6 @@ public abstract class KineticTileInstance extends T return key; } - protected final void relight(InstanceKey> key) { - key.getInstance() - .setBlockLight(world.getLightLevel(LightType.BLOCK, pos)) - .setSkyLight(world.getLightLevel(LightType.SKY, pos)); - } - protected float getRotationOffset(final Direction.Axis axis) { float offset = CogWheelBlock.isLargeCog(lastState) ? 11.25f : 0; double d = (((axis == Direction.Axis.X) ? 0 : pos.getX()) + ((axis == Direction.Axis.Y) ? 0 : pos.getY()) diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/SingleRotatingInstance.java b/src/main/java/com/simibubi/create/content/contraptions/base/SingleRotatingInstance.java index a84f620b6..44e9c93d0 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/SingleRotatingInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/SingleRotatingInstance.java @@ -4,14 +4,10 @@ import static com.simibubi.create.content.contraptions.base.KineticTileEntityRen import com.simibubi.create.foundation.render.backend.instancing.InstanceKey; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; -import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; import net.minecraft.block.BlockState; -import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.fml.DistExecutor; public class SingleRotatingInstance extends KineticTileInstance { @@ -35,7 +31,7 @@ public class SingleRotatingInstance extends KineticTileInstance { final Direction direction = lastState.get(FACING); BlockPos behind = pos.offset(direction.getOpposite()); - putLight(shaft, behind); + relight(behind, shaft.getInstance()); BlockPos inFront = pos.offset(direction); - putLight(fan, inFront); - } - - private void putLight(InstanceKey key, BlockPos pos) { - int blockLight = world.getLightLevel(LightType.BLOCK, pos); - int skyLight = world.getLightLevel(LightType.SKY, pos); - - key.getInstance() - .setBlockLight(blockLight) - .setSkyLight(skyLight); + relight(inFront, fan.getInstance()); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlyWheelInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlyWheelInstance.java index 0e8ff918d..bb2279a6f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlyWheelInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlyWheelInstance.java @@ -150,20 +150,10 @@ public class FlyWheelInstance extends KineticTileInstance im @Override public void updateLight() { - int block = world.getLightLevel(LightType.BLOCK, pos); - int sky = world.getLightLevel(LightType.SKY, pos); - - shaft.getInstance().setBlockLight(block).setSkyLight(sky); - wheel.getInstance().setBlockLight(block).setSkyLight(sky); + relight(pos, shaft.getInstance(), wheel.getInstance()); if (connection != null) { - BlockPos pos = this.pos.offset(connection); - - int connectionBlock = world.getLightLevel(LightType.BLOCK, pos); - int connectionSky = world.getLightLevel(LightType.SKY, pos); - connectors.stream() - .map(InstanceKey::getInstance) - .forEach(data -> data.setBlockLight(connectionBlock).setSkyLight(connectionSky)); + relight(this.pos.offset(connection), connectors.stream().map(InstanceKey::getInstance)); } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineInstance.java index 297016881..cac76a426 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineInstance.java @@ -66,9 +66,6 @@ public class EngineInstance extends TileEntityInstance { @Override public void updateLight() { - int block = world.getLightLevel(LightType.BLOCK, pos); - int sky = world.getLightLevel(LightType.SKY, pos); - - frame.getInstance().setBlockLight(block).setSkyLight(sky); + relight(pos, frame.getInstance()); } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MixerInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MixerInstance.java index 0f49c8eb6..d8325b5b0 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MixerInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MixerInstance.java @@ -92,14 +92,9 @@ public class MixerInstance extends ShaftlessCogInstance implements ITickableInst public void updateLight() { super.updateLight(); - BlockPos down = pos.down(); - mixerHead.getInstance() - .setBlockLight(world.getLightLevel(LightType.BLOCK, down)) - .setSkyLight(world.getLightLevel(LightType.SKY, down)); + relight(pos.down(), mixerHead.getInstance()); - mixerPole.getInstance() - .setBlockLight(world.getLightLevel(LightType.BLOCK, pos)) - .setSkyLight(world.getLightLevel(LightType.SKY, pos)); + relight(pos, mixerPole.getInstance()); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/press/PressInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/press/PressInstance.java index 8c4c1b89e..8af6fa19f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/press/PressInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/press/PressInstance.java @@ -67,9 +67,7 @@ public class PressInstance extends ShaftInstance implements ITickableInstance { public void updateLight() { super.updateLight(); - pressHead.getInstance() - .setBlockLight(world.getLightLevel(LightType.BLOCK, pos)) - .setSkyLight(world.getLightLevel(LightType.SKY, pos)); + relight(pos, pressHead.getInstance()); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerInstance.java index b8ea44bf2..6e692fcb9 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerInstance.java @@ -63,9 +63,7 @@ public class StickerInstance extends TileEntityInstance imple @Override public void updateLight() { - head.getInstance() - .setBlockLight(world.getLightLevel(LightType.BLOCK, pos)) - .setSkyLight(world.getLightLevel(LightType.SKY, pos)); + relight(pos, head.getInstance()); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryCarriageInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryCarriageInstance.java index 0d86bdd9a..1b9cc2e27 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryCarriageInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryCarriageInstance.java @@ -81,9 +81,7 @@ public class GantryCarriageInstance extends ShaftInstance implements ITickableIn @Override public void updateLight() { - gantryCogs.getInstance() - .setBlockLight(world.getLightLevel(LightType.BLOCK, pos)) - .setSkyLight(world.getLightLevel(LightType.SKY, pos)); + relight(pos, gantryCogs.getInstance()); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveBlock.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveBlock.java index aa93364de..ad9a85022 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveBlock.java @@ -25,6 +25,8 @@ import net.minecraft.world.TickPriority; import net.minecraft.world.World; import net.minecraft.world.server.ServerWorld; +import javax.annotation.Nonnull; + public class FluidValveBlock extends DirectionalAxisKineticBlock implements IAxisPipe { public static final BooleanProperty ENABLED = BooleanProperty.create("enabled"); @@ -60,9 +62,10 @@ public class FluidValveBlock extends DirectionalAxisKineticBlock implements IAxi return AllTileEntities.FLUID_VALVE.create(); } + @Nonnull public static Axis getPipeAxis(BlockState state) { if (!(state.getBlock() instanceof FluidValveBlock)) - return null; + throw new IllegalStateException("Provided BlockState is for a different block."); Direction facing = state.get(FACING); boolean alongFirst = !state.get(AXIS_ALONG_FIRST_COORDINATE); for (Axis axis : Iterate.axes) { @@ -74,7 +77,7 @@ public class FluidValveBlock extends DirectionalAxisKineticBlock implements IAxi } return axis; } - return null; + throw new IllegalStateException("Impossible axis."); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveInstance.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveInstance.java new file mode 100644 index 000000000..fac0a31ca --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveInstance.java @@ -0,0 +1,91 @@ +package com.simibubi.create.content.contraptions.fluids.pipes; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.content.contraptions.base.KineticTileEntity; +import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; +import com.simibubi.create.content.contraptions.relays.encased.ShaftInstance; +import com.simibubi.create.foundation.render.SuperByteBuffer; +import com.simibubi.create.foundation.render.backend.RenderMaterials; +import com.simibubi.create.foundation.render.backend.instancing.ITickableInstance; +import com.simibubi.create.foundation.render.backend.instancing.InstanceKey; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; +import com.simibubi.create.foundation.render.backend.instancing.impl.ModelData; +import com.simibubi.create.foundation.utility.AngleHelper; +import com.simibubi.create.foundation.utility.AnimationTickHolder; +import com.simibubi.create.foundation.utility.MatrixStacker; +import net.minecraft.block.BlockState; +import net.minecraft.util.Direction; +import net.minecraft.util.math.MathHelper; + +public class FluidValveInstance extends ShaftInstance implements ITickableInstance { + + protected InstanceKey pointer; + + protected double xRot; + protected double yRot; + protected int pointerRotationOffset; + + public FluidValveInstance(InstancedTileRenderer dispatcher, KineticTileEntity tile) { + super(dispatcher, tile); + } + + @Override + protected void init() { + super.init(); + + Direction facing = lastState.get(FluidValveBlock.FACING); + + yRot = AngleHelper.horizontalAngle(facing); + xRot = facing == Direction.UP ? 0 : facing == Direction.DOWN ? 180 : 90; + + Direction.Axis pipeAxis = FluidValveBlock.getPipeAxis(lastState); + Direction.Axis shaftAxis = KineticTileEntityRenderer.getRotationAxisOf(tile); + + pointerRotationOffset = 0; + if (pipeAxis.isHorizontal() && shaftAxis == Direction.Axis.Z || pipeAxis.isVertical()) + pointerRotationOffset = 90; + + pointer = modelManager.basicMaterial().getModel(AllBlockPartials.FLUID_VALVE_POINTER, lastState).createInstance(); + + updateLight(); + transformPointer((FluidValveTileEntity) tile); + } + + @Override + public void tick() { + + FluidValveTileEntity valve = (FluidValveTileEntity) tile; + + if (valve.pointer.settled()) return; + + transformPointer(valve); + } + + private void transformPointer(FluidValveTileEntity valve) { + float pointerRotation = MathHelper.lerp(valve.pointer.getValue(AnimationTickHolder.getPartialTicks()), 0, -90); + + MatrixStack ms = new MatrixStack(); + MatrixStacker.of(ms) + .translate(getFloatingPos()) + .centre() + .rotateY(yRot) + .rotateX(xRot) + .rotateY(pointerRotationOffset + pointerRotation) + .unCentre(); + + pointer.getInstance().setTransform(ms); + } + + @Override + public void updateLight() { + super.updateLight(); + relight(pos, pointer.getInstance()); + } + + @Override + public void remove() { + super.remove(); + pointer.delete(); + } +} diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveRenderer.java index 729d37d7d..14439f84a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveRenderer.java @@ -5,6 +5,7 @@ import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; import com.simibubi.create.foundation.render.SuperByteBuffer; +import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.MatrixStacker; @@ -25,6 +26,9 @@ public class FluidValveRenderer extends KineticTileEntityRenderer { @Override protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { + + if (FastRenderDispatcher.available(te.getWorld())) return; + super.renderSafe(te, partialTicks, ms, buffer, light, overlay); BlockState blockState = te.getBlockState(); SuperByteBuffer pointer = AllBlockPartials.FLUID_VALVE_POINTER.renderOn(blockState); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltInstance.java index c318d18ed..ed4794e76 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltInstance.java @@ -1,29 +1,24 @@ package com.simibubi.create.content.contraptions.relays.belt; import java.util.ArrayList; -import java.util.function.Consumer; import java.util.function.Supplier; import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.content.contraptions.base.KineticData; import com.simibubi.create.content.contraptions.base.KineticTileInstance; import com.simibubi.create.content.contraptions.base.RotatingData; import com.simibubi.create.foundation.block.render.SpriteShiftEntry; import com.simibubi.create.foundation.render.backend.instancing.InstanceKey; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; -import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.MatrixStacker; import net.minecraft.item.DyeColor; -import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; import net.minecraft.world.LightType; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.fml.DistExecutor; public class BeltInstance extends KineticTileInstance { @@ -103,9 +98,9 @@ public class BeltInstance extends KineticTileInstance { @Override public void updateLight() { - keys.forEach(this::relight); + relight(pos, keys.stream().map(InstanceKey::getInstance)); - if (pulleyKey != null) relight(pulleyKey); + if (pulleyKey != null) relight(pos, pulleyKey.getInstance()); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftInstance.java index 8547400b6..641d72a68 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftInstance.java @@ -4,19 +4,16 @@ import java.util.ArrayList; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.content.contraptions.base.IRotate; +import com.simibubi.create.content.contraptions.base.KineticData; import com.simibubi.create.content.contraptions.base.KineticTileInstance; import com.simibubi.create.content.contraptions.base.RotatingData; import com.simibubi.create.foundation.render.backend.instancing.InstanceKey; import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; -import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderRegistry; import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; import com.simibubi.create.foundation.utility.Iterate; import net.minecraft.block.Block; -import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.fml.DistExecutor; public class SplitShaftInstance extends KineticTileInstance { @@ -59,7 +56,7 @@ public class SplitShaftInstance extends KineticTileInstance relight(pos, ((InstanceKey>) key).getInstance())); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeInstance.java new file mode 100644 index 000000000..b7352809b --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeInstance.java @@ -0,0 +1,173 @@ +package com.simibubi.create.content.contraptions.relays.gauge; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.content.contraptions.base.KineticTileEntity; +import com.simibubi.create.content.contraptions.relays.encased.ShaftInstance; +import com.simibubi.create.foundation.render.backend.RenderMaterials; +import com.simibubi.create.foundation.render.backend.instancing.ITickableInstance; +import com.simibubi.create.foundation.render.backend.instancing.InstanceKey; +import com.simibubi.create.foundation.render.backend.instancing.InstancedModel; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; +import com.simibubi.create.foundation.render.backend.instancing.impl.ModelData; +import com.simibubi.create.foundation.utility.*; +import net.minecraft.util.Direction; +import net.minecraft.util.math.MathHelper; + +import java.util.ArrayList; + +public abstract class GaugeInstance extends ShaftInstance implements ITickableInstance { + + protected ArrayList faces; + + protected MatrixStack ms; + + protected GaugeInstance(InstancedTileRenderer dispatcher, KineticTileEntity tile) { + super(dispatcher, tile); + } + + @Override + protected void init() { + super.init(); + + faces = new ArrayList<>(2); + + GaugeTileEntity gaugeTile = (GaugeTileEntity) tile; + GaugeBlock gaugeBlock = (GaugeBlock) lastState.getBlock(); + + InstancedModel dialModel = modelManager.getMaterial(RenderMaterials.MODELS).getModel(AllBlockPartials.GAUGE_DIAL, lastState); + InstancedModel headModel = getHeadModel(); + + ms = new MatrixStack(); + MatrixStacker msr = MatrixStacker.of(ms); + msr.translate(getFloatingPos()); + + float progress = MathHelper.lerp(AnimationTickHolder.getPartialTicks(), gaugeTile.prevDialState, gaugeTile.dialState); + + for (Direction facing : Iterate.directions) { + if (!gaugeBlock.shouldRenderHeadOnFace(world, pos, lastState, facing)) + continue; + + DialFace face = makeFace(facing, dialModel, headModel); + + faces.add(face); + + face.setupTransform(msr, progress); + } + + updateLight(); + } + + private DialFace makeFace(Direction face, InstancedModel dialModel, InstancedModel headModel) { + return new DialFace(face, dialModel.createInstance(), headModel.createInstance()); + } + + @Override + public void tick() { + GaugeTileEntity gaugeTile = (GaugeTileEntity) tile; + + if (MathHelper.epsilonEquals(gaugeTile.prevDialState, gaugeTile.dialState)) + return; + + float progress = MathHelper.lerp(AnimationTickHolder.getPartialTicks(), gaugeTile.prevDialState, gaugeTile.dialState); + + MatrixStacker msr = MatrixStacker.of(ms); + + for (DialFace faceEntry : faces) { + faceEntry.updateTransform(msr, progress); + } + } + + @Override + public void updateLight() { + super.updateLight(); + + relight(pos, faces.stream() + .flatMap(Couple::stream) + .map(InstanceKey::getInstance)); + } + + @Override + public void remove() { + super.remove(); + + faces.forEach(DialFace::delete); + } + + protected abstract InstancedModel getHeadModel(); + + private class DialFace extends Couple> { + + Direction face; + + public DialFace(Direction face, InstanceKey first, InstanceKey second) { + super(first, second); + this.face = face; + } + + private void setupTransform(MatrixStacker msr, float progress) { + float dialPivot = 5.75f / 16; + + ms.push(); + rotateToFace(msr); + + getSecond().getInstance().setTransform(ms); + + msr.translate(0, dialPivot, dialPivot) + .rotate(Direction.EAST, (float) (Math.PI / 2 * -progress)) + .translate(0, -dialPivot, -dialPivot); + + getFirst().getInstance().setTransform(ms); + + ms.pop(); + } + + private void updateTransform(MatrixStacker msr, float progress) { + float dialPivot = 5.75f / 16; + + ms.push(); + + rotateToFace(msr) + .translate(0, dialPivot, dialPivot) + .rotate(Direction.EAST, (float) (Math.PI / 2 * -progress)) + .translate(0, -dialPivot, -dialPivot); + + getFirst().getInstance().setTransform(ms); + + ms.pop(); + } + + protected MatrixStacker rotateToFace(MatrixStacker msr) { + return msr.centre() + .rotate(Direction.UP, (float) ((-face.getHorizontalAngle() - 90) / 180 * Math.PI)) + .unCentre(); + } + + private void delete() { + getFirst().delete(); + getSecond().delete(); + } + } + + public static class Speed extends GaugeInstance { + public Speed(InstancedTileRenderer dispatcher, KineticTileEntity tile) { + super(dispatcher, tile); + } + + @Override + protected InstancedModel getHeadModel() { + return modelManager.getMaterial(RenderMaterials.MODELS).getModel(AllBlockPartials.GAUGE_HEAD_SPEED, lastState); + } + } + + public static class Stress extends GaugeInstance { + public Stress(InstancedTileRenderer dispatcher, KineticTileEntity tile) { + super(dispatcher, tile); + } + + @Override + protected InstancedModel getHeadModel() { + return modelManager.getMaterial(RenderMaterials.MODELS).getModel(AllBlockPartials.GAUGE_HEAD_STRESS, lastState); + } + } +} diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeRenderer.java index 3085dae58..bc89519bb 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeRenderer.java @@ -7,6 +7,7 @@ import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; import com.simibubi.create.content.contraptions.relays.gauge.GaugeBlock.Type; import com.simibubi.create.foundation.render.SuperByteBuffer; +import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.utility.Iterate; import net.minecraft.block.BlockState; @@ -37,6 +38,8 @@ public class GaugeRenderer extends KineticTileEntityRenderer { @Override protected void renderSafe(KineticTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { + if (FastRenderDispatcher.available(te.getWorld())) return; + super.renderSafe(te, partialTicks, ms, buffer, light, overlay); BlockState gaugeState = te.getBlockState(); GaugeTileEntity gaugeTE = (GaugeTileEntity) te; @@ -47,14 +50,14 @@ public class GaugeRenderer extends KineticTileEntityRenderer { .renderOn(gaugeState); SuperByteBuffer dialBuffer = AllBlockPartials.GAUGE_DIAL.renderOn(gaugeState); + float dialPivot = 5.75f / 16; + float progress = MathHelper.lerp(partialTicks, gaugeTE.prevDialState, gaugeTE.dialState); + for (Direction facing : Iterate.directions) { if (!((GaugeBlock) gaugeState.getBlock()).shouldRenderHeadOnFace(te.getWorld(), te.getPos(), gaugeState, facing)) continue; - float dialPivot = 5.75f / 16; - float progress = MathHelper.lerp(partialTicks, gaugeTE.prevDialState, gaugeTE.dialState); - IVertexBuilder vb = buffer.getBuffer(RenderType.getSolid()); rotateBufferTowards(dialBuffer, facing).translate(0, dialPivot, dialPivot) .rotate(Direction.EAST, (float) (Math.PI / 2 * -progress)) diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxInstance.java index 60c4ec81f..ec75b02a6 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxInstance.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxInstance.java @@ -99,14 +99,7 @@ public class GearboxInstance extends KineticTileInstance { @Override public void updateLight() { - int blockLight = tile.getWorld().getLightLevel(LightType.BLOCK, pos); - int skyLight = tile.getWorld().getLightLevel(LightType.SKY, pos); - - for (InstanceKey key : keys.values()) { - key.getInstance() - .setBlockLight(blockLight) - .setSkyLight(skyLight); - } + relight(pos, keys.values().stream().map(InstanceKey::getInstance)); } @Override diff --git a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInstance.java index c8a527490..7a504c7b1 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInstance.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInstance.java @@ -73,7 +73,7 @@ public class ArmInstance extends SingleRotatingInstance implements ITickableInst public void tick() { ArmTileEntity arm = (ArmTileEntity) tile; - boolean settled = Stream.of(arm.baseAngle, arm.lowerArmAngle, arm.upperArmAngle, arm.headAngle).allMatch(InterpolatedValue::settled); + boolean settled = arm.baseAngle.settled() && arm.lowerArmAngle.settled() && arm.upperArmAngle.settled() && arm.headAngle.settled(); boolean rave = arm.phase == ArmTileEntity.Phase.DANCING; if (!settled || rave || firstTick) @@ -154,13 +154,8 @@ public class ArmInstance extends SingleRotatingInstance implements ITickableInst @Override public void updateLight() { super.updateLight(); - int block = world.getLightLevel(LightType.BLOCK, pos); - int sky = world.getLightLevel(LightType.SKY, pos); - - models.stream() - .map(InstanceKey::getInstance) - .forEach(data -> data.setSkyLight(sky).setBlockLight(block)); + relight(pos, models.stream().map(InstanceKey::getInstance)); } @Override diff --git a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInstance.java b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInstance.java index 307a8e6b1..97f27b930 100644 --- a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInstance.java +++ b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInstance.java @@ -81,15 +81,6 @@ public class SchematicannonInstance extends TileEntityInstance extends BufferedMod protected int minIndexChanged = -1; protected int maxIndexChanged = -1; + protected boolean anyToRemove; + public InstancedModel(InstancedTileRenderer renderer, BufferBuilder buf) { super(buf); this.renderer = renderer; @@ -73,6 +75,8 @@ public abstract class InstancedModel extends BufferedMod verifyKey(key); key.invalidate(); + + anyToRemove = true; } public D getInstance(InstanceKey key) { @@ -161,6 +165,8 @@ public abstract class InstancedModel extends BufferedMod // copied from ArrayList#removeIf protected boolean doRemoval() { + if (!anyToRemove) return false; + // figure out which elements are to be removed // any exception thrown from the filter predicate at this stage // will leave the collection unmodified @@ -198,6 +204,8 @@ public abstract class InstancedModel extends BufferedMod maxIndexChanged = newSize - 1; } + this.anyToRemove = false; + return anyToRemove; } diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java index 21131fe32..5871c5d8e 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java @@ -6,8 +6,10 @@ import javax.annotation.Nullable; import com.simibubi.create.foundation.ponder.PonderWorld; import com.simibubi.create.foundation.render.backend.Backend; +import com.simibubi.create.foundation.render.backend.RenderMaterials; import com.simibubi.create.foundation.render.backend.gl.BasicProgram; import com.simibubi.create.foundation.render.backend.gl.shader.ShaderCallback; +import com.simibubi.create.foundation.render.backend.instancing.impl.ModelData; import com.simibubi.create.foundation.utility.AnimationTickHolder; import net.minecraft.client.Minecraft; @@ -67,6 +69,10 @@ public abstract class InstancedTileRenderer

{ return (RenderMaterial) materials.get(materialType); } + public RenderMaterial> basicMaterial() { + return getMaterial(RenderMaterials.MODELS); + } + @Nullable public TileEntityInstance getInstance(T tile) { return getInstance(tile, true); diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/TileEntityInstance.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/TileEntityInstance.java index 4e029f184..b5241999c 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/TileEntityInstance.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/TileEntityInstance.java @@ -1,5 +1,6 @@ package com.simibubi.create.foundation.render.backend.instancing; +import com.simibubi.create.foundation.render.backend.instancing.impl.IFlatLight; import com.simibubi.create.foundation.render.backend.instancing.impl.ModelData; import net.minecraft.block.BlockState; import net.minecraft.tileentity.TileEntity; @@ -7,6 +8,9 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.LightType; import net.minecraft.world.World; +import java.util.Arrays; +import java.util.stream.Stream; + public abstract class TileEntityInstance { protected final InstancedTileRenderer modelManager; @@ -60,13 +64,19 @@ public abstract class TileEntityInstance { return pos.subtract(modelManager.getOriginCoordinate()); } - protected void relight(BlockPos pos, ModelData... models) { + protected > void relight(BlockPos pos, IFlatLight... models) { relight(world.getLightLevel(LightType.BLOCK, pos), world.getLightLevel(LightType.SKY, pos), models); } - protected void relight(int block, int sky, ModelData... models) { - for (ModelData model : models) { - model.setBlockLight(block).setSkyLight(sky); - } + protected > void relight(BlockPos pos, Stream> models) { + relight(world.getLightLevel(LightType.BLOCK, pos), world.getLightLevel(LightType.SKY, pos), models); + } + + protected > void relight(int block, int sky, IFlatLight... models) { + relight(block, sky, Arrays.stream(models)); + } + + protected > void relight(int block, int sky, Stream> models) { + models.forEach(model -> model.setBlockLight(block).setSkyLight(sky)); } } diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/impl/IFlatLight.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/impl/IFlatLight.java new file mode 100644 index 000000000..7dea998b1 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/impl/IFlatLight.java @@ -0,0 +1,26 @@ +package com.simibubi.create.foundation.render.backend.instancing.impl; + +import com.simibubi.create.foundation.render.backend.instancing.InstanceData; + +/** + * An interface that implementors of {@link InstanceData} should also implement + * if they wish to make use of Flywheel's provided light update methods. + * + * This only covers flat lighting, smooth lighting is still TODO. + * @param The name of the class that implements this interface. + */ +public interface IFlatLight> { + /** + * @param blockLight An integer in the range [0, 15] representing the + * amount of block light this instance should receive. + * @return this + */ + D setBlockLight(int blockLight); + + /** + * @param skyLight An integer in the range [0, 15] representing the + * amount of sky light this instance should receive. + * @return this + */ + D setSkyLight(int skyLight); +} diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/impl/ModelData.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/impl/ModelData.java index 350c8e4ad..4b0a93a9a 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/impl/ModelData.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/impl/ModelData.java @@ -9,7 +9,7 @@ import net.minecraft.client.renderer.Matrix4f; import java.nio.ByteBuffer; -public class ModelData extends InstanceData { +public class ModelData extends InstanceData implements IFlatLight { private static final Matrix4f IDENT4 = new Matrix4f(); private static final Matrix3f IDENT3 = new Matrix3f(); static { @@ -54,11 +54,13 @@ public class ModelData extends InstanceData { return this; } + @Override public ModelData setBlockLight(int blockLight) { this.blockLight = (byte) (blockLight << 4); return this; } + @Override public ModelData setSkyLight(int skyLight) { this.skyLight = (byte) (skyLight << 4); return this; diff --git a/src/main/java/com/simibubi/create/foundation/utility/Couple.java b/src/main/java/com/simibubi/create/foundation/utility/Couple.java index 9c36c903f..1c0cf6153 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/Couple.java +++ b/src/main/java/com/simibubi/create/foundation/utility/Couple.java @@ -6,6 +6,7 @@ import java.util.function.BiConsumer; import java.util.function.BiFunction; import java.util.function.Consumer; import java.util.function.Function; +import java.util.stream.Stream; import com.google.common.base.Supplier; import com.google.common.collect.ImmutableList; @@ -104,6 +105,10 @@ public class Couple extends Pair implements Iterable { return new Couplerator<>(this); } + public Stream stream() { + return Stream.of(first, second); + } + private static class Couplerator implements Iterator { int state; diff --git a/src/main/java/com/simibubi/create/foundation/utility/MatrixStacker.java b/src/main/java/com/simibubi/create/foundation/utility/MatrixStacker.java index 0323a1ebb..8ebc71b26 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/MatrixStacker.java +++ b/src/main/java/com/simibubi/create/foundation/utility/MatrixStacker.java @@ -24,6 +24,15 @@ public class MatrixStacker { return instance; } + public MatrixStacker restoreIdentity() { + MatrixStack.Entry entry = ms.peek(); + + entry.getModel().loadIdentity(); + entry.getNormal().loadIdentity(); + + return this; + } + public MatrixStacker rotate(Direction axis, float radians) { if (radians == 0) return this; diff --git a/src/main/java/com/simibubi/create/foundation/utility/animation/LerpedFloat.java b/src/main/java/com/simibubi/create/foundation/utility/animation/LerpedFloat.java index b0f22f545..7e99e39cb 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/animation/LerpedFloat.java +++ b/src/main/java/com/simibubi/create/foundation/utility/animation/LerpedFloat.java @@ -81,6 +81,10 @@ public class LerpedFloat { return MathHelper.lerp(partialTicks, previousValue, value); } + public boolean settled() { + return MathHelper.epsilonEquals(previousValue, value); + } + public float getChaseTarget() { return chaseTarget; } From d9027c1d9990fc0b30a5a02d7f7410b83ed13667 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Mon, 15 Mar 2021 23:20:24 +0100 Subject: [PATCH 2/4] Logic Thinking - Ponder scenes for various redstone components --- src/generated/resources/.cache/cache | 28 +- .../resources/assets/create/lang/en_us.json | 40 ++ .../assets/create/lang/unfinished/de_de.json | 42 +- .../assets/create/lang/unfinished/es_es.json | 42 +- .../assets/create/lang/unfinished/es_mx.json | 42 +- .../assets/create/lang/unfinished/fr_fr.json | 42 +- .../assets/create/lang/unfinished/it_it.json | 42 +- .../assets/create/lang/unfinished/ja_jp.json | 42 +- .../assets/create/lang/unfinished/ko_kr.json | 42 +- .../assets/create/lang/unfinished/nl_nl.json | 42 +- .../assets/create/lang/unfinished/pt_br.json | 42 +- .../assets/create/lang/unfinished/ru_ru.json | 42 +- .../assets/create/lang/unfinished/zh_cn.json | 42 +- .../assets/create/lang/unfinished/zh_tw.json | 42 +- .../block/redstone/AnalogLeverTileEntity.java | 1 - .../content/schematics/SchematicWorld.java | 29 +- .../create/foundation/ponder/PonderWorld.java | 5 + .../foundation/ponder/SceneBuilder.java | 18 + .../ponder/content/PonderIndex.java | 18 + .../ponder/content/RedstoneScenes.java | 662 +++++++++++++++++- .../ponder/adjustable_pulse_repeater.nbt | Bin 0 -> 453 bytes .../resources/ponder/adjustable_repeater.nbt | Bin 0 -> 447 bytes src/main/resources/ponder/analog_lever.nbt | Bin 0 -> 514 bytes src/main/resources/ponder/nixie_tube.nbt | Bin 0 -> 467 bytes src/main/resources/ponder/powered_latch.nbt | Bin 0 -> 443 bytes .../resources/ponder/powered_toggle_latch.nbt | Bin 0 -> 409 bytes src/main/resources/ponder/pulse_repeater.nbt | Bin 0 -> 400 bytes src/main/resources/ponder/redstone_link.nbt | Bin 0 -> 564 bytes 28 files changed, 1265 insertions(+), 40 deletions(-) create mode 100644 src/main/resources/ponder/adjustable_pulse_repeater.nbt create mode 100644 src/main/resources/ponder/adjustable_repeater.nbt create mode 100644 src/main/resources/ponder/analog_lever.nbt create mode 100644 src/main/resources/ponder/nixie_tube.nbt create mode 100644 src/main/resources/ponder/powered_latch.nbt create mode 100644 src/main/resources/ponder/powered_toggle_latch.nbt create mode 100644 src/main/resources/ponder/pulse_repeater.nbt create mode 100644 src/main/resources/ponder/redstone_link.nbt diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 670bb1770..08e29ebe9 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -402,19 +402,19 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json 2b12f3cf99e498899207a8c4855210e7b5dc55cd assets/create/lang/en_ud.json -6d00aa2e085c5754a9b7f5fffdea8702c474f5a6 assets/create/lang/en_us.json -be6252adfc657c2ee9f0f30bcca3155dc9ca98d8 assets/create/lang/unfinished/de_de.json -64baba74aa6a1e980dc4a7d469dba660a308e42c assets/create/lang/unfinished/es_es.json -e5fa6c5ad75b424382ae0d202547908bab13f569 assets/create/lang/unfinished/es_mx.json -945e755bdfa2996060129e6edad5ef6a3ed171e0 assets/create/lang/unfinished/fr_fr.json -bb0cc8cc01bf99b33f8c42c333ecac5e65f0c134 assets/create/lang/unfinished/it_it.json -37d0b9d5ccb0072b52f1896f836cea8d042a9156 assets/create/lang/unfinished/ja_jp.json -c380bc0d1933a41fdf64d323775a43dfe6ac92b1 assets/create/lang/unfinished/ko_kr.json -d003e93a08a630e803293612793a9ecd3b38017a assets/create/lang/unfinished/nl_nl.json -0c3c6e0c574c22e4e39a1ee88e13e0c2c677845d assets/create/lang/unfinished/pt_br.json -a376c60e64007b73f034ebd2f46551f7d4f63237 assets/create/lang/unfinished/ru_ru.json -20530fd24391fcd010d2d20965ed1797142c0ec4 assets/create/lang/unfinished/zh_cn.json -ee78cba92550be14a61bc862d5ae63d31258cc75 assets/create/lang/unfinished/zh_tw.json +212de32a4245c53011c14d5a449cc9845ba8a897 assets/create/lang/en_us.json +68692dcac5364521de8437c653b64791e962628a assets/create/lang/unfinished/de_de.json +ea0fb50d4198972c4c7865d2471cdbc75977cc70 assets/create/lang/unfinished/es_es.json +5a54f2e9ad6264bdbb41fe6390b6674904219bfe assets/create/lang/unfinished/es_mx.json +a1a8a74c61650c1bb59a4187864d952f534100c7 assets/create/lang/unfinished/fr_fr.json +07992e28b58ec1bc837a80ab633dca672ad236e4 assets/create/lang/unfinished/it_it.json +8b84abd9b61ab88fdbbf9c0cc1979e95b34b3580 assets/create/lang/unfinished/ja_jp.json +fcd3bde020b3e904d5a31032c01e2e5b9c05a702 assets/create/lang/unfinished/ko_kr.json +2e4780fe25cef72f9bb3b43be76a379e3dde9f00 assets/create/lang/unfinished/nl_nl.json +edd45f6e468d4976d2bcd714066ae3284fc27ddb assets/create/lang/unfinished/pt_br.json +8c27872585a9a180ede3ccdd1d07014863501b89 assets/create/lang/unfinished/ru_ru.json +dead3a1a62323e91d41a8e8864b7179fd2f30583 assets/create/lang/unfinished/zh_cn.json +41faa5ab5d3f812e46d8d0e1580e83cd9f2f4bb3 assets/create/lang/unfinished/zh_tw.json 846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json 1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json 1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json @@ -1585,7 +1585,7 @@ d080b1b25e5bc8baf5aee68691b08c7f12ece3b0 assets/create/models/item/windmill_bear 9f9455ccb5fc9e3cbfce73862b46078346a522a5 assets/create/models/item/zinc_nugget.json b1689617190c05ef34bd18456b0c7ae09bb3210f assets/create/models/item/zinc_ore.json e76041b7ae829fdd7dc0524f6ca4d2f89fca51bb assets/create/sounds.json -0f1b4b980afba9bf2caf583b88e261bba8b10313 data/create/advancements/aesthetics.json +5d0cc4c0255dc241e61c173b31ddca70c88d08e4 data/create/advancements/aesthetics.json 187921fa131b06721bfaf63f2623a28c141aae9a data/create/advancements/andesite_alloy.json 0ea2db7173b5be28b289ea7c9a6a0cf5805c60c7 data/create/advancements/andesite_casing.json 356f4855a2a6c65be3fb51d7d1aabf2ca6034d42 data/create/advancements/arm_blaze_burner.json diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index 3307f8347..0060f63ea 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -1850,6 +1850,23 @@ "create.ponder.tag.fluids": "Fluid Manipulators", "create.ponder.tag.fluids.description": "Components which help relaying and making use of Fluids", + "create.ponder.adjustable_pulse_repeater.header": "Controlling signals using Adjustable Pulse Repeaters", + "create.ponder.adjustable_pulse_repeater.text_1": "Adjustable Pulse Repeaters emit a short pulse at a delay", + "create.ponder.adjustable_pulse_repeater.text_2": "Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_pulse_repeater.text_3": "Configured delays can range up to 30 minutes", + + "create.ponder.adjustable_repeater.header": "Controlling signals using Adjustable Repeaters", + "create.ponder.adjustable_repeater.text_1": "Adjustable Repeaters behave similarly to regular Repeaters", + "create.ponder.adjustable_repeater.text_2": "They charge up for a set time...", + "create.ponder.adjustable_repeater.text_3": "...and cool down for the same duration", + "create.ponder.adjustable_repeater.text_4": "Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_repeater.text_5": "Configured delays can range up to 30 minutes", + + "create.ponder.analog_lever.header": "Controlling signals using the Analog Lever", + "create.ponder.analog_lever.text_1": "Analog Levers make for a compact and precise source of redstone power", + "create.ponder.analog_lever.text_2": "Right-click to increase its analog power output", + "create.ponder.analog_lever.text_3": "Right-click while Sneaking to decrease the power output again", + "create.ponder.bearing_modes.header": "Movement Modes of the Mechanical Bearing", "create.ponder.bearing_modes.text_1": "When Stopped, the Bearing will place the structure at the nearest grid-aligned Angle", "create.ponder.bearing_modes.text_2": "It can be configured never to revert to solid blocks, or only near the angle it started at", @@ -2077,6 +2094,21 @@ "create.ponder.portable_storage_interface_redstone.header": "Redstone Control", "create.ponder.portable_storage_interface_redstone.text_1": "Redstone power will prevent the stationary interface from engaging", + "create.ponder.powered_latch.header": "Controlling signals using the Powered Latch", + "create.ponder.powered_latch.text_1": "Powered Latches are redstone controllable Levers", + "create.ponder.powered_latch.text_2": "Signals at the back switch it on", + "create.ponder.powered_latch.text_3": "Signals from the side switch it back off", + "create.ponder.powered_latch.text_4": "Powered latches can also be toggled manually", + + "create.ponder.powered_toggle_latch.header": "Controlling signals using the Powered Toggle Latch", + "create.ponder.powered_toggle_latch.text_1": "Powered Toggle Latches are redstone controllable Levers", + "create.ponder.powered_toggle_latch.text_2": "Signals at the back will toggle its state", + "create.ponder.powered_toggle_latch.text_3": "...on and back off", + "create.ponder.powered_toggle_latch.text_4": "Powered toggle latches can also be toggled manually", + + "create.ponder.pulse_repeater.header": "Controlling signals using Pulse Repeaters", + "create.ponder.pulse_repeater.text_1": "Pulse Repeaters will shorten any redstone signal to a single pulse", + "create.ponder.radial_chassis.header": "Attaching blocks using Radial Chassis", "create.ponder.radial_chassis.text_1": "Radial Chassis connect to identical Chassis blocks in a row", "create.ponder.radial_chassis.text_2": "When one is moved by a Contraption, the others are dragged with it", @@ -2092,6 +2124,14 @@ "create.ponder.redstone_contact.text_1": "Redstone Contacts facing each other will emit a redstone signal", "create.ponder.redstone_contact.text_2": "This still applies when one of them is part of a moving Contraption", + "create.ponder.redstone_link.header": "Using Redstone Links", + "create.ponder.redstone_link.text_1": "Redstone Links can transmit redstone signals wirelessly", + "create.ponder.redstone_link.text_2": "Right-click while Sneaking to toggle receive mode", + "create.ponder.redstone_link.text_3": "A simple Right-click with a Wrench can do the same", + "create.ponder.redstone_link.text_4": "Receivers will emit the redstone power of transmitters within a range of 128 blocks", + "create.ponder.redstone_link.text_5": "Placing items in the two slots can specify a Frequency", + "create.ponder.redstone_link.text_6": "Only the links with matching Frequency combinations will communicate", + "create.ponder.rope_pulley.header": "Moving Structures using Rope Pulleys", "create.ponder.rope_pulley.text_1": "Rope Pulleys can move blocks vertically when given Rotational Force", "create.ponder.rope_pulley.text_2": "Direction and Speed of movement depend on the Rotational Input", diff --git a/src/generated/resources/assets/create/lang/unfinished/de_de.json b/src/generated/resources/assets/create/lang/unfinished/de_de.json index 690fa404f..f727142a9 100644 --- a/src/generated/resources/assets/create/lang/unfinished/de_de.json +++ b/src/generated/resources/assets/create/lang/unfinished/de_de.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1263", + "_": "Missing Localizations: 1296", "_": "->------------------------] Game Elements [------------------------<-", @@ -1851,6 +1851,23 @@ "create.ponder.tag.fluids": "UNLOCALIZED: Fluid Manipulators", "create.ponder.tag.fluids.description": "UNLOCALIZED: Components which help relaying and making use of Fluids", + "create.ponder.adjustable_pulse_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Pulse Repeaters", + "create.ponder.adjustable_pulse_repeater.text_1": "UNLOCALIZED: Adjustable Pulse Repeaters emit a short pulse at a delay", + "create.ponder.adjustable_pulse_repeater.text_2": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_pulse_repeater.text_3": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.adjustable_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Repeaters", + "create.ponder.adjustable_repeater.text_1": "UNLOCALIZED: Adjustable Repeaters behave similarly to regular Repeaters", + "create.ponder.adjustable_repeater.text_2": "UNLOCALIZED: They charge up for a set time...", + "create.ponder.adjustable_repeater.text_3": "UNLOCALIZED: ...and cool down for the same duration", + "create.ponder.adjustable_repeater.text_4": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_repeater.text_5": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.analog_lever.header": "UNLOCALIZED: Controlling signals using the Analog Lever", + "create.ponder.analog_lever.text_1": "UNLOCALIZED: Analog Levers make for a compact and precise source of redstone power", + "create.ponder.analog_lever.text_2": "UNLOCALIZED: Right-click to increase its analog power output", + "create.ponder.analog_lever.text_3": "UNLOCALIZED: Right-click while Sneaking to decrease the power output again", + "create.ponder.bearing_modes.header": "UNLOCALIZED: Movement Modes of the Mechanical Bearing", "create.ponder.bearing_modes.text_1": "UNLOCALIZED: When Stopped, the Bearing will place the structure at the nearest grid-aligned Angle", "create.ponder.bearing_modes.text_2": "UNLOCALIZED: It can be configured never to revert to solid blocks, or only near the angle it started at", @@ -2078,6 +2095,21 @@ "create.ponder.portable_storage_interface_redstone.header": "UNLOCALIZED: Redstone Control", "create.ponder.portable_storage_interface_redstone.text_1": "UNLOCALIZED: Redstone power will prevent the stationary interface from engaging", + "create.ponder.powered_latch.header": "UNLOCALIZED: Controlling signals using the Powered Latch", + "create.ponder.powered_latch.text_1": "UNLOCALIZED: Powered Latches are redstone controllable Levers", + "create.ponder.powered_latch.text_2": "UNLOCALIZED: Signals at the back switch it on", + "create.ponder.powered_latch.text_3": "UNLOCALIZED: Signals from the side switch it back off", + "create.ponder.powered_latch.text_4": "UNLOCALIZED: Powered latches can also be toggled manually", + + "create.ponder.powered_toggle_latch.header": "UNLOCALIZED: Controlling signals using the Powered Toggle Latch", + "create.ponder.powered_toggle_latch.text_1": "UNLOCALIZED: Powered Toggle Latches are redstone controllable Levers", + "create.ponder.powered_toggle_latch.text_2": "UNLOCALIZED: Signals at the back will toggle its state", + "create.ponder.powered_toggle_latch.text_3": "UNLOCALIZED: ...on and back off", + "create.ponder.powered_toggle_latch.text_4": "UNLOCALIZED: Powered toggle latches can also be toggled manually", + + "create.ponder.pulse_repeater.header": "UNLOCALIZED: Controlling signals using Pulse Repeaters", + "create.ponder.pulse_repeater.text_1": "UNLOCALIZED: Pulse Repeaters will shorten any redstone signal to a single pulse", + "create.ponder.radial_chassis.header": "UNLOCALIZED: Attaching blocks using Radial Chassis", "create.ponder.radial_chassis.text_1": "UNLOCALIZED: Radial Chassis connect to identical Chassis blocks in a row", "create.ponder.radial_chassis.text_2": "UNLOCALIZED: When one is moved by a Contraption, the others are dragged with it", @@ -2093,6 +2125,14 @@ "create.ponder.redstone_contact.text_1": "UNLOCALIZED: Redstone Contacts facing each other will emit a redstone signal", "create.ponder.redstone_contact.text_2": "UNLOCALIZED: This still applies when one of them is part of a moving Contraption", + "create.ponder.redstone_link.header": "UNLOCALIZED: Using Redstone Links", + "create.ponder.redstone_link.text_1": "UNLOCALIZED: Redstone Links can transmit redstone signals wirelessly", + "create.ponder.redstone_link.text_2": "UNLOCALIZED: Right-click while Sneaking to toggle receive mode", + "create.ponder.redstone_link.text_3": "UNLOCALIZED: A simple Right-click with a Wrench can do the same", + "create.ponder.redstone_link.text_4": "UNLOCALIZED: Receivers will emit the redstone power of transmitters within a range of 128 blocks", + "create.ponder.redstone_link.text_5": "UNLOCALIZED: Placing items in the two slots can specify a Frequency", + "create.ponder.redstone_link.text_6": "UNLOCALIZED: Only the links with matching Frequency combinations will communicate", + "create.ponder.rope_pulley.header": "UNLOCALIZED: Moving Structures using Rope Pulleys", "create.ponder.rope_pulley.text_1": "UNLOCALIZED: Rope Pulleys can move blocks vertically when given Rotational Force", "create.ponder.rope_pulley.text_2": "UNLOCALIZED: Direction and Speed of movement depend on the Rotational Input", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_es.json b/src/generated/resources/assets/create/lang/unfinished/es_es.json index a8c5d3c4a..58b16e83f 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_es.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_es.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 294", + "_": "Missing Localizations: 327", "_": "->------------------------] Game Elements [------------------------<-", @@ -1851,6 +1851,23 @@ "create.ponder.tag.fluids": "UNLOCALIZED: Fluid Manipulators", "create.ponder.tag.fluids.description": "UNLOCALIZED: Components which help relaying and making use of Fluids", + "create.ponder.adjustable_pulse_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Pulse Repeaters", + "create.ponder.adjustable_pulse_repeater.text_1": "UNLOCALIZED: Adjustable Pulse Repeaters emit a short pulse at a delay", + "create.ponder.adjustable_pulse_repeater.text_2": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_pulse_repeater.text_3": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.adjustable_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Repeaters", + "create.ponder.adjustable_repeater.text_1": "UNLOCALIZED: Adjustable Repeaters behave similarly to regular Repeaters", + "create.ponder.adjustable_repeater.text_2": "UNLOCALIZED: They charge up for a set time...", + "create.ponder.adjustable_repeater.text_3": "UNLOCALIZED: ...and cool down for the same duration", + "create.ponder.adjustable_repeater.text_4": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_repeater.text_5": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.analog_lever.header": "UNLOCALIZED: Controlling signals using the Analog Lever", + "create.ponder.analog_lever.text_1": "UNLOCALIZED: Analog Levers make for a compact and precise source of redstone power", + "create.ponder.analog_lever.text_2": "UNLOCALIZED: Right-click to increase its analog power output", + "create.ponder.analog_lever.text_3": "UNLOCALIZED: Right-click while Sneaking to decrease the power output again", + "create.ponder.bearing_modes.header": "UNLOCALIZED: Movement Modes of the Mechanical Bearing", "create.ponder.bearing_modes.text_1": "UNLOCALIZED: When Stopped, the Bearing will place the structure at the nearest grid-aligned Angle", "create.ponder.bearing_modes.text_2": "UNLOCALIZED: It can be configured never to revert to solid blocks, or only near the angle it started at", @@ -2078,6 +2095,21 @@ "create.ponder.portable_storage_interface_redstone.header": "UNLOCALIZED: Redstone Control", "create.ponder.portable_storage_interface_redstone.text_1": "UNLOCALIZED: Redstone power will prevent the stationary interface from engaging", + "create.ponder.powered_latch.header": "UNLOCALIZED: Controlling signals using the Powered Latch", + "create.ponder.powered_latch.text_1": "UNLOCALIZED: Powered Latches are redstone controllable Levers", + "create.ponder.powered_latch.text_2": "UNLOCALIZED: Signals at the back switch it on", + "create.ponder.powered_latch.text_3": "UNLOCALIZED: Signals from the side switch it back off", + "create.ponder.powered_latch.text_4": "UNLOCALIZED: Powered latches can also be toggled manually", + + "create.ponder.powered_toggle_latch.header": "UNLOCALIZED: Controlling signals using the Powered Toggle Latch", + "create.ponder.powered_toggle_latch.text_1": "UNLOCALIZED: Powered Toggle Latches are redstone controllable Levers", + "create.ponder.powered_toggle_latch.text_2": "UNLOCALIZED: Signals at the back will toggle its state", + "create.ponder.powered_toggle_latch.text_3": "UNLOCALIZED: ...on and back off", + "create.ponder.powered_toggle_latch.text_4": "UNLOCALIZED: Powered toggle latches can also be toggled manually", + + "create.ponder.pulse_repeater.header": "UNLOCALIZED: Controlling signals using Pulse Repeaters", + "create.ponder.pulse_repeater.text_1": "UNLOCALIZED: Pulse Repeaters will shorten any redstone signal to a single pulse", + "create.ponder.radial_chassis.header": "UNLOCALIZED: Attaching blocks using Radial Chassis", "create.ponder.radial_chassis.text_1": "UNLOCALIZED: Radial Chassis connect to identical Chassis blocks in a row", "create.ponder.radial_chassis.text_2": "UNLOCALIZED: When one is moved by a Contraption, the others are dragged with it", @@ -2093,6 +2125,14 @@ "create.ponder.redstone_contact.text_1": "UNLOCALIZED: Redstone Contacts facing each other will emit a redstone signal", "create.ponder.redstone_contact.text_2": "UNLOCALIZED: This still applies when one of them is part of a moving Contraption", + "create.ponder.redstone_link.header": "UNLOCALIZED: Using Redstone Links", + "create.ponder.redstone_link.text_1": "UNLOCALIZED: Redstone Links can transmit redstone signals wirelessly", + "create.ponder.redstone_link.text_2": "UNLOCALIZED: Right-click while Sneaking to toggle receive mode", + "create.ponder.redstone_link.text_3": "UNLOCALIZED: A simple Right-click with a Wrench can do the same", + "create.ponder.redstone_link.text_4": "UNLOCALIZED: Receivers will emit the redstone power of transmitters within a range of 128 blocks", + "create.ponder.redstone_link.text_5": "UNLOCALIZED: Placing items in the two slots can specify a Frequency", + "create.ponder.redstone_link.text_6": "UNLOCALIZED: Only the links with matching Frequency combinations will communicate", + "create.ponder.rope_pulley.header": "UNLOCALIZED: Moving Structures using Rope Pulleys", "create.ponder.rope_pulley.text_1": "UNLOCALIZED: Rope Pulleys can move blocks vertically when given Rotational Force", "create.ponder.rope_pulley.text_2": "UNLOCALIZED: Direction and Speed of movement depend on the Rotational Input", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_mx.json b/src/generated/resources/assets/create/lang/unfinished/es_mx.json index b3d1c305d..ed7c04672 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_mx.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_mx.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1193", + "_": "Missing Localizations: 1226", "_": "->------------------------] Game Elements [------------------------<-", @@ -1851,6 +1851,23 @@ "create.ponder.tag.fluids": "UNLOCALIZED: Fluid Manipulators", "create.ponder.tag.fluids.description": "UNLOCALIZED: Components which help relaying and making use of Fluids", + "create.ponder.adjustable_pulse_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Pulse Repeaters", + "create.ponder.adjustable_pulse_repeater.text_1": "UNLOCALIZED: Adjustable Pulse Repeaters emit a short pulse at a delay", + "create.ponder.adjustable_pulse_repeater.text_2": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_pulse_repeater.text_3": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.adjustable_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Repeaters", + "create.ponder.adjustable_repeater.text_1": "UNLOCALIZED: Adjustable Repeaters behave similarly to regular Repeaters", + "create.ponder.adjustable_repeater.text_2": "UNLOCALIZED: They charge up for a set time...", + "create.ponder.adjustable_repeater.text_3": "UNLOCALIZED: ...and cool down for the same duration", + "create.ponder.adjustable_repeater.text_4": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_repeater.text_5": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.analog_lever.header": "UNLOCALIZED: Controlling signals using the Analog Lever", + "create.ponder.analog_lever.text_1": "UNLOCALIZED: Analog Levers make for a compact and precise source of redstone power", + "create.ponder.analog_lever.text_2": "UNLOCALIZED: Right-click to increase its analog power output", + "create.ponder.analog_lever.text_3": "UNLOCALIZED: Right-click while Sneaking to decrease the power output again", + "create.ponder.bearing_modes.header": "UNLOCALIZED: Movement Modes of the Mechanical Bearing", "create.ponder.bearing_modes.text_1": "UNLOCALIZED: When Stopped, the Bearing will place the structure at the nearest grid-aligned Angle", "create.ponder.bearing_modes.text_2": "UNLOCALIZED: It can be configured never to revert to solid blocks, or only near the angle it started at", @@ -2078,6 +2095,21 @@ "create.ponder.portable_storage_interface_redstone.header": "UNLOCALIZED: Redstone Control", "create.ponder.portable_storage_interface_redstone.text_1": "UNLOCALIZED: Redstone power will prevent the stationary interface from engaging", + "create.ponder.powered_latch.header": "UNLOCALIZED: Controlling signals using the Powered Latch", + "create.ponder.powered_latch.text_1": "UNLOCALIZED: Powered Latches are redstone controllable Levers", + "create.ponder.powered_latch.text_2": "UNLOCALIZED: Signals at the back switch it on", + "create.ponder.powered_latch.text_3": "UNLOCALIZED: Signals from the side switch it back off", + "create.ponder.powered_latch.text_4": "UNLOCALIZED: Powered latches can also be toggled manually", + + "create.ponder.powered_toggle_latch.header": "UNLOCALIZED: Controlling signals using the Powered Toggle Latch", + "create.ponder.powered_toggle_latch.text_1": "UNLOCALIZED: Powered Toggle Latches are redstone controllable Levers", + "create.ponder.powered_toggle_latch.text_2": "UNLOCALIZED: Signals at the back will toggle its state", + "create.ponder.powered_toggle_latch.text_3": "UNLOCALIZED: ...on and back off", + "create.ponder.powered_toggle_latch.text_4": "UNLOCALIZED: Powered toggle latches can also be toggled manually", + + "create.ponder.pulse_repeater.header": "UNLOCALIZED: Controlling signals using Pulse Repeaters", + "create.ponder.pulse_repeater.text_1": "UNLOCALIZED: Pulse Repeaters will shorten any redstone signal to a single pulse", + "create.ponder.radial_chassis.header": "UNLOCALIZED: Attaching blocks using Radial Chassis", "create.ponder.radial_chassis.text_1": "UNLOCALIZED: Radial Chassis connect to identical Chassis blocks in a row", "create.ponder.radial_chassis.text_2": "UNLOCALIZED: When one is moved by a Contraption, the others are dragged with it", @@ -2093,6 +2125,14 @@ "create.ponder.redstone_contact.text_1": "UNLOCALIZED: Redstone Contacts facing each other will emit a redstone signal", "create.ponder.redstone_contact.text_2": "UNLOCALIZED: This still applies when one of them is part of a moving Contraption", + "create.ponder.redstone_link.header": "UNLOCALIZED: Using Redstone Links", + "create.ponder.redstone_link.text_1": "UNLOCALIZED: Redstone Links can transmit redstone signals wirelessly", + "create.ponder.redstone_link.text_2": "UNLOCALIZED: Right-click while Sneaking to toggle receive mode", + "create.ponder.redstone_link.text_3": "UNLOCALIZED: A simple Right-click with a Wrench can do the same", + "create.ponder.redstone_link.text_4": "UNLOCALIZED: Receivers will emit the redstone power of transmitters within a range of 128 blocks", + "create.ponder.redstone_link.text_5": "UNLOCALIZED: Placing items in the two slots can specify a Frequency", + "create.ponder.redstone_link.text_6": "UNLOCALIZED: Only the links with matching Frequency combinations will communicate", + "create.ponder.rope_pulley.header": "UNLOCALIZED: Moving Structures using Rope Pulleys", "create.ponder.rope_pulley.text_1": "UNLOCALIZED: Rope Pulleys can move blocks vertically when given Rotational Force", "create.ponder.rope_pulley.text_2": "UNLOCALIZED: Direction and Speed of movement depend on the Rotational Input", diff --git a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json index 60960800a..533355d03 100644 --- a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json +++ b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 975", + "_": "Missing Localizations: 1008", "_": "->------------------------] Game Elements [------------------------<-", @@ -1851,6 +1851,23 @@ "create.ponder.tag.fluids": "UNLOCALIZED: Fluid Manipulators", "create.ponder.tag.fluids.description": "UNLOCALIZED: Components which help relaying and making use of Fluids", + "create.ponder.adjustable_pulse_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Pulse Repeaters", + "create.ponder.adjustable_pulse_repeater.text_1": "UNLOCALIZED: Adjustable Pulse Repeaters emit a short pulse at a delay", + "create.ponder.adjustable_pulse_repeater.text_2": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_pulse_repeater.text_3": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.adjustable_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Repeaters", + "create.ponder.adjustable_repeater.text_1": "UNLOCALIZED: Adjustable Repeaters behave similarly to regular Repeaters", + "create.ponder.adjustable_repeater.text_2": "UNLOCALIZED: They charge up for a set time...", + "create.ponder.adjustable_repeater.text_3": "UNLOCALIZED: ...and cool down for the same duration", + "create.ponder.adjustable_repeater.text_4": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_repeater.text_5": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.analog_lever.header": "UNLOCALIZED: Controlling signals using the Analog Lever", + "create.ponder.analog_lever.text_1": "UNLOCALIZED: Analog Levers make for a compact and precise source of redstone power", + "create.ponder.analog_lever.text_2": "UNLOCALIZED: Right-click to increase its analog power output", + "create.ponder.analog_lever.text_3": "UNLOCALIZED: Right-click while Sneaking to decrease the power output again", + "create.ponder.bearing_modes.header": "UNLOCALIZED: Movement Modes of the Mechanical Bearing", "create.ponder.bearing_modes.text_1": "UNLOCALIZED: When Stopped, the Bearing will place the structure at the nearest grid-aligned Angle", "create.ponder.bearing_modes.text_2": "UNLOCALIZED: It can be configured never to revert to solid blocks, or only near the angle it started at", @@ -2078,6 +2095,21 @@ "create.ponder.portable_storage_interface_redstone.header": "UNLOCALIZED: Redstone Control", "create.ponder.portable_storage_interface_redstone.text_1": "UNLOCALIZED: Redstone power will prevent the stationary interface from engaging", + "create.ponder.powered_latch.header": "UNLOCALIZED: Controlling signals using the Powered Latch", + "create.ponder.powered_latch.text_1": "UNLOCALIZED: Powered Latches are redstone controllable Levers", + "create.ponder.powered_latch.text_2": "UNLOCALIZED: Signals at the back switch it on", + "create.ponder.powered_latch.text_3": "UNLOCALIZED: Signals from the side switch it back off", + "create.ponder.powered_latch.text_4": "UNLOCALIZED: Powered latches can also be toggled manually", + + "create.ponder.powered_toggle_latch.header": "UNLOCALIZED: Controlling signals using the Powered Toggle Latch", + "create.ponder.powered_toggle_latch.text_1": "UNLOCALIZED: Powered Toggle Latches are redstone controllable Levers", + "create.ponder.powered_toggle_latch.text_2": "UNLOCALIZED: Signals at the back will toggle its state", + "create.ponder.powered_toggle_latch.text_3": "UNLOCALIZED: ...on and back off", + "create.ponder.powered_toggle_latch.text_4": "UNLOCALIZED: Powered toggle latches can also be toggled manually", + + "create.ponder.pulse_repeater.header": "UNLOCALIZED: Controlling signals using Pulse Repeaters", + "create.ponder.pulse_repeater.text_1": "UNLOCALIZED: Pulse Repeaters will shorten any redstone signal to a single pulse", + "create.ponder.radial_chassis.header": "UNLOCALIZED: Attaching blocks using Radial Chassis", "create.ponder.radial_chassis.text_1": "UNLOCALIZED: Radial Chassis connect to identical Chassis blocks in a row", "create.ponder.radial_chassis.text_2": "UNLOCALIZED: When one is moved by a Contraption, the others are dragged with it", @@ -2093,6 +2125,14 @@ "create.ponder.redstone_contact.text_1": "UNLOCALIZED: Redstone Contacts facing each other will emit a redstone signal", "create.ponder.redstone_contact.text_2": "UNLOCALIZED: This still applies when one of them is part of a moving Contraption", + "create.ponder.redstone_link.header": "UNLOCALIZED: Using Redstone Links", + "create.ponder.redstone_link.text_1": "UNLOCALIZED: Redstone Links can transmit redstone signals wirelessly", + "create.ponder.redstone_link.text_2": "UNLOCALIZED: Right-click while Sneaking to toggle receive mode", + "create.ponder.redstone_link.text_3": "UNLOCALIZED: A simple Right-click with a Wrench can do the same", + "create.ponder.redstone_link.text_4": "UNLOCALIZED: Receivers will emit the redstone power of transmitters within a range of 128 blocks", + "create.ponder.redstone_link.text_5": "UNLOCALIZED: Placing items in the two slots can specify a Frequency", + "create.ponder.redstone_link.text_6": "UNLOCALIZED: Only the links with matching Frequency combinations will communicate", + "create.ponder.rope_pulley.header": "UNLOCALIZED: Moving Structures using Rope Pulleys", "create.ponder.rope_pulley.text_1": "UNLOCALIZED: Rope Pulleys can move blocks vertically when given Rotational Force", "create.ponder.rope_pulley.text_2": "UNLOCALIZED: Direction and Speed of movement depend on the Rotational Input", diff --git a/src/generated/resources/assets/create/lang/unfinished/it_it.json b/src/generated/resources/assets/create/lang/unfinished/it_it.json index a5e05faa6..d08d07d00 100644 --- a/src/generated/resources/assets/create/lang/unfinished/it_it.json +++ b/src/generated/resources/assets/create/lang/unfinished/it_it.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 311", + "_": "Missing Localizations: 344", "_": "->------------------------] Game Elements [------------------------<-", @@ -1851,6 +1851,23 @@ "create.ponder.tag.fluids": "UNLOCALIZED: Fluid Manipulators", "create.ponder.tag.fluids.description": "UNLOCALIZED: Components which help relaying and making use of Fluids", + "create.ponder.adjustable_pulse_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Pulse Repeaters", + "create.ponder.adjustable_pulse_repeater.text_1": "UNLOCALIZED: Adjustable Pulse Repeaters emit a short pulse at a delay", + "create.ponder.adjustable_pulse_repeater.text_2": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_pulse_repeater.text_3": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.adjustable_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Repeaters", + "create.ponder.adjustable_repeater.text_1": "UNLOCALIZED: Adjustable Repeaters behave similarly to regular Repeaters", + "create.ponder.adjustable_repeater.text_2": "UNLOCALIZED: They charge up for a set time...", + "create.ponder.adjustable_repeater.text_3": "UNLOCALIZED: ...and cool down for the same duration", + "create.ponder.adjustable_repeater.text_4": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_repeater.text_5": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.analog_lever.header": "UNLOCALIZED: Controlling signals using the Analog Lever", + "create.ponder.analog_lever.text_1": "UNLOCALIZED: Analog Levers make for a compact and precise source of redstone power", + "create.ponder.analog_lever.text_2": "UNLOCALIZED: Right-click to increase its analog power output", + "create.ponder.analog_lever.text_3": "UNLOCALIZED: Right-click while Sneaking to decrease the power output again", + "create.ponder.bearing_modes.header": "UNLOCALIZED: Movement Modes of the Mechanical Bearing", "create.ponder.bearing_modes.text_1": "UNLOCALIZED: When Stopped, the Bearing will place the structure at the nearest grid-aligned Angle", "create.ponder.bearing_modes.text_2": "UNLOCALIZED: It can be configured never to revert to solid blocks, or only near the angle it started at", @@ -2078,6 +2095,21 @@ "create.ponder.portable_storage_interface_redstone.header": "UNLOCALIZED: Redstone Control", "create.ponder.portable_storage_interface_redstone.text_1": "UNLOCALIZED: Redstone power will prevent the stationary interface from engaging", + "create.ponder.powered_latch.header": "UNLOCALIZED: Controlling signals using the Powered Latch", + "create.ponder.powered_latch.text_1": "UNLOCALIZED: Powered Latches are redstone controllable Levers", + "create.ponder.powered_latch.text_2": "UNLOCALIZED: Signals at the back switch it on", + "create.ponder.powered_latch.text_3": "UNLOCALIZED: Signals from the side switch it back off", + "create.ponder.powered_latch.text_4": "UNLOCALIZED: Powered latches can also be toggled manually", + + "create.ponder.powered_toggle_latch.header": "UNLOCALIZED: Controlling signals using the Powered Toggle Latch", + "create.ponder.powered_toggle_latch.text_1": "UNLOCALIZED: Powered Toggle Latches are redstone controllable Levers", + "create.ponder.powered_toggle_latch.text_2": "UNLOCALIZED: Signals at the back will toggle its state", + "create.ponder.powered_toggle_latch.text_3": "UNLOCALIZED: ...on and back off", + "create.ponder.powered_toggle_latch.text_4": "UNLOCALIZED: Powered toggle latches can also be toggled manually", + + "create.ponder.pulse_repeater.header": "UNLOCALIZED: Controlling signals using Pulse Repeaters", + "create.ponder.pulse_repeater.text_1": "UNLOCALIZED: Pulse Repeaters will shorten any redstone signal to a single pulse", + "create.ponder.radial_chassis.header": "UNLOCALIZED: Attaching blocks using Radial Chassis", "create.ponder.radial_chassis.text_1": "UNLOCALIZED: Radial Chassis connect to identical Chassis blocks in a row", "create.ponder.radial_chassis.text_2": "UNLOCALIZED: When one is moved by a Contraption, the others are dragged with it", @@ -2093,6 +2125,14 @@ "create.ponder.redstone_contact.text_1": "UNLOCALIZED: Redstone Contacts facing each other will emit a redstone signal", "create.ponder.redstone_contact.text_2": "UNLOCALIZED: This still applies when one of them is part of a moving Contraption", + "create.ponder.redstone_link.header": "UNLOCALIZED: Using Redstone Links", + "create.ponder.redstone_link.text_1": "UNLOCALIZED: Redstone Links can transmit redstone signals wirelessly", + "create.ponder.redstone_link.text_2": "UNLOCALIZED: Right-click while Sneaking to toggle receive mode", + "create.ponder.redstone_link.text_3": "UNLOCALIZED: A simple Right-click with a Wrench can do the same", + "create.ponder.redstone_link.text_4": "UNLOCALIZED: Receivers will emit the redstone power of transmitters within a range of 128 blocks", + "create.ponder.redstone_link.text_5": "UNLOCALIZED: Placing items in the two slots can specify a Frequency", + "create.ponder.redstone_link.text_6": "UNLOCALIZED: Only the links with matching Frequency combinations will communicate", + "create.ponder.rope_pulley.header": "UNLOCALIZED: Moving Structures using Rope Pulleys", "create.ponder.rope_pulley.text_1": "UNLOCALIZED: Rope Pulleys can move blocks vertically when given Rotational Force", "create.ponder.rope_pulley.text_2": "UNLOCALIZED: Direction and Speed of movement depend on the Rotational Input", diff --git a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json index 163a2c7e0..a5958565a 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json +++ b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 318", + "_": "Missing Localizations: 351", "_": "->------------------------] Game Elements [------------------------<-", @@ -1851,6 +1851,23 @@ "create.ponder.tag.fluids": "UNLOCALIZED: Fluid Manipulators", "create.ponder.tag.fluids.description": "UNLOCALIZED: Components which help relaying and making use of Fluids", + "create.ponder.adjustable_pulse_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Pulse Repeaters", + "create.ponder.adjustable_pulse_repeater.text_1": "UNLOCALIZED: Adjustable Pulse Repeaters emit a short pulse at a delay", + "create.ponder.adjustable_pulse_repeater.text_2": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_pulse_repeater.text_3": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.adjustable_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Repeaters", + "create.ponder.adjustable_repeater.text_1": "UNLOCALIZED: Adjustable Repeaters behave similarly to regular Repeaters", + "create.ponder.adjustable_repeater.text_2": "UNLOCALIZED: They charge up for a set time...", + "create.ponder.adjustable_repeater.text_3": "UNLOCALIZED: ...and cool down for the same duration", + "create.ponder.adjustable_repeater.text_4": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_repeater.text_5": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.analog_lever.header": "UNLOCALIZED: Controlling signals using the Analog Lever", + "create.ponder.analog_lever.text_1": "UNLOCALIZED: Analog Levers make for a compact and precise source of redstone power", + "create.ponder.analog_lever.text_2": "UNLOCALIZED: Right-click to increase its analog power output", + "create.ponder.analog_lever.text_3": "UNLOCALIZED: Right-click while Sneaking to decrease the power output again", + "create.ponder.bearing_modes.header": "UNLOCALIZED: Movement Modes of the Mechanical Bearing", "create.ponder.bearing_modes.text_1": "UNLOCALIZED: When Stopped, the Bearing will place the structure at the nearest grid-aligned Angle", "create.ponder.bearing_modes.text_2": "UNLOCALIZED: It can be configured never to revert to solid blocks, or only near the angle it started at", @@ -2078,6 +2095,21 @@ "create.ponder.portable_storage_interface_redstone.header": "UNLOCALIZED: Redstone Control", "create.ponder.portable_storage_interface_redstone.text_1": "UNLOCALIZED: Redstone power will prevent the stationary interface from engaging", + "create.ponder.powered_latch.header": "UNLOCALIZED: Controlling signals using the Powered Latch", + "create.ponder.powered_latch.text_1": "UNLOCALIZED: Powered Latches are redstone controllable Levers", + "create.ponder.powered_latch.text_2": "UNLOCALIZED: Signals at the back switch it on", + "create.ponder.powered_latch.text_3": "UNLOCALIZED: Signals from the side switch it back off", + "create.ponder.powered_latch.text_4": "UNLOCALIZED: Powered latches can also be toggled manually", + + "create.ponder.powered_toggle_latch.header": "UNLOCALIZED: Controlling signals using the Powered Toggle Latch", + "create.ponder.powered_toggle_latch.text_1": "UNLOCALIZED: Powered Toggle Latches are redstone controllable Levers", + "create.ponder.powered_toggle_latch.text_2": "UNLOCALIZED: Signals at the back will toggle its state", + "create.ponder.powered_toggle_latch.text_3": "UNLOCALIZED: ...on and back off", + "create.ponder.powered_toggle_latch.text_4": "UNLOCALIZED: Powered toggle latches can also be toggled manually", + + "create.ponder.pulse_repeater.header": "UNLOCALIZED: Controlling signals using Pulse Repeaters", + "create.ponder.pulse_repeater.text_1": "UNLOCALIZED: Pulse Repeaters will shorten any redstone signal to a single pulse", + "create.ponder.radial_chassis.header": "UNLOCALIZED: Attaching blocks using Radial Chassis", "create.ponder.radial_chassis.text_1": "UNLOCALIZED: Radial Chassis connect to identical Chassis blocks in a row", "create.ponder.radial_chassis.text_2": "UNLOCALIZED: When one is moved by a Contraption, the others are dragged with it", @@ -2093,6 +2125,14 @@ "create.ponder.redstone_contact.text_1": "UNLOCALIZED: Redstone Contacts facing each other will emit a redstone signal", "create.ponder.redstone_contact.text_2": "UNLOCALIZED: This still applies when one of them is part of a moving Contraption", + "create.ponder.redstone_link.header": "UNLOCALIZED: Using Redstone Links", + "create.ponder.redstone_link.text_1": "UNLOCALIZED: Redstone Links can transmit redstone signals wirelessly", + "create.ponder.redstone_link.text_2": "UNLOCALIZED: Right-click while Sneaking to toggle receive mode", + "create.ponder.redstone_link.text_3": "UNLOCALIZED: A simple Right-click with a Wrench can do the same", + "create.ponder.redstone_link.text_4": "UNLOCALIZED: Receivers will emit the redstone power of transmitters within a range of 128 blocks", + "create.ponder.redstone_link.text_5": "UNLOCALIZED: Placing items in the two slots can specify a Frequency", + "create.ponder.redstone_link.text_6": "UNLOCALIZED: Only the links with matching Frequency combinations will communicate", + "create.ponder.rope_pulley.header": "UNLOCALIZED: Moving Structures using Rope Pulleys", "create.ponder.rope_pulley.text_1": "UNLOCALIZED: Rope Pulleys can move blocks vertically when given Rotational Force", "create.ponder.rope_pulley.text_2": "UNLOCALIZED: Direction and Speed of movement depend on the Rotational Input", diff --git a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json index c0d1e71cc..64125ad90 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json +++ b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 364", + "_": "Missing Localizations: 397", "_": "->------------------------] Game Elements [------------------------<-", @@ -1851,6 +1851,23 @@ "create.ponder.tag.fluids": "UNLOCALIZED: Fluid Manipulators", "create.ponder.tag.fluids.description": "UNLOCALIZED: Components which help relaying and making use of Fluids", + "create.ponder.adjustable_pulse_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Pulse Repeaters", + "create.ponder.adjustable_pulse_repeater.text_1": "UNLOCALIZED: Adjustable Pulse Repeaters emit a short pulse at a delay", + "create.ponder.adjustable_pulse_repeater.text_2": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_pulse_repeater.text_3": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.adjustable_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Repeaters", + "create.ponder.adjustable_repeater.text_1": "UNLOCALIZED: Adjustable Repeaters behave similarly to regular Repeaters", + "create.ponder.adjustable_repeater.text_2": "UNLOCALIZED: They charge up for a set time...", + "create.ponder.adjustable_repeater.text_3": "UNLOCALIZED: ...and cool down for the same duration", + "create.ponder.adjustable_repeater.text_4": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_repeater.text_5": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.analog_lever.header": "UNLOCALIZED: Controlling signals using the Analog Lever", + "create.ponder.analog_lever.text_1": "UNLOCALIZED: Analog Levers make for a compact and precise source of redstone power", + "create.ponder.analog_lever.text_2": "UNLOCALIZED: Right-click to increase its analog power output", + "create.ponder.analog_lever.text_3": "UNLOCALIZED: Right-click while Sneaking to decrease the power output again", + "create.ponder.bearing_modes.header": "UNLOCALIZED: Movement Modes of the Mechanical Bearing", "create.ponder.bearing_modes.text_1": "UNLOCALIZED: When Stopped, the Bearing will place the structure at the nearest grid-aligned Angle", "create.ponder.bearing_modes.text_2": "UNLOCALIZED: It can be configured never to revert to solid blocks, or only near the angle it started at", @@ -2078,6 +2095,21 @@ "create.ponder.portable_storage_interface_redstone.header": "UNLOCALIZED: Redstone Control", "create.ponder.portable_storage_interface_redstone.text_1": "UNLOCALIZED: Redstone power will prevent the stationary interface from engaging", + "create.ponder.powered_latch.header": "UNLOCALIZED: Controlling signals using the Powered Latch", + "create.ponder.powered_latch.text_1": "UNLOCALIZED: Powered Latches are redstone controllable Levers", + "create.ponder.powered_latch.text_2": "UNLOCALIZED: Signals at the back switch it on", + "create.ponder.powered_latch.text_3": "UNLOCALIZED: Signals from the side switch it back off", + "create.ponder.powered_latch.text_4": "UNLOCALIZED: Powered latches can also be toggled manually", + + "create.ponder.powered_toggle_latch.header": "UNLOCALIZED: Controlling signals using the Powered Toggle Latch", + "create.ponder.powered_toggle_latch.text_1": "UNLOCALIZED: Powered Toggle Latches are redstone controllable Levers", + "create.ponder.powered_toggle_latch.text_2": "UNLOCALIZED: Signals at the back will toggle its state", + "create.ponder.powered_toggle_latch.text_3": "UNLOCALIZED: ...on and back off", + "create.ponder.powered_toggle_latch.text_4": "UNLOCALIZED: Powered toggle latches can also be toggled manually", + + "create.ponder.pulse_repeater.header": "UNLOCALIZED: Controlling signals using Pulse Repeaters", + "create.ponder.pulse_repeater.text_1": "UNLOCALIZED: Pulse Repeaters will shorten any redstone signal to a single pulse", + "create.ponder.radial_chassis.header": "UNLOCALIZED: Attaching blocks using Radial Chassis", "create.ponder.radial_chassis.text_1": "UNLOCALIZED: Radial Chassis connect to identical Chassis blocks in a row", "create.ponder.radial_chassis.text_2": "UNLOCALIZED: When one is moved by a Contraption, the others are dragged with it", @@ -2093,6 +2125,14 @@ "create.ponder.redstone_contact.text_1": "UNLOCALIZED: Redstone Contacts facing each other will emit a redstone signal", "create.ponder.redstone_contact.text_2": "UNLOCALIZED: This still applies when one of them is part of a moving Contraption", + "create.ponder.redstone_link.header": "UNLOCALIZED: Using Redstone Links", + "create.ponder.redstone_link.text_1": "UNLOCALIZED: Redstone Links can transmit redstone signals wirelessly", + "create.ponder.redstone_link.text_2": "UNLOCALIZED: Right-click while Sneaking to toggle receive mode", + "create.ponder.redstone_link.text_3": "UNLOCALIZED: A simple Right-click with a Wrench can do the same", + "create.ponder.redstone_link.text_4": "UNLOCALIZED: Receivers will emit the redstone power of transmitters within a range of 128 blocks", + "create.ponder.redstone_link.text_5": "UNLOCALIZED: Placing items in the two slots can specify a Frequency", + "create.ponder.redstone_link.text_6": "UNLOCALIZED: Only the links with matching Frequency combinations will communicate", + "create.ponder.rope_pulley.header": "UNLOCALIZED: Moving Structures using Rope Pulleys", "create.ponder.rope_pulley.text_1": "UNLOCALIZED: Rope Pulleys can move blocks vertically when given Rotational Force", "create.ponder.rope_pulley.text_2": "UNLOCALIZED: Direction and Speed of movement depend on the Rotational Input", diff --git a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json index 4933193e5..e90aa4a1e 100644 --- a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json +++ b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1462", + "_": "Missing Localizations: 1495", "_": "->------------------------] Game Elements [------------------------<-", @@ -1851,6 +1851,23 @@ "create.ponder.tag.fluids": "UNLOCALIZED: Fluid Manipulators", "create.ponder.tag.fluids.description": "UNLOCALIZED: Components which help relaying and making use of Fluids", + "create.ponder.adjustable_pulse_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Pulse Repeaters", + "create.ponder.adjustable_pulse_repeater.text_1": "UNLOCALIZED: Adjustable Pulse Repeaters emit a short pulse at a delay", + "create.ponder.adjustable_pulse_repeater.text_2": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_pulse_repeater.text_3": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.adjustable_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Repeaters", + "create.ponder.adjustable_repeater.text_1": "UNLOCALIZED: Adjustable Repeaters behave similarly to regular Repeaters", + "create.ponder.adjustable_repeater.text_2": "UNLOCALIZED: They charge up for a set time...", + "create.ponder.adjustable_repeater.text_3": "UNLOCALIZED: ...and cool down for the same duration", + "create.ponder.adjustable_repeater.text_4": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_repeater.text_5": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.analog_lever.header": "UNLOCALIZED: Controlling signals using the Analog Lever", + "create.ponder.analog_lever.text_1": "UNLOCALIZED: Analog Levers make for a compact and precise source of redstone power", + "create.ponder.analog_lever.text_2": "UNLOCALIZED: Right-click to increase its analog power output", + "create.ponder.analog_lever.text_3": "UNLOCALIZED: Right-click while Sneaking to decrease the power output again", + "create.ponder.bearing_modes.header": "UNLOCALIZED: Movement Modes of the Mechanical Bearing", "create.ponder.bearing_modes.text_1": "UNLOCALIZED: When Stopped, the Bearing will place the structure at the nearest grid-aligned Angle", "create.ponder.bearing_modes.text_2": "UNLOCALIZED: It can be configured never to revert to solid blocks, or only near the angle it started at", @@ -2078,6 +2095,21 @@ "create.ponder.portable_storage_interface_redstone.header": "UNLOCALIZED: Redstone Control", "create.ponder.portable_storage_interface_redstone.text_1": "UNLOCALIZED: Redstone power will prevent the stationary interface from engaging", + "create.ponder.powered_latch.header": "UNLOCALIZED: Controlling signals using the Powered Latch", + "create.ponder.powered_latch.text_1": "UNLOCALIZED: Powered Latches are redstone controllable Levers", + "create.ponder.powered_latch.text_2": "UNLOCALIZED: Signals at the back switch it on", + "create.ponder.powered_latch.text_3": "UNLOCALIZED: Signals from the side switch it back off", + "create.ponder.powered_latch.text_4": "UNLOCALIZED: Powered latches can also be toggled manually", + + "create.ponder.powered_toggle_latch.header": "UNLOCALIZED: Controlling signals using the Powered Toggle Latch", + "create.ponder.powered_toggle_latch.text_1": "UNLOCALIZED: Powered Toggle Latches are redstone controllable Levers", + "create.ponder.powered_toggle_latch.text_2": "UNLOCALIZED: Signals at the back will toggle its state", + "create.ponder.powered_toggle_latch.text_3": "UNLOCALIZED: ...on and back off", + "create.ponder.powered_toggle_latch.text_4": "UNLOCALIZED: Powered toggle latches can also be toggled manually", + + "create.ponder.pulse_repeater.header": "UNLOCALIZED: Controlling signals using Pulse Repeaters", + "create.ponder.pulse_repeater.text_1": "UNLOCALIZED: Pulse Repeaters will shorten any redstone signal to a single pulse", + "create.ponder.radial_chassis.header": "UNLOCALIZED: Attaching blocks using Radial Chassis", "create.ponder.radial_chassis.text_1": "UNLOCALIZED: Radial Chassis connect to identical Chassis blocks in a row", "create.ponder.radial_chassis.text_2": "UNLOCALIZED: When one is moved by a Contraption, the others are dragged with it", @@ -2093,6 +2125,14 @@ "create.ponder.redstone_contact.text_1": "UNLOCALIZED: Redstone Contacts facing each other will emit a redstone signal", "create.ponder.redstone_contact.text_2": "UNLOCALIZED: This still applies when one of them is part of a moving Contraption", + "create.ponder.redstone_link.header": "UNLOCALIZED: Using Redstone Links", + "create.ponder.redstone_link.text_1": "UNLOCALIZED: Redstone Links can transmit redstone signals wirelessly", + "create.ponder.redstone_link.text_2": "UNLOCALIZED: Right-click while Sneaking to toggle receive mode", + "create.ponder.redstone_link.text_3": "UNLOCALIZED: A simple Right-click with a Wrench can do the same", + "create.ponder.redstone_link.text_4": "UNLOCALIZED: Receivers will emit the redstone power of transmitters within a range of 128 blocks", + "create.ponder.redstone_link.text_5": "UNLOCALIZED: Placing items in the two slots can specify a Frequency", + "create.ponder.redstone_link.text_6": "UNLOCALIZED: Only the links with matching Frequency combinations will communicate", + "create.ponder.rope_pulley.header": "UNLOCALIZED: Moving Structures using Rope Pulleys", "create.ponder.rope_pulley.text_1": "UNLOCALIZED: Rope Pulleys can move blocks vertically when given Rotational Force", "create.ponder.rope_pulley.text_2": "UNLOCALIZED: Direction and Speed of movement depend on the Rotational Input", diff --git a/src/generated/resources/assets/create/lang/unfinished/pt_br.json b/src/generated/resources/assets/create/lang/unfinished/pt_br.json index 098d5ea60..495da0f25 100644 --- a/src/generated/resources/assets/create/lang/unfinished/pt_br.json +++ b/src/generated/resources/assets/create/lang/unfinished/pt_br.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1528", + "_": "Missing Localizations: 1561", "_": "->------------------------] Game Elements [------------------------<-", @@ -1851,6 +1851,23 @@ "create.ponder.tag.fluids": "UNLOCALIZED: Fluid Manipulators", "create.ponder.tag.fluids.description": "UNLOCALIZED: Components which help relaying and making use of Fluids", + "create.ponder.adjustable_pulse_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Pulse Repeaters", + "create.ponder.adjustable_pulse_repeater.text_1": "UNLOCALIZED: Adjustable Pulse Repeaters emit a short pulse at a delay", + "create.ponder.adjustable_pulse_repeater.text_2": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_pulse_repeater.text_3": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.adjustable_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Repeaters", + "create.ponder.adjustable_repeater.text_1": "UNLOCALIZED: Adjustable Repeaters behave similarly to regular Repeaters", + "create.ponder.adjustable_repeater.text_2": "UNLOCALIZED: They charge up for a set time...", + "create.ponder.adjustable_repeater.text_3": "UNLOCALIZED: ...and cool down for the same duration", + "create.ponder.adjustable_repeater.text_4": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_repeater.text_5": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.analog_lever.header": "UNLOCALIZED: Controlling signals using the Analog Lever", + "create.ponder.analog_lever.text_1": "UNLOCALIZED: Analog Levers make for a compact and precise source of redstone power", + "create.ponder.analog_lever.text_2": "UNLOCALIZED: Right-click to increase its analog power output", + "create.ponder.analog_lever.text_3": "UNLOCALIZED: Right-click while Sneaking to decrease the power output again", + "create.ponder.bearing_modes.header": "UNLOCALIZED: Movement Modes of the Mechanical Bearing", "create.ponder.bearing_modes.text_1": "UNLOCALIZED: When Stopped, the Bearing will place the structure at the nearest grid-aligned Angle", "create.ponder.bearing_modes.text_2": "UNLOCALIZED: It can be configured never to revert to solid blocks, or only near the angle it started at", @@ -2078,6 +2095,21 @@ "create.ponder.portable_storage_interface_redstone.header": "UNLOCALIZED: Redstone Control", "create.ponder.portable_storage_interface_redstone.text_1": "UNLOCALIZED: Redstone power will prevent the stationary interface from engaging", + "create.ponder.powered_latch.header": "UNLOCALIZED: Controlling signals using the Powered Latch", + "create.ponder.powered_latch.text_1": "UNLOCALIZED: Powered Latches are redstone controllable Levers", + "create.ponder.powered_latch.text_2": "UNLOCALIZED: Signals at the back switch it on", + "create.ponder.powered_latch.text_3": "UNLOCALIZED: Signals from the side switch it back off", + "create.ponder.powered_latch.text_4": "UNLOCALIZED: Powered latches can also be toggled manually", + + "create.ponder.powered_toggle_latch.header": "UNLOCALIZED: Controlling signals using the Powered Toggle Latch", + "create.ponder.powered_toggle_latch.text_1": "UNLOCALIZED: Powered Toggle Latches are redstone controllable Levers", + "create.ponder.powered_toggle_latch.text_2": "UNLOCALIZED: Signals at the back will toggle its state", + "create.ponder.powered_toggle_latch.text_3": "UNLOCALIZED: ...on and back off", + "create.ponder.powered_toggle_latch.text_4": "UNLOCALIZED: Powered toggle latches can also be toggled manually", + + "create.ponder.pulse_repeater.header": "UNLOCALIZED: Controlling signals using Pulse Repeaters", + "create.ponder.pulse_repeater.text_1": "UNLOCALIZED: Pulse Repeaters will shorten any redstone signal to a single pulse", + "create.ponder.radial_chassis.header": "UNLOCALIZED: Attaching blocks using Radial Chassis", "create.ponder.radial_chassis.text_1": "UNLOCALIZED: Radial Chassis connect to identical Chassis blocks in a row", "create.ponder.radial_chassis.text_2": "UNLOCALIZED: When one is moved by a Contraption, the others are dragged with it", @@ -2093,6 +2125,14 @@ "create.ponder.redstone_contact.text_1": "UNLOCALIZED: Redstone Contacts facing each other will emit a redstone signal", "create.ponder.redstone_contact.text_2": "UNLOCALIZED: This still applies when one of them is part of a moving Contraption", + "create.ponder.redstone_link.header": "UNLOCALIZED: Using Redstone Links", + "create.ponder.redstone_link.text_1": "UNLOCALIZED: Redstone Links can transmit redstone signals wirelessly", + "create.ponder.redstone_link.text_2": "UNLOCALIZED: Right-click while Sneaking to toggle receive mode", + "create.ponder.redstone_link.text_3": "UNLOCALIZED: A simple Right-click with a Wrench can do the same", + "create.ponder.redstone_link.text_4": "UNLOCALIZED: Receivers will emit the redstone power of transmitters within a range of 128 blocks", + "create.ponder.redstone_link.text_5": "UNLOCALIZED: Placing items in the two slots can specify a Frequency", + "create.ponder.redstone_link.text_6": "UNLOCALIZED: Only the links with matching Frequency combinations will communicate", + "create.ponder.rope_pulley.header": "UNLOCALIZED: Moving Structures using Rope Pulleys", "create.ponder.rope_pulley.text_1": "UNLOCALIZED: Rope Pulleys can move blocks vertically when given Rotational Force", "create.ponder.rope_pulley.text_2": "UNLOCALIZED: Direction and Speed of movement depend on the Rotational Input", diff --git a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json index ee7c4ce98..59f6535e0 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json +++ b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 314", + "_": "Missing Localizations: 347", "_": "->------------------------] Game Elements [------------------------<-", @@ -1851,6 +1851,23 @@ "create.ponder.tag.fluids": "UNLOCALIZED: Fluid Manipulators", "create.ponder.tag.fluids.description": "UNLOCALIZED: Components which help relaying and making use of Fluids", + "create.ponder.adjustable_pulse_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Pulse Repeaters", + "create.ponder.adjustable_pulse_repeater.text_1": "UNLOCALIZED: Adjustable Pulse Repeaters emit a short pulse at a delay", + "create.ponder.adjustable_pulse_repeater.text_2": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_pulse_repeater.text_3": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.adjustable_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Repeaters", + "create.ponder.adjustable_repeater.text_1": "UNLOCALIZED: Adjustable Repeaters behave similarly to regular Repeaters", + "create.ponder.adjustable_repeater.text_2": "UNLOCALIZED: They charge up for a set time...", + "create.ponder.adjustable_repeater.text_3": "UNLOCALIZED: ...and cool down for the same duration", + "create.ponder.adjustable_repeater.text_4": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_repeater.text_5": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.analog_lever.header": "UNLOCALIZED: Controlling signals using the Analog Lever", + "create.ponder.analog_lever.text_1": "UNLOCALIZED: Analog Levers make for a compact and precise source of redstone power", + "create.ponder.analog_lever.text_2": "UNLOCALIZED: Right-click to increase its analog power output", + "create.ponder.analog_lever.text_3": "UNLOCALIZED: Right-click while Sneaking to decrease the power output again", + "create.ponder.bearing_modes.header": "UNLOCALIZED: Movement Modes of the Mechanical Bearing", "create.ponder.bearing_modes.text_1": "UNLOCALIZED: When Stopped, the Bearing will place the structure at the nearest grid-aligned Angle", "create.ponder.bearing_modes.text_2": "UNLOCALIZED: It can be configured never to revert to solid blocks, or only near the angle it started at", @@ -2078,6 +2095,21 @@ "create.ponder.portable_storage_interface_redstone.header": "UNLOCALIZED: Redstone Control", "create.ponder.portable_storage_interface_redstone.text_1": "UNLOCALIZED: Redstone power will prevent the stationary interface from engaging", + "create.ponder.powered_latch.header": "UNLOCALIZED: Controlling signals using the Powered Latch", + "create.ponder.powered_latch.text_1": "UNLOCALIZED: Powered Latches are redstone controllable Levers", + "create.ponder.powered_latch.text_2": "UNLOCALIZED: Signals at the back switch it on", + "create.ponder.powered_latch.text_3": "UNLOCALIZED: Signals from the side switch it back off", + "create.ponder.powered_latch.text_4": "UNLOCALIZED: Powered latches can also be toggled manually", + + "create.ponder.powered_toggle_latch.header": "UNLOCALIZED: Controlling signals using the Powered Toggle Latch", + "create.ponder.powered_toggle_latch.text_1": "UNLOCALIZED: Powered Toggle Latches are redstone controllable Levers", + "create.ponder.powered_toggle_latch.text_2": "UNLOCALIZED: Signals at the back will toggle its state", + "create.ponder.powered_toggle_latch.text_3": "UNLOCALIZED: ...on and back off", + "create.ponder.powered_toggle_latch.text_4": "UNLOCALIZED: Powered toggle latches can also be toggled manually", + + "create.ponder.pulse_repeater.header": "UNLOCALIZED: Controlling signals using Pulse Repeaters", + "create.ponder.pulse_repeater.text_1": "UNLOCALIZED: Pulse Repeaters will shorten any redstone signal to a single pulse", + "create.ponder.radial_chassis.header": "UNLOCALIZED: Attaching blocks using Radial Chassis", "create.ponder.radial_chassis.text_1": "UNLOCALIZED: Radial Chassis connect to identical Chassis blocks in a row", "create.ponder.radial_chassis.text_2": "UNLOCALIZED: When one is moved by a Contraption, the others are dragged with it", @@ -2093,6 +2125,14 @@ "create.ponder.redstone_contact.text_1": "UNLOCALIZED: Redstone Contacts facing each other will emit a redstone signal", "create.ponder.redstone_contact.text_2": "UNLOCALIZED: This still applies when one of them is part of a moving Contraption", + "create.ponder.redstone_link.header": "UNLOCALIZED: Using Redstone Links", + "create.ponder.redstone_link.text_1": "UNLOCALIZED: Redstone Links can transmit redstone signals wirelessly", + "create.ponder.redstone_link.text_2": "UNLOCALIZED: Right-click while Sneaking to toggle receive mode", + "create.ponder.redstone_link.text_3": "UNLOCALIZED: A simple Right-click with a Wrench can do the same", + "create.ponder.redstone_link.text_4": "UNLOCALIZED: Receivers will emit the redstone power of transmitters within a range of 128 blocks", + "create.ponder.redstone_link.text_5": "UNLOCALIZED: Placing items in the two slots can specify a Frequency", + "create.ponder.redstone_link.text_6": "UNLOCALIZED: Only the links with matching Frequency combinations will communicate", + "create.ponder.rope_pulley.header": "UNLOCALIZED: Moving Structures using Rope Pulleys", "create.ponder.rope_pulley.text_1": "UNLOCALIZED: Rope Pulleys can move blocks vertically when given Rotational Force", "create.ponder.rope_pulley.text_2": "UNLOCALIZED: Direction and Speed of movement depend on the Rotational Input", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json index 166f470d3..314b568f1 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 312", + "_": "Missing Localizations: 345", "_": "->------------------------] Game Elements [------------------------<-", @@ -1851,6 +1851,23 @@ "create.ponder.tag.fluids": "UNLOCALIZED: Fluid Manipulators", "create.ponder.tag.fluids.description": "UNLOCALIZED: Components which help relaying and making use of Fluids", + "create.ponder.adjustable_pulse_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Pulse Repeaters", + "create.ponder.adjustable_pulse_repeater.text_1": "UNLOCALIZED: Adjustable Pulse Repeaters emit a short pulse at a delay", + "create.ponder.adjustable_pulse_repeater.text_2": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_pulse_repeater.text_3": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.adjustable_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Repeaters", + "create.ponder.adjustable_repeater.text_1": "UNLOCALIZED: Adjustable Repeaters behave similarly to regular Repeaters", + "create.ponder.adjustable_repeater.text_2": "UNLOCALIZED: They charge up for a set time...", + "create.ponder.adjustable_repeater.text_3": "UNLOCALIZED: ...and cool down for the same duration", + "create.ponder.adjustable_repeater.text_4": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_repeater.text_5": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.analog_lever.header": "UNLOCALIZED: Controlling signals using the Analog Lever", + "create.ponder.analog_lever.text_1": "UNLOCALIZED: Analog Levers make for a compact and precise source of redstone power", + "create.ponder.analog_lever.text_2": "UNLOCALIZED: Right-click to increase its analog power output", + "create.ponder.analog_lever.text_3": "UNLOCALIZED: Right-click while Sneaking to decrease the power output again", + "create.ponder.bearing_modes.header": "UNLOCALIZED: Movement Modes of the Mechanical Bearing", "create.ponder.bearing_modes.text_1": "UNLOCALIZED: When Stopped, the Bearing will place the structure at the nearest grid-aligned Angle", "create.ponder.bearing_modes.text_2": "UNLOCALIZED: It can be configured never to revert to solid blocks, or only near the angle it started at", @@ -2078,6 +2095,21 @@ "create.ponder.portable_storage_interface_redstone.header": "UNLOCALIZED: Redstone Control", "create.ponder.portable_storage_interface_redstone.text_1": "UNLOCALIZED: Redstone power will prevent the stationary interface from engaging", + "create.ponder.powered_latch.header": "UNLOCALIZED: Controlling signals using the Powered Latch", + "create.ponder.powered_latch.text_1": "UNLOCALIZED: Powered Latches are redstone controllable Levers", + "create.ponder.powered_latch.text_2": "UNLOCALIZED: Signals at the back switch it on", + "create.ponder.powered_latch.text_3": "UNLOCALIZED: Signals from the side switch it back off", + "create.ponder.powered_latch.text_4": "UNLOCALIZED: Powered latches can also be toggled manually", + + "create.ponder.powered_toggle_latch.header": "UNLOCALIZED: Controlling signals using the Powered Toggle Latch", + "create.ponder.powered_toggle_latch.text_1": "UNLOCALIZED: Powered Toggle Latches are redstone controllable Levers", + "create.ponder.powered_toggle_latch.text_2": "UNLOCALIZED: Signals at the back will toggle its state", + "create.ponder.powered_toggle_latch.text_3": "UNLOCALIZED: ...on and back off", + "create.ponder.powered_toggle_latch.text_4": "UNLOCALIZED: Powered toggle latches can also be toggled manually", + + "create.ponder.pulse_repeater.header": "UNLOCALIZED: Controlling signals using Pulse Repeaters", + "create.ponder.pulse_repeater.text_1": "UNLOCALIZED: Pulse Repeaters will shorten any redstone signal to a single pulse", + "create.ponder.radial_chassis.header": "UNLOCALIZED: Attaching blocks using Radial Chassis", "create.ponder.radial_chassis.text_1": "UNLOCALIZED: Radial Chassis connect to identical Chassis blocks in a row", "create.ponder.radial_chassis.text_2": "UNLOCALIZED: When one is moved by a Contraption, the others are dragged with it", @@ -2093,6 +2125,14 @@ "create.ponder.redstone_contact.text_1": "UNLOCALIZED: Redstone Contacts facing each other will emit a redstone signal", "create.ponder.redstone_contact.text_2": "UNLOCALIZED: This still applies when one of them is part of a moving Contraption", + "create.ponder.redstone_link.header": "UNLOCALIZED: Using Redstone Links", + "create.ponder.redstone_link.text_1": "UNLOCALIZED: Redstone Links can transmit redstone signals wirelessly", + "create.ponder.redstone_link.text_2": "UNLOCALIZED: Right-click while Sneaking to toggle receive mode", + "create.ponder.redstone_link.text_3": "UNLOCALIZED: A simple Right-click with a Wrench can do the same", + "create.ponder.redstone_link.text_4": "UNLOCALIZED: Receivers will emit the redstone power of transmitters within a range of 128 blocks", + "create.ponder.redstone_link.text_5": "UNLOCALIZED: Placing items in the two slots can specify a Frequency", + "create.ponder.redstone_link.text_6": "UNLOCALIZED: Only the links with matching Frequency combinations will communicate", + "create.ponder.rope_pulley.header": "UNLOCALIZED: Moving Structures using Rope Pulleys", "create.ponder.rope_pulley.text_1": "UNLOCALIZED: Rope Pulleys can move blocks vertically when given Rotational Force", "create.ponder.rope_pulley.text_2": "UNLOCALIZED: Direction and Speed of movement depend on the Rotational Input", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json index 100ff16ac..e900c1e46 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 317", + "_": "Missing Localizations: 350", "_": "->------------------------] Game Elements [------------------------<-", @@ -1851,6 +1851,23 @@ "create.ponder.tag.fluids": "UNLOCALIZED: Fluid Manipulators", "create.ponder.tag.fluids.description": "UNLOCALIZED: Components which help relaying and making use of Fluids", + "create.ponder.adjustable_pulse_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Pulse Repeaters", + "create.ponder.adjustable_pulse_repeater.text_1": "UNLOCALIZED: Adjustable Pulse Repeaters emit a short pulse at a delay", + "create.ponder.adjustable_pulse_repeater.text_2": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_pulse_repeater.text_3": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.adjustable_repeater.header": "UNLOCALIZED: Controlling signals using Adjustable Repeaters", + "create.ponder.adjustable_repeater.text_1": "UNLOCALIZED: Adjustable Repeaters behave similarly to regular Repeaters", + "create.ponder.adjustable_repeater.text_2": "UNLOCALIZED: They charge up for a set time...", + "create.ponder.adjustable_repeater.text_3": "UNLOCALIZED: ...and cool down for the same duration", + "create.ponder.adjustable_repeater.text_4": "UNLOCALIZED: Using the mouse wheel, the charge time can be configured", + "create.ponder.adjustable_repeater.text_5": "UNLOCALIZED: Configured delays can range up to 30 minutes", + + "create.ponder.analog_lever.header": "UNLOCALIZED: Controlling signals using the Analog Lever", + "create.ponder.analog_lever.text_1": "UNLOCALIZED: Analog Levers make for a compact and precise source of redstone power", + "create.ponder.analog_lever.text_2": "UNLOCALIZED: Right-click to increase its analog power output", + "create.ponder.analog_lever.text_3": "UNLOCALIZED: Right-click while Sneaking to decrease the power output again", + "create.ponder.bearing_modes.header": "UNLOCALIZED: Movement Modes of the Mechanical Bearing", "create.ponder.bearing_modes.text_1": "UNLOCALIZED: When Stopped, the Bearing will place the structure at the nearest grid-aligned Angle", "create.ponder.bearing_modes.text_2": "UNLOCALIZED: It can be configured never to revert to solid blocks, or only near the angle it started at", @@ -2078,6 +2095,21 @@ "create.ponder.portable_storage_interface_redstone.header": "UNLOCALIZED: Redstone Control", "create.ponder.portable_storage_interface_redstone.text_1": "UNLOCALIZED: Redstone power will prevent the stationary interface from engaging", + "create.ponder.powered_latch.header": "UNLOCALIZED: Controlling signals using the Powered Latch", + "create.ponder.powered_latch.text_1": "UNLOCALIZED: Powered Latches are redstone controllable Levers", + "create.ponder.powered_latch.text_2": "UNLOCALIZED: Signals at the back switch it on", + "create.ponder.powered_latch.text_3": "UNLOCALIZED: Signals from the side switch it back off", + "create.ponder.powered_latch.text_4": "UNLOCALIZED: Powered latches can also be toggled manually", + + "create.ponder.powered_toggle_latch.header": "UNLOCALIZED: Controlling signals using the Powered Toggle Latch", + "create.ponder.powered_toggle_latch.text_1": "UNLOCALIZED: Powered Toggle Latches are redstone controllable Levers", + "create.ponder.powered_toggle_latch.text_2": "UNLOCALIZED: Signals at the back will toggle its state", + "create.ponder.powered_toggle_latch.text_3": "UNLOCALIZED: ...on and back off", + "create.ponder.powered_toggle_latch.text_4": "UNLOCALIZED: Powered toggle latches can also be toggled manually", + + "create.ponder.pulse_repeater.header": "UNLOCALIZED: Controlling signals using Pulse Repeaters", + "create.ponder.pulse_repeater.text_1": "UNLOCALIZED: Pulse Repeaters will shorten any redstone signal to a single pulse", + "create.ponder.radial_chassis.header": "UNLOCALIZED: Attaching blocks using Radial Chassis", "create.ponder.radial_chassis.text_1": "UNLOCALIZED: Radial Chassis connect to identical Chassis blocks in a row", "create.ponder.radial_chassis.text_2": "UNLOCALIZED: When one is moved by a Contraption, the others are dragged with it", @@ -2093,6 +2125,14 @@ "create.ponder.redstone_contact.text_1": "UNLOCALIZED: Redstone Contacts facing each other will emit a redstone signal", "create.ponder.redstone_contact.text_2": "UNLOCALIZED: This still applies when one of them is part of a moving Contraption", + "create.ponder.redstone_link.header": "UNLOCALIZED: Using Redstone Links", + "create.ponder.redstone_link.text_1": "UNLOCALIZED: Redstone Links can transmit redstone signals wirelessly", + "create.ponder.redstone_link.text_2": "UNLOCALIZED: Right-click while Sneaking to toggle receive mode", + "create.ponder.redstone_link.text_3": "UNLOCALIZED: A simple Right-click with a Wrench can do the same", + "create.ponder.redstone_link.text_4": "UNLOCALIZED: Receivers will emit the redstone power of transmitters within a range of 128 blocks", + "create.ponder.redstone_link.text_5": "UNLOCALIZED: Placing items in the two slots can specify a Frequency", + "create.ponder.redstone_link.text_6": "UNLOCALIZED: Only the links with matching Frequency combinations will communicate", + "create.ponder.rope_pulley.header": "UNLOCALIZED: Moving Structures using Rope Pulleys", "create.ponder.rope_pulley.text_1": "UNLOCALIZED: Rope Pulleys can move blocks vertically when given Rotational Force", "create.ponder.rope_pulley.text_2": "UNLOCALIZED: Direction and Speed of movement depend on the Rotational Input", diff --git a/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverTileEntity.java index 233c8b441..d98c89f5f 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverTileEntity.java @@ -2,7 +2,6 @@ package com.simibubi.create.content.logistics.block.redstone; import java.util.List; -import com.simibubi.create.CreateClient; import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation; import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingValue; import com.simibubi.create.foundation.render.backend.instancing.IInstanceRendered; diff --git a/src/main/java/com/simibubi/create/content/schematics/SchematicWorld.java b/src/main/java/com/simibubi/create/content/schematics/SchematicWorld.java index 06abab70c..1b6c7e5ab 100644 --- a/src/main/java/com/simibubi/create/content/schematics/SchematicWorld.java +++ b/src/main/java/com/simibubi/create/content/schematics/SchematicWorld.java @@ -11,6 +11,7 @@ import java.util.function.Predicate; import com.simibubi.create.Create; import com.simibubi.create.foundation.utility.worldWrappers.WrappedWorld; +import net.minecraft.block.AbstractFurnaceBlock; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; @@ -39,14 +40,14 @@ public class SchematicWorld extends WrappedWorld { protected List renderedTileEntities; protected List entities; protected MutableBoundingBox bounds; - + public BlockPos anchor; public boolean renderMode; public SchematicWorld(World original) { this(BlockPos.ZERO, original); } - + public SchematicWorld(BlockPos anchor, World original) { super(original); this.blocks = new HashMap<>(); @@ -111,12 +112,8 @@ public class SchematicWorld extends WrappedWorld { if (pos.getY() - bounds.minY == -1 && !renderMode) return Blocks.GRASS_BLOCK.getDefaultState(); - if (getBounds().isVecInside(pos) && blocks.containsKey(pos)) { - BlockState blockState = blocks.get(pos); - if (blockState.has(BlockStateProperties.LIT)) - blockState = blockState.with(BlockStateProperties.LIT, false); - return blockState; - } + if (getBounds().isVecInside(pos) && blocks.containsKey(pos)) + return processBlockStateForPrinting(blocks.get(pos)); return Blocks.AIR.getDefaultState(); } @@ -177,21 +174,23 @@ public class SchematicWorld extends WrappedWorld { @Override public boolean setBlockState(BlockPos pos, BlockState arg1, int arg2) { - pos = pos.subtract(anchor); + pos = pos.toImmutable() + .subtract(anchor); bounds.expandTo(new MutableBoundingBox(pos, pos)); blocks.put(pos, arg1); if (tileEntities.containsKey(pos)) { TileEntity tileEntity = tileEntities.get(pos); - if (!tileEntity.getType().isValidBlock(arg1.getBlock())) { + if (!tileEntity.getType() + .isValidBlock(arg1.getBlock())) { tileEntities.remove(pos); renderedTileEntities.remove(tileEntity); } } - + TileEntity tileEntity = getTileEntity(pos); if (tileEntity != null) tileEntities.put(pos, tileEntity); - + return true; } @@ -213,4 +212,10 @@ public class SchematicWorld extends WrappedWorld { return renderedTileEntities; } + protected BlockState processBlockStateForPrinting(BlockState state) { + if (state.getBlock() instanceof AbstractFurnaceBlock && state.has(BlockStateProperties.LIT)) + state = state.with(BlockStateProperties.LIT, false); + return state; + } + } diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderWorld.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderWorld.java index ec5a41f0f..298b01d8f 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderWorld.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderWorld.java @@ -280,5 +280,10 @@ public class PonderWorld extends SchematicWorld { } } } + + @Override + protected BlockState processBlockStateForPrinting(BlockState state) { + return state; + } } diff --git a/src/main/java/com/simibubi/create/foundation/ponder/SceneBuilder.java b/src/main/java/com/simibubi/create/foundation/ponder/SceneBuilder.java index e628ae1f3..811aa75a9 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/SceneBuilder.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/SceneBuilder.java @@ -55,11 +55,13 @@ import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; +import net.minecraft.block.RedstoneTorchBlock; import net.minecraft.entity.Entity; import net.minecraft.entity.item.ItemEntity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; import net.minecraft.particles.RedstoneParticleData; +import net.minecraft.state.IProperty; import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Direction; @@ -334,6 +336,15 @@ public class SceneBuilder { expands, duration)); } + public void showRepeaterScrollInput(BlockPos pos, int duration) { + float s = 1 / 16f; + float q = 1 / 6f; + Vec3d expands = new Vec3d(q, s, q); + addInstruction( + new HighlightValueBoxInstruction(scene.getSceneBuildingUtil().vector.blockSurface(pos, Direction.DOWN) + .add(0, 3 / 16f, 0), expands, duration)); + } + public void showFilterSlotInput(Vec3d location, int duration) { float s = .1f; Vec3d expands = new Vec3d(s, s, s); @@ -523,6 +534,11 @@ public class SceneBuilder { modifyBlocks(scene.getSceneBuildingUtil().select.position(pos), stateFunc, spawnParticles); } + public void cycleBlockProperty(BlockPos pos, IProperty property) { + modifyBlocks(scene.getSceneBuildingUtil().select.position(pos), + s -> s.has(property) ? s.cycle(property) : s, false); + } + public void modifyBlocks(Selection selection, UnaryOperator stateFunc, boolean spawnParticles) { addInstruction(new ReplaceBlocksInstruction(selection, stateFunc, false, spawnParticles)); } @@ -533,6 +549,8 @@ public class SceneBuilder { s = s.with(BlockStateProperties.POWER_0_15, s.get(BlockStateProperties.POWER_0_15) == 0 ? 15 : 0); if (s.has(BlockStateProperties.POWERED)) s = s.cycle(BlockStateProperties.POWERED); + if (s.has(RedstoneTorchBlock.LIT)) + s = s.cycle(RedstoneTorchBlock.LIT); return s; }, false); } diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderIndex.java b/src/main/java/com/simibubi/create/foundation/ponder/content/PonderIndex.java index 88309ec71..d1c4b0a5d 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderIndex.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/PonderIndex.java @@ -149,6 +149,24 @@ public class PonderIndex { .addStoryBoard("mechanical_drill/contraption", MechanicalDrillScenes::contraption, PonderTag.CONTRAPTION_ACTOR); + // Redstone + PonderRegistry.forComponents(AllBlocks.PULSE_REPEATER) + .addStoryBoard("pulse_repeater", RedstoneScenes::pulseRepeater); + PonderRegistry.forComponents(AllBlocks.ADJUSTABLE_REPEATER) + .addStoryBoard("adjustable_repeater", RedstoneScenes::adjustableRepeater); + PonderRegistry.forComponents(AllBlocks.ADJUSTABLE_PULSE_REPEATER) + .addStoryBoard("adjustable_pulse_repeater", RedstoneScenes::adjustablePulseRepeater); + PonderRegistry.forComponents(AllBlocks.POWERED_LATCH) + .addStoryBoard("powered_latch", RedstoneScenes::poweredLatch); + PonderRegistry.forComponents(AllBlocks.POWERED_TOGGLE_LATCH) + .addStoryBoard("powered_toggle_latch", RedstoneScenes::poweredToggleLatch); + PonderRegistry.forComponents(AllBlocks.ANALOG_LEVER) + .addStoryBoard("analog_lever", RedstoneScenes::analogLever); + PonderRegistry.forComponents(AllBlocks.NIXIE_TUBE) + .addStoryBoard("nixie_tube", RedstoneScenes::nixieTube); + PonderRegistry.forComponents(AllBlocks.REDSTONE_LINK) + .addStoryBoard("redstone_link", RedstoneScenes::redstoneLink); + // Debug scenes, can be found in game via the Brass Hand if (EDITOR_MODE) DebugScenes.registerAll(); diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/RedstoneScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/RedstoneScenes.java index c707e191b..4d98b7d3c 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/RedstoneScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/RedstoneScenes.java @@ -2,14 +2,36 @@ package com.simibubi.create.foundation.ponder.content; import com.simibubi.create.content.contraptions.components.structureMovement.chassis.StickerBlock; import com.simibubi.create.content.contraptions.components.structureMovement.chassis.StickerTileEntity; +import com.simibubi.create.content.logistics.block.diodes.AdjustablePulseRepeaterTileEntity; +import com.simibubi.create.content.logistics.block.diodes.AdjustableRepeaterBlock; +import com.simibubi.create.content.logistics.block.diodes.AdjustableRepeaterTileEntity; +import com.simibubi.create.content.logistics.block.diodes.PoweredLatchBlock; +import com.simibubi.create.content.logistics.block.diodes.PulseRepeaterBlock; +import com.simibubi.create.content.logistics.block.diodes.ToggleLatchBlock; +import com.simibubi.create.content.logistics.block.redstone.AnalogLeverTileEntity; +import com.simibubi.create.content.logistics.block.redstone.NixieTubeTileEntity; +import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkBlock; +import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkTileEntity; import com.simibubi.create.foundation.ponder.ElementLink; import com.simibubi.create.foundation.ponder.SceneBuilder; import com.simibubi.create.foundation.ponder.SceneBuildingUtil; import com.simibubi.create.foundation.ponder.Selection; +import com.simibubi.create.foundation.ponder.elements.InputWindowElement; +import com.simibubi.create.foundation.ponder.elements.ParrotElement; import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.utility.Pointing; +import net.minecraft.block.RedstoneWireBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.state.IntegerProperty; import net.minecraft.util.Direction; +import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Vec3d; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; public class RedstoneScenes { @@ -82,7 +104,7 @@ public class RedstoneScenes { .pointAt(util.vector.blockSurface(stickerPos, Direction.WEST)) .placeNearTarget(); scene.idle(70); - + scene.world.rotateBearing(bearingPos, 180 * 3, 80); scene.world.rotateSection(sticker, 0, 180 * 3, 0, 80); } @@ -166,4 +188,642 @@ public class RedstoneScenes { scene.world.rotateSection(contact, 0, 10, 0, speed); } + public static void pulseRepeater(SceneBuilder scene, SceneBuildingUtil util) { + scene.title("pulse_repeater", "Controlling signals using Pulse Repeaters"); + scene.configureBasePlate(0, 0, 5); + scene.world.showSection(util.select.layer(0), Direction.UP); + + BlockPos circuitPos = util.grid.at(2, 1, 2); + BlockPos leverPos = util.grid.at(4, 1, 2); + + scene.world.showSection(util.select.layersFrom(1) + .substract(util.select.position(circuitPos)), Direction.UP); + scene.idle(10); + scene.world.showSection(util.select.position(circuitPos), Direction.DOWN); + scene.idle(20); + scene.effects.indicateRedstone(leverPos); + scene.world.toggleRedstonePower(util.select.fromTo(4, 1, 2, 0, 1, 2)); + scene.world.cycleBlockProperty(circuitPos, PulseRepeaterBlock.PULSING); + scene.idle(3); + scene.world.cycleBlockProperty(circuitPos, PulseRepeaterBlock.PULSING); + scene.world.toggleRedstonePower(util.select.position(1, 1, 2)); + scene.idle(2); + scene.world.toggleRedstonePower(util.select.position(0, 1, 2)); + + scene.idle(15); + scene.overlay.showText(70) + .text("Pulse Repeaters will shorten any redstone signal to a single pulse") + .placeNearTarget() + .attachKeyFrame() + .pointAt(util.vector.topOf(util.grid.at(0, 1, 2))); + scene.idle(60); + + scene.world.toggleRedstonePower(util.select.fromTo(4, 1, 2, 2, 1, 2)); + scene.idle(20); + scene.effects.indicateRedstone(leverPos); + scene.world.toggleRedstonePower(util.select.fromTo(4, 1, 2, 0, 1, 2)); + scene.world.cycleBlockProperty(circuitPos, PulseRepeaterBlock.PULSING); + scene.idle(3); + scene.world.cycleBlockProperty(circuitPos, PulseRepeaterBlock.PULSING); + scene.world.toggleRedstonePower(util.select.position(1, 1, 2)); + scene.idle(2); + scene.world.toggleRedstonePower(util.select.position(0, 1, 2)); + } + + public static void adjustableRepeater(SceneBuilder scene, SceneBuildingUtil util) { + scene.title("adjustable_repeater", "Controlling signals using Adjustable Repeaters"); + scene.configureBasePlate(0, 0, 5); + scene.world.showSection(util.select.layer(0), Direction.UP); + + BlockPos circuitPos = util.grid.at(2, 1, 2); + BlockPos leverPos = util.grid.at(4, 1, 2); + + scene.world.modifyTileNBT(util.select.position(circuitPos), AdjustableRepeaterTileEntity.class, + nbt -> nbt.putInt("ScrollValue", 30)); + scene.world.showSection(util.select.layersFrom(1) + .substract(util.select.position(circuitPos)), Direction.UP); + scene.idle(10); + scene.world.showSection(util.select.position(circuitPos), Direction.DOWN); + scene.idle(20); + + Vec3d circuitTop = util.vector.blockSurface(circuitPos, Direction.DOWN) + .add(0, 3 / 16f, 0); + scene.overlay.showText(70) + .text("Adjustable Repeaters behave similarly to regular Repeaters") + .attachKeyFrame() + .placeNearTarget() + .pointAt(circuitTop); + scene.idle(60); + + scene.effects.indicateRedstone(leverPos); + scene.world.toggleRedstonePower(util.select.fromTo(4, 1, 2, 2, 1, 2)); + scene.idle(30); + scene.world.cycleBlockProperty(circuitPos, AdjustableRepeaterBlock.POWERING); + scene.world.toggleRedstonePower(util.select.fromTo(1, 1, 2, 0, 1, 2)); + scene.idle(15); + + scene.overlay.showText(40) + .text("They charge up for a set time...") + .placeNearTarget() + .pointAt(util.vector.topOf(util.grid.at(0, 1, 2))); + scene.idle(50); + + scene.effects.indicateRedstone(leverPos); + scene.world.toggleRedstonePower(util.select.fromTo(4, 1, 2, 2, 1, 2)); + scene.idle(30); + scene.world.cycleBlockProperty(circuitPos, AdjustableRepeaterBlock.POWERING); + scene.world.toggleRedstonePower(util.select.fromTo(1, 1, 2, 0, 1, 2)); + scene.idle(15); + + scene.overlay.showText(40) + .text("...and cool down for the same duration") + .placeNearTarget() + .pointAt(util.vector.topOf(util.grid.at(0, 1, 2))); + scene.idle(50); + + scene.overlay.showRepeaterScrollInput(circuitPos, 60); + scene.overlay.showControls(new InputWindowElement(circuitTop, Pointing.DOWN).scroll(), 60); + scene.idle(10); + scene.overlay.showText(60) + .text("Using the mouse wheel, the charge time can be configured") + .attachKeyFrame() + .placeNearTarget() + .pointAt(circuitTop); + scene.world.modifyTileNBT(util.select.position(circuitPos), AdjustableRepeaterTileEntity.class, + nbt -> nbt.putInt("ScrollValue", 120)); + scene.idle(70); + + scene.effects.indicateRedstone(leverPos); + scene.world.toggleRedstonePower(util.select.fromTo(4, 1, 2, 2, 1, 2)); + scene.idle(60); + scene.overlay.showText(50) + .text("Configured delays can range up to 30 minutes") + .placeNearTarget() + .pointAt(circuitTop); + scene.idle(60); + scene.world.cycleBlockProperty(circuitPos, AdjustableRepeaterBlock.POWERING); + scene.world.toggleRedstonePower(util.select.fromTo(1, 1, 2, 0, 1, 2)); + scene.idle(15); + + } + + public static void adjustablePulseRepeater(SceneBuilder scene, SceneBuildingUtil util) { + scene.title("adjustable_pulse_repeater", "Controlling signals using Adjustable Pulse Repeaters"); + scene.configureBasePlate(0, 0, 5); + scene.world.showSection(util.select.layer(0), Direction.UP); + + BlockPos circuitPos = util.grid.at(2, 1, 2); + BlockPos leverPos = util.grid.at(4, 1, 2); + + scene.world.modifyTileNBT(util.select.position(circuitPos), AdjustablePulseRepeaterTileEntity.class, + nbt -> nbt.putInt("ScrollValue", 30)); + scene.world.showSection(util.select.layersFrom(1) + .substract(util.select.position(circuitPos)), Direction.UP); + scene.idle(10); + scene.world.showSection(util.select.position(circuitPos), Direction.DOWN); + scene.idle(20); + + Vec3d circuitTop = util.vector.blockSurface(circuitPos, Direction.DOWN) + .add(0, 3 / 16f, 0); + + scene.effects.indicateRedstone(leverPos); + scene.world.toggleRedstonePower(util.select.fromTo(4, 1, 2, 2, 1, 2)); + scene.idle(30); + scene.world.cycleBlockProperty(circuitPos, AdjustableRepeaterBlock.POWERING); + scene.world.toggleRedstonePower(util.select.fromTo(1, 1, 2, 0, 1, 2)); + scene.idle(3); + scene.world.toggleRedstonePower(util.select.fromTo(1, 1, 2, 0, 1, 2)); + scene.idle(15); + + scene.overlay.showText(60) + .text("Adjustable Pulse Repeaters emit a short pulse at a delay") + .attachKeyFrame() + .placeNearTarget() + .pointAt(circuitTop); + + scene.world.toggleRedstonePower(util.select.fromTo(4, 1, 2, 2, 1, 2)); + scene.idle(70); + + scene.overlay.showRepeaterScrollInput(circuitPos, 60); + scene.overlay.showControls(new InputWindowElement(circuitTop, Pointing.DOWN).scroll(), 60); + scene.idle(10); + scene.overlay.showText(60) + .text("Using the mouse wheel, the charge time can be configured") + .attachKeyFrame() + .placeNearTarget() + .pointAt(circuitTop); + scene.world.modifyTileNBT(util.select.position(circuitPos), AdjustablePulseRepeaterTileEntity.class, + nbt -> nbt.putInt("ScrollValue", 120)); + scene.idle(70); + + scene.effects.indicateRedstone(leverPos); + scene.world.toggleRedstonePower(util.select.fromTo(4, 1, 2, 2, 1, 2)); + scene.idle(60); + scene.overlay.showText(50) + .text("Configured delays can range up to 30 minutes") + .placeNearTarget() + .pointAt(circuitTop); + scene.idle(60); + scene.world.cycleBlockProperty(circuitPos, AdjustableRepeaterBlock.POWERING); + scene.world.toggleRedstonePower(util.select.fromTo(1, 1, 2, 0, 1, 2)); + scene.idle(3); + scene.world.toggleRedstonePower(util.select.fromTo(1, 1, 2, 0, 1, 2)); + } + + public static void poweredLatch(SceneBuilder scene, SceneBuildingUtil util) { + scene.title("powered_latch", "Controlling signals using the Powered Latch"); + scene.configureBasePlate(0, 0, 5); + scene.world.showSection(util.select.layer(0), Direction.UP); + + BlockPos circuitPos = util.grid.at(2, 1, 2); + BlockPos buttonPos = util.grid.at(4, 1, 2); + Vec3d circuitTop = util.vector.blockSurface(circuitPos, Direction.DOWN) + .add(0, 3 / 16f, 0); + + scene.world.showSection(util.select.layersFrom(1) + .substract(util.select.position(circuitPos)), Direction.UP); + scene.idle(10); + scene.world.showSection(util.select.position(circuitPos), Direction.DOWN); + scene.idle(20); + + scene.overlay.showText(40) + .attachKeyFrame() + .text("Powered Latches are redstone controllable Levers") + .placeNearTarget() + .pointAt(circuitTop); + scene.idle(50); + + scene.effects.indicateRedstone(buttonPos); + scene.world.toggleRedstonePower(util.select.fromTo(4, 1, 2, 0, 1, 2)); + scene.world.cycleBlockProperty(circuitPos, PoweredLatchBlock.POWERING); + scene.idle(30); + scene.world.toggleRedstonePower(util.select.fromTo(4, 1, 2, 3, 1, 2)); + + AxisAlignedBB bb = new AxisAlignedBB(circuitPos).grow(-.48f, -.45f, -.05f) + .offset(.575, -.45, 0); + scene.overlay.chaseBoundingBoxOutline(PonderPalette.GREEN, bb, bb, 40); + scene.overlay.showText(40) + .colored(PonderPalette.GREEN) + .text("Signals at the back switch it on") + .placeNearTarget() + .pointAt(bb.getCenter()); + scene.idle(60); + + scene.effects.indicateRedstone(util.grid.at(2, 1, 0)); + scene.world.toggleRedstonePower(util.select.fromTo(2, 1, 0, 2, 1, 1)); + scene.world.toggleRedstonePower(util.select.fromTo(2, 1, 2, 0, 1, 2)); + scene.world.cycleBlockProperty(circuitPos, PoweredLatchBlock.POWERING); + scene.idle(30); + scene.world.toggleRedstonePower(util.select.fromTo(2, 1, 0, 2, 1, 1)); + + bb = new AxisAlignedBB(circuitPos).grow(-.05f, -.45f, -.48f) + .offset(0, -.45, .575); + AxisAlignedBB bb2 = new AxisAlignedBB(circuitPos).grow(-.05f, -.45f, -.48f) + .offset(0, -.45, -.575); + scene.overlay.chaseBoundingBoxOutline(PonderPalette.RED, bb, bb, 40); + scene.overlay.chaseBoundingBoxOutline(PonderPalette.RED, bb2, bb2, 40); + scene.overlay.showText(40) + .colored(PonderPalette.RED) + .text("Signals from the side switch it back off") + .placeNearTarget() + .pointAt(bb2.getCenter()); + scene.idle(50); + + scene.addKeyframe(); + scene.idle(10); + scene.overlay.showControls(new InputWindowElement(circuitTop, Pointing.DOWN).rightClick(), 40); + scene.idle(7); + scene.world.toggleRedstonePower(util.select.fromTo(2, 1, 2, 0, 1, 2)); + scene.world.cycleBlockProperty(circuitPos, PoweredLatchBlock.POWERING); + scene.idle(10); + + scene.overlay.showText(50) + .text("Powered latches can also be toggled manually") + .placeNearTarget() + .pointAt(circuitTop); + scene.idle(60); + + scene.overlay.showControls(new InputWindowElement(circuitTop, Pointing.DOWN).rightClick(), 40); + scene.idle(7); + scene.world.toggleRedstonePower(util.select.fromTo(2, 1, 2, 0, 1, 2)); + scene.world.cycleBlockProperty(circuitPos, PoweredLatchBlock.POWERING); + scene.idle(10); + } + + public static void poweredToggleLatch(SceneBuilder scene, SceneBuildingUtil util) { + scene.title("powered_toggle_latch", "Controlling signals using the Powered Toggle Latch"); + scene.configureBasePlate(0, 0, 5); + scene.world.showSection(util.select.layer(0), Direction.UP); + + BlockPos circuitPos = util.grid.at(2, 1, 2); + BlockPos buttonPos = util.grid.at(4, 1, 2); + Vec3d circuitTop = util.vector.blockSurface(circuitPos, Direction.DOWN) + .add(0, 3 / 16f, 0); + + scene.world.showSection(util.select.layersFrom(1) + .substract(util.select.position(circuitPos)), Direction.UP); + scene.idle(10); + scene.world.showSection(util.select.position(circuitPos), Direction.DOWN); + scene.idle(20); + + scene.overlay.showText(40) + .attachKeyFrame() + .text("Powered Toggle Latches are redstone controllable Levers") + .placeNearTarget() + .pointAt(circuitTop); + scene.idle(50); + + scene.effects.indicateRedstone(buttonPos); + scene.world.toggleRedstonePower(util.select.fromTo(4, 1, 2, 0, 1, 2)); + scene.world.cycleBlockProperty(circuitPos, ToggleLatchBlock.POWERING); + scene.idle(30); + scene.world.toggleRedstonePower(util.select.fromTo(4, 1, 2, 3, 1, 2)); + + AxisAlignedBB bb = new AxisAlignedBB(circuitPos).grow(-.48f, -.45f, -.05f) + .offset(.575, -.45, 0); + scene.overlay.chaseBoundingBoxOutline(PonderPalette.GREEN, bb, bb, 40); + scene.overlay.showText(40) + .colored(PonderPalette.GREEN) + .text("Signals at the back will toggle its state") + .placeNearTarget() + .pointAt(bb.getCenter()); + scene.idle(60); + + scene.effects.indicateRedstone(buttonPos); + scene.world.toggleRedstonePower(util.select.fromTo(4, 1, 2, 0, 1, 2)); + scene.world.cycleBlockProperty(circuitPos, ToggleLatchBlock.POWERING); + scene.idle(30); + scene.world.toggleRedstonePower(util.select.fromTo(4, 1, 2, 3, 1, 2)); + scene.overlay.chaseBoundingBoxOutline(PonderPalette.RED, bb, bb, 40); + scene.overlay.showText(30) + .colored(PonderPalette.RED) + .text("...on and back off") + .placeNearTarget() + .pointAt(bb.getCenter()); + scene.idle(50); + + scene.addKeyframe(); + scene.idle(10); + scene.overlay.showControls(new InputWindowElement(circuitTop, Pointing.DOWN).rightClick(), 40); + scene.idle(7); + scene.world.toggleRedstonePower(util.select.fromTo(2, 1, 2, 0, 1, 2)); + scene.world.cycleBlockProperty(circuitPos, ToggleLatchBlock.POWERING); + scene.idle(10); + + scene.overlay.showText(50) + .text("Powered toggle latches can also be toggled manually") + .placeNearTarget() + .pointAt(circuitTop); + scene.idle(60); + + scene.overlay.showControls(new InputWindowElement(circuitTop, Pointing.DOWN).rightClick(), 40); + scene.idle(7); + scene.world.toggleRedstonePower(util.select.fromTo(2, 1, 2, 0, 1, 2)); + scene.world.cycleBlockProperty(circuitPos, ToggleLatchBlock.POWERING); + scene.idle(10); + } + + public static void analogLever(SceneBuilder scene, SceneBuildingUtil util) { + scene.title("analog_lever", "Controlling signals using the Analog Lever"); + scene.configureBasePlate(0, 0, 5); + + BlockPos[] wireLocations = new BlockPos[] { util.grid.at(2, 1, 1), util.grid.at(2, 1, 0), util.grid.at(1, 1, 0), + util.grid.at(0, 1, 0), util.grid.at(0, 1, 1), util.grid.at(0, 1, 2), util.grid.at(0, 1, 3), + util.grid.at(0, 1, 4), util.grid.at(1, 1, 4), util.grid.at(2, 1, 4), util.grid.at(3, 1, 4), + util.grid.at(4, 1, 4), util.grid.at(4, 1, 3), util.grid.at(4, 1, 2), util.grid.at(4, 1, 1) }; + + Selection leverSelection = util.select.fromTo(2, 1, 2, 2, 2, 2); + Selection lamp = util.select.position(4, 1, 0); + BlockPos leverPos = util.grid.at(2, 2, 2); + Vec3d leverVec = util.vector.centerOf(leverPos) + .add(0, -.25, 0); + + scene.world.showSection(util.select.layersFrom(0) + .substract(lamp) + .substract(leverSelection), Direction.UP); + scene.idle(5); + scene.world.showSection(lamp, Direction.DOWN); + scene.idle(10); + + scene.world.showSection(leverSelection, Direction.DOWN); + scene.idle(20); + + scene.overlay.showText(60) + .text("Analog Levers make for a compact and precise source of redstone power") + .placeNearTarget() + .attachKeyFrame() + .pointAt(leverVec); + scene.idle(70); + + IntegerProperty power = RedstoneWireBlock.POWER; + scene.overlay.showControls(new InputWindowElement(leverVec, Pointing.DOWN).rightClick(), 40); + scene.idle(7); + for (int i = 0; i < 7; i++) { + scene.idle(2); + final int state = i + 1; + scene.world.modifyTileNBT(leverSelection, AnalogLeverTileEntity.class, nbt -> nbt.putInt("State", state)); + scene.world.modifyBlock(wireLocations[i], s -> s.with(power, 7 - state), false); + scene.effects.indicateRedstone(wireLocations[i]); + } + scene.idle(20); + + scene.overlay.showText(60) + .attachKeyFrame() + .text("Right-click to increase its analog power output") + .placeNearTarget() + .pointAt(leverVec); + scene.idle(70); + + scene.overlay.showControls(new InputWindowElement(leverVec, Pointing.DOWN).rightClick() + .whileSneaking(), 40); + scene.idle(7); + for (int i = 7; i > 0; i--) { + scene.idle(2); + final int state = i - 1; + if (i > 3) { + scene.world.modifyTileNBT(leverSelection, AnalogLeverTileEntity.class, + nbt -> nbt.putInt("State", state)); + scene.effects.indicateRedstone(wireLocations[i]); + } + scene.world.modifyBlock(wireLocations[i], s -> s.with(power, state > 2 ? 0 : 3 - state), false); + } + scene.world.modifyBlock(wireLocations[0], s -> s.with(power, 3), false); + scene.idle(20); + + scene.overlay.showText(60) + .attachKeyFrame() + .text("Right-click while Sneaking to decrease the power output again") + .placeNearTarget() + .pointAt(leverVec); + scene.idle(70); + + scene.overlay.showControls(new InputWindowElement(leverVec, Pointing.DOWN).rightClick(), 40); + scene.idle(7); + for (int i = 0; i < 15; i++) { + scene.idle(2); + final int state = i + 1; + if (i >= 4) { + scene.world.modifyTileNBT(leverSelection, AnalogLeverTileEntity.class, + nbt -> nbt.putInt("State", state)); + scene.effects.indicateRedstone(wireLocations[i]); + } + scene.world.modifyBlock(wireLocations[i], s -> s.with(power, 15 - state), false); + } + + scene.world.toggleRedstonePower(lamp); + scene.effects.indicateRedstone(leverPos); + scene.effects.indicateRedstone(util.grid.at(4, 1, 1)); + scene.idle(20); + } + + public static void nixieTube(SceneBuilder scene, SceneBuildingUtil util) { + scene.title("analog_lever", "Using Nixie Tubes"); + scene.configureBasePlate(0, 0, 5); + scene.world.showSection(util.select.layer(0) + .add(util.select.fromTo(2, 1, 1, 2, 1, 2)), Direction.UP); + scene.idle(10); + scene.world.showSection(util.select.position(2, 1, 3), Direction.DOWN); + scene.idle(20); + + Selection tubes = util.select.fromTo(3, 1, 3, 1, 1, 3); + + scene.effects.indicateRedstone(util.grid.at(2, 1, 1)); + scene.world.modifyTileNBT(util.select.position(2, 1, 1), AnalogLeverTileEntity.class, + nbt -> nbt.putInt("State", 11)); + scene.world.modifyBlock(util.grid.at(2, 1, 2), s -> s.with(RedstoneWireBlock.POWER, 11), false); + scene.world.modifyTileNBT(tubes, NixieTubeTileEntity.class, nbt -> nbt.putInt("RedstoneStrength", 11)); + scene.idle(20); + + Vec3d centerTube = util.vector.centerOf(2, 1, 3); + + scene.overlay.showText(60) + .attachKeyFrame() + .text("When powered by Redstone, Nixie Tubes will display the redstone signals' strength") + .placeNearTarget() + .pointAt(util.vector.blockSurface(util.grid.at(2, 1, 3), Direction.WEST)); + scene.idle(70); + + scene.world.hideSection(util.select.position(2, 1, 3), Direction.UP); + scene.idle(5); + scene.world.hideSection(util.select.fromTo(2, 1, 1, 2, 1, 2), Direction.NORTH); + scene.idle(10); + scene.world.modifyTileNBT(tubes, NixieTubeTileEntity.class, nbt -> nbt.putInt("RedstoneStrength", 0)); + scene.world.showSection(tubes, Direction.DOWN); + scene.idle(20); + + scene.overlay.showControls(new InputWindowElement(centerTube.add(0, .35, 0), Pointing.DOWN).rightClick() + .withItem(new ItemStack(Items.NAME_TAG)), 40); + scene.idle(7); + + ITextComponent component = new StringTextComponent("CREATE"); + for (int i = 0; i < 3; i++) { + final int index = i; + scene.world.modifyTileNBT(util.select.position(3 - i, 1, 3), NixieTubeTileEntity.class, nbt -> { + nbt.putString("RawCustomText", component.getFormattedText()); + nbt.putString("CustomText", ITextComponent.Serializer.toJson(component)); + nbt.putInt("CustomTextIndex", index); + }); + } + + scene.idle(10); + scene.world.showSection(util.select.position(4, 1, 3), Direction.DOWN); + scene.idle(10); + scene.special.createBirb(util.vector.topOf(util.grid.at(0, 0, 3)), ParrotElement.DancePose::new); + + scene.idle(20); + scene.overlay.showText(80) + .attachKeyFrame() + .text("Using name tags edited with an anvil, custom text can be displayed") + .pointAt(util.vector.topOf(util.grid.at(2, 1, 3)) + .add(.25, -.05f, 0)); + scene.idle(70); + } + + public static void redstoneLink(SceneBuilder scene, SceneBuildingUtil util) { + scene.title("redstone_link", "Using Redstone Links"); + scene.configureBasePlate(0, 0, 5); + scene.world.showSection(util.select.layer(0) + .add(util.select.fromTo(3, 1, 1, 2, 1, 1)), Direction.UP); + scene.idle(5); + scene.world.showSection(util.select.fromTo(4, 1, 3, 0, 2, 3), Direction.DOWN); + scene.idle(10); + + Selection redstone = util.select.fromTo(3, 1, 1, 1, 1, 1); + BlockPos leverPos = util.grid.at(3, 1, 1); + BlockPos link1Pos = util.grid.at(1, 1, 1); + BlockPos link2Pos = util.grid.at(1, 2, 2); + BlockPos link3Pos = util.grid.at(3, 2, 2); + Selection link1Select = util.select.position(link1Pos); + Selection link2Select = util.select.position(link2Pos); + Selection link3Select = util.select.position(link3Pos); + Vec3d link1Vec = util.vector.blockSurface(link1Pos, Direction.DOWN) + .add(0, 3 / 16f, 0); + Vec3d link2Vec = util.vector.blockSurface(link2Pos, Direction.SOUTH) + .add(0, 0, -3 / 16f); + Vec3d link3Vec = util.vector.blockSurface(link3Pos, Direction.SOUTH) + .add(0, 0, -3 / 16f); + + scene.world.showSection(link1Select, Direction.DOWN); + scene.idle(5); + scene.world.showSection(link2Select, Direction.DOWN); + scene.idle(5); + scene.world.showSection(link3Select, Direction.DOWN); + scene.idle(10); + + scene.overlay.showText(50) + .attachKeyFrame() + .text("Redstone Links can transmit redstone signals wirelessly") + .placeNearTarget() + .pointAt(link1Vec); + scene.idle(60); + + scene.overlay.showControls(new InputWindowElement(link2Vec, Pointing.UP).rightClick() + .whileSneaking(), 40); + scene.idle(7); + scene.world.modifyBlock(link2Pos, s -> s.cycle(RedstoneLinkBlock.RECEIVER), true); + scene.idle(10); + scene.overlay.showText(50) + .text("Right-click while Sneaking to toggle receive mode") + .placeNearTarget() + .pointAt(link2Vec); + scene.idle(60); + + scene.overlay.showControls(new InputWindowElement(link3Vec, Pointing.UP).rightClick() + .withWrench(), 40); + scene.idle(7); + scene.world.modifyBlock(link3Pos, s -> s.cycle(RedstoneLinkBlock.RECEIVER), true); + scene.idle(10); + scene.overlay.showText(50) + .text("A simple Right-click with a Wrench can do the same") + .placeNearTarget() + .pointAt(link3Vec); + scene.idle(70); + + scene.addKeyframe(); + scene.idle(10); + scene.world.toggleRedstonePower(redstone); + scene.effects.indicateRedstone(leverPos); + scene.idle(5); + scene.world.toggleRedstonePower(util.select.fromTo(3, 2, 3, 1, 2, 2)); + scene.effects.indicateRedstone(link2Pos); + scene.effects.indicateRedstone(link3Pos); + + scene.idle(10); + scene.overlay.showText(70) + .colored(PonderPalette.GREEN) + .text("Receivers will emit the redstone power of transmitters within a range of 128 blocks") + .placeNearTarget() + .pointAt(link2Vec); + scene.idle(80); + scene.world.toggleRedstonePower(redstone); + scene.idle(5); + scene.world.toggleRedstonePower(util.select.fromTo(3, 2, 3, 1, 2, 2)); + scene.idle(20); + + Vec3d frontSlot = link1Vec.add(.18, -.05, -.15); + Vec3d backSlot = link1Vec.add(.18, -.05, .15); + Vec3d top2Slot = link2Vec.add(-.09, .15, 0); + Vec3d bottom2Slot = link2Vec.add(-.09, -.2, 0); + Vec3d top3Slot = link3Vec.add(-.09, .15, 0); + Vec3d bottom3Slot = link3Vec.add(-.09, -.2, 0); + + scene.addKeyframe(); + scene.idle(10); + scene.overlay.showFilterSlotInput(frontSlot, 100); + scene.overlay.showFilterSlotInput(backSlot, 100); + scene.idle(10); + + scene.overlay.showText(50) + .text("Placing items in the two slots can specify a Frequency") + .placeNearTarget() + .pointAt(backSlot); + scene.idle(60); + + ItemStack iron = new ItemStack(Items.IRON_INGOT); + ItemStack gold = new ItemStack(Items.GOLD_INGOT); + ItemStack sapling = new ItemStack(Items.OAK_SAPLING); + + scene.overlay.showControls(new InputWindowElement(backSlot, Pointing.DOWN).withItem(iron), 40); + scene.idle(7); + scene.overlay.showControls(new InputWindowElement(frontSlot, Pointing.UP).withItem(sapling), 40); + scene.world.modifyTileNBT(link1Select, RedstoneLinkTileEntity.class, + nbt -> nbt.put("FrequencyLast", iron.write(new CompoundNBT()))); + scene.idle(7); + scene.world.modifyTileNBT(link1Select, RedstoneLinkTileEntity.class, + nbt -> nbt.put("FrequencyFirst", sapling.write(new CompoundNBT()))); + scene.idle(20); + + scene.overlay.showControls(new InputWindowElement(top2Slot, Pointing.DOWN).withItem(iron), 40); + scene.idle(7); + scene.overlay.showControls(new InputWindowElement(bottom2Slot, Pointing.UP).withItem(sapling), 40); + scene.world.modifyTileNBT(link2Select, RedstoneLinkTileEntity.class, + nbt -> nbt.put("FrequencyLast", iron.write(new CompoundNBT()))); + scene.idle(7); + scene.world.modifyTileNBT(link2Select, RedstoneLinkTileEntity.class, + nbt -> nbt.put("FrequencyFirst", sapling.write(new CompoundNBT()))); + scene.idle(20); + + scene.overlay.showControls(new InputWindowElement(top3Slot, Pointing.DOWN).withItem(gold), 40); + scene.idle(7); + scene.overlay.showControls(new InputWindowElement(bottom3Slot, Pointing.UP).withItem(sapling), 40); + scene.world.modifyTileNBT(link3Select, RedstoneLinkTileEntity.class, + nbt -> nbt.put("FrequencyLast", gold.write(new CompoundNBT()))); + scene.idle(7); + scene.world.modifyTileNBT(link3Select, RedstoneLinkTileEntity.class, + nbt -> nbt.put("FrequencyFirst", sapling.write(new CompoundNBT()))); + scene.idle(20); + + scene.world.toggleRedstonePower(redstone); + scene.effects.indicateRedstone(leverPos); + scene.idle(5); + scene.world.toggleRedstonePower(util.select.fromTo(1, 2, 2, 1, 2, 3)); + scene.effects.indicateRedstone(link2Pos); + scene.overlay.showText(90) + .attachKeyFrame() + .text("Only the links with matching Frequency combinations will communicate") + .placeNearTarget() + .pointAt(link2Vec); + scene.idle(100); + } + } diff --git a/src/main/resources/ponder/adjustable_pulse_repeater.nbt b/src/main/resources/ponder/adjustable_pulse_repeater.nbt new file mode 100644 index 0000000000000000000000000000000000000000..bac67f6a1da1b6c12495a2a25141dd4c6c639dd9 GIT binary patch literal 453 zcmV;$0XqI4iwFP!000000Hu`8PUA2T$0xB<(sJN}#GVk3u;*TP&nqM(u92Hesae;K zYIvm#j6 zRmVGy+P1p)u0@}&zY>Je5sIy%7MvV!&W;|N5S_)!sC_&3EnC;2Pn~}Ul$2?DgU#v1 zVyo&Tkf=gD1^9Xhqe$=WbelKCEP^}49Y{-g(at)5-pLM=us=Fx1KH2n$~x`wyYYJA v|Hq>?AvMi7=V!XuXEM;Q&UAzSC^CKYzg1L^=!13^pnQcl0#*5N2L}KEl9$&; literal 0 HcmV?d00001 diff --git a/src/main/resources/ponder/adjustable_repeater.nbt b/src/main/resources/ponder/adjustable_repeater.nbt new file mode 100644 index 0000000000000000000000000000000000000000..feb3414774597c8daa1e5448964f50831b470991 GIT binary patch literal 447 zcmV;w0YLsAiwFP!000000Hu`8PUA2T$0xB<(sJN}1mdvIuxGAtMo36pD>s=^@49wm zyF}u_cs|A@X;2iR5sYL-cK-95uf!{WCCH%PPyj$$1+6?imr$aOI%*7%Yzd2van=8@ zqRpQrh{lE9>0|06QWiy;?LNn&%431!MB!kmi&ggT_ z=<^&$FgTLIfi9=7n*5u(1Y;J0F^f5lU~nXZ)0LNaDC#}N#UoaC%P*iFo!yxS@N zqU}riC7$}%0?wZ*?~Hj?=5U0Tkn0+5Dvu<&RrS9Eu{H+R9-DOJC$b+;S4?zatdSEH zjy1(Zg=5WvG-r)67$c^O>8u3#p!NvYdu_4uY8!9cosPJ!oTaMBsaISMieO#4KHhHB zu+^h?4f=HPl^~3cP;8Y6gX7iU=&=sbSzH^nZ^pi5<688o=bwO*GEFB~pAHsVRV9H$ z72+wtT>D2cJ{{=>uZdO!cZfTXmNKH9b$-~%7L%}hb<6{@zq2*9+T(BIb;6&=qXr?h p%Q)v}`qyRB(=P_P!B>h*ANswD>KT2|&H|M0@B!wabyWKX006Ky+x`Fm literal 0 HcmV?d00001 diff --git a/src/main/resources/ponder/analog_lever.nbt b/src/main/resources/ponder/analog_lever.nbt new file mode 100644 index 0000000000000000000000000000000000000000..07bfc5e2974a9090056cc10409936094f4897023 GIT binary patch literal 514 zcmV+d0{#6TiwFP!000000L7Khj?*v@#wWJZO|ozT0q?+t^IqYMkU(53Z#r!)QaiE@ zk$5nk52qWa*{l-=@ny_Nw}b+xp) z!>f<+6^HA$N2w3^NuAL4Zwg>)2hVDYL2@ItY|LTX;J5Ja!>O`aD@CF#^P`t1$}-n% z7Pie)bG6_#Ju<}tXR0X|J{MC>wcy28yaYiLIh?>*(?rg+-Pa3s7KA#lX*fY65}GGL zbJfZQy~qA$d0K#YFHZ=sPD*2K<=)?PN9A!_8y&V^NQ#Q*7lqTN+n%qd(3I+fH7(ly z<|=?U%0s@Fjk_eiyd+xOId3#>8+mF+!HaR9@6esSrBnJaXN$e8F~A#RYyq1P^&)}N z`4N>oGIP#3BV5BfEJ9_>SAQHMZEPRuFvlS5uovD1d271B%HFK5t5X(9egib+HwgdK zZ*cha`u>C8UG#VBdEf7TJ^#Jmy**q!}$Y#0v0xsK?(~1 E0KT{K6951J literal 0 HcmV?d00001 diff --git a/src/main/resources/ponder/nixie_tube.nbt b/src/main/resources/ponder/nixie_tube.nbt new file mode 100644 index 0000000000000000000000000000000000000000..7d858b35f140a88d926cea864e9ddba15e2dc154 GIT binary patch literal 467 zcmV;^0WAI>iwFP!000000JW9DZrmUchQ|hPyxU8wRBCTI8ZX3i-yI4pz1GdM$( z89tX8KA+;S3=YrWj9Zc6Gt2P#6o+MScm`((p5Zgk@c9&nWpH?svjS$;fx7O8E(V`& zcG7I|LG97So*GKEf%C>8Nv@@l+HQr$7kc~mRO6D4k6$?s@%blie6R-ZgF~|oyNUhf zz&7etp$N}wOc+(n3}^p@T>dvQOOn&0A0K|6*tj{TBF$MRHHLukE?v~Xf5<(;_q{UM zIN65ley0M8#u}O^6%C57lfoO@i;oML7QDK1wnG>1YLd3HL8w}7t*c={nKE18D18_~ z$pbOtoHeL)EUj9pJx-{~SVwLStc02K8GVe+4edouKG}*f7 zDz3(nzD>(_hrJcOa+5!olc2L???z~)--K;N*r9llTH{;%NN#12kLbLzhK|HU^`CRj(dcid)|54X;+joca25~N>U;1 z!S;L$Z77IRWUaG=km2v2zoKLSDR8U4kpV#aB>supcM1Y4r<_6yt);M7m%8|}nRlL2 zV70bg(8(Ai)=7sUVyKBGG|@;C6F7{(;RH@+(F`Y=(2O}Tfx`$KPT+JF6XqNf<~+w? z1P&)~Ak;L}#25Nvgk3PgF6KClz~KZ=XPmGLPT0j9hY>iOz=^w>1{!ujGdzcUqOb8z zlM9@oW--y%ShJkyYpfAov#e!_&S85Ur2_b?+#x*fRE33+8@Fn<%3)sUsxat-I>lYD zu$6A|!<_~hWN${-Xxi&e04tS)WFt%42R`(H20yIR73QVf)#F&ckp=qTQfni8mAXN% z4>SP_|65g`z8AfB+Y|l1r>~VMw)uMRe2OzTO6!1EKDp=+{`&rCy-J(j;|&gkhaw<) zo^7U41~23b8A84Q4f&4VKjjmL$isZXyv_!A8$RT1QD>jBRU)q1~)I#$#*nXc^AYF`~qY}_2AV9003+J&T{|& literal 0 HcmV?d00001 diff --git a/src/main/resources/ponder/powered_toggle_latch.nbt b/src/main/resources/ponder/powered_toggle_latch.nbt new file mode 100644 index 0000000000000000000000000000000000000000..e17715e41ad4ad944cdde610a7129a487ec78686 GIT binary patch literal 409 zcmV;K0cQRmiwFP!000000Hu_{YQr!LhLzZDlk7US!C=p@bI&`EopudwsL_WUxdX| z4x+KXPr8JFg(pSWWn62L2~9H6qzsN=a3q7%M>4}nCNyJC%HRkFM>05lq>MhNj6TnC z1cM_P9Oyhi&5Bp zYHW)RlIPj;TJ3OrUUtsZX5SgkLTBO*ZZ8|lovNbX$69~DV`xlh=ekpuWcT|z)XAT*!km{l zjKJXp4h){oHTf@nF~TkwVHZmrM&NJ)XADl*1t;uciNgpSPT*uSyI?bZQVpN+lWK|? zKdELFH0w?%^d93gvMzx?iUY#!L27KR*!fMrmmZte=+gWUFdCaGSV+6y2AHxGlPo<;l(prCyfRuKj8~{O=o|j1^@t+1iQrm literal 0 HcmV?d00001 diff --git a/src/main/resources/ponder/redstone_link.nbt b/src/main/resources/ponder/redstone_link.nbt new file mode 100644 index 0000000000000000000000000000000000000000..6535d7930f62e90e67f38775c0aa647b423b2975 GIT binary patch literal 564 zcmV-40?Yj$iwFP!000000L_-)Yuhjo$Iq6WI4)foly(2W-uIk6cJyUqlri=iRQuA1 zI+7s}d!3PMo)z0dv7`JxP90o=;p$N-@JB;k7jDJmzOL<{v= z!0e{f`JK)D=G_8VrEM_k7K6k(;jpzBYN8QMbfk$197f=90w=6!f)kBsjyW-b!w4Ks z;Di+u>Kqg5JjG!I4kvKBqaf6o5$Zg}VFV5*aG;H8sEJ2neoPY+G>o9(#CYN(4IAAkwv*3UYv8ei2ig;*AFo*VQomj(;#w8B*>)m;X!t_=Rzp~`<53 zJ>5!$xe;r(6w*YHT2kq`B>lh^L1)em&pa4PWU&i?+x3(CIkqv3o>o;CaX7nD64 z&3=5s4EtmDz=RoU=3X+AR!yh^?ZIAHscwBGvTLI&H1&ld1y=fFOV*;aJ@}#r_ca&W>ezN(={f;_e&;MX2N*lL%8lIzXg8IT$cu->X&I7pe>NMcm9pB?XcnAuj z_midCON0OT^Rc3jywuu^Bo|U?!V2)S9$sRdIfIjr!in!_?BOj*|G;0~=jKm23IG6b CFCB{j literal 0 HcmV?d00001 From e1c16d869d37c8434950bac6b889b5dc9e412acd Mon Sep 17 00:00:00 2001 From: JozsefA Date: Mon, 15 Mar 2021 15:58:41 -0700 Subject: [PATCH 3/4] Some semblance of immersive portals compat. - Each world gets its own KineticRenderer now. --- .../com/simibubi/create/CreateClient.java | 24 +++++++++++++--- .../contraptions/base/KineticTileEntity.java | 6 ---- .../simibubi/create/events/ClientEvents.java | 7 +++-- .../foundation/mixin/AddRemoveTileMixin.java | 26 +++++++++++++++-- .../foundation/mixin/LightUpdateMixin.java | 9 ++++-- .../foundation/mixin/RenderHooksMixin.java | 10 +++++-- .../foundation/render/AllProgramSpecs.java | 8 +++--- .../foundation/render/KineticRenderer.java | 28 +++++++++---------- .../render/backend/FastRenderDispatcher.java | 14 ++++++---- .../foundation/utility/WorldAttached.java | 5 ++++ 10 files changed, 92 insertions(+), 45 deletions(-) diff --git a/src/main/java/com/simibubi/create/CreateClient.java b/src/main/java/com/simibubi/create/CreateClient.java index c411a9e26..cd696310b 100644 --- a/src/main/java/com/simibubi/create/CreateClient.java +++ b/src/main/java/com/simibubi/create/CreateClient.java @@ -14,10 +14,13 @@ import com.simibubi.create.foundation.item.CustomItemModels; import com.simibubi.create.foundation.item.CustomRenderedItems; import com.simibubi.create.foundation.ponder.content.PonderIndex; import com.simibubi.create.foundation.ponder.elements.WorldSectionElement; +import com.simibubi.create.foundation.render.AllProgramSpecs; import com.simibubi.create.foundation.render.KineticRenderer; import com.simibubi.create.foundation.render.SuperByteBufferCache; import com.simibubi.create.foundation.render.backend.Backend; import com.simibubi.create.foundation.render.backend.OptifineHandler; +import com.simibubi.create.foundation.render.backend.instancing.InstancedTileRenderer; +import com.simibubi.create.foundation.utility.WorldAttached; import com.simibubi.create.foundation.utility.ghost.GhostBlocks; import com.simibubi.create.foundation.utility.outliner.Outliner; import net.minecraft.block.Block; @@ -30,6 +33,7 @@ import net.minecraft.item.Item; import net.minecraft.resources.IReloadableResourceManager; import net.minecraft.resources.IResourceManager; import net.minecraft.util.ResourceLocation; +import net.minecraft.world.IWorld; import net.minecraftforge.client.event.ModelBakeEvent; import net.minecraftforge.client.event.ModelRegistryEvent; import net.minecraftforge.client.event.TextureStitchEvent; @@ -37,6 +41,7 @@ import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; +import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -48,7 +53,7 @@ public class CreateClient { public static SchematicHandler schematicHandler; public static SchematicAndQuillHandler schematicAndQuillHandler; public static SuperByteBufferCache bufferCache; - public static KineticRenderer kineticRenderer; + public static WorldAttached kineticRenderer; public static final Outliner outliner = new Outliner(); public static GhostBlocks ghostBlocks; @@ -70,7 +75,8 @@ public class CreateClient { } public static void clientInit(FMLClientSetupEvent event) { - kineticRenderer = new KineticRenderer(); + AllProgramSpecs.init(); + kineticRenderer = new WorldAttached<>(KineticRenderer::new); schematicSender = new ClientSchematicLoader(); schematicHandler = new SchematicHandler(); @@ -192,8 +198,18 @@ public class CreateClient { } public static void invalidateRenderers() { - CreateClient.bufferCache.invalidate(); - CreateClient.kineticRenderer.invalidate(); + invalidateRenderers(null); + } + + public static void invalidateRenderers(@Nullable IWorld world) { + bufferCache.invalidate(); + + if (world != null) { + kineticRenderer.get(world).invalidate(); + } else { + kineticRenderer.forEach(InstancedTileRenderer::invalidate); + } + ContraptionRenderDispatcher.invalidateAll(); } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntity.java index b0b2d51f6..c0984e491 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntity.java @@ -534,12 +534,6 @@ public abstract class KineticTileEntity extends SmartTileEntity return block.hasIntegratedCogwheel(world, pos, state); } - @Override - public void onChunkUnloaded() { - if (world != null && world.isRemote) - DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.kineticRenderer.remove(this)); - } - @Override public void requestModelDataUpdate() { super.requestModelDataUpdate(); diff --git a/src/main/java/com/simibubi/create/events/ClientEvents.java b/src/main/java/com/simibubi/create/events/ClientEvents.java index 5a5f384af..3c19cdde8 100644 --- a/src/main/java/com/simibubi/create/events/ClientEvents.java +++ b/src/main/java/com/simibubi/create/events/ClientEvents.java @@ -27,6 +27,7 @@ import com.simibubi.create.foundation.item.TooltipHelper; import com.simibubi.create.foundation.networking.AllPackets; import com.simibubi.create.foundation.networking.LeftClickPacket; import com.simibubi.create.foundation.ponder.PonderTooltipHandler; +import com.simibubi.create.foundation.render.KineticRenderer; import com.simibubi.create.foundation.render.backend.FastRenderDispatcher; import com.simibubi.create.foundation.render.backend.RenderWork; import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer; @@ -125,7 +126,9 @@ public class ClientEvents { if (world.isRemote() && world instanceof ClientWorld) { CreateClient.invalidateRenderers(); AnimationTickHolder.reset(); - ((ClientWorld) world).loadedTileEntityList.forEach(CreateClient.kineticRenderer::add); + KineticRenderer renderer = CreateClient.kineticRenderer.get(world); + renderer.invalidate(); + ((ClientWorld) world).loadedTileEntityList.forEach(renderer::add); } /* @@ -139,7 +142,7 @@ public class ClientEvents { @SubscribeEvent public static void onUnloadWorld(WorldEvent.Unload event) { if (event.getWorld().isRemote()) { - CreateClient.invalidateRenderers(); + CreateClient.invalidateRenderers(event.getWorld()); AnimationTickHolder.reset(); } } diff --git a/src/main/java/com/simibubi/create/foundation/mixin/AddRemoveTileMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/AddRemoveTileMixin.java index d20b076ec..24321c5ad 100644 --- a/src/main/java/com/simibubi/create/foundation/mixin/AddRemoveTileMixin.java +++ b/src/main/java/com/simibubi/create/foundation/mixin/AddRemoveTileMixin.java @@ -1,5 +1,6 @@ package com.simibubi.create.foundation.mixin; +import com.simibubi.create.foundation.render.KineticRenderer; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; @@ -17,12 +18,16 @@ import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; +import java.util.Set; + @OnlyIn(Dist.CLIENT) @Mixin(World.class) public class AddRemoveTileMixin { @Shadow @Final public boolean isRemote; + @Shadow @Final protected Set tileEntitiesToBeRemoved; + /** * JUSTIFICATION: This method is called whenever a tile entity is removed due * to a change in block state, even on the client. By hooking into this method, @@ -30,11 +35,28 @@ public class AddRemoveTileMixin { */ @Inject(at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/world/World;getTileEntity(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/tileentity/TileEntity;"), method = "removeTileEntity", locals = LocalCapture.CAPTURE_FAILHARD) private void onRemoveTile(BlockPos pos, CallbackInfo ci, TileEntity te) { - if (isRemote) CreateClient.kineticRenderer.remove(te); + if (isRemote) { + World thi = (World)(Object) this; + CreateClient.kineticRenderer.get(thi).remove(te); + } } @Inject(at = @At("TAIL"), method = "addTileEntity") private void onAddTile(TileEntity te, CallbackInfoReturnable cir) { - if (isRemote) CreateClient.kineticRenderer.queueAdd(te); + if (isRemote) { + World thi = (World)(Object) this; + CreateClient.kineticRenderer.get(thi).queueAdd(te); + } + } + + @Inject(at = @At(value = "INVOKE", target = "Ljava/util/Set;clear()V", ordinal = 0), method = "tickBlockEntities") + private void onChunkUnload(CallbackInfo ci) { + if (isRemote) { + World thi = (World)(Object) this; + KineticRenderer kineticRenderer = CreateClient.kineticRenderer.get(thi); + for (TileEntity tile : tileEntitiesToBeRemoved) { + kineticRenderer.remove(tile); + } + } } } diff --git a/src/main/java/com/simibubi/create/foundation/mixin/LightUpdateMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/LightUpdateMixin.java index 1636c95bb..d55539c7c 100644 --- a/src/main/java/com/simibubi/create/foundation/mixin/LightUpdateMixin.java +++ b/src/main/java/com/simibubi/create/foundation/mixin/LightUpdateMixin.java @@ -3,6 +3,7 @@ package com.simibubi.create.foundation.mixin; import java.util.Map; import com.simibubi.create.CreateClient; +import net.minecraft.client.world.ClientWorld; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -33,6 +34,7 @@ public abstract class LightUpdateMixin extends AbstractChunkProvider { @Inject(at = @At("HEAD"), method = "markLightChanged") private void onLightUpdate(LightType type, SectionPos pos, CallbackInfo ci) { ClientChunkProvider thi = ((ClientChunkProvider) (Object) this); + ClientWorld world = (ClientWorld) thi.getWorld(); Chunk chunk = thi.getChunk(pos.getSectionX(), pos.getSectionZ(), false); @@ -43,14 +45,15 @@ public abstract class LightUpdateMixin extends AbstractChunkProvider { .entrySet() .stream() .filter(entry -> SectionPos.toChunk(entry.getKey().getY()) == sectionY) - .map(Map.Entry::getValue).forEach(tile -> { - CreateClient.kineticRenderer.onLightUpdate(tile); + .map(Map.Entry::getValue) + .forEach(tile -> { + CreateClient.kineticRenderer.get(world).onLightUpdate(tile); if (tile instanceof ILightListener) ((ILightListener) tile).onChunkLightUpdate(); }); } - ContraptionRenderDispatcher.notifyLightUpdate((ILightReader) thi.getWorld(), type, pos); + ContraptionRenderDispatcher.notifyLightUpdate(world, type, pos); } } diff --git a/src/main/java/com/simibubi/create/foundation/mixin/RenderHooksMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/RenderHooksMixin.java index 89310489c..2bdf89fb7 100644 --- a/src/main/java/com/simibubi/create/foundation/mixin/RenderHooksMixin.java +++ b/src/main/java/com/simibubi/create/foundation/mixin/RenderHooksMixin.java @@ -1,5 +1,6 @@ package com.simibubi.create.foundation.mixin; +import com.simibubi.create.foundation.render.KineticRenderer; import net.minecraft.client.renderer.*; import net.minecraft.util.math.Vec3d; import org.lwjgl.opengl.GL20; @@ -52,17 +53,20 @@ public class RenderHooksMixin { double camY = cameraPos.getY(); double camZ = cameraPos.getZ(); - CreateClient.kineticRenderer.beginFrame(camX, camY, camZ); + CreateClient.kineticRenderer.get(world).beginFrame(camX, camY, camZ); ContraptionRenderDispatcher.beginFrame(camX, camY, camZ); } @Inject(at = @At("TAIL"), method = "loadRenderers") private void refresh(CallbackInfo ci) { - CreateClient.kineticRenderer.invalidate(); ContraptionRenderDispatcher.invalidateAll(); OptifineHandler.refresh(); Backend.refresh(); - if (Backend.canUseInstancing() && world != null) world.loadedTileEntityList.forEach(CreateClient.kineticRenderer::add); + if (Backend.canUseInstancing() && world != null) { + KineticRenderer kineticRenderer = CreateClient.kineticRenderer.get(world); + kineticRenderer.invalidate(); + world.loadedTileEntityList.forEach(kineticRenderer::add); + } } } diff --git a/src/main/java/com/simibubi/create/foundation/render/AllProgramSpecs.java b/src/main/java/com/simibubi/create/foundation/render/AllProgramSpecs.java index a07a85727..916d8c478 100644 --- a/src/main/java/com/simibubi/create/foundation/render/AllProgramSpecs.java +++ b/src/main/java/com/simibubi/create/foundation/render/AllProgramSpecs.java @@ -19,6 +19,10 @@ import com.simibubi.create.foundation.render.backend.gl.shader.ShaderConstants; import net.minecraft.util.ResourceLocation; public class AllProgramSpecs { + public static void init() { + // noop, make sure the static field are loaded. + } + public static final ProgramSpec MODEL = register(ProgramSpec.builder("model", BasicProgram::new) .addAttributes(ModelVertexAttributes.class) .addAttributes(InstanceVertexAttributes.class) @@ -90,10 +94,6 @@ public class AllProgramSpecs { .setFrag(Locations.CONTRAPTION) .createProgramSpec()); - public static class Contraption { - - } - public static class Locations { public static final ResourceLocation MODEL_FRAG = loc("model.frag"); diff --git a/src/main/java/com/simibubi/create/foundation/render/KineticRenderer.java b/src/main/java/com/simibubi/create/foundation/render/KineticRenderer.java index d9c8f74d6..d41890d0d 100644 --- a/src/main/java/com/simibubi/create/foundation/render/KineticRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/render/KineticRenderer.java @@ -19,6 +19,7 @@ import net.minecraft.client.renderer.RenderType; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.MathHelper; public class KineticRenderer extends InstancedTileRenderer { public static int MAX_ORIGIN_DISTANCE = 100; @@ -40,30 +41,27 @@ public class KineticRenderer extends InstancedTileRenderer { } @Override - public void tick() { - super.tick(); + public void beginFrame(double cameraX, double cameraY, double cameraZ) { + int cX = MathHelper.floor(cameraX); + int cY = MathHelper.floor(cameraY); + int cZ = MathHelper.floor(cameraZ); - Minecraft mc = Minecraft.getInstance(); - Entity renderViewEntity = mc.renderViewEntity; - - if (renderViewEntity == null) return; - - BlockPos renderViewPosition = renderViewEntity.getPosition(); - - int dX = Math.abs(renderViewPosition.getX() - originCoordinate.getX()); - int dY = Math.abs(renderViewPosition.getY() - originCoordinate.getY()); - int dZ = Math.abs(renderViewPosition.getZ() - originCoordinate.getZ()); + int dX = Math.abs(cX - originCoordinate.getX()); + int dY = Math.abs(cY - originCoordinate.getY()); + int dZ = Math.abs(cZ - originCoordinate.getZ()); if (dX > MAX_ORIGIN_DISTANCE || - dY > MAX_ORIGIN_DISTANCE || - dZ > MAX_ORIGIN_DISTANCE) { + dY > MAX_ORIGIN_DISTANCE || + dZ > MAX_ORIGIN_DISTANCE) { - originCoordinate = renderViewPosition; + originCoordinate = new BlockPos(cX, cY, cZ); ArrayList instancedTiles = new ArrayList<>(instances.keySet()); invalidate(); instancedTiles.forEach(this::add); } + + super.beginFrame(cameraX, cameraY, cameraZ); } @Override diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/FastRenderDispatcher.java b/src/main/java/com/simibubi/create/foundation/render/backend/FastRenderDispatcher.java index 6f096d888..08e31dcc1 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/FastRenderDispatcher.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/FastRenderDispatcher.java @@ -2,13 +2,11 @@ package com.simibubi.create.foundation.render.backend; import java.util.concurrent.ConcurrentHashMap; -import org.lwjgl.opengl.GL11; +import com.simibubi.create.foundation.render.KineticRenderer; import com.mojang.blaze3d.matrix.MatrixStack; -import com.mojang.blaze3d.systems.RenderSystem; import com.simibubi.create.CreateClient; import com.simibubi.create.content.contraptions.KineticDebugger; -import com.simibubi.create.content.schematics.SchematicWorld; import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.WorldAttached; @@ -41,14 +39,15 @@ public class FastRenderDispatcher { public static void tick() { ClientWorld world = Minecraft.getInstance().world; - CreateClient.kineticRenderer.tick(); + KineticRenderer kineticRenderer = CreateClient.kineticRenderer.get(world); + kineticRenderer.tick(); ConcurrentHashMap.KeySetView map = queuedUpdates.get(world); map .forEach(te -> { map.remove(te); - CreateClient.kineticRenderer.update(te); + kineticRenderer.update(te); }); } @@ -71,9 +70,12 @@ public class FastRenderDispatcher { public static void renderLayer(RenderType layer, Matrix4f viewProjection, double cameraX, double cameraY, double cameraZ) { if (!Backend.canUseInstancing()) return; + ClientWorld world = Minecraft.getInstance().world; + KineticRenderer kineticRenderer = CreateClient.kineticRenderer.get(world); + layer.startDrawing(); - CreateClient.kineticRenderer.render(layer, viewProjection, cameraX, cameraY, cameraZ); + kineticRenderer.render(layer, viewProjection, cameraX, cameraY, cameraZ); layer.endDrawing(); } diff --git a/src/main/java/com/simibubi/create/foundation/utility/WorldAttached.java b/src/main/java/com/simibubi/create/foundation/utility/WorldAttached.java index 99a84db53..c457bea5e 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/WorldAttached.java +++ b/src/main/java/com/simibubi/create/foundation/utility/WorldAttached.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.function.Consumer; import java.util.function.Supplier; import javax.annotation.Nullable; @@ -39,5 +40,9 @@ public class WorldAttached { public void put(IWorld world, T entry) { attached.put(world, entry); } + + public void forEach(Consumer consumer) { + attached.values().forEach(consumer); + } } From 27eaf55b451b51bcab54baae756998bc0cb97c6a Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Tue, 16 Mar 2021 03:24:34 +0100 Subject: [PATCH 4/4] Another UI reshuffle - 'Backstepping' is now a button - Added little labels for hovered buttons at the bottom - Moved ponder/transition-specific logic out of the generic screen class --- src/generated/resources/.cache/cache | 26 +- .../resources/assets/create/lang/en_us.json | 6 + .../assets/create/lang/unfinished/de_de.json | 8 +- .../assets/create/lang/unfinished/es_es.json | 8 +- .../assets/create/lang/unfinished/es_mx.json | 8 +- .../assets/create/lang/unfinished/fr_fr.json | 8 +- .../assets/create/lang/unfinished/it_it.json | 8 +- .../assets/create/lang/unfinished/ja_jp.json | 8 +- .../assets/create/lang/unfinished/ko_kr.json | 8 +- .../assets/create/lang/unfinished/nl_nl.json | 8 +- .../assets/create/lang/unfinished/pt_br.json | 8 +- .../assets/create/lang/unfinished/ru_ru.json | 8 +- .../assets/create/lang/unfinished/zh_cn.json | 8 +- .../assets/create/lang/unfinished/zh_tw.json | 8 +- .../foundation/gui/AbstractSimiScreen.java | 161 +----------- .../create/foundation/gui/ScreenOpener.java | 13 +- .../ponder/NavigatableSimiScreen.java | 231 ++++++++++++++++++ .../foundation/ponder/PonderLocalization.java | 7 + .../ponder/PonderTooltipHandler.java | 6 +- .../create/foundation/ponder/PonderUI.java | 54 ++-- .../ponder/content/PonderIndexScreen.java | 22 +- .../ponder/content/PonderTagScreen.java | 17 +- .../ponder/content/RedstoneScenes.java | 4 +- .../ponder/elements/TextWindowElement.java | 2 +- 24 files changed, 419 insertions(+), 226 deletions(-) create mode 100644 src/main/java/com/simibubi/create/foundation/ponder/NavigatableSimiScreen.java diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 08e29ebe9..1ec53cafb 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -402,19 +402,19 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json 2b12f3cf99e498899207a8c4855210e7b5dc55cd assets/create/lang/en_ud.json -212de32a4245c53011c14d5a449cc9845ba8a897 assets/create/lang/en_us.json -68692dcac5364521de8437c653b64791e962628a assets/create/lang/unfinished/de_de.json -ea0fb50d4198972c4c7865d2471cdbc75977cc70 assets/create/lang/unfinished/es_es.json -5a54f2e9ad6264bdbb41fe6390b6674904219bfe assets/create/lang/unfinished/es_mx.json -a1a8a74c61650c1bb59a4187864d952f534100c7 assets/create/lang/unfinished/fr_fr.json -07992e28b58ec1bc837a80ab633dca672ad236e4 assets/create/lang/unfinished/it_it.json -8b84abd9b61ab88fdbbf9c0cc1979e95b34b3580 assets/create/lang/unfinished/ja_jp.json -fcd3bde020b3e904d5a31032c01e2e5b9c05a702 assets/create/lang/unfinished/ko_kr.json -2e4780fe25cef72f9bb3b43be76a379e3dde9f00 assets/create/lang/unfinished/nl_nl.json -edd45f6e468d4976d2bcd714066ae3284fc27ddb assets/create/lang/unfinished/pt_br.json -8c27872585a9a180ede3ccdd1d07014863501b89 assets/create/lang/unfinished/ru_ru.json -dead3a1a62323e91d41a8e8864b7179fd2f30583 assets/create/lang/unfinished/zh_cn.json -41faa5ab5d3f812e46d8d0e1580e83cd9f2f4bb3 assets/create/lang/unfinished/zh_tw.json +f7bdf2fb1af4cae8bca1735861d603cce0870985 assets/create/lang/en_us.json +f83d2acecd5ce6ebe8dfddffde3c5c3a68abd492 assets/create/lang/unfinished/de_de.json +35e50f9ba61af0ef900154213b0b25d1dc5469d3 assets/create/lang/unfinished/es_es.json +98c26496201d8f12be5f6fc0ddaf919d9098f825 assets/create/lang/unfinished/es_mx.json +161ac9821b2445c96c6d594885c2d32cd784e8c5 assets/create/lang/unfinished/fr_fr.json +0c1baeb251ff32329a8d34a7200101de2cb724c4 assets/create/lang/unfinished/it_it.json +b0ccadbcc765e7ddee1089b3ca65414f5aa1ad95 assets/create/lang/unfinished/ja_jp.json +9551b6b6df919ff7e2b7e14361e8061b65cd4857 assets/create/lang/unfinished/ko_kr.json +552b3ef71a2898d7e263035ade5b47fb0bcfec23 assets/create/lang/unfinished/nl_nl.json +1661f76a0ba088209fcd837a8a1676dbed186368 assets/create/lang/unfinished/pt_br.json +621af99986c9e334d224f9a356c25d7468a1ef47 assets/create/lang/unfinished/ru_ru.json +6340ad62aedc1fec27abb6b490c36b1fd1317214 assets/create/lang/unfinished/zh_cn.json +56a1fedad3d453a36c456085c836fcfbf9740b1d assets/create/lang/unfinished/zh_tw.json 846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json 1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json 1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index 0060f63ea..f9fdd6089 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -1816,6 +1816,12 @@ "create.ponder.pondering": "Pondering about...", "create.ponder.identify_mode": "Identify mode active.\nUnpause with [%1$s]", "create.ponder.associated": "Associated Entries", + "create.ponder.close": "Close", + "create.ponder.identify": "Identify", + "create.ponder.next": "Next Scene", + "create.ponder.previous": "Previous Scene", + "create.ponder.replay": "Replay", + "create.ponder.think_back": "Think Back", "create.ponder.shared.movement_anchors": "With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "32 RPM", "create.ponder.shared.sneak_and": "Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/de_de.json b/src/generated/resources/assets/create/lang/unfinished/de_de.json index f727142a9..d3f057fa5 100644 --- a/src/generated/resources/assets/create/lang/unfinished/de_de.json +++ b/src/generated/resources/assets/create/lang/unfinished/de_de.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1296", + "_": "Missing Localizations: 1302", "_": "->------------------------] Game Elements [------------------------<-", @@ -1817,6 +1817,12 @@ "create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.associated": "UNLOCALIZED: Associated Entries", + "create.ponder.close": "UNLOCALIZED: Close", + "create.ponder.identify": "UNLOCALIZED: Identify", + "create.ponder.next": "UNLOCALIZED: Next Scene", + "create.ponder.previous": "UNLOCALIZED: Previous Scene", + "create.ponder.replay": "UNLOCALIZED: Replay", + "create.ponder.think_back": "UNLOCALIZED: Think Back", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_es.json b/src/generated/resources/assets/create/lang/unfinished/es_es.json index 58b16e83f..0b0652617 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_es.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_es.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 327", + "_": "Missing Localizations: 333", "_": "->------------------------] Game Elements [------------------------<-", @@ -1817,6 +1817,12 @@ "create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.associated": "UNLOCALIZED: Associated Entries", + "create.ponder.close": "UNLOCALIZED: Close", + "create.ponder.identify": "UNLOCALIZED: Identify", + "create.ponder.next": "UNLOCALIZED: Next Scene", + "create.ponder.previous": "UNLOCALIZED: Previous Scene", + "create.ponder.replay": "UNLOCALIZED: Replay", + "create.ponder.think_back": "UNLOCALIZED: Think Back", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/es_mx.json b/src/generated/resources/assets/create/lang/unfinished/es_mx.json index ed7c04672..e232209e0 100644 --- a/src/generated/resources/assets/create/lang/unfinished/es_mx.json +++ b/src/generated/resources/assets/create/lang/unfinished/es_mx.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1226", + "_": "Missing Localizations: 1232", "_": "->------------------------] Game Elements [------------------------<-", @@ -1817,6 +1817,12 @@ "create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.associated": "UNLOCALIZED: Associated Entries", + "create.ponder.close": "UNLOCALIZED: Close", + "create.ponder.identify": "UNLOCALIZED: Identify", + "create.ponder.next": "UNLOCALIZED: Next Scene", + "create.ponder.previous": "UNLOCALIZED: Previous Scene", + "create.ponder.replay": "UNLOCALIZED: Replay", + "create.ponder.think_back": "UNLOCALIZED: Think Back", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json index 533355d03..061ec4e47 100644 --- a/src/generated/resources/assets/create/lang/unfinished/fr_fr.json +++ b/src/generated/resources/assets/create/lang/unfinished/fr_fr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1008", + "_": "Missing Localizations: 1014", "_": "->------------------------] Game Elements [------------------------<-", @@ -1817,6 +1817,12 @@ "create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.associated": "UNLOCALIZED: Associated Entries", + "create.ponder.close": "UNLOCALIZED: Close", + "create.ponder.identify": "UNLOCALIZED: Identify", + "create.ponder.next": "UNLOCALIZED: Next Scene", + "create.ponder.previous": "UNLOCALIZED: Previous Scene", + "create.ponder.replay": "UNLOCALIZED: Replay", + "create.ponder.think_back": "UNLOCALIZED: Think Back", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/it_it.json b/src/generated/resources/assets/create/lang/unfinished/it_it.json index d08d07d00..871dae9bd 100644 --- a/src/generated/resources/assets/create/lang/unfinished/it_it.json +++ b/src/generated/resources/assets/create/lang/unfinished/it_it.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 344", + "_": "Missing Localizations: 350", "_": "->------------------------] Game Elements [------------------------<-", @@ -1817,6 +1817,12 @@ "create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.associated": "UNLOCALIZED: Associated Entries", + "create.ponder.close": "UNLOCALIZED: Close", + "create.ponder.identify": "UNLOCALIZED: Identify", + "create.ponder.next": "UNLOCALIZED: Next Scene", + "create.ponder.previous": "UNLOCALIZED: Previous Scene", + "create.ponder.replay": "UNLOCALIZED: Replay", + "create.ponder.think_back": "UNLOCALIZED: Think Back", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json index a5958565a..e08d19db8 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ja_jp.json +++ b/src/generated/resources/assets/create/lang/unfinished/ja_jp.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 351", + "_": "Missing Localizations: 357", "_": "->------------------------] Game Elements [------------------------<-", @@ -1817,6 +1817,12 @@ "create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.associated": "UNLOCALIZED: Associated Entries", + "create.ponder.close": "UNLOCALIZED: Close", + "create.ponder.identify": "UNLOCALIZED: Identify", + "create.ponder.next": "UNLOCALIZED: Next Scene", + "create.ponder.previous": "UNLOCALIZED: Previous Scene", + "create.ponder.replay": "UNLOCALIZED: Replay", + "create.ponder.think_back": "UNLOCALIZED: Think Back", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json index 64125ad90..0de6cbdc1 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ko_kr.json +++ b/src/generated/resources/assets/create/lang/unfinished/ko_kr.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 397", + "_": "Missing Localizations: 403", "_": "->------------------------] Game Elements [------------------------<-", @@ -1817,6 +1817,12 @@ "create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.associated": "UNLOCALIZED: Associated Entries", + "create.ponder.close": "UNLOCALIZED: Close", + "create.ponder.identify": "UNLOCALIZED: Identify", + "create.ponder.next": "UNLOCALIZED: Next Scene", + "create.ponder.previous": "UNLOCALIZED: Previous Scene", + "create.ponder.replay": "UNLOCALIZED: Replay", + "create.ponder.think_back": "UNLOCALIZED: Think Back", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json index e90aa4a1e..6f11b4c0e 100644 --- a/src/generated/resources/assets/create/lang/unfinished/nl_nl.json +++ b/src/generated/resources/assets/create/lang/unfinished/nl_nl.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1495", + "_": "Missing Localizations: 1501", "_": "->------------------------] Game Elements [------------------------<-", @@ -1817,6 +1817,12 @@ "create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.associated": "UNLOCALIZED: Associated Entries", + "create.ponder.close": "UNLOCALIZED: Close", + "create.ponder.identify": "UNLOCALIZED: Identify", + "create.ponder.next": "UNLOCALIZED: Next Scene", + "create.ponder.previous": "UNLOCALIZED: Previous Scene", + "create.ponder.replay": "UNLOCALIZED: Replay", + "create.ponder.think_back": "UNLOCALIZED: Think Back", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/pt_br.json b/src/generated/resources/assets/create/lang/unfinished/pt_br.json index 495da0f25..4316c6e3e 100644 --- a/src/generated/resources/assets/create/lang/unfinished/pt_br.json +++ b/src/generated/resources/assets/create/lang/unfinished/pt_br.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 1561", + "_": "Missing Localizations: 1567", "_": "->------------------------] Game Elements [------------------------<-", @@ -1817,6 +1817,12 @@ "create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.associated": "UNLOCALIZED: Associated Entries", + "create.ponder.close": "UNLOCALIZED: Close", + "create.ponder.identify": "UNLOCALIZED: Identify", + "create.ponder.next": "UNLOCALIZED: Next Scene", + "create.ponder.previous": "UNLOCALIZED: Previous Scene", + "create.ponder.replay": "UNLOCALIZED: Replay", + "create.ponder.think_back": "UNLOCALIZED: Think Back", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json index 59f6535e0..d891d5922 100644 --- a/src/generated/resources/assets/create/lang/unfinished/ru_ru.json +++ b/src/generated/resources/assets/create/lang/unfinished/ru_ru.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 347", + "_": "Missing Localizations: 353", "_": "->------------------------] Game Elements [------------------------<-", @@ -1817,6 +1817,12 @@ "create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.associated": "UNLOCALIZED: Associated Entries", + "create.ponder.close": "UNLOCALIZED: Close", + "create.ponder.identify": "UNLOCALIZED: Identify", + "create.ponder.next": "UNLOCALIZED: Next Scene", + "create.ponder.previous": "UNLOCALIZED: Previous Scene", + "create.ponder.replay": "UNLOCALIZED: Replay", + "create.ponder.think_back": "UNLOCALIZED: Think Back", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json index 314b568f1..d806010de 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_cn.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_cn.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 345", + "_": "Missing Localizations: 351", "_": "->------------------------] Game Elements [------------------------<-", @@ -1817,6 +1817,12 @@ "create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.associated": "UNLOCALIZED: Associated Entries", + "create.ponder.close": "UNLOCALIZED: Close", + "create.ponder.identify": "UNLOCALIZED: Identify", + "create.ponder.next": "UNLOCALIZED: Next Scene", + "create.ponder.previous": "UNLOCALIZED: Previous Scene", + "create.ponder.replay": "UNLOCALIZED: Replay", + "create.ponder.think_back": "UNLOCALIZED: Think Back", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json index e900c1e46..691488640 100644 --- a/src/generated/resources/assets/create/lang/unfinished/zh_tw.json +++ b/src/generated/resources/assets/create/lang/unfinished/zh_tw.json @@ -1,5 +1,5 @@ { - "_": "Missing Localizations: 350", + "_": "Missing Localizations: 356", "_": "->------------------------] Game Elements [------------------------<-", @@ -1817,6 +1817,12 @@ "create.ponder.pondering": "UNLOCALIZED: Pondering about...", "create.ponder.identify_mode": "UNLOCALIZED: Identify mode active.\nUnpause with [%1$s]", "create.ponder.associated": "UNLOCALIZED: Associated Entries", + "create.ponder.close": "UNLOCALIZED: Close", + "create.ponder.identify": "UNLOCALIZED: Identify", + "create.ponder.next": "UNLOCALIZED: Next Scene", + "create.ponder.previous": "UNLOCALIZED: Previous Scene", + "create.ponder.replay": "UNLOCALIZED: Replay", + "create.ponder.think_back": "UNLOCALIZED: Think Back", "create.ponder.shared.movement_anchors": "UNLOCALIZED: With the help of Chassis or Super Glue, larger structures can be moved.", "create.ponder.shared.rpm32": "UNLOCALIZED: 32 RPM", "create.ponder.shared.sneak_and": "UNLOCALIZED: Sneak +", diff --git a/src/main/java/com/simibubi/create/foundation/gui/AbstractSimiScreen.java b/src/main/java/com/simibubi/create/foundation/gui/AbstractSimiScreen.java index 1ce2335c8..a6cd30944 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/AbstractSimiScreen.java +++ b/src/main/java/com/simibubi/create/foundation/gui/AbstractSimiScreen.java @@ -2,18 +2,10 @@ package com.simibubi.create.foundation.gui; import java.util.ArrayList; import java.util.List; -import java.util.Optional; -import java.util.stream.Collectors; - -import org.apache.commons.lang3.mutable.MutableBoolean; -import org.apache.commons.lang3.mutable.MutableInt; -import org.lwjgl.glfw.GLFW; import com.mojang.blaze3d.systems.RenderSystem; import com.simibubi.create.foundation.gui.widgets.AbstractSimiWidget; -import com.simibubi.create.foundation.utility.animation.LerpedFloat; -import net.minecraft.client.MainWindow; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.gui.widget.Widget; @@ -26,19 +18,11 @@ public abstract class AbstractSimiScreen extends Screen { protected int sWidth, sHeight; protected int guiLeft, guiTop; - protected int depthPointX, depthPointY; protected List widgets; - public final LerpedFloat transition = LerpedFloat.linear() - .startWithValue(0) - .chase(0, .1f, LerpedFloat.Chaser.LINEAR); protected AbstractSimiScreen() { super(new StringTextComponent("")); widgets = new ArrayList<>(); - MainWindow window = Minecraft.getInstance() - .getWindow(); - depthPointX = window.getScaledWidth() / 2; - depthPointY = window.getScaledHeight() / 2; } protected void setWindowSize(int width, int height) { @@ -48,12 +32,6 @@ public abstract class AbstractSimiScreen extends Screen { guiTop = (this.height - sHeight) / 2; } - @Override - public void tick() { - super.tick(); - transition.tickChaser(); - } - @Override public void render(int mouseX, int mouseY, float partialTicks) { partialTicks = partialTicks == 10 ? 0 @@ -62,72 +40,19 @@ public abstract class AbstractSimiScreen extends Screen { RenderSystem.pushMatrix(); - renderTransition(mouseX, mouseY, partialTicks); - + renderWindowBackground(mouseX, mouseY, partialTicks); renderWindow(mouseX, mouseY, partialTicks); for (Widget widget : widgets) widget.render(mouseX, mouseY, partialTicks); - renderWindowForeground(mouseX, mouseY, partialTicks); for (Widget widget : widgets) widget.renderToolTip(mouseX, mouseY); RenderSystem.popMatrix(); - - renderBreadcrumbs(mouseX, mouseY, partialTicks); } - - private void renderTransition(int mouseX, int mouseY, float partialTicks) { - if (transition.getChaseTarget() == 0) { - renderBackground(); - return; - } - + + protected void renderWindowBackground(int mouseX, int mouseY, float partialTicks) { renderBackground(); - - Screen lastScreen = ScreenOpener.getPreviouslyRenderedScreen(); - float transitionValue = transition.getValue(partialTicks); - double scale = 1 + 0.5 * transitionValue; - - // draw last screen into buffer - if (lastScreen != null && lastScreen != this) { - RenderSystem.pushMatrix();// 1 - UIRenderHelper.framebuffer.framebufferClear(Minecraft.IS_RUNNING_ON_MAC); - UIRenderHelper.prepFramebufferSize(); - RenderSystem.pushMatrix();// 2 - RenderSystem.translated(0, 0, -1000); - UIRenderHelper.framebuffer.bindFramebuffer(true); - lastScreen.render(mouseX, mouseY, 10); - RenderSystem.popMatrix();// 2 - - // use the buffer texture - Minecraft.getInstance() - .getFramebuffer() - .bindFramebuffer(true); - - MainWindow window = Minecraft.getInstance() - .getWindow(); - int dpx = window.getScaledWidth() / 2; - int dpy = window.getScaledHeight() / 2; - if (lastScreen instanceof AbstractSimiScreen) { - dpx = ((AbstractSimiScreen) lastScreen).depthPointX; - dpy = ((AbstractSimiScreen) lastScreen).depthPointY; - } - - // transitionV is 1/-1 when the older screen is hidden - // transitionV is 0 when the older screen is still fully visible - RenderSystem.translated(dpx, dpy, 0); - RenderSystem.scaled(scale, scale, 1); - RenderSystem.translated(-dpx, -dpy, 0); - UIRenderHelper.drawFramebuffer(1f - Math.abs(transitionValue)); - RenderSystem.popMatrix();// 1 - } - - // modify current screen as well - scale = transitionValue > 0 ? 1 - 0.5 * (1 - transitionValue) : 1 + .5 * (1 + transitionValue); - RenderSystem.translated(depthPointX, depthPointY, 0); - RenderSystem.scaled(scale, scale, 1); - RenderSystem.translated(-depthPointX, -depthPointY, 0); } @Override @@ -144,12 +69,6 @@ public abstract class AbstractSimiScreen extends Screen { for (Widget widget : widgets) if (widget.keyPressed(code, p_keyPressed_2_, p_keyPressed_3_)) return true; - - if (code == GLFW.GLFW_KEY_BACKSPACE) { - ScreenOpener.openPreviousScreen(this, Optional.empty()); - return true; - } - return super.keyPressed(code, p_keyPressed_2_, p_keyPressed_3_); } @@ -188,12 +107,6 @@ public abstract class AbstractSimiScreen extends Screen { return true; } - @Override - public void onClose() { - ScreenOpener.clearStack(); - super.onClose(); - } - @Override public boolean isPauseScreen() { return false; @@ -201,56 +114,6 @@ public abstract class AbstractSimiScreen extends Screen { protected abstract void renderWindow(int mouseX, int mouseY, float partialTicks); - protected void renderBreadcrumbs(int mouseX, int mouseY, float partialTicks) { - List history = ScreenOpener.getScreenHistory(); - if (history.isEmpty()) - return; - - history.add(0, Minecraft.getInstance().currentScreen); - int spacing = 20; - - List names = history.stream() - .map(AbstractSimiScreen::screenTitle) - .collect(Collectors.toList()); - - int bWidth = names.stream() - .mapToInt(s -> font.getStringWidth(s) + spacing) - .sum(); - - MutableInt x = new MutableInt(width - bWidth); - MutableInt y = new MutableInt(height - 18); - MutableBoolean first = new MutableBoolean(true); - - if (x.getValue() < 25) - x.setValue(25); - - RenderSystem.pushMatrix(); - RenderSystem.translated(0, 0, 600); - names.forEach(s -> { - int sWidth = font.getStringWidth(s); - // UIRenderHelper.breadcrumbArrow(x.getValue(), y.getValue(), sWidth + spacing, - // 14, spacing/2, 0xbbababab, 0x22ababab); - UIRenderHelper.breadcrumbArrow(x.getValue(), y.getValue(), sWidth + spacing, 14, spacing / 2, 0xdd101010, - 0x44101010); - drawString(font, s, x.getValue() + 5, y.getValue() + 3, first.getValue() ? 0xffeeffee : 0xffddeeff); - first.setFalse(); - - x.add(sWidth + spacing); - }); - RenderSystem.popMatrix(); - } - - private static String screenTitle(Screen screen) { - if (screen instanceof AbstractSimiScreen) - return ((AbstractSimiScreen) screen).getBreadcrumbTitle(); - return "<"; - } - - protected String getBreadcrumbTitle() { - return this.getClass() - .getSimpleName(); - } - protected void renderWindowForeground(int mouseX, int mouseY, float partialTicks) { for (Widget widget : widgets) { if (!widget.isHovered()) @@ -263,22 +126,4 @@ public abstract class AbstractSimiScreen extends Screen { } } - public void centerScalingOn(int x, int y) { - depthPointX = x; - depthPointY = y; - } - - public void centerScalingOnMouse() { - MainWindow w = minecraft.getWindow(); - double mouseX = minecraft.mouseHelper.getMouseX() * w.getScaledWidth() / w.getWidth(); - double mouseY = minecraft.mouseHelper.getMouseY() * w.getScaledHeight() / w.getHeight(); - centerScalingOn((int) mouseX, (int) mouseY); - } - - public boolean isEquivalentTo(AbstractSimiScreen other) { - return false; - } - - public void shareContextWith(AbstractSimiScreen other) {} - } diff --git a/src/main/java/com/simibubi/create/foundation/gui/ScreenOpener.java b/src/main/java/com/simibubi/create/foundation/gui/ScreenOpener.java index af19f8fda..2d7c65352 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/ScreenOpener.java +++ b/src/main/java/com/simibubi/create/foundation/gui/ScreenOpener.java @@ -8,6 +8,7 @@ import java.util.Optional; import javax.annotation.Nullable; +import com.simibubi.create.foundation.ponder.NavigatableSimiScreen; import com.simibubi.create.foundation.utility.animation.LerpedFloat; import net.minecraft.client.Minecraft; @@ -35,13 +36,13 @@ public class ScreenOpener { openScreen(toOpen); } - public static void openPreviousScreen(Screen current, Optional screenWithContext) { + public static void openPreviousScreen(Screen current, Optional screenWithContext) { if (backStack.isEmpty()) return; backSteppedFrom = current; Screen previousScreen = backStack.pop(); - if (previousScreen instanceof AbstractSimiScreen) { - AbstractSimiScreen previousAbstractSimiScreen = (AbstractSimiScreen) previousScreen; + if (previousScreen instanceof NavigatableSimiScreen) { + NavigatableSimiScreen previousAbstractSimiScreen = (NavigatableSimiScreen) previousScreen; screenWithContext.ifPresent(s -> s.shareContextWith(previousAbstractSimiScreen)); previousAbstractSimiScreen.transition.startWithValue(-0.1) .chase(-1, .4f, LerpedFloat.Chaser.EXP); @@ -51,7 +52,7 @@ public class ScreenOpener { // transitions are only supported in simiScreens atm. they take care of all the // rendering for it - public static void transitionTo(AbstractSimiScreen screen) { + public static void transitionTo(NavigatableSimiScreen screen) { if (tryBackTracking(screen)) return; screen.transition.startWithValue(0.1) @@ -59,14 +60,14 @@ public class ScreenOpener { open(screen); } - private static boolean tryBackTracking(AbstractSimiScreen screen) { + private static boolean tryBackTracking(NavigatableSimiScreen screen) { List screenHistory = getScreenHistory(); if (screenHistory.isEmpty()) return false; Screen previouslyRenderedScreen = screenHistory.get(0); if (!(previouslyRenderedScreen instanceof AbstractSimiScreen)) return false; - if (!screen.isEquivalentTo((AbstractSimiScreen) previouslyRenderedScreen)) + if (!screen.isEquivalentTo((NavigatableSimiScreen) previouslyRenderedScreen)) return false; openPreviousScreen(Minecraft.getInstance().currentScreen, Optional.of(screen)); diff --git a/src/main/java/com/simibubi/create/foundation/ponder/NavigatableSimiScreen.java b/src/main/java/com/simibubi/create/foundation/ponder/NavigatableSimiScreen.java new file mode 100644 index 000000000..4226aded7 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/ponder/NavigatableSimiScreen.java @@ -0,0 +1,231 @@ +package com.simibubi.create.foundation.ponder; + +import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; + +import org.apache.commons.lang3.mutable.MutableBoolean; +import org.apache.commons.lang3.mutable.MutableInt; +import org.lwjgl.glfw.GLFW; + +import com.mojang.blaze3d.systems.RenderSystem; +import com.simibubi.create.foundation.gui.AbstractSimiScreen; +import com.simibubi.create.foundation.gui.IScreenRenderable; +import com.simibubi.create.foundation.gui.ScreenOpener; +import com.simibubi.create.foundation.gui.UIRenderHelper; +import com.simibubi.create.foundation.ponder.content.PonderTagScreen; +import com.simibubi.create.foundation.ponder.ui.PonderButton; +import com.simibubi.create.foundation.utility.Lang; +import com.simibubi.create.foundation.utility.animation.LerpedFloat; + +import net.minecraft.client.MainWindow; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.screen.Screen; +import net.minecraft.item.ItemStack; + +public abstract class NavigatableSimiScreen extends AbstractSimiScreen { + + public static final String THINK_BACK = PonderLocalization.LANG_PREFIX + "think_back"; + + protected int depthPointX, depthPointY; + public final LerpedFloat transition = LerpedFloat.linear() + .startWithValue(0) + .chase(0, .1f, LerpedFloat.Chaser.LINEAR); + protected PonderButton backTrack; + + public NavigatableSimiScreen() { + MainWindow window = Minecraft.getInstance() + .getWindow(); + depthPointX = window.getScaledWidth() / 2; + depthPointY = window.getScaledHeight() / 2; + } + + @Override + public void onClose() { + ScreenOpener.clearStack(); + super.onClose(); + } + + @Override + public void tick() { + super.tick(); + transition.tickChaser(); + } + + @Override + protected void init() { + super.init(); + List screenHistory = ScreenOpener.getScreenHistory(); + if (screenHistory.isEmpty()) + return; + if (!(screenHistory.get(0) instanceof NavigatableSimiScreen)) + return; + + Screen screen = screenHistory.get(0); + IScreenRenderable icon = null; + ItemStack altIcon = null; + + if (screen instanceof PonderUI) + altIcon = ((PonderUI) screen).stack; + if (screen instanceof PonderTagScreen) + icon = ((PonderTagScreen) screen).getTag(); + + widgets.add(backTrack = new PonderButton(31, height - 31 - PonderButton.SIZE, () -> { + ScreenOpener.openPreviousScreen(this, Optional.empty()); + }).fade(0, -1)); + backTrack.fade(1); + + if (icon != null) + backTrack.showing(icon); + if (altIcon != null) + backTrack.showing(altIcon); + } + + @Override + public void render(int mouseX, int mouseY, float partialTicks) { + super.render(mouseX, mouseY, partialTicks); +// renderZeloBreadcrumbs(mouseX, mouseY, partialTicks); + if (backTrack == null) + return; + + RenderSystem.pushMatrix(); + RenderSystem.translated(0, 0, 500); + if (backTrack.isHovered()) + drawString(font, Lang.translate(THINK_BACK), 15, height - 16, 0xffa3a3a3); + RenderSystem.popMatrix(); + } + + @Override + protected void renderWindowBackground(int mouseX, int mouseY, float partialTicks) { + if (transition.getChaseTarget() == 0) { + renderBackground(); + return; + } + + renderBackground(); + + Screen lastScreen = ScreenOpener.getPreviouslyRenderedScreen(); + float transitionValue = transition.getValue(partialTicks); + double scale = 1 + 0.5 * transitionValue; + + // draw last screen into buffer + if (lastScreen != null && lastScreen != this) { + RenderSystem.pushMatrix();// 1 + UIRenderHelper.framebuffer.framebufferClear(Minecraft.IS_RUNNING_ON_MAC); + UIRenderHelper.prepFramebufferSize(); + RenderSystem.pushMatrix();// 2 + RenderSystem.translated(0, 0, -1000); + UIRenderHelper.framebuffer.bindFramebuffer(true); + lastScreen.render(mouseX, mouseY, 10); + RenderSystem.popMatrix();// 2 + + // use the buffer texture + Minecraft.getInstance() + .getFramebuffer() + .bindFramebuffer(true); + + MainWindow window = Minecraft.getInstance() + .getWindow(); + int dpx = window.getScaledWidth() / 2; + int dpy = window.getScaledHeight() / 2; + if (lastScreen instanceof AbstractSimiScreen) { + dpx = ((NavigatableSimiScreen) lastScreen).depthPointX; + dpy = ((NavigatableSimiScreen) lastScreen).depthPointY; + } + + // transitionV is 1/-1 when the older screen is hidden + // transitionV is 0 when the older screen is still fully visible + RenderSystem.translated(dpx, dpy, 0); + RenderSystem.scaled(scale, scale, 1); + RenderSystem.translated(-dpx, -dpy, 0); + UIRenderHelper.drawFramebuffer(1f - Math.abs(transitionValue)); + RenderSystem.popMatrix();// 1 + } + + // modify current screen as well + scale = transitionValue > 0 ? 1 - 0.5 * (1 - transitionValue) : 1 + .5 * (1 + transitionValue); + RenderSystem.translated(depthPointX, depthPointY, 0); + RenderSystem.scaled(scale, scale, 1); + RenderSystem.translated(-depthPointX, -depthPointY, 0); + + if (backTrack != null) { + UIRenderHelper.breadcrumbArrow(21, height - 51, 30, 20, 5, 0x40aa9999, 0x10aa9999); + UIRenderHelper.breadcrumbArrow(-19, height - 51, 40, 20, 5, 0x40aa9999, 0x10aa9999); + } + } + + @Override + public boolean keyPressed(int code, int p_keyPressed_2_, int p_keyPressed_3_) { + if (code == GLFW.GLFW_KEY_BACKSPACE) { + ScreenOpener.openPreviousScreen(this, Optional.empty()); + return true; + } + return super.keyPressed(code, p_keyPressed_2_, p_keyPressed_3_); + } + + public void centerScalingOn(int x, int y) { + depthPointX = x; + depthPointY = y; + } + + public void centerScalingOnMouse() { + MainWindow w = minecraft.getWindow(); + double mouseX = minecraft.mouseHelper.getMouseX() * w.getScaledWidth() / w.getWidth(); + double mouseY = minecraft.mouseHelper.getMouseY() * w.getScaledHeight() / w.getHeight(); + centerScalingOn((int) mouseX, (int) mouseY); + } + + public boolean isEquivalentTo(NavigatableSimiScreen other) { + return false; + } + + public void shareContextWith(NavigatableSimiScreen other) {} + + protected void renderZeloBreadcrumbs(int mouseX, int mouseY, float partialTicks) { + List history = ScreenOpener.getScreenHistory(); + if (history.isEmpty()) + return; + + history.add(0, Minecraft.getInstance().currentScreen); + int spacing = 20; + + List names = history.stream() + .map(NavigatableSimiScreen::screenTitle) + .collect(Collectors.toList()); + + int bWidth = names.stream() + .mapToInt(s -> font.getStringWidth(s) + spacing) + .sum(); + + MutableInt x = new MutableInt(width - bWidth); + MutableInt y = new MutableInt(height - 18); + MutableBoolean first = new MutableBoolean(true); + + if (x.getValue() < 25) + x.setValue(25); + + RenderSystem.pushMatrix(); + RenderSystem.translated(0, 0, 600); + names.forEach(s -> { + int sWidth = font.getStringWidth(s); + UIRenderHelper.breadcrumbArrow(x.getValue(), y.getValue(), sWidth + spacing, 14, spacing / 2, 0xdd101010, + 0x44101010); + drawString(font, s, x.getValue() + 5, y.getValue() + 3, first.getValue() ? 0xffeeffee : 0xffddeeff); + first.setFalse(); + + x.add(sWidth + spacing); + }); + RenderSystem.popMatrix(); + } + + private static String screenTitle(Screen screen) { + if (screen instanceof NavigatableSimiScreen) + return ((NavigatableSimiScreen) screen).getBreadcrumbTitle(); + return "<"; + } + + protected String getBreadcrumbTitle() { + return this.getClass() + .getSimpleName(); + } +} diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderLocalization.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderLocalization.java index b6e7eae6c..62e359ab2 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderLocalization.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderLocalization.java @@ -73,6 +73,13 @@ public class PonderLocalization { addGeneral(object, PonderUI.PONDERING, "Pondering about..."); addGeneral(object, PonderUI.IDENTIFY_MODE, "Identify mode active.\nUnpause with [%1$s]"); addGeneral(object, PonderTagScreen.ASSOCIATED, "Associated Entries"); + + addGeneral(object, PonderUI.CLOSE, "Close"); + addGeneral(object, PonderUI.IDENTIFY, "Identify"); + addGeneral(object, PonderUI.NEXT, "Next Scene"); + addGeneral(object, PonderUI.PREVIOUS, "Previous Scene"); + addGeneral(object, PonderUI.REPLAY, "Replay"); + addGeneral(object, PonderUI.THINK_BACK, "Think Back"); shared.forEach((k, v) -> object.addProperty(Create.ID + "." + langKeyForShared(k), v)); tag.forEach((k, v) -> { diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderTooltipHandler.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderTooltipHandler.java index d992305cf..4c144bf30 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderTooltipHandler.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderTooltipHandler.java @@ -3,7 +3,6 @@ package com.simibubi.create.foundation.ponder; import java.util.List; import com.google.common.base.Strings; -import com.simibubi.create.foundation.gui.AbstractSimiScreen; import com.simibubi.create.foundation.gui.ScreenOpener; import com.simibubi.create.foundation.ponder.content.PonderIndexScreen; import com.simibubi.create.foundation.ponder.content.PonderTagScreen; @@ -79,9 +78,8 @@ public class PonderTooltipHandler { if (!subject && InputMappings.isKeyDown(window, keyCode)) { if (value >= 1) { - if (currentScreen instanceof AbstractSimiScreen) - ((AbstractSimiScreen) currentScreen).centerScalingOnMouse(); - + if (currentScreen instanceof NavigatableSimiScreen) + ((NavigatableSimiScreen) currentScreen).centerScalingOnMouse(); ScreenOpener.transitionTo(PonderUI.of(stack)); holdWProgress.startWithValue(0); return; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java b/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java index 229be5f19..545dfbd1b 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/PonderUI.java @@ -10,7 +10,6 @@ import org.lwjgl.opengl.GL11; import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; -import com.simibubi.create.foundation.gui.AbstractSimiScreen; import com.simibubi.create.foundation.gui.AllGuiTextures; import com.simibubi.create.foundation.gui.AllIcons; import com.simibubi.create.foundation.gui.GuiGameElement; @@ -28,10 +27,10 @@ import com.simibubi.create.foundation.utility.ColorHelper; import com.simibubi.create.foundation.utility.FontHelper; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.Lang; -import com.simibubi.create.foundation.utility.animation.LerpedFloat; -import com.simibubi.create.foundation.utility.animation.LerpedFloat.Chaser; import com.simibubi.create.foundation.utility.Pair; import com.simibubi.create.foundation.utility.Pointing; +import com.simibubi.create.foundation.utility.animation.LerpedFloat; +import com.simibubi.create.foundation.utility.animation.LerpedFloat.Chaser; import net.minecraft.client.ClipboardHelper; import net.minecraft.client.GameSettings; @@ -54,7 +53,7 @@ import net.minecraft.world.gen.feature.template.Template; import net.minecraftforge.fml.client.gui.GuiUtils; import net.minecraftforge.registries.ForgeRegistries; -public class PonderUI extends AbstractSimiScreen { +public class PonderUI extends NavigatableSimiScreen { public static int ponderTicks; public static float ponderPartialTicksPaused; @@ -62,6 +61,11 @@ public class PonderUI extends AbstractSimiScreen { public static final String PONDERING = PonderLocalization.LANG_PREFIX + "pondering"; public static final String IDENTIFY_MODE = PonderLocalization.LANG_PREFIX + "identify_mode"; public static final String IN_CHAPTER = PonderLocalization.LANG_PREFIX + "in_chapter"; + public static final String IDENTIFY = PonderLocalization.LANG_PREFIX + "identify"; + public static final String PREVIOUS = PonderLocalization.LANG_PREFIX + "previous"; + public static final String CLOSE = PonderLocalization.LANG_PREFIX + "close"; + public static final String NEXT = PonderLocalization.LANG_PREFIX + "next"; + public static final String REPLAY = PonderLocalization.LANG_PREFIX + "replay"; private List scenes; private List tags; @@ -83,7 +87,7 @@ public class PonderUI extends AbstractSimiScreen { private int index = 0; private PonderTag referredToByTag; - private PonderButton left, right, scan, chap, userMode; + private PonderButton left, right, scan, chap, userMode, close, replay; private PonderProgressBar progressBar; private int skipCooling = 0; @@ -133,8 +137,8 @@ public class PonderUI extends AbstractSimiScreen { @Override protected void init() { - super.init(); widgets.clear(); + super.init(); tagButtons = new ArrayList<>(); tagFades = new ArrayList<>(); @@ -187,7 +191,7 @@ public class PonderUI extends AbstractSimiScreen { .fade(0, -1)); if (PonderIndex.EDITOR_MODE) { - widgets.add(userMode = new PonderButton(31, bY, () -> { + widgets.add(userMode = new PonderButton(width - 20 - 31, bY, () -> { userViewMode = !userViewMode; }).showing(AllIcons.I_MTD_USER_MODE) .fade(0, -1)); @@ -199,7 +203,7 @@ public class PonderUI extends AbstractSimiScreen { .fade(0, -1)); bX += 20 + spacing; - widgets.add(new PonderButton(bX, bY, this::onClose).showing(AllIcons.I_MTD_CLOSE) + widgets.add(close = new PonderButton(bX, bY, this::onClose).showing(AllIcons.I_MTD_CLOSE) .shortcut(bindings.keyBindInventory) .fade(0, -1)); @@ -209,7 +213,7 @@ public class PonderUI extends AbstractSimiScreen { .fade(0, -1)); bX += 50 + spacing; - widgets.add(new PonderButton(bX, bY, this::replay).showing(AllIcons.I_MTD_REPLAY) + widgets.add(replay = new PonderButton(bX, bY, this::replay).showing(AllIcons.I_MTD_REPLAY) .shortcut(bindings.keyBindBack) .fade(0, -1)); } @@ -460,6 +464,7 @@ public class PonderUI extends AbstractSimiScreen { for (Widget widget : widgets) noWidgetsHovered &= !widget.isMouseOver(mouseX, mouseY); + int tooltipColor = 0xffa3a3a3; { // Chapter title RenderSystem.pushMatrix(); @@ -480,14 +485,15 @@ public class PonderUI extends AbstractSimiScreen { .scale(2) .render(); - drawString(font, Lang.translate(PONDERING), x, y - 6, 0xffa3a3a3); + drawString(font, Lang.translate(PONDERING), x, y - 6, tooltipColor); y += 8; x += 0; // RenderSystem.translated(0, 3 * (indexDiff), 0); RenderSystem.translated(x, y, 0); RenderSystem.rotatef(indexDiff * -75, 1, 0, 0); RenderSystem.translated(0, 0, 5); - FontHelper.drawSplitString(font, title, 0, 0, left.x - 51, ColorHelper.applyAlpha(textColor, 1 - indexDiff)); + FontHelper.drawSplitString(font, title, 0, 0, left.x - 51, + ColorHelper.applyAlpha(textColor, 1 - indexDiff)); RenderSystem.popMatrix(); if (chapter != null) { @@ -496,12 +502,17 @@ public class PonderUI extends AbstractSimiScreen { RenderSystem.translated(chap.x - 4 - 4, chap.y, 0); UIRenderHelper.streak(180, 4, 10, 26, (int) (150 * fade), 0x101010); - drawRightAlignedString(font, Lang.translate(IN_CHAPTER), 0, 0, 0xffa3a3a3); + drawRightAlignedString(font, Lang.translate(IN_CHAPTER), 0, 0, tooltipColor); drawRightAlignedString(font, Lang.translate(PonderLocalization.LANG_PREFIX + "chapter." + chapter.getId()), 0, 12, 0xffeeeeee); RenderSystem.popMatrix(); } + + UIRenderHelper.breadcrumbArrow(width / 2 - 20, height - 51, 20, 20, 5, 0x40aa9999, 0x20aa9999); + UIRenderHelper.breadcrumbArrow(width / 2 + 20, height - 51, -20, 20, -5, 0x40aa9999, 0x20aa9999); + UIRenderHelper.breadcrumbArrow(width / 2 - 90, height - 51, 70, 20, 5, 0x40aa9999, 0x10aa9999); + UIRenderHelper.breadcrumbArrow(width / 2 + 90, height - 51, -70, 20, -5, 0x40aa9999, 0x10aa9999); } if (identifyMode) { @@ -612,6 +623,21 @@ public class PonderUI extends AbstractSimiScreen { RenderSystem.popMatrix(); }); + + RenderSystem.pushMatrix(); + RenderSystem.translated(0, 0, 500); + int tooltipY = height - 16; + if (scan.isHovered()) + drawCenteredString(font, Lang.translate(IDENTIFY), scan.x + 10, tooltipY, tooltipColor); + if (index != 0 && left.isHovered()) + drawCenteredString(font, Lang.translate(PREVIOUS), left.x + 10, tooltipY, tooltipColor); + if (close.isHovered()) + drawCenteredString(font, Lang.translate(CLOSE), close.x + 10, tooltipY, tooltipColor); + if (index != scenes.size() - 1 && right.isHovered()) + drawCenteredString(font, Lang.translate(NEXT), right.x + 10, tooltipY, tooltipColor); + if (replay.isHovered()) + drawCenteredString(font, Lang.translate(REPLAY), replay.x + 10, tooltipY, tooltipColor); + RenderSystem.popMatrix(); } protected void lowerButtonGroup(int index, int mouseX, int mouseY, float fade, AllIcons icon, KeyBinding key) { @@ -838,14 +864,14 @@ public class PonderUI extends AbstractSimiScreen { } @Override - public boolean isEquivalentTo(AbstractSimiScreen other) { + public boolean isEquivalentTo(NavigatableSimiScreen other) { if (other instanceof PonderUI) return stack.isItemEqual(((PonderUI) other).stack); return super.isEquivalentTo(other); } @Override - public void shareContextWith(AbstractSimiScreen other) { + public void shareContextWith(NavigatableSimiScreen other) { if (other instanceof PonderUI) { PonderUI ponderUI = (PonderUI) other; ponderUI.referredToByTag = referredToByTag; diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderIndexScreen.java b/src/main/java/com/simibubi/create/foundation/ponder/content/PonderIndexScreen.java index 15f3e70f8..5ca5d0d16 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderIndexScreen.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/PonderIndexScreen.java @@ -1,16 +1,23 @@ package com.simibubi.create.foundation.ponder.content; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import org.apache.commons.lang3.mutable.MutableBoolean; + import com.mojang.blaze3d.systems.RenderSystem; import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.components.crank.ValveHandleBlock; -import com.simibubi.create.foundation.gui.AbstractSimiScreen; import com.simibubi.create.foundation.gui.ScreenOpener; import com.simibubi.create.foundation.gui.UIRenderHelper; +import com.simibubi.create.foundation.ponder.NavigatableSimiScreen; import com.simibubi.create.foundation.ponder.PonderRegistry; import com.simibubi.create.foundation.ponder.PonderUI; import com.simibubi.create.foundation.ponder.ui.ChapterLabel; import com.simibubi.create.foundation.ponder.ui.LayoutHelper; import com.simibubi.create.foundation.ponder.ui.PonderButton; + import net.minecraft.block.Block; import net.minecraft.client.MainWindow; import net.minecraft.client.gui.widget.Widget; @@ -20,13 +27,8 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.math.MathHelper; import net.minecraftforge.registries.ForgeRegistries; -import org.apache.commons.lang3.mutable.MutableBoolean; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -public class PonderIndexScreen extends AbstractSimiScreen { +public class PonderIndexScreen extends NavigatableSimiScreen { protected final List chapters; private final double chapterXmult = 0.5; @@ -47,10 +49,8 @@ public class PonderIndexScreen extends AbstractSimiScreen { @Override protected void init() { - super.init(); - - // populate lists widgets.clear(); + super.init(); chapters.clear(); // chapters.addAll(PonderRegistry.chapters.getAllChapters()); @@ -210,7 +210,7 @@ public class PonderIndexScreen extends AbstractSimiScreen { } @Override - public boolean isEquivalentTo(AbstractSimiScreen other) { + public boolean isEquivalentTo(NavigatableSimiScreen other) { return other instanceof PonderIndexScreen; } diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderTagScreen.java b/src/main/java/com/simibubi/create/foundation/ponder/content/PonderTagScreen.java index 09abfaadb..2ad235153 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/PonderTagScreen.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/PonderTagScreen.java @@ -7,9 +7,9 @@ import java.util.Objects; import org.apache.commons.lang3.mutable.MutableBoolean; import com.mojang.blaze3d.systems.RenderSystem; -import com.simibubi.create.foundation.gui.AbstractSimiScreen; import com.simibubi.create.foundation.gui.ScreenOpener; import com.simibubi.create.foundation.gui.UIRenderHelper; +import com.simibubi.create.foundation.ponder.NavigatableSimiScreen; import com.simibubi.create.foundation.ponder.PonderLocalization; import com.simibubi.create.foundation.ponder.PonderRegistry; import com.simibubi.create.foundation.ponder.PonderUI; @@ -28,11 +28,11 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.math.MathHelper; import net.minecraftforge.registries.ForgeRegistries; -public class PonderTagScreen extends AbstractSimiScreen { +public class PonderTagScreen extends NavigatableSimiScreen { public static final String ASSOCIATED = PonderLocalization.LANG_PREFIX + "associated"; - protected final PonderTag tag; + private final PonderTag tag; protected final List items; private final double itemXmult = 0.5; protected Rectangle2d itemArea; @@ -52,8 +52,8 @@ public class PonderTagScreen extends AbstractSimiScreen { @Override protected void init() { - super.init(); widgets.clear(); + super.init(); // items items.clear(); @@ -146,6 +146,8 @@ public class PonderTagScreen extends AbstractSimiScreen { double mouseX = minecraft.mouseHelper.getMouseX() * w.getScaledWidth() / w.getWidth(); double mouseY = minecraft.mouseHelper.getMouseY() * w.getScaledHeight() / w.getHeight(); for (Widget widget : widgets) { + if (widget == backTrack) + continue; if (widget instanceof PonderButton) if (widget.isMouseOver(mouseX, mouseY)) { hoveredItem = ((PonderButton) widget).getItem(); @@ -200,6 +202,7 @@ public class PonderTagScreen extends AbstractSimiScreen { RenderSystem.translated(0, 0, 100); FontHelper.drawSplitString(font, desc, x, y, w, 0xeeeeee); RenderSystem.popMatrix(); + } protected void renderItems(int mouseX, int mouseY, float partialTicks) { @@ -293,7 +296,7 @@ public class PonderTagScreen extends AbstractSimiScreen { } @Override - public boolean isEquivalentTo(AbstractSimiScreen other) { + public boolean isEquivalentTo(NavigatableSimiScreen other) { if (other instanceof PonderTagScreen) return tag == ((PonderTagScreen) other).tag; return super.isEquivalentTo(other); @@ -304,4 +307,8 @@ public class PonderTagScreen extends AbstractSimiScreen { return true; } + public PonderTag getTag() { + return tag; + } + } diff --git a/src/main/java/com/simibubi/create/foundation/ponder/content/RedstoneScenes.java b/src/main/java/com/simibubi/create/foundation/ponder/content/RedstoneScenes.java index 4d98b7d3c..a0f2f3543 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/content/RedstoneScenes.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/content/RedstoneScenes.java @@ -751,7 +751,7 @@ public class RedstoneScenes { scene.idle(10); scene.overlay.showText(70) .colored(PonderPalette.GREEN) - .text("Receivers will emit the redstone power of transmitters within a range of 128 blocks") + .text("Receivers emit the redstone power of transmitters within 128 blocks") .placeNearTarget() .pointAt(link2Vec); scene.idle(80); @@ -820,7 +820,7 @@ public class RedstoneScenes { scene.effects.indicateRedstone(link2Pos); scene.overlay.showText(90) .attachKeyFrame() - .text("Only the links with matching Frequency combinations will communicate") + .text("Only the links with matching Frequencies will communicate") .placeNearTarget() .pointAt(link2Vec); scene.idle(100); diff --git a/src/main/java/com/simibubi/create/foundation/ponder/elements/TextWindowElement.java b/src/main/java/com/simibubi/create/foundation/ponder/elements/TextWindowElement.java index b41861a36..2423c420e 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/elements/TextWindowElement.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/elements/TextWindowElement.java @@ -103,7 +103,7 @@ public class TextWindowElement extends AnimatedOverlayElement { boxWidth = Math.max(boxWidth, screen.getFontRenderer() .getStringWidth(string)); int boxHeight = screen.getFontRenderer() - .getWordWrappedHeight(bakedText, textWidth); + .getWordWrappedHeight(bakedText, boxWidth); RenderSystem.pushMatrix(); RenderSystem.translatef(0, sceneToScreen.y, 400);