all the elements

- even more ponder API refactors
This commit is contained in:
zelophed 2023-11-05 15:21:23 +01:00
parent c25968853d
commit 01b214b28d
49 changed files with 839 additions and 1037 deletions

View file

@ -533,7 +533,7 @@ public class BeltBlock extends HorizontalKineticBlock
((BeltTunnelBlock) tunnelBlock).updateTunnel(world, pos); ((BeltTunnelBlock) tunnelBlock).updateTunnel(world, pos);
} }
public static List<BlockPos> getBeltChain(Level world, BlockPos controllerPos) { public static List<BlockPos> getBeltChain(LevelAccessor world, BlockPos controllerPos) {
List<BlockPos> positions = new LinkedList<>(); List<BlockPos> positions = new LinkedList<>();
BlockState blockState = world.getBlockState(controllerPos); BlockState blockState = world.getBlockState(controllerPos);

View file

@ -27,7 +27,7 @@ import net.createmod.catnip.render.CachedBuffers;
import net.createmod.catnip.utility.Iterate; import net.createmod.catnip.utility.Iterate;
import net.createmod.catnip.utility.VecHelper; import net.createmod.catnip.utility.VecHelper;
import net.createmod.catnip.utility.levelWrappers.SchematicLevel; import net.createmod.catnip.utility.levelWrappers.SchematicLevel;
import net.createmod.ponder.foundation.PonderLevel; import net.createmod.ponder.api.level.PonderLevel;
import net.minecraft.client.renderer.LevelRenderer; import net.minecraft.client.renderer.LevelRenderer;
import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.RenderType;

View file

@ -6,12 +6,12 @@ import com.simibubi.create.content.kinetics.crank.ValveHandleBlock;
import com.simibubi.create.infrastructure.ponder.AllCreatePonderScenes; import com.simibubi.create.infrastructure.ponder.AllCreatePonderScenes;
import com.simibubi.create.infrastructure.ponder.AllCreatePonderTags; import com.simibubi.create.infrastructure.ponder.AllCreatePonderTags;
import net.createmod.ponder.api.level.PonderLevel;
import net.createmod.ponder.api.registration.IndexExclusionHelper; import net.createmod.ponder.api.registration.IndexExclusionHelper;
import net.createmod.ponder.api.registration.PonderPlugin; import net.createmod.ponder.api.registration.PonderPlugin;
import net.createmod.ponder.api.registration.PonderSceneRegistrationHelper; import net.createmod.ponder.api.registration.PonderSceneRegistrationHelper;
import net.createmod.ponder.api.registration.PonderTagRegistrationHelper; import net.createmod.ponder.api.registration.PonderTagRegistrationHelper;
import net.createmod.ponder.api.registration.SharedTextRegistrationHelper; import net.createmod.ponder.api.registration.SharedTextRegistrationHelper;
import net.createmod.ponder.foundation.PonderLevel;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
public class CreatePonderPlugin implements PonderPlugin { public class CreatePonderPlugin implements PonderPlugin {
@ -44,8 +44,8 @@ public class CreatePonderPlugin implements PonderPlugin {
} }
@Override @Override
public void onPonderWorldRestore(PonderLevel world) { public void onPonderLevelRestore(PonderLevel ponderLevel) {
PonderWorldBlockEntityFix.fixControllerBlockEntities(world); PonderWorldBlockEntityFix.fixControllerBlockEntities(ponderLevel);
} }
@Override @Override

View file

@ -31,14 +31,16 @@ import com.simibubi.create.foundation.ponder.instruction.AnimateBlockEntityInstr
import net.createmod.catnip.utility.FunctionalHelper; import net.createmod.catnip.utility.FunctionalHelper;
import net.createmod.catnip.utility.NBTHelper; import net.createmod.catnip.utility.NBTHelper;
import net.createmod.catnip.utility.VecHelper; import net.createmod.catnip.utility.VecHelper;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.ParrotElement;
import net.createmod.ponder.api.element.ParrotPose;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.level.PonderLevel;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderLevel;
import net.createmod.ponder.foundation.PonderScene; import net.createmod.ponder.foundation.PonderScene;
import net.createmod.ponder.foundation.PonderSceneBuilder; import net.createmod.ponder.foundation.PonderSceneBuilder;
import net.createmod.ponder.foundation.Selection; import net.createmod.ponder.foundation.element.ElementLinkImpl;
import net.createmod.ponder.foundation.element.ParrotElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.createmod.ponder.foundation.instruction.CreateParrotInstruction; import net.createmod.ponder.foundation.instruction.CreateParrotInstruction;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
@ -159,7 +161,7 @@ public class CreateSceneBuilder extends PonderSceneBuilder {
public ElementLink<BeltItemElement> createItemOnBelt(BlockPos beltLocation, Direction insertionSide, public ElementLink<BeltItemElement> createItemOnBelt(BlockPos beltLocation, Direction insertionSide,
ItemStack stack) { ItemStack stack) {
ElementLink<BeltItemElement> link = new ElementLink<>(BeltItemElement.class); ElementLink<BeltItemElement> link = new ElementLinkImpl<>(BeltItemElement.class);
addInstruction(scene -> { addInstruction(scene -> {
PonderLevel world = scene.getWorld(); PonderLevel world = scene.getWorld();
BlockEntity blockEntity = world.getBlockEntity(beltLocation); BlockEntity blockEntity = world.getBlockEntity(beltLocation);
@ -308,8 +310,8 @@ public class CreateSceneBuilder extends PonderSceneBuilder {
public class SpecialInstructions extends PonderSpecialInstructions { public class SpecialInstructions extends PonderSpecialInstructions {
@Override @Override
public ElementLink<ParrotElement> createBirb(Vec3 location, Supplier<? extends ParrotElement.ParrotPose> pose) { public ElementLink<ParrotElement> createBirb(Vec3 location, Supplier<? extends ParrotPose> pose) {
ElementLink<ParrotElement> link = new ElementLink<>(ParrotElement.class); ElementLink<ParrotElement> link = new ElementLinkImpl<>(ParrotElement.class);
ParrotElement parrot = ExpandedParrotElement.create(location, pose); ParrotElement parrot = ExpandedParrotElement.create(location, pose);
addInstruction(new CreateParrotInstruction(10, Direction.DOWN, parrot)); addInstruction(new CreateParrotInstruction(10, Direction.DOWN, parrot));
addInstruction(scene -> scene.linkElement(parrot, link)); addInstruction(scene -> scene.linkElement(parrot, link));
@ -331,7 +333,7 @@ public class CreateSceneBuilder extends PonderSceneBuilder {
.ifPresent(expandedBirb -> expandedBirb.setConductor(conductor))); .ifPresent(expandedBirb -> expandedBirb.setConductor(conductor)));
} }
public static class ParrotSpinOnComponentPose extends ParrotElement.ParrotPose { public static class ParrotSpinOnComponentPose extends ParrotPose {
private final BlockPos componentPos; private final BlockPos componentPos;
public ParrotSpinOnComponentPose(BlockPos componentPos) { public ParrotSpinOnComponentPose(BlockPos componentPos) {
@ -339,7 +341,7 @@ public class CreateSceneBuilder extends PonderSceneBuilder {
} }
@Override @Override
protected void tick(PonderScene scene, Parrot entity, Vec3 location) { public void tick(PonderScene scene, Parrot entity, Vec3 location) {
BlockEntity blockEntity = scene.getWorld().getBlockEntity(componentPos); BlockEntity blockEntity = scene.getWorld().getBlockEntity(componentPos);
if (!(blockEntity instanceof KineticBlockEntity)) if (!(blockEntity instanceof KineticBlockEntity))
return; return;

View file

@ -4,7 +4,7 @@ import com.simibubi.create.content.kinetics.belt.BeltBlock;
import com.simibubi.create.content.kinetics.belt.BeltBlockEntity; import com.simibubi.create.content.kinetics.belt.BeltBlockEntity;
import com.simibubi.create.foundation.blockEntity.IMultiBlockEntityContainer; import com.simibubi.create.foundation.blockEntity.IMultiBlockEntityContainer;
import net.createmod.ponder.foundation.PonderLevel; import net.createmod.ponder.api.level.PonderLevel;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntity;

View file

@ -2,9 +2,9 @@ package com.simibubi.create.foundation.ponder.element;
import com.simibubi.create.content.kinetics.belt.transport.TransportedItemStack; import com.simibubi.create.content.kinetics.belt.transport.TransportedItemStack;
import net.createmod.ponder.foundation.element.TrackedElement; import net.createmod.ponder.foundation.element.TrackedElementBase;
public class BeltItemElement extends TrackedElement<TransportedItemStack> { public class BeltItemElement extends TrackedElementBase<TransportedItemStack> {
public BeltItemElement(TransportedItemStack wrapped) { public BeltItemElement(TransportedItemStack wrapped) {
super(wrapped); super(wrapped);

View file

@ -2,12 +2,13 @@ package com.simibubi.create.foundation.ponder.element;
import java.util.function.Supplier; import java.util.function.Supplier;
import net.createmod.ponder.api.element.ParrotPose;
import net.createmod.ponder.foundation.PonderScene; import net.createmod.ponder.foundation.PonderScene;
import net.createmod.ponder.foundation.element.ParrotElement; import net.createmod.ponder.foundation.element.ParrotElementImpl;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
public class ExpandedParrotElement extends ParrotElement { public class ExpandedParrotElement extends ParrotElementImpl {
protected boolean deferConductor = false; protected boolean deferConductor = false;

View file

@ -9,7 +9,7 @@ import com.simibubi.create.content.contraptions.pulley.PulleyBlockEntity;
import com.simibubi.create.content.kinetics.deployer.DeployerBlockEntity; import com.simibubi.create.content.kinetics.deployer.DeployerBlockEntity;
import com.simibubi.create.content.trains.bogey.AbstractBogeyBlockEntity; import com.simibubi.create.content.trains.bogey.AbstractBogeyBlockEntity;
import net.createmod.ponder.foundation.PonderLevel; import net.createmod.ponder.api.level.PonderLevel;
import net.createmod.ponder.foundation.PonderScene; import net.createmod.ponder.foundation.PonderScene;
import net.createmod.ponder.foundation.instruction.TickingInstruction; import net.createmod.ponder.foundation.instruction.TickingInstruction;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
@ -22,8 +22,8 @@ public class AnimateBlockEntityInstruction extends TickingInstruction {
protected double target; protected double target;
protected final BlockPos location; protected final BlockPos location;
private BiConsumer<PonderLevel, Float> setter; private final BiConsumer<PonderLevel, Float> setter;
private Function<PonderLevel, Float> getter; private final Function<PonderLevel, Float> getter;
public static AnimateBlockEntityInstruction bearing(BlockPos location, float totalDelta, int ticks) { public static AnimateBlockEntityInstruction bearing(BlockPos location, float totalDelta, int ticks) {
return new AnimateBlockEntityInstruction(location, totalDelta, ticks, return new AnimateBlockEntityInstruction(location, totalDelta, ticks,

View file

@ -8,13 +8,12 @@ import com.simibubi.create.content.logistics.funnel.FunnelBlockEntity;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
@ -44,7 +43,7 @@ public class ArmScenes {
scene.world().showSection(armSel, Direction.DOWN); scene.world().showSection(armSel, Direction.DOWN);
scene.idle(10); scene.idle(10);
scene.effects().indicateRedstone(armPos); scene.effects().indicateRedstone(armPos);
scene.overlay().showSelectionWithText(armSel, 70) scene.overlay().showOutlineWithText(armSel, 70)
.attachKeyFrame() .attachKeyFrame()
.colored(PonderPalette.RED) .colored(PonderPalette.RED)
.text("Mechanical Arms have to be assigned their in- and outputs before they are placed") .text("Mechanical Arms have to be assigned their in- and outputs before they are placed")
@ -55,8 +54,9 @@ public class ArmScenes {
scene.world().showSection(util.select().fromTo(0, 1, 1, 0, 2, 1), Direction.DOWN); scene.world().showSection(util.select().fromTo(0, 1, 1, 0, 2, 1), Direction.DOWN);
scene.world().hideSection(armSel, Direction.UP); scene.world().hideSection(armSel, Direction.UP);
scene.idle(20); scene.idle(20);
scene.overlay().showControls(new InputWindowElement(depotSurface, Pointing.RIGHT).rightClick() scene.overlay().showControls(depotSurface, Pointing.RIGHT, 50)
.withItem(armItem), 50); .rightClick()
.withItem(armItem);
scene.idle(7); scene.idle(7);
AABB depotBounds = AllShapes.CASING_13PX.get(Direction.UP) AABB depotBounds = AllShapes.CASING_13PX.get(Direction.UP)
.bounds(); .bounds();
@ -71,15 +71,14 @@ public class ArmScenes {
scene.idle(80); scene.idle(80);
BlockPos outputDepot = util.grid().at(0, 2, 1); BlockPos outputDepot = util.grid().at(0, 2, 1);
InputWindowElement input = scene.overlay().showControls(util.vector().blockSurface(outputDepot, Direction.NORTH), Pointing.RIGHT, 20).rightClick()
new InputWindowElement(util.vector().blockSurface(outputDepot, Direction.NORTH), Pointing.RIGHT).rightClick() .withItem(armItem);
.withItem(armItem);
scene.overlay().showControls(input, 20);
scene.idle(7); scene.idle(7);
Object second = new Object(); Object second = new Object();
scene.overlay().chaseBoundingBoxOutline(PonderPalette.INPUT, second, depotBounds.move(0, 2, 1), 100); scene.overlay().chaseBoundingBoxOutline(PonderPalette.INPUT, second, depotBounds.move(0, 2, 1), 100);
scene.idle(25); scene.idle(25);
scene.overlay().showControls(input, 30); scene.overlay().showControls(util.vector().blockSurface(outputDepot, Direction.NORTH), Pointing.RIGHT, 30).rightClick()
.withItem(armItem);
scene.idle(7); scene.idle(7);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.OUTPUT, second, depotBounds.move(0, 2, 1), 280); scene.overlay().chaseBoundingBoxOutline(PonderPalette.OUTPUT, second, depotBounds.move(0, 2, 1), 280);
scene.overlay().showText(70) scene.overlay().showText(70)
@ -100,9 +99,8 @@ public class ArmScenes {
.placeNearTarget(); .placeNearTarget();
scene.idle(35); scene.idle(35);
scene.overlay() scene.overlay().showControls(util.vector().topOf(util.grid().at(1, 1, 0)), Pointing.DOWN, 30).leftClick()
.showControls(new InputWindowElement(util.vector().topOf(util.grid().at(1, 1, 0)), Pointing.DOWN).leftClick() .withItem(armItem);
.withItem(armItem), 30);
scene.idle(50); scene.idle(50);
scene.world().showSection(armSel, Direction.DOWN); scene.world().showSection(armSel, Direction.DOWN);
@ -223,8 +221,7 @@ public class ArmScenes {
scene.idle(70); scene.idle(70);
ItemStack sword = new ItemStack(Items.GOLDEN_SWORD); ItemStack sword = new ItemStack(Items.GOLDEN_SWORD);
inputDepot = util.grid().at(4, 1, 2); inputDepot = util.grid().at(4, 1, 2);
scene.overlay() scene.overlay().showControls(util.vector().topOf(inputDepot), Pointing.RIGHT, 30).withItem(sword);
.showControls(new InputWindowElement(util.vector().topOf(inputDepot), Pointing.RIGHT).withItem(sword), 30);
scene.world().createItemOnBeltLike(inputDepot, Direction.SOUTH, sword); scene.world().createItemOnBeltLike(inputDepot, Direction.SOUTH, sword);
scene.idle(20); scene.idle(20);
@ -238,10 +235,8 @@ public class ArmScenes {
scene.world().flapFunnel(util.grid().at(0, 2, 2), false); scene.world().flapFunnel(util.grid().at(0, 2, 2), false);
scene.world().instructArm(armPos, Phase.SEARCH_INPUTS, ItemStack.EMPTY, -1); scene.world().instructArm(armPos, Phase.SEARCH_INPUTS, ItemStack.EMPTY, -1);
scene.idle(5); scene.idle(5);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(0, 2, 3), Direction.WEST), Pointing.LEFT, 30)
new InputWindowElement(util.vector().blockSurface(util.grid().at(0, 2, 3), Direction.WEST), Pointing.LEFT) .withItem(sword);
.withItem(sword),
30);
} }
@ -276,12 +271,12 @@ public class ArmScenes {
scene.world().createItemOnBeltLike(util.grid().at(2, 1, 4), Direction.SOUTH, sand); scene.world().createItemOnBeltLike(util.grid().at(2, 1, 4), Direction.SOUTH, sand);
scene.world().createItemOnBeltLike(util.grid().at(1, 1, 4), Direction.SOUTH, sulphur); scene.world().createItemOnBeltLike(util.grid().at(1, 1, 4), Direction.SOUTH, sulphur);
scene.overlay().showSelectionWithText(util.select().fromTo(2, 1, 4, 1, 1, 4), 60) scene.overlay().showOutlineWithText(util.select().fromTo(2, 1, 4, 1, 1, 4), 60)
.text("Inputs") .text("Inputs")
.placeNearTarget() .placeNearTarget()
.colored(PonderPalette.INPUT); .colored(PonderPalette.INPUT);
scene.idle(50); scene.idle(50);
scene.overlay().showSelectionWithText(util.select().fromTo(5, 3, 1, 3, 1, 1), 40) scene.overlay().showOutlineWithText(util.select().fromTo(5, 3, 1, 3, 1, 1), 40)
.text("Outputs") .text("Outputs")
.placeNearTarget() .placeNearTarget()
.colored(PonderPalette.OUTPUT); .colored(PonderPalette.OUTPUT);
@ -297,7 +292,7 @@ public class ArmScenes {
scene.rotateCameraY(-90 - 30); scene.rotateCameraY(-90 - 30);
scene.idle(20); scene.idle(20);
scene.overlay().showSelectionWithText(util.select().position(4, 1, 4), 80) scene.overlay().showOutlineWithText(util.select().position(4, 1, 4), 80)
.colored(PonderPalette.RED) .colored(PonderPalette.RED)
.text("Mechanical Arms by themselves do not provide any options for filtering") .text("Mechanical Arms by themselves do not provide any options for filtering")
.placeNearTarget(); .placeNearTarget();
@ -322,9 +317,8 @@ public class ArmScenes {
for (int y = 0; y < 3; y++) { for (int y = 0; y < 3; y++) {
for (int x = 0; x < 3; x++) { for (int x = 0; x < 3; x++) {
ItemStack item = (x + y) % 2 == 0 ? sulphur : sand; ItemStack item = (x + y) % 2 == 0 ? sulphur : sand;
scene.overlay() scene.overlay().showControls(filterSlot.add(2 - x, -y, 0), Pointing.LEFT, 5).rightClick()
.showControls(new InputWindowElement(filterSlot.add(2 - x, -y, 0), Pointing.LEFT).rightClick() .withItem(item);
.withItem(item), 5);
scene.idle(7); scene.idle(7);
scene.world().setFilterData(util.select().position(5 - x, 3 - y, 2), FunnelBlockEntity.class, item); scene.world().setFilterData(util.select().position(5 - x, 3 - y, 2), FunnelBlockEntity.class, item);
scene.idle(4); scene.idle(4);
@ -440,7 +434,7 @@ public class ArmScenes {
.placeNearTarget(); .placeNearTarget();
scene.idle(60); scene.idle(60);
scene.overlay().showControls(new InputWindowElement(scrollSlot, Pointing.RIGHT).rightClick(), 40); scene.overlay().showControls(scrollSlot, Pointing.RIGHT, 40).rightClick();
scene.idle(10); scene.idle(10);
scene.overlay().showText(50) scene.overlay().showText(50)
.text("The value panel will allow you to configure it") .text("The value panel will allow you to configure it")

View file

@ -9,13 +9,12 @@ import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Iterate; import net.createmod.catnip.utility.Iterate;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.core.Direction.Axis; import net.minecraft.core.Direction.Axis;
@ -52,7 +51,7 @@ public class BearingScenes {
scene.idle(10); scene.idle(10);
BlockPos anchorPos = windmill.north(); BlockPos anchorPos = windmill.north();
scene.overlay().showSelectionWithText(util.select().position(anchorPos), 60) scene.overlay().showOutlineWithText(util.select().position(anchorPos), 60)
.colored(PonderPalette.GREEN) .colored(PonderPalette.GREEN)
.pointAt(util.vector().blockSurface(windmill, Direction.WEST)) .pointAt(util.vector().blockSurface(windmill, Direction.WEST))
.attachKeyFrame() .attachKeyFrame()
@ -104,8 +103,8 @@ public class BearingScenes {
scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, bb2, bb2, 1); scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, bb2, bb2, 1);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, bb2, bb2.expandTowards(0, -4, 0), 80); scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, bb2, bb2.expandTowards(0, -4, 0), 80);
scene.idle(10); scene.idle(10);
scene.overlay().showControls(new InputWindowElement(util.vector().centerOf(util.grid().at(5, 2, 0)), Pointing.RIGHT) scene.overlay().showControls(util.vector().centerOf(util.grid().at(5, 2, 0)), Pointing.RIGHT, 40)
.withItem(AllItems.SUPER_GLUE.asStack()), 40); .withItem(AllItems.SUPER_GLUE.asStack());
scene.idle(15); scene.idle(15);
scene.overlay().showText(60) scene.overlay().showText(60)
@ -125,8 +124,7 @@ public class BearingScenes {
scene.rotateCameraY(-90); scene.rotateCameraY(-90);
scene.idle(20); scene.idle(20);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(windmill) scene.overlay().showControls(util.vector().topOf(windmill).subtract(.5, 0, 0), Pointing.DOWN, 60).rightClick();
.subtract(.5, 0, 0), Pointing.DOWN).rightClick(), 60);
scene.idle(7); scene.idle(7);
scene.world().rotateBearing(windmill, 360, 200); scene.world().rotateBearing(windmill, 360, 200);
scene.world().rotateSection(structure, 0, 0, 360, 200); scene.world().rotateSection(structure, 0, 0, 360, 200);
@ -154,7 +152,7 @@ public class BearingScenes {
Vec3 surface = util.vector().blockSurface(windmill, Direction.WEST) Vec3 surface = util.vector().blockSurface(windmill, Direction.WEST)
.add(0, 0, 2 / 16f); .add(0, 0, 2 / 16f);
scene.overlay().showControls(new InputWindowElement(surface, Pointing.DOWN).rightClick(), 60); scene.overlay().showControls(surface, Pointing.DOWN, 60).rightClick();
scene.overlay().showFilterSlotInput(surface, Direction.WEST, 50); scene.overlay().showFilterSlotInput(surface, Direction.WEST, 50);
scene.overlay().showText(60) scene.overlay().showText(60)
.pointAt(surface) .pointAt(surface)
@ -170,8 +168,8 @@ public class BearingScenes {
scene.effects().rotationDirectionIndicator(windmill.south()); scene.effects().rotationDirectionIndicator(windmill.south());
scene.idle(69); scene.idle(69);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(windmill) scene.overlay().showControls(util.vector().topOf(windmill).subtract(.5, 0, 0), Pointing.DOWN, 60)
.subtract(.5, 0, 0), Pointing.DOWN).rightClick(), 60); .rightClick();
scene.idle(7); scene.idle(7);
scene.world().rotateBearing(windmill, -45, 0); scene.world().rotateBearing(windmill, -45, 0);
scene.world().rotateSection(structure, 0, 0, -45, 0); scene.world().rotateSection(structure, 0, 0, -45, 0);
@ -220,15 +218,13 @@ public class BearingScenes {
scene.idle(10); scene.idle(10);
scene.overlay().showOutline(PonderPalette.BLUE, bearingPos, util.select().fromTo(3, 2, 1, 3, 3, 2), 80); scene.overlay().showOutline(PonderPalette.BLUE, bearingPos, util.select().fromTo(3, 2, 1, 3, 3, 2), 80);
scene.overlay().showSelectionWithText(util.select().fromTo(3, 2, 4, 3, 3, 5), 80) scene.overlay().showOutlineWithText(util.select().fromTo(3, 2, 4, 3, 3, 5), 80)
.colored(PonderPalette.BLUE) .colored(PonderPalette.BLUE)
.attachKeyFrame() .attachKeyFrame()
.text("Any Structure can count as a valid Windmill, as long as it contains at least 8 sail-like Blocks."); .text("Any Structure can count as a valid Windmill, as long as it contains at least 8 sail-like Blocks.");
scene.idle(90); scene.idle(90);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(bearingPos, Direction.WEST), Pointing.LEFT, 40).rightClick();
new InputWindowElement(util.vector().blockSurface(bearingPos, Direction.WEST), Pointing.LEFT).rightClick(),
40);
scene.idle(7); scene.idle(7);
scene.markAsFinished(); scene.markAsFinished();
scene.world().rotateBearing(bearingPos, -720, 400); scene.world().rotateBearing(bearingPos, -720, 400);
@ -262,7 +258,7 @@ public class BearingScenes {
.add(cog4); .add(cog4);
BlockPos bearingPos = util.grid().at(3, 2, 3); BlockPos bearingPos = util.grid().at(3, 2, 3);
scene.overlay().showSelectionWithText(util.select().position(bearingPos.above()), 60) scene.overlay().showOutlineWithText(util.select().position(bearingPos.above()), 60)
.colored(PonderPalette.GREEN) .colored(PonderPalette.GREEN)
.pointAt(util.vector().blockSurface(bearingPos, Direction.WEST)) .pointAt(util.vector().blockSurface(bearingPos, Direction.WEST))
.placeNearTarget() .placeNearTarget()
@ -305,8 +301,8 @@ public class BearingScenes {
scene.overlay().showOutline(PonderPalette.GREEN, "glue", util.select().position(2, 4, 3) scene.overlay().showOutline(PonderPalette.GREEN, "glue", util.select().position(2, 4, 3)
.add(util.select().fromTo(4, 3, 3, 2, 3, 3)) .add(util.select().fromTo(4, 3, 3, 2, 3, 3))
.add(util.select().position(4, 3, 2)), 40); .add(util.select().position(4, 3, 2)), 40);
scene.overlay().showControls(new InputWindowElement(util.vector().centerOf(util.grid().at(4, 3, 3)), Pointing.RIGHT) scene.overlay().showControls(util.vector().centerOf(util.grid().at(4, 3, 3)), Pointing.RIGHT, 40)
.withItem(AllItems.SUPER_GLUE.asStack()), 40); .withItem(AllItems.SUPER_GLUE.asStack());
scene.idle(10); scene.idle(10);
scene.world().showSectionAndMerge(plank2, Direction.SOUTH, contraption); scene.world().showSectionAndMerge(plank2, Direction.SOUTH, contraption);
@ -392,8 +388,8 @@ public class BearingScenes {
Vec3 blockSurface = util.vector().blockSurface(bearingPos, Direction.NORTH) Vec3 blockSurface = util.vector().blockSurface(bearingPos, Direction.NORTH)
.add(0, 2 / 16f, 0); .add(0, 2 / 16f, 0);
scene.overlay().showFilterSlotInput(blockSurface, Direction.NORTH, 60); scene.overlay().showFilterSlotInput(blockSurface, Direction.NORTH, 60);
scene.overlay().showControls(new InputWindowElement(blockSurface, Pointing.DOWN).scroll() scene.overlay().showControls(blockSurface, Pointing.DOWN, 60).scroll()
.withItem(AllItems.WRENCH.asStack()), 60); .withItem(AllItems.WRENCH.asStack());
scene.idle(10); scene.idle(10);
scene.overlay().showText(60) scene.overlay().showText(60)
.pointAt(blockSurface) .pointAt(blockSurface)
@ -446,7 +442,7 @@ public class BearingScenes {
scene.idle(15); scene.idle(15);
scene.overlay().showSelectionWithText(util.select().position(bearingPos), 60) scene.overlay().showOutlineWithText(util.select().position(bearingPos), 60)
.text("Whenever Mechanical Bearings are themselves part of a moving Structure..") .text("Whenever Mechanical Bearings are themselves part of a moving Structure..")
.attachKeyFrame() .attachKeyFrame()
.placeNearTarget(); .placeNearTarget();
@ -467,7 +463,7 @@ public class BearingScenes {
.placeNearTarget(); .placeNearTarget();
scene.idle(70); scene.idle(70);
scene.overlay().showSelectionWithText(util.select().position(bearingPos.north()), 60) scene.overlay().showOutlineWithText(util.select().position(bearingPos.north()), 60)
.colored(PonderPalette.GREEN) .colored(PonderPalette.GREEN)
.text("Once again, the bearing will attach to the block in front of it") .text("Once again, the bearing will attach to the block in front of it")
.attachKeyFrame() .attachKeyFrame()
@ -513,7 +509,7 @@ public class BearingScenes {
scene.world().showSection(util.select().position(bearingPos), Direction.DOWN); scene.world().showSection(util.select().position(bearingPos), Direction.DOWN);
scene.idle(10); scene.idle(10);
scene.overlay().showSelectionWithText(util.select().position(bearingPos.north()), 60) scene.overlay().showOutlineWithText(util.select().position(bearingPos.north()), 60)
.colored(PonderPalette.GREEN) .colored(PonderPalette.GREEN)
.pointAt(util.vector().blockSurface(bearingPos, Direction.WEST)) .pointAt(util.vector().blockSurface(bearingPos, Direction.WEST))
.placeNearTarget() .placeNearTarget()
@ -554,11 +550,7 @@ public class BearingScenes {
scene.world().rotateBearing(bearingPos, 30, 12); scene.world().rotateBearing(bearingPos, 30, 12);
scene.idle(42); scene.idle(42);
InputWindowElement clickTheBearing = new InputWindowElement(util.vector().topOf(bearingPos), Pointing.DOWN); scene.overlay().showControls(util.vector().topOf(bearingPos), Pointing.DOWN, 60).rightClick();
InputWindowElement clickTheBearingSide =
new InputWindowElement(util.vector().blockSurface(bearingPos, Direction.WEST), Pointing.LEFT);
scene.overlay().showControls(clickTheBearing.rightClick(), 60);
scene.idle(7); scene.idle(7);
scene.world().rotateSection(plank, 0, 0, -120, 0); scene.world().rotateSection(plank, 0, 0, -120, 0);
scene.world().rotateBearing(bearingPos, -120, 0); scene.world().rotateBearing(bearingPos, -120, 0);
@ -577,28 +569,28 @@ public class BearingScenes {
scene.world().showIndependentSection(util.select().fromTo(3, 3, 1, 3, 5, 2), Direction.SOUTH); scene.world().showIndependentSection(util.select().fromTo(3, 3, 1, 3, 5, 2), Direction.SOUTH);
scene.world().configureCenterOfRotation(hourHand, util.vector().centerOf(bearingPos)); scene.world().configureCenterOfRotation(hourHand, util.vector().centerOf(bearingPos));
scene.idle(15); scene.idle(15);
scene.overlay().showControls(new InputWindowElement(util.vector().centerOf(util.grid().at(3, 4, 1)), Pointing.RIGHT) scene.overlay().showControls(util.vector().centerOf(util.grid().at(3, 4, 1)), Pointing.RIGHT, 40)
.withItem(AllItems.SUPER_GLUE.asStack()), 40); .withItem(AllItems.SUPER_GLUE.asStack());
scene.overlay().showSelectionWithText(util.select().fromTo(3, 3, 1, 3, 4, 2), 80) scene.overlay().showOutlineWithText(util.select().fromTo(3, 3, 1, 3, 4, 2), 80)
.placeNearTarget() .placeNearTarget()
.attachKeyFrame() .attachKeyFrame()
.colored(PonderPalette.GREEN) .colored(PonderPalette.GREEN)
.sharedText("movement_anchors"); .sharedText("movement_anchors");
scene.idle(90); scene.idle(90);
scene.overlay().showControls(clickTheBearingSide.rightClick(), 20); scene.overlay().showControls(util.vector().blockSurface(bearingPos, Direction.WEST), Pointing.LEFT, 20).rightClick();
scene.idle(7); scene.idle(7);
scene.world().rotateSection(hourHand, 0, 0, 120, 50); scene.world().rotateSection(hourHand, 0, 0, 120, 50);
scene.world().rotateBearing(bearingPos, 120, 50); scene.world().rotateBearing(bearingPos, 120, 50);
scene.idle(60); scene.idle(60);
scene.overlay().showSelectionWithText(util.select().position(bearingPos.north(3)), 80) scene.overlay().showOutlineWithText(util.select().position(bearingPos.north(3)), 80)
.placeNearTarget() .placeNearTarget()
.colored(PonderPalette.BLUE) .colored(PonderPalette.BLUE)
.attachKeyFrame() .attachKeyFrame()
.text("In front of the Hour Hand, a second structure can be added"); .text("In front of the Hour Hand, a second structure can be added");
scene.idle(90); scene.idle(90);
scene.overlay().showControls(clickTheBearingSide.rightClick(), 20); scene.overlay().showControls(util.vector().blockSurface(bearingPos, Direction.WEST), Pointing.LEFT, 20).rightClick();
scene.idle(7); scene.idle(7);
scene.world().rotateSection(hourHand, 0, 0, -120, 0); scene.world().rotateSection(hourHand, 0, 0, -120, 0);
scene.world().rotateBearing(bearingPos, -120, 0); scene.world().rotateBearing(bearingPos, -120, 0);
@ -612,13 +604,13 @@ public class BearingScenes {
scene.idle(30); scene.idle(30);
scene.overlay().showOutline(PonderPalette.BLUE, minuteHand, util.select().fromTo(3, 3, 0, 3, 6, 0), 85); scene.overlay().showOutline(PonderPalette.BLUE, minuteHand, util.select().fromTo(3, 3, 0, 3, 6, 0), 85);
scene.overlay().showSelectionWithText(util.select().fromTo(3, 3, 1, 3, 4, 2), 80) scene.overlay().showOutlineWithText(util.select().fromTo(3, 3, 1, 3, 4, 2), 80)
.placeNearTarget() .placeNearTarget()
.colored(PonderPalette.GREEN) .colored(PonderPalette.GREEN)
.text("Ensure that the two Structures are not glued to each other"); .text("Ensure that the two Structures are not glued to each other");
scene.idle(90); scene.idle(90);
scene.overlay().showControls(clickTheBearingSide.rightClick(), 20); scene.overlay().showControls(util.vector().blockSurface(bearingPos, Direction.WEST), Pointing.LEFT, 20).rightClick();
scene.idle(7); scene.idle(7);
scene.world().rotateSection(hourHand, 0, 0, 120, 50); scene.world().rotateSection(hourHand, 0, 0, 120, 50);
@ -685,7 +677,7 @@ public class BearingScenes {
.attachKeyFrame(); .attachKeyFrame();
scene.idle(80); scene.idle(80);
scene.overlay().showSelectionWithText(util.select().position(bearingPos.above()), 80) scene.overlay().showOutlineWithText(util.select().position(bearingPos.above()), 80)
.colored(PonderPalette.GREEN) .colored(PonderPalette.GREEN)
.text("They will attach to blocks and each other without the need of Super Glue or Chassis Blocks") .text("They will attach to blocks and each other without the need of Super Glue or Chassis Blocks")
.attachKeyFrame() .attachKeyFrame()
@ -701,10 +693,8 @@ public class BearingScenes {
scene.world().rotateSection(plank, 0, 180, 0, 0); scene.world().rotateSection(plank, 0, 180, 0, 0);
scene.rotateCameraY(-30); scene.rotateCameraY(-30);
scene.idle(10); scene.idle(10);
InputWindowElement input = scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.NORTH), Pointing.RIGHT, 30)
new InputWindowElement(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.NORTH), Pointing.RIGHT) .withItem(new ItemStack(Items.BLUE_DYE));
.withItem(new ItemStack(Items.BLUE_DYE));
scene.overlay().showControls(input, 30);
scene.idle(7); scene.idle(7);
scene.world().setBlock(util.grid().at(2, 3, 1), AllBlocks.DYED_SAILS.get(DyeColor.BLUE) scene.world().setBlock(util.grid().at(2, 3, 1), AllBlocks.DYED_SAILS.get(DyeColor.BLUE)
.getDefaultState() .getDefaultState()
@ -717,7 +707,8 @@ public class BearingScenes {
.pointAt(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.WEST)) .pointAt(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.WEST))
.placeNearTarget(); .placeNearTarget();
scene.idle(20); scene.idle(20);
scene.overlay().showControls(input, 30); scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.NORTH), Pointing.RIGHT, 30)
.withItem(new ItemStack(Items.BLUE_DYE));
scene.idle(7); scene.idle(7);
scene.world().replaceBlocks(util.select().fromTo(2, 2, 1, 2, 4, 1), AllBlocks.DYED_SAILS.get(DyeColor.BLUE) scene.world().replaceBlocks(util.select().fromTo(2, 2, 1, 2, 4, 1), AllBlocks.DYED_SAILS.get(DyeColor.BLUE)
.getDefaultState() .getDefaultState()
@ -728,11 +719,8 @@ public class BearingScenes {
scene.world().rotateSection(plank, 0, 90, 0, 33); scene.world().rotateSection(plank, 0, 90, 0, 33);
scene.idle(40); scene.idle(40);
input = scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.NORTH), Pointing.RIGHT, 30)
new InputWindowElement(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.NORTH), Pointing.RIGHT) .withItem(new ItemStack(Items.SHEARS));
.withItem(new ItemStack(Items.SHEARS));
scene.overlay().showControls(input, 30);
scene.idle(7); scene.idle(7);
scene.world().setBlock(util.grid().at(3, 3, 2), AllBlocks.SAIL_FRAME.getDefaultState() scene.world().setBlock(util.grid().at(3, 3, 2), AllBlocks.SAIL_FRAME.getDefaultState()
.setValue(SailBlock.FACING, Direction.NORTH), false); .setValue(SailBlock.FACING, Direction.NORTH), false);
@ -743,7 +731,8 @@ public class BearingScenes {
.pointAt(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.WEST)) .pointAt(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.WEST))
.placeNearTarget(); .placeNearTarget();
scene.idle(20); scene.idle(20);
scene.overlay().showControls(input, 30); scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.NORTH), Pointing.RIGHT, 30)
.withItem(new ItemStack(Items.SHEARS));
scene.idle(7); scene.idle(7);
scene.world().replaceBlocks(util.select().fromTo(3, 2, 2, 3, 4, 2), AllBlocks.SAIL_FRAME.getDefaultState() scene.world().replaceBlocks(util.select().fromTo(3, 2, 2, 3, 4, 2), AllBlocks.SAIL_FRAME.getDefaultState()
.setValue(SailBlock.FACING, Direction.NORTH), false); .setValue(SailBlock.FACING, Direction.NORTH), false);

View file

@ -18,15 +18,15 @@ import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.NBTHelper; import net.createmod.catnip.utility.NBTHelper;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.EntityElement;
import net.createmod.ponder.api.element.ParrotElement;
import net.createmod.ponder.api.element.ParrotPose;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.EntityElement;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.ParrotElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.core.Direction.Axis; import net.minecraft.core.Direction.Axis;
@ -66,16 +66,16 @@ public class BeltScenes {
.getShape(null, null) .getShape(null, null)
.bounds(); .bounds();
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(backEnd), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(backEnd), Pointing.DOWN, 57).rightClick()
.withItem(beltItem), 57); .withItem(beltItem);
scene.idle(7); scene.idle(7);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, backEnd, shaftBB.move(backEnd), 42); scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, backEnd, shaftBB.move(backEnd), 42);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.BLACK, backEndCenter, connectBB, 50); scene.overlay().chaseBoundingBoxOutline(PonderPalette.BLACK, backEndCenter, connectBB, 50);
scene.idle(20); scene.idle(20);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(frontEnd), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(frontEnd), Pointing.DOWN, 37).rightClick()
.withItem(beltItem), 37); .withItem(beltItem);
scene.idle(7); scene.idle(7);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, frontEnd, shaftBB.move(frontEnd), 17); scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, frontEnd, shaftBB.move(frontEnd), 17);
@ -95,8 +95,8 @@ public class BeltScenes {
scene.idle(90); scene.idle(90);
Vec3 falseSelection = util.vector().topOf(backEnd.south(1)); Vec3 falseSelection = util.vector().topOf(backEnd.south(1));
scene.overlay().showControls(new InputWindowElement(falseSelection, Pointing.DOWN).rightClick() scene.overlay().showControls(falseSelection, Pointing.DOWN, 37).rightClick()
.withItem(beltItem), 37); .withItem(beltItem);
scene.idle(7); scene.idle(7);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.RED, backEnd, shaftBB.move(backEnd.south(1)), 50); scene.overlay().chaseBoundingBoxOutline(PonderPalette.RED, backEnd, shaftBB.move(backEnd.south(1)), 50);
@ -108,14 +108,14 @@ public class BeltScenes {
.pointAt(util.vector().centerOf(backEnd.south(1))); .pointAt(util.vector().centerOf(backEnd.south(1)));
scene.idle(43); scene.idle(43);
scene.overlay().showControls(new InputWindowElement(falseSelection, Pointing.DOWN).rightClick() scene.overlay().showControls(falseSelection, Pointing.DOWN, 20).rightClick()
.withItem(beltItem) .withItem(beltItem)
.whileSneaking(), 20); .whileSneaking();
scene.idle(60); scene.idle(60);
BlockPos shaftLocation = frontEnd.east(); BlockPos shaftLocation = frontEnd.east();
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(shaftLocation), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(shaftLocation), Pointing.DOWN, 50).rightClick()
.withItem(AllBlocks.SHAFT.asStack()), 50); .withItem(AllBlocks.SHAFT.asStack());
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(shaftLocation, s -> s.setValue(BeltBlock.PART, BeltPart.PULLEY), true); scene.world().modifyBlock(shaftLocation, s -> s.setValue(BeltBlock.PART, BeltPart.PULLEY), true);
scene.idle(10); scene.idle(10);
@ -144,8 +144,8 @@ public class BeltScenes {
scene.world().hideSection(attachedShafts, Direction.NORTH); scene.world().hideSection(attachedShafts, Direction.NORTH);
scene.idle(20); scene.idle(20);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(shaftLocation), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(shaftLocation), Pointing.DOWN, 50).rightClick()
.withItem(AllItems.WRENCH.asStack()), 50); .withItem(AllItems.WRENCH.asStack());
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(shaftLocation, s -> s.setValue(BeltBlock.PART, BeltPart.MIDDLE), true); scene.world().modifyBlock(shaftLocation, s -> s.setValue(BeltBlock.PART, BeltPart.MIDDLE), true);
scene.idle(10); scene.idle(10);
@ -156,9 +156,8 @@ public class BeltScenes {
.pointAt(util.vector().blockSurface(shaftLocation, Direction.NORTH)); .pointAt(util.vector().blockSurface(shaftLocation, Direction.NORTH));
scene.idle(70); scene.idle(70);
scene.overlay() scene.overlay().showControls(util.vector().topOf(shaftLocation.east()), Pointing.DOWN, 50).rightClick()
.showControls(new InputWindowElement(util.vector().topOf(shaftLocation.east()), Pointing.DOWN).rightClick() .withItem(new ItemStack(Items.BLUE_DYE));
.withItem(new ItemStack(Items.BLUE_DYE)), 50);
scene.idle(7); scene.idle(7);
scene.world().modifyBlockEntityNBT(util.select().fromTo(0, 1, 2, 4, 1, 2), BeltBlockEntity.class, scene.world().modifyBlockEntityNBT(util.select().fromTo(0, 1, 2, 4, 1, 2), BeltBlockEntity.class,
nbt -> NBTHelper.writeEnum(nbt, "Dye", DyeColor.BLUE)); nbt -> NBTHelper.writeEnum(nbt, "Dye", DyeColor.BLUE));
@ -348,7 +347,7 @@ public class BeltScenes {
scene.idle(20); scene.idle(20);
ElementLink<ParrotElement> parrot = scene.special().createBirb(util.vector().topOf(0, 1, 2) ElementLink<ParrotElement> parrot = scene.special().createBirb(util.vector().topOf(0, 1, 2)
.add(0, -3 / 16f, 0), ParrotElement.FacePointOfInterestPose::new); .add(0, -3 / 16f, 0), ParrotPose.FacePointOfInterestPose::new);
scene.special().moveParrot(parrot, util.vector().of(1.78, 0, 0), 40); scene.special().moveParrot(parrot, util.vector().of(1.78, 0, 0), 40);
scene.special().movePointOfInterest(util.grid().at(1, 1, 3)); scene.special().movePointOfInterest(util.grid().at(1, 1, 3));
@ -383,7 +382,7 @@ public class BeltScenes {
Vec3 topOf = util.vector().topOf(util.grid().at(3, 2, 2)) Vec3 topOf = util.vector().topOf(util.grid().at(3, 2, 2))
.add(-0.1, 0.3, 0); .add(-0.1, 0.3, 0);
scene.overlay().showControls(new InputWindowElement(topOf, Pointing.DOWN).rightClick(), 60); scene.overlay().showControls(topOf, Pointing.DOWN, 60).rightClick();
scene.idle(10); scene.idle(10);
scene.overlay().showText(60) scene.overlay().showText(60)
.placeNearTarget() .placeNearTarget()
@ -395,7 +394,7 @@ public class BeltScenes {
scene.effects().indicateSuccess(util.grid().at(3, 2, 2)); scene.effects().indicateSuccess(util.grid().at(3, 2, 2));
scene.idle(20); scene.idle(20);
scene.special().changeBirbPose(parrot, ParrotElement.FaceCursorPose::new); scene.special().changeBirbPose(parrot, ParrotPose.FaceCursorPose::new);
} }
public static void beltsCanBeEncased(SceneBuilder builder, SceneBuildingUtil util) { public static void beltsCanBeEncased(SceneBuilder builder, SceneBuildingUtil util) {
@ -415,14 +414,14 @@ public class BeltScenes {
BlockPos beltPos2 = util.grid().at(0, 2, 3); BlockPos beltPos2 = util.grid().at(0, 2, 3);
BlockPos beltPos3 = util.grid().at(1, 4, 4); BlockPos beltPos3 = util.grid().at(1, 4, 4);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(beltPos), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(beltPos), Pointing.DOWN, 20).rightClick()
.withItem(brassCasingItem), 20); .withItem(brassCasingItem);
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(beltPos, s -> s.setValue(BeltBlock.CASING, true), true); scene.world().modifyBlock(beltPos, s -> s.setValue(BeltBlock.CASING, true), true);
scene.idle(20); scene.idle(20);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(beltPos2), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(beltPos2), Pointing.DOWN, 20).rightClick()
.withItem(andesiteCasingItem), 20); .withItem(andesiteCasingItem);
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(beltPos2, s -> s.setValue(BeltBlock.CASING, true), true); scene.world().modifyBlock(beltPos2, s -> s.setValue(BeltBlock.CASING, true), true);
scene.world().modifyBlockEntityNBT(util.select().position(beltPos2), BeltBlockEntity.class, nbt -> { scene.world().modifyBlockEntityNBT(util.select().position(beltPos2), BeltBlockEntity.class, nbt -> {
@ -430,10 +429,8 @@ public class BeltScenes {
}); });
scene.idle(20); scene.idle(20);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(beltPos3, Direction.EAST), Pointing.RIGHT, 20).rightClick()
new InputWindowElement(util.vector().blockSurface(beltPos3, Direction.EAST), Pointing.RIGHT).rightClick() .withItem(brassCasingItem);
.withItem(brassCasingItem),
20);
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(beltPos3, s -> s.setValue(BeltBlock.CASING, true), true); scene.world().modifyBlock(beltPos3, s -> s.setValue(BeltBlock.CASING, true), true);
scene.idle(20); scene.idle(20);
@ -473,9 +470,8 @@ public class BeltScenes {
scene.idle(30); scene.idle(30);
scene.addKeyframe(); scene.addKeyframe();
scene.overlay() scene.overlay().showControls(util.vector().topOf(beltPos.south()), Pointing.DOWN, 40).rightClick()
.showControls(new InputWindowElement(util.vector().topOf(beltPos.south()), Pointing.DOWN).rightClick() .withItem(AllItems.WRENCH.asStack());
.withItem(AllItems.WRENCH.asStack()), 40);
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(beltPos.south(), s -> s.setValue(BeltBlock.CASING, false), true); scene.world().modifyBlock(beltPos.south(), s -> s.setValue(BeltBlock.CASING, false), true);
scene.overlay().showText(80) scene.overlay().showText(80)
@ -502,8 +498,8 @@ public class BeltScenes {
.pointAt(topOf); .pointAt(topOf);
scene.idle(70); scene.idle(70);
scene.overlay().showControls(new InputWindowElement(topOf, Pointing.DOWN).rightClick() scene.overlay().showControls(topOf, Pointing.DOWN, 20).rightClick()
.withItem(new ItemStack(Items.COPPER_BLOCK)), 20); .withItem(new ItemStack(Items.COPPER_BLOCK));
scene.idle(7); scene.idle(7);
scene.world().createItemOnBeltLike(depotPos, Direction.NORTH, new ItemStack(Items.COPPER_BLOCK)); scene.world().createItemOnBeltLike(depotPos, Direction.NORTH, new ItemStack(Items.COPPER_BLOCK));
scene.idle(10); scene.idle(10);
@ -514,7 +510,7 @@ public class BeltScenes {
.pointAt(topOf); .pointAt(topOf);
scene.idle(80); scene.idle(80);
scene.overlay().showControls(new InputWindowElement(topOf, Pointing.DOWN).rightClick(), 20); scene.overlay().showControls(topOf, Pointing.DOWN, 20).rightClick();
scene.idle(7); scene.idle(7);
scene.world().removeItemsFromBelt(depotPos); scene.world().removeItemsFromBelt(depotPos);
scene.effects().indicateSuccess(depotPos); scene.effects().indicateSuccess(depotPos);

View file

@ -7,16 +7,15 @@ import com.simibubi.create.content.contraptions.mounted.CartAssemblerBlock;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.ParticleEmitter;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.EntityElement;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.EntityElement;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.MinecartElement; import net.createmod.ponder.foundation.element.MinecartElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.createmod.ponder.foundation.instruction.EmitParticlesInstruction.Emitter;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.core.particles.ParticleTypes; import net.minecraft.core.particles.ParticleTypes;
@ -52,9 +51,8 @@ public class CartAssemblerScenes {
scene.idle(10); scene.idle(10);
scene.overlay() scene.overlay().showControls(util.vector().centerOf(assemblerPos), Pointing.DOWN, 30).rightClick()
.showControls(new InputWindowElement(util.vector().centerOf(assemblerPos), Pointing.DOWN).rightClick() .withItem(AllBlocks.CART_ASSEMBLER.asStack());
.withItem(AllBlocks.CART_ASSEMBLER.asStack()), 30);
scene.idle(7); scene.idle(7);
scene.world().setBlock(assemblerPos, AllBlocks.CART_ASSEMBLER.getDefaultState() scene.world().setBlock(assemblerPos, AllBlocks.CART_ASSEMBLER.getDefaultState()
.setValue(CartAssemblerBlock.RAIL_SHAPE, RailShape.NORTH_SOUTH) .setValue(CartAssemblerBlock.RAIL_SHAPE, RailShape.NORTH_SOUTH)
@ -126,8 +124,8 @@ public class CartAssemblerScenes {
scene.overlay().showOutline(PonderPalette.GREEN, "glue", util.select().position(1, 3, 2) scene.overlay().showOutline(PonderPalette.GREEN, "glue", util.select().position(1, 3, 2)
.add(util.select().fromTo(3, 2, 2, 1, 2, 2)) .add(util.select().fromTo(3, 2, 2, 1, 2, 2))
.add(util.select().position(3, 2, 1)), 40); .add(util.select().position(3, 2, 1)), 40);
scene.overlay().showControls(new InputWindowElement(util.vector().centerOf(util.grid().at(3, 2, 2)), Pointing.RIGHT) scene.overlay().showControls(util.vector().centerOf(util.grid().at(3, 2, 2)), Pointing.RIGHT, 40)
.withItem(AllItems.SUPER_GLUE.asStack()), 40); .withItem(AllItems.SUPER_GLUE.asStack());
scene.effects().superGlue(util.grid().at(3, 2, 1), Direction.SOUTH, true); scene.effects().superGlue(util.grid().at(3, 2, 1), Direction.SOUTH, true);
scene.overlay().showText(80) scene.overlay().showText(80)
@ -149,8 +147,8 @@ public class CartAssemblerScenes {
scene.idle(25); scene.idle(25);
Vec3 cartCenter = util.vector().centerOf(assemblerPos.north(2)); Vec3 cartCenter = util.vector().centerOf(assemblerPos.north(2));
scene.overlay().showControls(new InputWindowElement(cartCenter, Pointing.LEFT).rightClick() scene.overlay().showControls(cartCenter, Pointing.LEFT, 40).rightClick()
.withItem(AllItems.WRENCH.asStack()), 40); .withItem(AllItems.WRENCH.asStack());
scene.idle(7); scene.idle(7);
scene.special().moveCart(cart, util.vector().of(0, -100, 4), 0); scene.special().moveCart(cart, util.vector().of(0, -100, 4), 0);
scene.world().moveSection(anchor, util.vector().of(0, -100, 4), 0); scene.world().moveSection(anchor, util.vector().of(0, -100, 4), 0);
@ -167,8 +165,8 @@ public class CartAssemblerScenes {
scene.idle(80); scene.idle(80);
scene.world().modifyEntity(itemEntity, Entity::discard); scene.world().modifyEntity(itemEntity, Entity::discard);
scene.overlay().showControls(new InputWindowElement(cartCenter.add(0, 0, 4), Pointing.DOWN).rightClick() scene.overlay().showControls(cartCenter.add(0, 0, 4), Pointing.DOWN, 20).rightClick()
.withItem(asStack), 20); .withItem(asStack);
scene.idle(20); scene.idle(20);
scene.special().moveCart(cart, util.vector().of(0, 100.5, 0), 0); scene.special().moveCart(cart, util.vector().of(0, 100.5, 0), 0);
scene.world().moveSection(anchor, util.vector().of(0, 100.5, 0), 0); scene.world().moveSection(anchor, util.vector().of(0, 100.5, 0), 0);
@ -261,7 +259,7 @@ public class CartAssemblerScenes {
Vec3 blockSurface = util.vector().blockSurface(assemblerPos, Direction.NORTH) Vec3 blockSurface = util.vector().blockSurface(assemblerPos, Direction.NORTH)
.add(0, -1 / 16f, -2 / 16f); .add(0, -1 / 16f, -2 / 16f);
scene.overlay().showFilterSlotInput(blockSurface, Direction.NORTH, 60); scene.overlay().showFilterSlotInput(blockSurface, Direction.NORTH, 60);
scene.overlay().showControls(new InputWindowElement(blockSurface, Pointing.DOWN).rightClick(), 60); scene.overlay().showControls(blockSurface, Pointing.DOWN, 60).rightClick();
scene.idle(10); scene.idle(10);
scene.overlay().showText(60) scene.overlay().showText(60)
.pointAt(util.vector().of(3, 1.5, 3)) .pointAt(util.vector().of(3, 1.5, 3))
@ -344,7 +342,7 @@ public class CartAssemblerScenes {
ElementLink<WorldSectionElement> contraption = scene.world().showIndependentSection(chassis, Direction.DOWN); ElementLink<WorldSectionElement> contraption = scene.world().showIndependentSection(chassis, Direction.DOWN);
scene.idle(15); scene.idle(15);
scene.overlay().showOutline(PonderPalette.GREEN, new Object(), util.select().position(assembler2), 60); scene.overlay().showOutline(PonderPalette.GREEN, new Object(), util.select().position(assembler2), 60);
scene.overlay().showSelectionWithText(util.select().position(assembler1), 60) scene.overlay().showOutlineWithText(util.select().position(assembler1), 60)
.colored(PonderPalette.GREEN) .colored(PonderPalette.GREEN)
.pointAt(util.vector().blockSurface(util.grid().at(2, 2, 4), Direction.NORTH)) .pointAt(util.vector().blockSurface(util.grid().at(2, 2, 4), Direction.NORTH))
.placeNearTarget() .placeNearTarget()
@ -464,8 +462,8 @@ public class CartAssemblerScenes {
scene.world().moveSection(anchor, util.vector().of(0, -3, 0), 0); scene.world().moveSection(anchor, util.vector().of(0, -3, 0), 0);
scene.idle(30); scene.idle(30);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(assembler), Pointing.DOWN) scene.overlay().showControls(util.vector().topOf(assembler), Pointing.DOWN, 50)
.withItem(new ItemStack(Items.POWERED_RAIL)), 50); .withItem(new ItemStack(Items.POWERED_RAIL));
scene.idle(7); scene.idle(7);
scene.world().setBlock(assembler, AllBlocks.CART_ASSEMBLER.getDefaultState() scene.world().setBlock(assembler, AllBlocks.CART_ASSEMBLER.getDefaultState()
.setValue(CartAssemblerBlock.RAIL_SHAPE, RailShape.EAST_WEST) .setValue(CartAssemblerBlock.RAIL_SHAPE, RailShape.EAST_WEST)
@ -520,8 +518,8 @@ public class CartAssemblerScenes {
scene.world().glueBlockOnto(assembler.above(2), Direction.DOWN, contraption); scene.world().glueBlockOnto(assembler.above(2), Direction.DOWN, contraption);
scene.idle(15); scene.idle(15);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(assembler.above()), Pointing.UP) scene.overlay().showControls(util.vector().topOf(assembler.above()), Pointing.UP, 40)
.withItem(new ItemStack(Items.CHARCOAL)), 40); .withItem(new ItemStack(Items.CHARCOAL));
scene.idle(7); scene.idle(7);
scene.overlay().showText(80) scene.overlay().showText(80)
.pointAt(util.vector().blockSurface(assembler.above(2), Direction.WEST)) .pointAt(util.vector().blockSurface(assembler.above(2), Direction.WEST))
@ -529,7 +527,7 @@ public class CartAssemblerScenes {
.text("Furnace Carts will keep themselves powered, pulling fuel from any attached inventories"); .text("Furnace Carts will keep themselves powered, pulling fuel from any attached inventories");
scene.idle(85); scene.idle(85);
Emitter smoke = Emitter.simple(ParticleTypes.LARGE_SMOKE, util.vector().of(0, 0, 0)); ParticleEmitter smoke = scene.effects().simpleParticleEmitter(ParticleTypes.LARGE_SMOKE, util.vector().of(0, 0, 0));
scene.special().moveCart(cart, util.vector().of(-5, 0, 0), 50); scene.special().moveCart(cart, util.vector().of(-5, 0, 0), 50);
scene.idle(20); scene.idle(20);

View file

@ -6,14 +6,13 @@ import com.simibubi.create.content.redstone.analogLever.AnalogLeverBlockEntity;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.TextElementBuilder;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.TextWindowElement.Builder;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.core.Direction.Axis; import net.minecraft.core.Direction.Axis;
@ -78,8 +77,8 @@ public class ChainDriveScenes {
scene.idle(25); scene.idle(25);
scene.addKeyframe(); scene.addKeyframe();
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(rotatedECD), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(rotatedECD), Pointing.DOWN, 30).rightClick()
.withItem(AllItems.WRENCH.asStack()), 30); .withItem(AllItems.WRENCH.asStack());
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(rotatedECD, s -> s.setValue(ChainDriveBlock.AXIS, Axis.Y), true); scene.world().modifyBlock(rotatedECD, s -> s.setValue(ChainDriveBlock.AXIS, Axis.Y), true);
scene.idle(40); scene.idle(40);
@ -240,9 +239,7 @@ public class ChainDriveScenes {
scene.world().showSection(util.select().fromTo(analogPos, analogPos.south()), Direction.DOWN); scene.world().showSection(util.select().fromTo(analogPos, analogPos.south()), Direction.DOWN);
scene.idle(15); scene.idle(15);
scene.world().modifyBlockEntityNBT(util.select().position(analogPos), AnalogLeverBlockEntity.class, nbt -> { scene.world().modifyBlockEntityNBT(util.select().position(analogPos), AnalogLeverBlockEntity.class, nbt -> nbt.putInt("State", 8));
nbt.putInt("State", 8);
});
scene.world().modifyBlock(analogPos.south(), s -> s.setValue(RedStoneWireBlock.POWER, 8), false); scene.world().modifyBlock(analogPos.south(), s -> s.setValue(RedStoneWireBlock.POWER, 8), false);
scene.world().toggleRedstonePower(util.select().position(1, 1, 4)); scene.world().toggleRedstonePower(util.select().position(1, 1, 4));
scene.world().modifyKineticSpeed(util.select().position(westGauge), f -> .75f * f); scene.world().modifyKineticSpeed(util.select().position(westGauge), f -> .75f * f);
@ -259,7 +256,7 @@ public class ChainDriveScenes {
for (BlockPos gauge : new BlockPos[] { eastGauge, middleGauge, westGauge }) { for (BlockPos gauge : new BlockPos[] { eastGauge, middleGauge, westGauge }) {
scene.idle(5); scene.idle(5);
Builder textBuilder = scene.overlay().showText(180) TextElementBuilder textBuilder = scene.overlay().showText(180)
.colored(gauge == westGauge ? PonderPalette.SLOW : PonderPalette.MEDIUM) .colored(gauge == westGauge ? PonderPalette.SLOW : PonderPalette.MEDIUM)
.placeNearTarget() .placeNearTarget()
.pointAt(util.vector().blockSurface(gauge, Direction.NORTH)); .pointAt(util.vector().blockSurface(gauge, Direction.NORTH));

View file

@ -8,13 +8,12 @@ import com.simibubi.create.content.contraptions.chassis.RadialChassisBlock;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
@ -80,7 +79,7 @@ public class ChassisScenes {
scene.world().showSection(wrong1, Direction.DOWN); scene.world().showSection(wrong1, Direction.DOWN);
scene.idle(10); scene.idle(10);
scene.overlay().showOutline(PonderPalette.RED, wrong2, wrong2, 80); scene.overlay().showOutline(PonderPalette.RED, wrong2, wrong2, 80);
scene.overlay().showSelectionWithText(wrong1, 80) scene.overlay().showOutlineWithText(wrong1, 80)
.colored(PonderPalette.RED) .colored(PonderPalette.RED)
.placeNearTarget() .placeNearTarget()
.text("Chassis of a different type or facing another direction will not attach"); .text("Chassis of a different type or facing another direction will not attach");
@ -106,10 +105,8 @@ public class ChassisScenes {
scene.world().showSection(chassis, Direction.DOWN); scene.world().showSection(chassis, Direction.DOWN);
scene.idle(10); scene.idle(10);
InputWindowElement input = scene.overlay().showControls(util.vector().blockSurface(chassisPos, Direction.WEST), Pointing.LEFT, 30).rightClick()
new InputWindowElement(util.vector().blockSurface(chassisPos, Direction.WEST), Pointing.LEFT).rightClick() .withItem(new ItemStack(Items.SLIME_BALL));
.withItem(new ItemStack(Items.SLIME_BALL));
scene.overlay().showControls(input, 30);
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(chassisPos, s -> s.setValue(LinearChassisBlock.STICKY_BOTTOM, true), false); scene.world().modifyBlock(chassisPos, s -> s.setValue(LinearChassisBlock.STICKY_BOTTOM, true), false);
scene.effects().superGlue(chassisPos, Direction.WEST, false); scene.effects().superGlue(chassisPos, Direction.WEST, false);
@ -121,7 +118,8 @@ public class ChassisScenes {
.pointAt(util.vector().blockSurface(chassisPos, Direction.WEST)); .pointAt(util.vector().blockSurface(chassisPos, Direction.WEST));
scene.idle(70); scene.idle(70);
scene.overlay().showControls(input, 15); scene.overlay().showControls(util.vector().blockSurface(chassisPos, Direction.WEST), Pointing.LEFT, 15).rightClick()
.withItem(new ItemStack(Items.SLIME_BALL));
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(chassisPos, s -> s.setValue(LinearChassisBlock.STICKY_TOP, true), false); scene.world().modifyBlock(chassisPos, s -> s.setValue(LinearChassisBlock.STICKY_TOP, true), false);
scene.effects().superGlue(chassisPos, Direction.EAST, false); scene.effects().superGlue(chassisPos, Direction.EAST, false);
@ -137,10 +135,8 @@ public class ChassisScenes {
scene.rotateCameraY(-60); scene.rotateCameraY(-60);
scene.idle(25); scene.idle(25);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(chassisPos, Direction.WEST), Pointing.LEFT, 30).rightClick()
new InputWindowElement(util.vector().blockSurface(chassisPos, Direction.WEST), Pointing.LEFT).rightClick() .whileSneaking();
.whileSneaking(),
30);
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(chassisPos, s -> s.setValue(LinearChassisBlock.STICKY_BOTTOM, false), false); scene.world().modifyBlock(chassisPos, s -> s.setValue(LinearChassisBlock.STICKY_BOTTOM, false), false);
scene.effects().superGlue(chassisPos, Direction.WEST, false); scene.effects().superGlue(chassisPos, Direction.WEST, false);
@ -170,7 +166,7 @@ public class ChassisScenes {
Selection column2 = util.select().fromTo(2, 3, 2, 2, 4, 2); Selection column2 = util.select().fromTo(2, 3, 2, 2, 4, 2);
Selection column3 = util.select().fromTo(2, 3, 2, 2, 5, 2); Selection column3 = util.select().fromTo(2, 3, 2, 2, 5, 2);
scene.overlay().showSelectionWithText(column3, 80) scene.overlay().showOutlineWithText(column3, 80)
.colored(PonderPalette.GREEN) .colored(PonderPalette.GREEN)
.text("Stickied faces of the Linear Chassis will attach a line of blocks in front of it") .text("Stickied faces of the Linear Chassis will attach a line of blocks in front of it")
.placeNearTarget(); .placeNearTarget();
@ -185,8 +181,8 @@ public class ChassisScenes {
Vec3 blockSurface = util.vector().blockSurface(chassisPos, Direction.NORTH); Vec3 blockSurface = util.vector().blockSurface(chassisPos, Direction.NORTH);
scene.overlay().showCenteredScrollInput(chassisPos, Direction.NORTH, 50); scene.overlay().showCenteredScrollInput(chassisPos, Direction.NORTH, 50);
scene.overlay().showControls(new InputWindowElement(blockSurface, Pointing.UP).rightClick() scene.overlay().showControls(blockSurface, Pointing.UP, 50).rightClick()
.withItem(AllItems.WRENCH.asStack()), 50); .withItem(AllItems.WRENCH.asStack());
scene.idle(10); scene.idle(10);
scene.overlay().showOutline(PonderPalette.WHITE, chassis, column3, 20); scene.overlay().showOutline(PonderPalette.WHITE, chassis, column3, 20);
@ -217,9 +213,9 @@ public class ChassisScenes {
scene.idle(20); scene.idle(20);
scene.overlay().showCenteredScrollInput(chassisPos, Direction.NORTH, 50); scene.overlay().showCenteredScrollInput(chassisPos, Direction.NORTH, 50);
scene.overlay().showControls(new InputWindowElement(blockSurface, Pointing.UP).whileCTRL() scene.overlay().showControls(blockSurface, Pointing.UP, 50).whileCTRL()
.rightClick() .rightClick()
.withItem(AllItems.WRENCH.asStack()), 50); .withItem(AllItems.WRENCH.asStack());
column1 = util.select().fromTo(1, 3, 2, 3, 3, 2); column1 = util.select().fromTo(1, 3, 2, 3, 3, 2);
column2 = util.select().fromTo(1, 3, 2, 3, 4, 2); column2 = util.select().fromTo(1, 3, 2, 3, 4, 2);
@ -253,8 +249,8 @@ public class ChassisScenes {
.text("Attaching blocks to any other side requires the use of Super Glue") .text("Attaching blocks to any other side requires the use of Super Glue")
.placeNearTarget(); .placeNearTarget();
scene.idle(90); scene.idle(90);
scene.overlay().showControls(new InputWindowElement(glueSurface, Pointing.DOWN).rightClick() scene.overlay().showControls(glueSurface, Pointing.DOWN, 30).rightClick()
.withItem(AllItems.SUPER_GLUE.asStack()), 30); .withItem(AllItems.SUPER_GLUE.asStack());
scene.idle(7); scene.idle(7);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, glueSurface, scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, glueSurface,
new AABB(util.grid().at(1, 2, 2)).expandTowards(0, 0, -1), 40); new AABB(util.grid().at(1, 2, 2)).expandTowards(0, 0, -1), 40);
@ -340,10 +336,8 @@ public class ChassisScenes {
scene.idle(15); scene.idle(15);
scene.addKeyframe(); scene.addKeyframe();
InputWindowElement input = scene.overlay().showControls(util.vector().blockSurface(chassisPos, Direction.WEST), Pointing.LEFT, 30).rightClick()
new InputWindowElement(util.vector().blockSurface(chassisPos, Direction.WEST), Pointing.LEFT).rightClick() .withItem(new ItemStack(Items.SLIME_BALL));
.withItem(new ItemStack(Items.SLIME_BALL));
scene.overlay().showControls(input, 30);
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(chassisPos, s -> s.setValue(RadialChassisBlock.STICKY_WEST, true), false); scene.world().modifyBlock(chassisPos, s -> s.setValue(RadialChassisBlock.STICKY_WEST, true), false);
scene.effects().superGlue(chassisPos, Direction.WEST, false); scene.effects().superGlue(chassisPos, Direction.WEST, false);
@ -355,7 +349,8 @@ public class ChassisScenes {
.pointAt(util.vector().blockSurface(chassisPos, Direction.WEST)); .pointAt(util.vector().blockSurface(chassisPos, Direction.WEST));
scene.idle(70); scene.idle(70);
scene.overlay().showControls(input, 15); scene.overlay().showControls(util.vector().blockSurface(chassisPos, Direction.WEST), Pointing.LEFT, 15).rightClick()
.withItem(new ItemStack(Items.SLIME_BALL));
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(chassisPos, s -> s.setValue(RadialChassisBlock.STICKY_EAST, true) scene.world().modifyBlock(chassisPos, s -> s.setValue(RadialChassisBlock.STICKY_EAST, true)
.setValue(RadialChassisBlock.STICKY_NORTH, true) .setValue(RadialChassisBlock.STICKY_NORTH, true)
@ -375,10 +370,8 @@ public class ChassisScenes {
scene.rotateCameraY(-60); scene.rotateCameraY(-60);
scene.idle(25); scene.idle(25);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(chassisPos, Direction.WEST), Pointing.LEFT, 30).rightClick()
new InputWindowElement(util.vector().blockSurface(chassisPos, Direction.WEST), Pointing.LEFT).rightClick() .whileSneaking();
.whileSneaking(),
30);
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(chassisPos, s -> s.setValue(RadialChassisBlock.STICKY_WEST, false), false); scene.world().modifyBlock(chassisPos, s -> s.setValue(RadialChassisBlock.STICKY_WEST, false), false);
scene.effects().superGlue(chassisPos, Direction.WEST, false); scene.effects().superGlue(chassisPos, Direction.WEST, false);
@ -431,7 +424,7 @@ public class ChassisScenes {
obj.setValue(add); obj.setValue(add);
}); });
scene.overlay().showSelectionWithText(obj.getValue(), 60) scene.overlay().showOutlineWithText(obj.getValue(), 60)
.colored(PonderPalette.GREEN) .colored(PonderPalette.GREEN)
.text("...it will attach all reachable blocks within a radius on that layer"); .text("...it will attach all reachable blocks within a radius on that layer");
scene.idle(70); scene.idle(70);
@ -445,8 +438,8 @@ public class ChassisScenes {
scene.addKeyframe(); scene.addKeyframe();
blockSurface = util.vector().topOf(chassisPos); blockSurface = util.vector().topOf(chassisPos);
scene.overlay().showCenteredScrollInput(chassisPos, Direction.UP, 50); scene.overlay().showCenteredScrollInput(chassisPos, Direction.UP, 50);
scene.overlay().showControls(new InputWindowElement(blockSurface, Pointing.DOWN).rightClick() scene.overlay().showControls(blockSurface, Pointing.DOWN, 50).rightClick()
.withItem(AllItems.WRENCH.asStack()), 50); .withItem(AllItems.WRENCH.asStack());
scene.idle(10); scene.idle(10);
scene.overlay().showOutline(PonderPalette.WHITE, chassis, r2, 20); scene.overlay().showOutline(PonderPalette.WHITE, chassis, r2, 20);
@ -482,7 +475,7 @@ public class ChassisScenes {
scene.overlay().showOutline(PonderPalette.GREEN, r2, r2.copy() scene.overlay().showOutline(PonderPalette.GREEN, r2, r2.copy()
.substract(util.select().fromTo(0, 2, 0, 1, 2, 4)), 80); .substract(util.select().fromTo(0, 2, 0, 1, 2, 4)), 80);
scene.markAsFinished(); scene.markAsFinished();
scene.overlay().showSelectionWithText(ignored, 80) scene.overlay().showOutlineWithText(ignored, 80)
.colored(PonderPalette.RED) .colored(PonderPalette.RED)
.text("Blocks not reachable by any sticky face will not attach"); .text("Blocks not reachable by any sticky face will not attach");
} }
@ -519,19 +512,15 @@ public class ChassisScenes {
.pointAt(util.vector().topOf(util.grid().at(2, 1, 2))); .pointAt(util.vector().topOf(util.grid().at(2, 1, 2)));
scene.idle(70); scene.idle(70);
scene.overlay().showControls( scene.overlay().showControls(util.vector().topOf(2, 2, 3), Pointing.DOWN, 40).withItem(AllItems.SUPER_GLUE.asStack())
new InputWindowElement(util.vector().topOf(2, 2, 3), Pointing.DOWN).withItem(AllItems.SUPER_GLUE.asStack()) .rightClick();
.rightClick(),
40);
scene.idle(6); scene.idle(6);
scene.effects().indicateSuccess(util.grid().at(2, 2, 3)); scene.effects().indicateSuccess(util.grid().at(2, 2, 3));
scene.idle(45); scene.idle(45);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(1, 1, 2), Direction.DOWN), Pointing.UP, 40)
new InputWindowElement(util.vector().blockSurface(util.grid().at(1, 1, 2), Direction.DOWN), Pointing.UP)
.withItem(AllItems.SUPER_GLUE.asStack()) .withItem(AllItems.SUPER_GLUE.asStack())
.rightClick(), .rightClick();
40);
scene.idle(6); scene.idle(6);
AABB bb = new AABB(util.grid().at(2, 2, 3)); AABB bb = new AABB(util.grid().at(2, 2, 3));
@ -559,16 +548,14 @@ public class ChassisScenes {
.pointAt(util.vector().blockSurface(util.grid().at(3, 1, 1), Direction.WEST)); .pointAt(util.vector().blockSurface(util.grid().at(3, 1, 1), Direction.WEST));
scene.idle(40); scene.idle(40);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(3, 1, 1), Direction.UP), Pointing.DOWN, 40)
new InputWindowElement(util.vector().blockSurface(util.grid().at(3, 1, 1), Direction.UP), Pointing.DOWN)
.withItem(AllItems.SUPER_GLUE.asStack()) .withItem(AllItems.SUPER_GLUE.asStack())
.leftClick(), .leftClick();
40);
scene.idle(50); scene.idle(50);
Selection toMove = util.select().fromTo(1, 1, 2, 2, 1, 2) Selection toMove = util.select().fromTo(1, 1, 2, 2, 1, 2)
.add(util.select().fromTo(2, 2, 3, 2, 1, 3)); .add(util.select().fromTo(2, 2, 3, 2, 1, 3));
scene.overlay().showSelectionWithText(toMove, 70) scene.overlay().showOutlineWithText(toMove, 70)
.text("Adjacent blocks sharing an area will pull each other along") .text("Adjacent blocks sharing an area will pull each other along")
.placeNearTarget() .placeNearTarget()
.attachKeyFrame() .attachKeyFrame()

View file

@ -10,14 +10,13 @@ import com.simibubi.create.content.logistics.chute.SmartChuteBlockEntity;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.EntityElement;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.EntityElement;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
@ -62,11 +61,9 @@ public class ChuteScenes {
scene.world().moveSection(bottom, util.vector().of(1, 0, 0), 10); scene.world().moveSection(bottom, util.vector().of(1, 0, 0), 10);
scene.world().moveSection(top, util.vector().of(-1, 0, 0), 10); scene.world().moveSection(top, util.vector().of(-1, 0, 0), 10);
scene.idle(20); scene.idle(20);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 3, 2), Direction.NORTH), Pointing.RIGHT, 40)
new InputWindowElement(util.vector().blockSurface(util.grid().at(2, 3, 2), Direction.NORTH), Pointing.RIGHT)
.rightClick() .rightClick()
.withItem(AllItems.WRENCH.asStack()), .withItem(AllItems.WRENCH.asStack());
40);
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(util.grid().at(3, 3, 3), s -> s.setValue(ChuteBlock.SHAPE, ChuteBlock.Shape.WINDOW), scene.world().modifyBlock(util.grid().at(3, 3, 3), s -> s.setValue(ChuteBlock.SHAPE, ChuteBlock.Shape.WINDOW),
false); false);
@ -77,11 +74,9 @@ public class ChuteScenes {
.text("Using the Wrench, a window can be created"); .text("Using the Wrench, a window can be created");
scene.idle(60); scene.idle(60);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 2, 2), Direction.NORTH), Pointing.RIGHT, 40)
new InputWindowElement(util.vector().blockSurface(util.grid().at(2, 2, 2), Direction.NORTH), Pointing.RIGHT)
.rightClick() .rightClick()
.withItem(AllBlocks.INDUSTRIAL_IRON_BLOCK.asStack()), .withItem(AllBlocks.INDUSTRIAL_IRON_BLOCK.asStack());
40);
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(util.grid().at(3, 2, 3), s -> s.setValue(ChuteBlock.SHAPE, ChuteBlock.Shape.ENCASED), scene.world().modifyBlock(util.grid().at(3, 2, 3), s -> s.setValue(ChuteBlock.SHAPE, ChuteBlock.Shape.ENCASED),
false); false);
@ -108,21 +103,17 @@ public class ChuteScenes {
scene.world().showSection(util.select().fromTo(2, 1, 1, 2, 2, 1), Direction.DOWN); scene.world().showSection(util.select().fromTo(2, 1, 1, 2, 2, 1), Direction.DOWN);
scene.idle(30); scene.idle(30);
ItemStack chuteItem = AllBlocks.CHUTE.asStack(); ItemStack chuteItem = AllBlocks.CHUTE.asStack();
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 2, 1), Direction.SOUTH), Pointing.LEFT, 30)
new InputWindowElement(util.vector().blockSurface(util.grid().at(2, 2, 1), Direction.SOUTH), Pointing.LEFT)
.rightClick() .rightClick()
.withItem(chuteItem), .withItem(chuteItem);
30);
scene.idle(7); scene.idle(7);
scene.world().showSection(util.select().position(2, 3, 2), Direction.NORTH); scene.world().showSection(util.select().position(2, 3, 2), Direction.NORTH);
scene.world().restoreBlocks(util.select().position(2, 2, 1)); scene.world().restoreBlocks(util.select().position(2, 2, 1));
scene.idle(15); scene.idle(15);
scene.idle(20); scene.idle(20);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 3, 2), Direction.SOUTH), Pointing.LEFT, 30)
new InputWindowElement(util.vector().blockSurface(util.grid().at(2, 3, 2), Direction.SOUTH), Pointing.LEFT)
.rightClick() .rightClick()
.withItem(chuteItem), .withItem(chuteItem);
30);
scene.idle(7); scene.idle(7);
scene.world().showSection(util.select().position(2, 4, 3), Direction.NORTH); scene.world().showSection(util.select().position(2, 4, 3), Direction.NORTH);
scene.idle(10); scene.idle(10);
@ -154,10 +145,8 @@ public class ChuteScenes {
} }
scene.idle(10); scene.idle(10);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 1, 1), Direction.NORTH), Pointing.RIGHT, 50)
new InputWindowElement(util.vector().blockSurface(util.grid().at(2, 1, 1), Direction.NORTH), Pointing.RIGHT) .withItem(stack);
.withItem(stack),
50);
scene.markAsFinished(); scene.markAsFinished();
} }
@ -183,10 +172,8 @@ public class ChuteScenes {
.pointAt(surface) .pointAt(surface)
.placeNearTarget(); .placeNearTarget();
scene.idle(80); scene.idle(80);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(1, 2, 2), Direction.NORTH), Pointing.RIGHT, 50)
new InputWindowElement(util.vector().blockSurface(util.grid().at(1, 2, 2), Direction.NORTH), Pointing.RIGHT) .withItem(AllItems.GOGGLES.asStack());
.withItem(AllItems.GOGGLES.asStack()),
50);
scene.overlay().showText(70) scene.overlay().showText(70)
.text("Inspecting chutes with Engineers' Goggles reveals information about the movement direction") .text("Inspecting chutes with Engineers' Goggles reveals information about the movement direction")
.attachKeyFrame() .attachKeyFrame()
@ -250,8 +237,8 @@ public class ChuteScenes {
scene.idle(15); scene.idle(15);
ItemStack copper = new ItemStack(Items.IRON_INGOT); ItemStack copper = new ItemStack(Items.IRON_INGOT);
scene.overlay().showControls(new InputWindowElement(filter.add(0, 0.125, 0), Pointing.DOWN).rightClick() scene.overlay().showControls(filter.add(0, 0.125, 0), Pointing.DOWN, 40).rightClick()
.withItem(copper), 40); .withItem(copper);
scene.idle(7); scene.idle(7);
scene.world().setFilterData(util.select().position(smarty), SmartChuteBlockEntity.class, copper); scene.world().setFilterData(util.select().position(smarty), SmartChuteBlockEntity.class, copper);
@ -260,8 +247,7 @@ public class ChuteScenes {
scene.world().createItemOnBeltLike(util.grid().at(2, 2, 2), Direction.UP, copper); scene.world().createItemOnBeltLike(util.grid().at(2, 2, 2), Direction.UP, copper);
if (i == 8) { if (i == 8) {
scene.rotateCameraY(-20); scene.rotateCameraY(-20);
scene.overlay().showControls(new InputWindowElement(filter.add(0, 0.125, 0), Pointing.DOWN).rightClick(), scene.overlay().showControls(filter.add(0, 0.125, 0), Pointing.DOWN, 40).rightClick();
40);
scene.overlay().showText(50) scene.overlay().showText(50)
.text("Use the value panel to specify the extracted stack size") .text("Use the value panel to specify the extracted stack size")
.attachKeyFrame() .attachKeyFrame()

View file

@ -10,13 +10,12 @@ import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Couple; import net.createmod.catnip.utility.Couple;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.EntityElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.EntityElement;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
@ -58,11 +57,9 @@ public class CrafterScenes {
.placeNearTarget(); .placeNearTarget();
scene.idle(80); scene.idle(80);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 3, 2), Direction.NORTH), Pointing.RIGHT, 40)
new InputWindowElement(util.vector().blockSurface(util.grid().at(2, 3, 2), Direction.NORTH), Pointing.RIGHT)
.rightClick() .rightClick()
.withItem(AllItems.WRENCH.asStack()), .withItem(AllItems.WRENCH.asStack());
40);
scene.idle(7); scene.idle(7);
scene.world().cycleBlockProperty(util.grid().at(2, 3, 2), MechanicalCrafterBlock.POINTING); scene.world().cycleBlockProperty(util.grid().at(2, 3, 2), MechanicalCrafterBlock.POINTING);
scene.idle(10); scene.idle(10);
@ -76,10 +73,8 @@ public class CrafterScenes {
BlockPos[] positions = new BlockPos[] { util.grid().at(3, 1, 2), util.grid().at(2, 1, 2), util.grid().at(1, 1, 2) }; BlockPos[] positions = new BlockPos[] { util.grid().at(3, 1, 2), util.grid().at(2, 1, 2), util.grid().at(1, 1, 2) };
for (BlockPos pos : positions) { for (BlockPos pos : positions) {
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(pos, Direction.NORTH), Pointing.RIGHT, 10).rightClick()
new InputWindowElement(util.vector().blockSurface(pos, Direction.NORTH), Pointing.RIGHT).rightClick() .withItem(AllItems.WRENCH.asStack());
.withItem(AllItems.WRENCH.asStack()),
10);
scene.idle(7); scene.idle(7);
scene.world().cycleBlockProperty(pos, MechanicalCrafterBlock.POINTING); scene.world().cycleBlockProperty(pos, MechanicalCrafterBlock.POINTING);
scene.idle(15); scene.idle(15);
@ -145,11 +140,9 @@ public class CrafterScenes {
scene.idle(40); scene.idle(40);
ItemStack planks = new ItemStack(Items.OAK_PLANKS); ItemStack planks = new ItemStack(Items.OAK_PLANKS);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(1, 3, 2), Direction.NORTH), Pointing.RIGHT, 40)
new InputWindowElement(util.vector().blockSurface(util.grid().at(1, 3, 2), Direction.NORTH), Pointing.RIGHT)
.rightClick() .rightClick()
.withItem(planks), .withItem(planks);
40);
scene.idle(7); scene.idle(7);
Class<MechanicalCrafterBlockEntity> type = MechanicalCrafterBlockEntity.class; Class<MechanicalCrafterBlockEntity> type = MechanicalCrafterBlockEntity.class;
scene.world().modifyBlockEntity(util.grid().at(1, 3, 2), type, mct -> mct.getInventory() scene.world().modifyBlockEntity(util.grid().at(1, 3, 2), type, mct -> mct.getInventory()
@ -272,7 +265,7 @@ public class CrafterScenes {
scene.world().removeItemsFromBelt(util.grid().at(3, 1, 2)); scene.world().removeItemsFromBelt(util.grid().at(3, 1, 2));
scene.world().flapFunnel(util.grid().at(3, 2, 2), false); scene.world().flapFunnel(util.grid().at(3, 2, 2), false);
scene.overlay().showSelectionWithText(util.select().position(2, 2, 2), 70) scene.overlay().showOutlineWithText(util.select().position(2, 2, 2), 70)
.attachKeyFrame() .attachKeyFrame()
.placeNearTarget() .placeNearTarget()
.pointAt(util.vector().blockSurface(util.grid().at(2, 2, 2), Direction.NORTH)) .pointAt(util.vector().blockSurface(util.grid().at(2, 2, 2), Direction.NORTH))
@ -287,47 +280,46 @@ public class CrafterScenes {
v = v.add(0, 0, .5); v = v.add(0, 0, .5);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.WHITE, new Object(), bb, 45); scene.overlay().chaseBoundingBoxOutline(PonderPalette.WHITE, new Object(), bb, 45);
scene.overlay().showControls(new InputWindowElement(v, Pointing.LEFT).rightClick() scene.overlay().showControls(v, Pointing.LEFT, 40).rightClick()
.withItem(AllItems.WRENCH.asStack()), 40); .withItem(AllItems.WRENCH.asStack());
scene.idle(7); scene.idle(7);
scene.world().connectCrafterInvs(util.grid().at(2, 2, 2), util.grid().at(1, 2, 2)); scene.world().connectCrafterInvs(util.grid().at(2, 2, 2), util.grid().at(1, 2, 2));
scene.idle(40); scene.idle(40);
scene.overlay().showSelectionWithText(util.select().fromTo(2, 2, 2, 1, 2, 2), 70) scene.overlay().showOutlineWithText(util.select().fromTo(2, 2, 2, 1, 2, 2), 70)
.attachKeyFrame() .attachKeyFrame()
.placeNearTarget() .placeNearTarget()
.pointAt(v) .pointAt(v)
.text("Using the Wrench at their backs, Mechanical Crafter inputs can be combined"); .text("Using the Wrench at their backs, Mechanical Crafter inputs can be combined");
scene.idle(80); scene.idle(80);
scene.overlay().showControls(new InputWindowElement(v.add(0, 1, 0), Pointing.LEFT).rightClick() scene.overlay().showControls(v.add(0, 1, 0), Pointing.LEFT, 20).rightClick()
.withItem(AllItems.WRENCH.asStack()), 20); .withItem(AllItems.WRENCH.asStack());
scene.idle(7); scene.idle(7);
scene.world().connectCrafterInvs(util.grid().at(2, 3, 2), util.grid().at(1, 3, 2)); scene.world().connectCrafterInvs(util.grid().at(2, 3, 2), util.grid().at(1, 3, 2));
scene.idle(20); scene.idle(20);
scene.overlay().showControls(new InputWindowElement(v.add(0, -1, 0), Pointing.LEFT).rightClick() scene.overlay().showControls(v.add(0, -1, 0), Pointing.LEFT, 20).rightClick()
.withItem(AllItems.WRENCH.asStack()), 20); .withItem(AllItems.WRENCH.asStack());
scene.idle(7); scene.idle(7);
scene.world().connectCrafterInvs(util.grid().at(2, 1, 2), util.grid().at(1, 1, 2)); scene.world().connectCrafterInvs(util.grid().at(2, 1, 2), util.grid().at(1, 1, 2));
scene.idle(20); scene.idle(20);
scene.overlay().showControls(new InputWindowElement(v.add(.5, -.5, 0), Pointing.LEFT).rightClick() scene.overlay().showControls(v.add(.5, -.5, 0), Pointing.LEFT, 20).rightClick()
.withItem(AllItems.WRENCH.asStack()), 20); .withItem(AllItems.WRENCH.asStack());
scene.idle(7); scene.idle(7);
scene.world().connectCrafterInvs(util.grid().at(2, 1, 2), util.grid().at(2, 2, 2)); scene.world().connectCrafterInvs(util.grid().at(2, 1, 2), util.grid().at(2, 2, 2));
scene.idle(10); scene.idle(10);
scene.overlay().showControls(new InputWindowElement(v.add(.5, .5, 0), Pointing.LEFT).rightClick() scene.overlay().showControls(v.add(.5, .5, 0), Pointing.LEFT, 20).rightClick()
.withItem(AllItems.WRENCH.asStack()), 20); .withItem(AllItems.WRENCH.asStack());
scene.idle(7); scene.idle(7);
scene.world().connectCrafterInvs(util.grid().at(2, 2, 2), util.grid().at(2, 3, 2)); scene.world().connectCrafterInvs(util.grid().at(2, 2, 2), util.grid().at(2, 3, 2));
scene.idle(20); scene.idle(20);
scene.rotateCameraY(90 + 30); scene.rotateCameraY(90 + 30);
scene.idle(40); scene.idle(40);
scene.overlay().showSelectionWithText(util.select().fromTo(1, 1, 2, 2, 3, 2), 70) scene.overlay().showOutlineWithText(util.select().fromTo(1, 1, 2, 2, 3, 2), 70)
.attachKeyFrame() .attachKeyFrame()
.placeNearTarget() .placeNearTarget()
.text("All connected Crafters can now be accessed by the same input location"); .text("All connected Crafters can now be accessed by the same input location");
scene.idle(60); scene.idle(60);
scene.overlay().showControls( scene.overlay().showControls(util.vector().centerOf(util.grid().at(4, 2, 2)), Pointing.DOWN, 40).withItem(planks);
new InputWindowElement(util.vector().centerOf(util.grid().at(4, 2, 2)), Pointing.DOWN).withItem(planks), 40);
scene.idle(7); scene.idle(7);
scene.world().createItemOnBelt(util.grid().at(4, 1, 2), Direction.EAST, scene.world().createItemOnBelt(util.grid().at(4, 1, 2), Direction.EAST,
ItemHandlerHelper.copyStackWithSize(planks, 16)); ItemHandlerHelper.copyStackWithSize(planks, 16));
@ -378,7 +370,7 @@ public class CrafterScenes {
scene.idle(5); scene.idle(5);
Selection emptyCrafter = util.select().position(2, 2, 2); Selection emptyCrafter = util.select().position(2, 2, 2);
scene.overlay().showSelectionWithText(emptyCrafter, 90) scene.overlay().showOutlineWithText(emptyCrafter, 90)
.attachKeyFrame() .attachKeyFrame()
.colored(PonderPalette.RED) .colored(PonderPalette.RED)
.text("Some recipes will require additional Crafters to bridge gaps in the path") .text("Some recipes will require additional Crafters to bridge gaps in the path")
@ -404,19 +396,14 @@ public class CrafterScenes {
.text("Using Slot Covers, Crafters can be set to act as an Empty Slot in the arrangement") .text("Using Slot Covers, Crafters can be set to act as an Empty Slot in the arrangement")
.placeNearTarget(); .placeNearTarget();
scene.idle(100); scene.idle(100);
scene.overlay() scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 2, 2), Direction.NORTH).add(0.5, 0, 0), Pointing.RIGHT, 50).withItem(AllItems.CRAFTER_SLOT_COVER.asStack())
.showControls(new InputWindowElement(util.vector().blockSurface(util.grid().at(2, 2, 2), Direction.NORTH) .rightClick();
.add(0.5, 0, 0), Pointing.RIGHT).withItem(AllItems.CRAFTER_SLOT_COVER.asStack())
.rightClick(),
50);
scene.idle(7); scene.idle(7);
scene.world().modifyBlockEntityNBT(emptyCrafter, type, compound -> compound.putBoolean("Cover", true)); scene.world().modifyBlockEntityNBT(emptyCrafter, type, compound -> compound.putBoolean("Cover", true));
scene.idle(130); scene.idle(130);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 3, 2), Direction.WEST), Pointing.LEFT, 40)
new InputWindowElement(util.vector().blockSurface(util.grid().at(2, 3, 2), Direction.WEST), Pointing.LEFT) .withItem(new ItemStack(Items.BUCKET));
.withItem(new ItemStack(Items.BUCKET)),
40);
scene.idle(50); scene.idle(50);
scene.world().showSection(util.select().position(4, 2, 2), Direction.DOWN); scene.world().showSection(util.select().position(4, 2, 2), Direction.DOWN);
@ -427,7 +414,7 @@ public class CrafterScenes {
scene.world().connectCrafterInvs(util.grid().at(1, 2, 2), util.grid().at(2, 2, 2)); scene.world().connectCrafterInvs(util.grid().at(1, 2, 2), util.grid().at(2, 2, 2));
scene.idle(10); scene.idle(10);
scene.overlay().showSelectionWithText(util.select().fromTo(3, 2, 2, 1, 2, 2) scene.overlay().showOutlineWithText(util.select().fromTo(3, 2, 2, 1, 2, 2)
.add(util.select().position(2, 1, 2)), 80) .add(util.select().position(2, 1, 2)), 80)
.attachKeyFrame() .attachKeyFrame()
.pointAt(util.vector().blockSurface(util.grid().at(2, 2, 2), Direction.NORTH)) .pointAt(util.vector().blockSurface(util.grid().at(2, 2, 2), Direction.NORTH))

View file

@ -8,15 +8,13 @@ import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import com.simibubi.create.foundation.ponder.element.BeltItemElement; import com.simibubi.create.foundation.ponder.element.BeltItemElement;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.EntityElement;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.EntityElement;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.createmod.ponder.foundation.instruction.EmitParticlesInstruction.Emitter;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.core.particles.BlockParticleOption; import net.minecraft.core.particles.BlockParticleOption;
@ -60,7 +58,7 @@ public class DeployerScenes {
scene.world().moveDeployer(deployerPos, -1, 25); scene.world().moveDeployer(deployerPos, -1, 25);
scene.idle(44); scene.idle(44);
scene.overlay().showSelectionWithText(util.select().position(deployerPos.west(2)), 60) scene.overlay().showOutlineWithText(util.select().position(deployerPos.west(2)), 60)
.text("It will always interact with the position 2 blocks in front of itself") .text("It will always interact with the position 2 blocks in front of itself")
.attachKeyFrame() .attachKeyFrame()
.placeNearTarget() .placeNearTarget()
@ -109,8 +107,8 @@ public class DeployerScenes {
Vec3 frontVec = util.vector().blockSurface(deployerPos, Direction.WEST) Vec3 frontVec = util.vector().blockSurface(deployerPos, Direction.WEST)
.add(-.125, 0, 0); .add(-.125, 0, 0);
scene.overlay().showControls(new InputWindowElement(frontVec, Pointing.DOWN).rightClick() scene.overlay().showControls(frontVec, Pointing.DOWN, 40).rightClick()
.withItem(pot), 40); .withItem(pot);
scene.idle(7); scene.idle(7);
Class<DeployerBlockEntity> teType = DeployerBlockEntity.class; Class<DeployerBlockEntity> teType = DeployerBlockEntity.class;
scene.world().modifyBlockEntityNBT(deployerSelection, teType, nbt -> nbt.put("HeldItem", pot.serializeNBT())); scene.world().modifyBlockEntityNBT(deployerSelection, teType, nbt -> nbt.put("HeldItem", pot.serializeNBT()));
@ -169,8 +167,8 @@ public class DeployerScenes {
ItemStack shears = new ItemStack(Items.SHEARS); ItemStack shears = new ItemStack(Items.SHEARS);
scene.overlay().showControls(new InputWindowElement(filterSlot, Pointing.DOWN).rightClick() scene.overlay().showControls(filterSlot, Pointing.DOWN, 40).rightClick()
.withItem(shears), 40); .withItem(shears);
scene.idle(7); scene.idle(7);
scene.world().setFilterData(deployerSelection, teType, shears); scene.world().setFilterData(deployerSelection, teType, shears);
scene.overlay().showText(60) scene.overlay().showText(60)
@ -212,10 +210,10 @@ public class DeployerScenes {
scene.idle(26); scene.idle(26);
scene.world().modifyEntity(sheep, e -> ((Sheep) e).setSheared(true)); scene.world().modifyEntity(sheep, e -> ((Sheep) e).setSheared(true));
scene.effects().emitParticles(util.vector().topOf(deployerPos.west(2)) scene.effects().emitParticles(util.vector().topOf(deployerPos.west(2))
.add(0, -.25, 0), .add(0, -.25, 0),
Emitter.withinBlockSpace(new BlockParticleOption(ParticleTypes.BLOCK, Blocks.PINK_WOOL.defaultBlockState()), scene.effects().particleEmitterWithinBlockSpace(new BlockParticleOption(ParticleTypes.BLOCK, Blocks.PINK_WOOL.defaultBlockState()),
util.vector().of(0, 0, 0)), util.vector().of(0, 0, 0)),
25, 1); 25, 1);
scene.world().moveDeployer(deployerPos, -1, 25); scene.world().moveDeployer(deployerPos, -1, 25);
scene.world().showSection(util.select().position(deployerPos.north()), Direction.SOUTH); scene.world().showSection(util.select().position(deployerPos.north()), Direction.SOUTH);
scene.idle(25); scene.idle(25);
@ -259,8 +257,7 @@ public class DeployerScenes {
scene.idle(10); scene.idle(10);
ItemStack tool = new ItemStack(Items.GOLDEN_HOE); ItemStack tool = new ItemStack(Items.GOLDEN_HOE);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(deployerPos), Pointing.DOWN).withItem(tool), scene.overlay().showControls(util.vector().topOf(deployerPos), Pointing.DOWN, 30).withItem(tool);
30);
scene.idle(7); scene.idle(7);
scene.world().modifyBlockEntityNBT(deployerSelection, DeployerBlockEntity.class, scene.world().modifyBlockEntityNBT(deployerSelection, DeployerBlockEntity.class,
nbt -> nbt.put("HeldItem", tool.serializeNBT())); nbt -> nbt.put("HeldItem", tool.serializeNBT()));
@ -281,8 +278,8 @@ public class DeployerScenes {
scene.world().moveDeployer(deployerPos, -1, 25); scene.world().moveDeployer(deployerPos, -1, 25);
scene.idle(46); scene.idle(46);
scene.overlay().showControls(new InputWindowElement(frontVec, Pointing.LEFT).rightClick() scene.overlay().showControls(frontVec, Pointing.LEFT, 40).rightClick()
.withItem(AllItems.WRENCH.asStack()), 40); .withItem(AllItems.WRENCH.asStack());
scene.idle(7); scene.idle(7);
scene.world().modifyBlockEntityNBT(deployerSelection, DeployerBlockEntity.class, scene.world().modifyBlockEntityNBT(deployerSelection, DeployerBlockEntity.class,
nbt -> nbt.putString("Mode", "PUNCH")); nbt -> nbt.putString("Mode", "PUNCH"));
@ -342,8 +339,8 @@ public class DeployerScenes {
scene.idle(10); scene.idle(10);
ItemStack tool = AllItems.SAND_PAPER.asStack(); ItemStack tool = AllItems.SAND_PAPER.asStack();
scene.overlay().showControls(new InputWindowElement(util.vector().blockSurface(pressPos.below(), Direction.EAST) scene.overlay().showControls(util.vector().blockSurface(pressPos.below(), Direction.EAST).add(0, 0.15, 0), Pointing.RIGHT, 30)
.add(0, 0.15, 0), Pointing.RIGHT).withItem(tool), 30); .withItem(tool);
scene.idle(7); scene.idle(7);
scene.world().modifyBlockEntityNBT(pressS, DeployerBlockEntity.class, scene.world().modifyBlockEntityNBT(pressS, DeployerBlockEntity.class,
nbt -> nbt.put("HeldItem", tool.serializeNBT())); nbt -> nbt.put("HeldItem", tool.serializeNBT()));
@ -365,7 +362,7 @@ public class DeployerScenes {
ItemStack quartz = AllItems.ROSE_QUARTZ.asStack(); ItemStack quartz = AllItems.ROSE_QUARTZ.asStack();
scene.world().createItemOnBeltLike(depotPos, Direction.NORTH, quartz); scene.world().createItemOnBeltLike(depotPos, Direction.NORTH, quartz);
Vec3 depotCenter = util.vector().centerOf(depotPos.south()); Vec3 depotCenter = util.vector().centerOf(depotPos.south());
scene.overlay().showControls(new InputWindowElement(depotCenter, Pointing.UP).withItem(quartz), 30); scene.overlay().showControls(depotCenter, Pointing.UP, 30).withItem(quartz);
scene.idle(10); scene.idle(10);
Vec3 targetV = util.vector().centerOf(pressPos) Vec3 targetV = util.vector().centerOf(pressPos)
@ -380,7 +377,7 @@ public class DeployerScenes {
ItemStack polished = AllItems.POLISHED_ROSE_QUARTZ.asStack(); ItemStack polished = AllItems.POLISHED_ROSE_QUARTZ.asStack();
scene.world().createItemOnBeltLike(depotPos, Direction.UP, polished); scene.world().createItemOnBeltLike(depotPos, Direction.UP, polished);
scene.idle(10); scene.idle(10);
scene.overlay().showControls(new InputWindowElement(depotCenter, Pointing.UP).withItem(polished), 50); scene.overlay().showControls(depotCenter, Pointing.UP, 50).withItem(polished);
scene.idle(60); scene.idle(60);
scene.world().hideIndependentSection(depot, Direction.NORTH); scene.world().hideIndependentSection(depot, Direction.NORTH);
@ -547,7 +544,7 @@ public class DeployerScenes {
scene.idle(18); scene.idle(18);
} }
scene.overlay().showSelectionWithText(flowers, 90) scene.overlay().showOutlineWithText(flowers, 90)
.attachKeyFrame() .attachKeyFrame()
.colored(PonderPalette.GREEN) .colored(PonderPalette.GREEN)
.text("They activate at each visited location, using items from inventories anywhere on the contraption"); .text("They activate at each visited location, using items from inventories anywhere on the contraption");
@ -569,7 +566,7 @@ public class DeployerScenes {
scene.idle(70); scene.idle(70);
ItemStack poppy = new ItemStack(Items.POPPY); ItemStack poppy = new ItemStack(Items.POPPY);
scene.overlay().showControls(new InputWindowElement(filterSlot, Pointing.DOWN).withItem(poppy), 30); scene.overlay().showControls(filterSlot, Pointing.DOWN, 30).withItem(poppy);
scene.idle(7); scene.idle(7);
scene.world().setFilterData(deployerSelection, DeployerBlockEntity.class, poppy); scene.world().setFilterData(deployerSelection, DeployerBlockEntity.class, poppy);
scene.idle(25); scene.idle(25);

View file

@ -5,13 +5,12 @@ import com.simibubi.create.content.redstone.thresholdSwitch.ThresholdSwitchBlock
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
@ -60,10 +59,8 @@ public class DetectorScenes {
ItemStack copperIngot = new ItemStack(Items.COPPER_INGOT); ItemStack copperIngot = new ItemStack(Items.COPPER_INGOT);
ItemStack amethystItem = new ItemStack(Blocks.AMETHYST_BLOCK); ItemStack amethystItem = new ItemStack(Blocks.AMETHYST_BLOCK);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(observerPos.north(), Direction.NORTH), Pointing.RIGHT, 40)
new InputWindowElement(util.vector().blockSurface(observerPos.north(), Direction.NORTH), Pointing.RIGHT) .withItem(copperIngot);
.withItem(copperIngot),
40);
scene.idle(7); scene.idle(7);
scene.world().toggleRedstonePower(util.select().position(observerPos)); scene.world().toggleRedstonePower(util.select().position(observerPos));
scene.world().toggleRedstonePower(redstoneDust); scene.world().toggleRedstonePower(redstoneDust);
@ -79,10 +76,8 @@ public class DetectorScenes {
scene.overlay().showCenteredScrollInput(observerPos, Direction.UP, 10); scene.overlay().showCenteredScrollInput(observerPos, Direction.UP, 10);
scene.idle(5); scene.idle(5);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(observerPos, Direction.UP), Pointing.DOWN, 60).rightClick()
new InputWindowElement(util.vector().blockSurface(observerPos, Direction.UP), Pointing.DOWN).rightClick() .withItem(amethystItem);
.withItem(amethystItem),
60);
scene.idle(7); scene.idle(7);
scene.world().setFilterData(util.select().position(observerPos), SmartObserverBlockEntity.class, amethystItem); scene.world().setFilterData(util.select().position(observerPos), SmartObserverBlockEntity.class, amethystItem);
scene.world().toggleRedstonePower(util.select().position(observerPos)); scene.world().toggleRedstonePower(util.select().position(observerPos));
@ -320,8 +315,7 @@ public class DetectorScenes {
scene.idle(5); scene.idle(5);
scene.overlay().showLine(PonderPalette.RED, upper.add(2 / 16f, 0, 0), upper.subtract(2 / 16f, 0, 0), 100); scene.overlay().showLine(PonderPalette.RED, upper.add(2 / 16f, 0, 0), upper.subtract(2 / 16f, 0, 0), 100);
scene.idle(15); scene.idle(15);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(switchPos, Direction.UP), Pointing.DOWN, 60).rightClick();
new InputWindowElement(util.vector().blockSurface(switchPos, Direction.UP), Pointing.DOWN).rightClick(), 60);
scene.idle(7); scene.idle(7);
scene.overlay().showText(70) scene.overlay().showText(70)
.text("The specific thresholds can be changed in the UI") .text("The specific thresholds can be changed in the UI")

View file

@ -9,13 +9,12 @@ import com.simibubi.create.foundation.utility.CreateLang;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.catnip.utility.lang.Components; import net.createmod.catnip.utility.lang.Components;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.item.DyeColor; import net.minecraft.world.item.DyeColor;
@ -73,9 +72,8 @@ public class DisplayScenes {
scene.idle(25); scene.idle(25);
Vec3 target = util.vector().of(3.5, 2.75, 3.25); Vec3 target = util.vector().of(3.5, 2.75, 3.25);
scene.overlay() scene.overlay().showControls(target, Pointing.RIGHT, 60).withItem(AllBlocks.DISPLAY_LINK.asStack())
.showControls(new InputWindowElement(target, Pointing.RIGHT).withItem(AllBlocks.DISPLAY_LINK.asStack()) .rightClick();
.rightClick(), 60);
scene.idle(6); scene.idle(6);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.OUTPUT, link, new AABB(board).expandTowards(-2, -1, 0) scene.overlay().chaseBoundingBoxOutline(PonderPalette.OUTPUT, link, new AABB(board).expandTowards(-2, -1, 0)
.deflate(0, 0, 3 / 16f), 60); .deflate(0, 0, 3 / 16f), 60);
@ -92,7 +90,7 @@ public class DisplayScenes {
scene.idle(10); scene.idle(10);
scene.world().showSection(link, Direction.EAST); scene.world().showSection(link, Direction.EAST);
scene.idle(20); scene.idle(20);
scene.overlay().showSelectionWithText(depot, 70) scene.overlay().showOutlineWithText(depot, 70)
.text("...then attach it to the block to read from") .text("...then attach it to the block to read from")
.pointAt(util.vector().centerOf(linkPos)) .pointAt(util.vector().centerOf(linkPos))
.colored(PonderPalette.INPUT) .colored(PonderPalette.INPUT)
@ -103,7 +101,7 @@ public class DisplayScenes {
scene.world().createItemOnBeltLike(depotPos, Direction.SOUTH, item); scene.world().createItemOnBeltLike(depotPos, Direction.SOUTH, item);
scene.idle(20); scene.idle(20);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(linkPos), Pointing.DOWN).rightClick(), 60); scene.overlay().showControls(util.vector().topOf(linkPos), Pointing.DOWN, 60).rightClick();
scene.idle(20); scene.idle(20);
scene.overlay().showText(80) scene.overlay().showText(80)
.text("Open the Interface to select and configure what is sent") .text("Open the Interface to select and configure what is sent")
@ -146,7 +144,7 @@ public class DisplayScenes {
scene.world().moveSection(dirtElement, util.vector().of(0, -4, 0), 0); scene.world().moveSection(dirtElement, util.vector().of(0, -4, 0), 0);
scene.idle(25); scene.idle(25);
scene.overlay().showSelectionWithText(depot, 50) scene.overlay().showOutlineWithText(depot, 50)
.text("Not every block can act as a source") .text("Not every block can act as a source")
.pointAt(util.vector().topOf(depotPos)) .pointAt(util.vector().topOf(depotPos))
.attachKeyFrame() .attachKeyFrame()
@ -286,8 +284,8 @@ public class DisplayScenes {
Vec3 target = util.vector().of(3.95, 2.75, 3.25); Vec3 target = util.vector().of(3.95, 2.75, 3.25);
ItemStack clipboard = AllBlocks.CLIPBOARD.asStack(); ItemStack clipboard = AllBlocks.CLIPBOARD.asStack();
ClipboardOverrides.switchTo(ClipboardType.WRITTEN, clipboard); ClipboardOverrides.switchTo(ClipboardType.WRITTEN, clipboard);
scene.overlay().showControls(new InputWindowElement(target, Pointing.RIGHT).withItem(clipboard) scene.overlay().showControls(target, Pointing.RIGHT, 40).withItem(clipboard)
.rightClick(), 40); .rightClick();
scene.idle(6); scene.idle(6);
scene.world().setDisplayBoardText(board, 0, Components.literal("Create")); scene.world().setDisplayBoardText(board, 0, Components.literal("Create"));
scene.idle(25); scene.idle(25);
@ -337,9 +335,8 @@ public class DisplayScenes {
scene.world().flashDisplayLink(linkPos); scene.world().flashDisplayLink(linkPos);
scene.idle(50); scene.idle(50);
scene.overlay() scene.overlay().showControls(target, Pointing.RIGHT, 40).withItem(new ItemStack(Items.PINK_DYE))
.showControls(new InputWindowElement(target, Pointing.RIGHT).withItem(new ItemStack(Items.PINK_DYE)) .rightClick();
.rightClick(), 40);
scene.idle(6); scene.idle(6);
scene.world().dyeDisplayBoard(board, 0, DyeColor.PINK); scene.world().dyeDisplayBoard(board, 0, DyeColor.PINK);
scene.idle(25); scene.idle(25);
@ -351,15 +348,13 @@ public class DisplayScenes {
.placeNearTarget(); .placeNearTarget();
scene.idle(25); scene.idle(25);
scene.overlay().showControls( scene.overlay().showControls(target.add(0, -.5f, 0), Pointing.RIGHT, 40).withItem(new ItemStack(Items.LIME_DYE))
new InputWindowElement(target.add(0, -.5f, 0), Pointing.RIGHT).withItem(new ItemStack(Items.LIME_DYE)) .rightClick();
.rightClick(),
40);
scene.idle(6); scene.idle(6);
scene.world().dyeDisplayBoard(board, 1, DyeColor.LIME); scene.world().dyeDisplayBoard(board, 1, DyeColor.LIME);
scene.idle(55); scene.idle(55);
scene.overlay().showControls(new InputWindowElement(target, Pointing.RIGHT).rightClick(), 40); scene.overlay().showControls(target, Pointing.RIGHT, 40).rightClick();
scene.idle(6); scene.idle(6);
scene.world().setDisplayBoardText(board, 0, Components.immutableEmpty()); scene.world().setDisplayBoardText(board, 0, Components.immutableEmpty());
scene.idle(25); scene.idle(25);
@ -457,7 +452,7 @@ public class DisplayScenes {
scene.world().setDisplayBoardText(board, 1, Components.immutableEmpty()); scene.world().setDisplayBoardText(board, 1, Components.immutableEmpty());
scene.idle(25); scene.idle(25);
scene.overlay().showSelectionWithText(depot, 80) scene.overlay().showOutlineWithText(depot, 80)
.colored(PonderPalette.RED) .colored(PonderPalette.RED)
.attachKeyFrame() .attachKeyFrame()
.pointAt(util.vector().topOf(linkPos)) .pointAt(util.vector().topOf(linkPos))

View file

@ -7,14 +7,14 @@ import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.NBTHelper; import net.createmod.catnip.utility.NBTHelper;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.ParrotElement;
import net.createmod.ponder.api.element.ParrotPose;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.ParrotElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
@ -44,9 +44,9 @@ public class EjectorScenes {
scene.idle(10); scene.idle(10);
ItemStack asStack = AllBlocks.WEIGHTED_EJECTOR.asStack(); ItemStack asStack = AllBlocks.WEIGHTED_EJECTOR.asStack();
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(targetPos), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(targetPos), Pointing.DOWN, 50).rightClick()
.whileSneaking() .whileSneaking()
.withItem(asStack), 50); .withItem(asStack);
scene.idle(7); scene.idle(7);
Object slot = new Object(); Object slot = new Object();
scene.overlay().chaseBoundingBoxOutline(PonderPalette.OUTPUT, slot, new AABB(targetPos), 160); scene.overlay().chaseBoundingBoxOutline(PonderPalette.OUTPUT, slot, new AABB(targetPos), 160);
@ -58,8 +58,8 @@ public class EjectorScenes {
.pointAt(util.vector().blockSurface(targetPos, Direction.WEST)) .pointAt(util.vector().blockSurface(targetPos, Direction.WEST))
.placeNearTarget(); .placeNearTarget();
scene.idle(80); scene.idle(80);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(ejectorPos), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(ejectorPos), Pointing.DOWN, 50).rightClick()
.withItem(asStack), 50); .withItem(asStack);
scene.idle(7); scene.idle(7);
scene.world().setKineticSpeed(ejectorS, 0); scene.world().setKineticSpeed(ejectorS, 0);
scene.world().modifyBlockEntityNBT(ejectorS, EjectorBlockEntity.class, nbt -> { scene.world().modifyBlockEntityNBT(ejectorS, EjectorBlockEntity.class, nbt -> {
@ -99,7 +99,7 @@ public class EjectorScenes {
.east(), Direction.WEST)) .east(), Direction.WEST))
.placeNearTarget(); .placeNearTarget();
scene.idle(70); scene.idle(70);
scene.overlay().showSelectionWithText(util.select().position(ejectorPos.west()), 70) scene.overlay().showOutlineWithText(util.select().position(ejectorPos.west()), 70)
.colored(PonderPalette.OUTPUT) .colored(PonderPalette.OUTPUT)
.text("If no valid Target was selected, it will simply target the block directly in front") .text("If no valid Target was selected, it will simply target the block directly in front")
.placeNearTarget(); .placeNearTarget();
@ -119,8 +119,7 @@ public class EjectorScenes {
ItemStack copperBlock = new ItemStack(Items.COPPER_BLOCK); ItemStack copperBlock = new ItemStack(Items.COPPER_BLOCK);
ItemStack copperIngot = new ItemStack(Items.COPPER_INGOT); ItemStack copperIngot = new ItemStack(Items.COPPER_INGOT);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(ejectorPos) scene.overlay().showControls(util.vector().topOf(ejectorPos).add(0.5, 0, 0), Pointing.RIGHT, 30).withItem(copperBlock);
.add(0.5, 0, 0), Pointing.RIGHT).withItem(copperBlock), 30);
scene.idle(7); scene.idle(7);
scene.world().createItemOnBeltLike(ejectorPos, Direction.NORTH, copperBlock); scene.world().createItemOnBeltLike(ejectorPos, Direction.NORTH, copperBlock);
scene.idle(20); scene.idle(20);
@ -156,7 +155,7 @@ public class EjectorScenes {
Vec3 input = util.vector().blockSurface(ejectorPos, Direction.WEST) Vec3 input = util.vector().blockSurface(ejectorPos, Direction.WEST)
.add(0, -2 / 16f, 0); .add(0, -2 / 16f, 0);
Vec3 topOfSlot = input.add(0, 2 / 16f, 0); Vec3 topOfSlot = input.add(0, 2 / 16f, 0);
scene.overlay().showControls(new InputWindowElement(topOfSlot, Pointing.DOWN).rightClick(), 60); scene.overlay().showControls(topOfSlot, Pointing.DOWN, 60).rightClick();
scene.overlay().showFilterSlotInput(input, Direction.WEST, 80); scene.overlay().showFilterSlotInput(input, Direction.WEST, 80);
scene.idle(10); scene.idle(10);
scene.overlay().showText(80) scene.overlay().showText(80)
@ -194,7 +193,7 @@ public class EjectorScenes {
scene.addKeyframe(); scene.addKeyframe();
ElementLink<ParrotElement> birb = scene.special().createBirb(util.vector().topOf(ejectorPos) ElementLink<ParrotElement> birb = scene.special().createBirb(util.vector().topOf(ejectorPos)
.add(0, -3 / 16f, 0), ParrotElement.FlappyPose::new); .add(0, -3 / 16f, 0), ParrotPose.FlappyPose::new);
scene.idle(15); scene.idle(15);
scene.world().modifyBlockEntity(ejectorPos, EjectorBlockEntity.class, ejector -> ejector.activateDeferred()); scene.world().modifyBlockEntity(ejectorPos, EjectorBlockEntity.class, ejector -> ejector.activateDeferred());
scene.special().moveParrot(birb, util.vector().of(-2, 3, 0), 5); scene.special().moveParrot(birb, util.vector().of(-2, 3, 0), 5);
@ -206,7 +205,7 @@ public class EjectorScenes {
scene.idle(6); scene.idle(6);
scene.special().moveParrot(birb, util.vector().of(-0.25, -2 + 3 / 16f, 0), 12); scene.special().moveParrot(birb, util.vector().of(-0.25, -2 + 3 / 16f, 0), 12);
scene.idle(15); scene.idle(15);
scene.special().changeBirbPose(birb, ParrotElement.FaceCursorPose::new); scene.special().changeBirbPose(birb, ParrotPose.FaceCursorPose::new);
scene.overlay().showText(80) scene.overlay().showText(80)
.text("Mobs and Players will always trigger an Ejector when stepping on it") .text("Mobs and Players will always trigger an Ejector when stepping on it")
.pointAt(util.vector().topOf(targetPos)) .pointAt(util.vector().topOf(targetPos))
@ -241,9 +240,7 @@ public class EjectorScenes {
scene.idle(90); scene.idle(90);
BlockPos tunnel = util.grid().at(2, 2, 3); BlockPos tunnel = util.grid().at(2, 2, 3);
scene.overlay().showControls( scene.overlay().showControls(util.vector().topOf(tunnel), Pointing.DOWN, 80).showing(AllIcons.I_TUNNEL_PREFER_NEAREST);
new InputWindowElement(util.vector().topOf(tunnel), Pointing.DOWN).showing(AllIcons.I_TUNNEL_PREFER_NEAREST),
80);
scene.idle(10); scene.idle(10);
scene.overlay().showCenteredScrollInput(tunnel, Direction.UP, 100); scene.overlay().showCenteredScrollInput(tunnel, Direction.UP, 100);
scene.idle(10); scene.idle(10);
@ -270,8 +267,8 @@ public class EjectorScenes {
}); });
scene.idle(90); scene.idle(90);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(util.grid().at(4, 1, 3)), Pointing.DOWN) scene.overlay().showControls(util.vector().topOf(util.grid().at(4, 1, 3)), Pointing.DOWN, 20)
.withItem(new ItemStack(Items.COPPER_INGOT)), 20); .withItem(new ItemStack(Items.COPPER_INGOT));
scene.world().showSection(coverbelt, Direction.SOUTH); scene.world().showSection(coverbelt, Direction.SOUTH);
scene.idle(7); scene.idle(7);

View file

@ -10,13 +10,12 @@ import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.catnip.utility.lang.Components; import net.createmod.catnip.utility.lang.Components;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
@ -112,15 +111,15 @@ public class ElevatorScenes {
AABB glue2 = glue1.inflate(1, 0, 1) AABB glue2 = glue1.inflate(1, 0, 1)
.expandTowards(0, -4, 0); .expandTowards(0, -4, 0);
scene.overlay().showControls(new InputWindowElement(util.vector().centerOf(4, 3, 1), Pointing.RIGHT) scene.overlay().showControls(util.vector().centerOf(4, 3, 1), Pointing.RIGHT, 60)
.withItem(AllItems.SUPER_GLUE.asStack()), 60); .withItem(AllItems.SUPER_GLUE.asStack());
scene.idle(7); scene.idle(7);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, glue1, glue1, 5); scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, glue1, glue1, 5);
scene.idle(1); scene.idle(1);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, glue1, glue2, 90); scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, glue1, glue2, 90);
scene.idle(10); scene.idle(10);
scene.overlay().showSelectionWithText(util.select().position(2, 1, 2), 80) scene.overlay().showOutlineWithText(util.select().position(2, 1, 2), 80)
.placeNearTarget() .placeNearTarget()
.colored(PonderPalette.GREEN) .colored(PonderPalette.GREEN)
.pointAt(util.vector().blockSurface(util.grid().at(1, 2, 1), Direction.UP)) .pointAt(util.vector().blockSurface(util.grid().at(1, 2, 1), Direction.UP))
@ -150,10 +149,8 @@ public class ElevatorScenes {
.text("Ensure that the pulley is supplied with Rotational Power"); .text("Ensure that the pulley is supplied with Rotational Power");
scene.idle(75); scene.idle(75);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(3, 6, 2), Direction.NORTH), Pointing.RIGHT, 60)
new InputWindowElement(util.vector().blockSurface(util.grid().at(3, 6, 2), Direction.NORTH), Pointing.RIGHT) .rightClick();
.rightClick(),
60);
scene.idle(7); scene.idle(7);
scene.effects().indicateSuccess(util.grid().at(3, 6, 2)); scene.effects().indicateSuccess(util.grid().at(3, 6, 2));
scene.world().toggleRedstonePower(util.select().position(1, 13, 2)); scene.world().toggleRedstonePower(util.select().position(1, 13, 2));
@ -175,12 +172,10 @@ public class ElevatorScenes {
.text("The stationary contact now turns into an Elevator Contact"); .text("The stationary contact now turns into an Elevator Contact");
scene.idle(80); scene.idle(80);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(1, 1, 2), Direction.UP), Pointing.DOWN, 60)
new InputWindowElement(util.vector().blockSurface(util.grid().at(1, 1, 2), Direction.UP), Pointing.DOWN) .rightClick();
.rightClick(),
60);
scene.idle(7); scene.idle(7);
scene.overlay().showSelectionWithText(util.select().position(1, 1, 2), 60) scene.overlay().showOutlineWithText(util.select().position(1, 1, 2), 60)
.placeNearTarget() .placeNearTarget()
.colored(PonderPalette.BLUE) .colored(PonderPalette.BLUE)
.pointAt(util.vector().blockSurface(util.grid().at(1, 1, 2), Direction.UP)) .pointAt(util.vector().blockSurface(util.grid().at(1, 1, 2), Direction.UP))
@ -245,10 +240,8 @@ public class ElevatorScenes {
scene.addLazyKeyframe(); scene.addLazyKeyframe();
scene.idle(10); scene.idle(10);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(4, 2, 2), Direction.UP), Pointing.DOWN, 60)
new InputWindowElement(util.vector().blockSurface(util.grid().at(4, 2, 2), Direction.UP), Pointing.DOWN) .scroll();
.scroll(),
60);
scene.idle(15); scene.idle(15);
scene.overlay().showText(90) scene.overlay().showText(90)
.placeNearTarget() .placeNearTarget()
@ -256,10 +249,8 @@ public class ElevatorScenes {
.text("Scroll and click on the controls block to choose a floor while on-board"); .text("Scroll and click on the controls block to choose a floor while on-board");
scene.idle(85); scene.idle(85);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(4, 2, 2), Direction.UP), Pointing.DOWN, 10)
new InputWindowElement(util.vector().blockSurface(util.grid().at(4, 2, 2), Direction.UP), Pointing.DOWN) .rightClick();
.rightClick(),
10);
scene.idle(7); scene.idle(7);
scene.world().cycleBlockProperty(midContact, ElevatorContactBlock.POWERING); scene.world().cycleBlockProperty(midContact, ElevatorContactBlock.POWERING);
scene.world().cycleBlockProperty(topContact, ElevatorContactBlock.CALLING); scene.world().cycleBlockProperty(topContact, ElevatorContactBlock.CALLING);
@ -274,10 +265,8 @@ public class ElevatorScenes {
scene.world().cycleBlockProperty(topContact, ElevatorContactBlock.CALLING); scene.world().cycleBlockProperty(topContact, ElevatorContactBlock.CALLING);
scene.idle(15); scene.idle(15);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(3, 6, 2), Direction.NORTH), Pointing.RIGHT, 60)
new InputWindowElement(util.vector().blockSurface(util.grid().at(3, 6, 2), Direction.NORTH), Pointing.RIGHT) .rightClick();
.rightClick(),
60);
scene.idle(7); scene.idle(7);
scene.effects().indicateSuccess(util.grid().at(3, 6, 2)); scene.effects().indicateSuccess(util.grid().at(3, 6, 2));
scene.world().movePulley(pulleyPos, -1, 0); scene.world().movePulley(pulleyPos, -1, 0);
@ -292,10 +281,8 @@ public class ElevatorScenes {
scene.world().showSectionAndMerge(util.select().fromTo(doorPos, doorPos.above()), Direction.DOWN, elevatorLink); scene.world().showSectionAndMerge(util.select().fromTo(doorPos, doorPos.above()), Direction.DOWN, elevatorLink);
scene.idle(20); scene.idle(20);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(3, 6, 2), Direction.NORTH), Pointing.RIGHT, 60)
new InputWindowElement(util.vector().blockSurface(util.grid().at(3, 6, 2), Direction.NORTH), Pointing.RIGHT) .rightClick();
.rightClick(),
60);
scene.idle(7); scene.idle(7);
scene.effects().indicateSuccess(util.grid().at(3, 6, 2)); scene.effects().indicateSuccess(util.grid().at(3, 6, 2));
scene.world().movePulley(pulleyPos, 1, 0); scene.world().movePulley(pulleyPos, 1, 0);
@ -373,11 +360,9 @@ public class ElevatorScenes {
scene.idle(30); scene.idle(30);
scene.world().showSectionAndMerge(util.select().position(nixiePos), Direction.DOWN, camLink); scene.world().showSectionAndMerge(util.select().position(nixiePos), Direction.DOWN, camLink);
scene.idle(15); scene.idle(15);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(4, 1, 0), Direction.UP), Pointing.DOWN, 15)
new InputWindowElement(util.vector().blockSurface(util.grid().at(4, 1, 0), Direction.UP), Pointing.DOWN)
.rightClick() .rightClick()
.withItem(AllBlocks.DISPLAY_LINK.asStack()), .withItem(AllBlocks.DISPLAY_LINK.asStack());
15);
scene.world().toggleRedstonePower(util.select().position(1, 14, 2)); scene.world().toggleRedstonePower(util.select().position(1, 14, 2));
scene.idle(15); scene.idle(15);
scene.world().showSectionAndMerge(util.select().position(linkPos), Direction.DOWN, camLink); scene.world().showSectionAndMerge(util.select().position(linkPos), Direction.DOWN, camLink);

View file

@ -6,16 +6,15 @@ import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import com.simibubi.create.foundation.ponder.element.BeltItemElement; import com.simibubi.create.foundation.ponder.element.BeltItemElement;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.EntityElement;
import net.createmod.ponder.api.element.ParrotElement;
import net.createmod.ponder.api.element.ParrotPose;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.EntityElement;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.ParrotElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.createmod.ponder.foundation.instruction.EmitParticlesInstruction.Emitter;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.core.particles.ParticleTypes; import net.minecraft.core.particles.ParticleTypes;
@ -46,7 +45,7 @@ public class FanScenes {
scene.idle(40); scene.idle(40);
scene.effects().rotationDirectionIndicator(fanPos.south()); scene.effects().rotationDirectionIndicator(fanPos.south());
ElementLink<ParrotElement> flappyBirb = scene.special().createBirb(util.vector().topOf(1, 0, 3), ParrotElement.FlappyPose::new); ElementLink<ParrotElement> flappyBirb = scene.special().createBirb(util.vector().topOf(1, 0, 3), ParrotPose.FlappyPose::new);
scene.idle(2); scene.idle(2);
scene.special().rotateParrot(flappyBirb, 0, 235, 0, 30); scene.special().rotateParrot(flappyBirb, 0, 235, 0, 30);
scene.special().moveParrot(flappyBirb, util.vector().of(0, 0, -2.5), 30); scene.special().moveParrot(flappyBirb, util.vector().of(0, 0, -2.5), 30);
@ -108,7 +107,7 @@ public class FanScenes {
scene.world().setBlock(blockPos, Blocks.LAVA.defaultBlockState(), false); scene.world().setBlock(blockPos, Blocks.LAVA.defaultBlockState(), false);
scene.idle(10); scene.idle(10);
scene.overlay().showSelectionWithText(util.select().fromTo(blockPos, blockPos.west(2)), 80) scene.overlay().showOutlineWithText(util.select().fromTo(blockPos, blockPos.west(2)), 80)
.colored(PonderPalette.RED) .colored(PonderPalette.RED)
.text("When passing through lava, the Air Flow becomes Heated"); .text("When passing through lava, the Air Flow becomes Heated");
scene.idle(80); scene.idle(80);
@ -122,10 +121,10 @@ public class FanScenes {
scene.world().modifyEntity(entityLink, e -> e.setDeltaMovement(-0.2f, 0, 0)); scene.world().modifyEntity(entityLink, e -> e.setDeltaMovement(-0.2f, 0, 0));
Vec3 itemVec = util.vector().blockSurface(util.grid().at(1, 1, 2), Direction.EAST) Vec3 itemVec = util.vector().blockSurface(util.grid().at(1, 1, 2), Direction.EAST)
.add(0.1, 0, 0); .add(0.1, 0, 0);
scene.overlay().showControls(new InputWindowElement(itemVec, Pointing.DOWN).withItem(stack), 20); scene.overlay().showControls(itemVec, Pointing.DOWN, 20).withItem(stack);
scene.idle(20); scene.idle(20);
scene.effects().emitParticles(itemVec.add(0, 0.2f, 0), Emitter.simple(ParticleTypes.LARGE_SMOKE, Vec3.ZERO), 1, scene.effects().emitParticles(itemVec.add(0, 0.2f, 0), scene.effects().simpleParticleEmitter(ParticleTypes.LARGE_SMOKE, Vec3.ZERO), 1,
60); 60);
scene.overlay().showText(80) scene.overlay().showText(80)
.colored(PonderPalette.WHITE) .colored(PonderPalette.WHITE)
@ -137,7 +136,7 @@ public class FanScenes {
scene.idle(60); scene.idle(60);
scene.world().modifyEntities(ItemEntity.class, ie -> ie.setItem(smelted)); scene.world().modifyEntities(ItemEntity.class, ie -> ie.setItem(smelted));
scene.idle(40); scene.idle(40);
scene.overlay().showControls(new InputWindowElement(itemVec, Pointing.DOWN).withItem(smelted), 20); scene.overlay().showControls(itemVec, Pointing.DOWN, 20).withItem(smelted);
scene.idle(20); scene.idle(20);
scene.world().modifyEntities(ItemEntity.class, Entity::discard); scene.world().modifyEntities(ItemEntity.class, Entity::discard);
scene.idle(20); scene.idle(20);
@ -160,7 +159,7 @@ public class FanScenes {
scene.world().moveSection(blockInFront, util.vector().of(1, 0, 2), 0); scene.world().moveSection(blockInFront, util.vector().of(1, 0, 2), 0);
scene.idle(50); scene.idle(50);
scene.overlay().showSelectionWithText(util.select().fromTo(blockPos, blockPos.west(2)), 60) scene.overlay().showOutlineWithText(util.select().fromTo(blockPos, blockPos.west(2)), 60)
.colored(PonderPalette.BLACK) .colored(PonderPalette.BLACK)
.attachKeyFrame() .attachKeyFrame()
.text("Instead, a setup for Smoking using Fire should be used for them"); .text("Instead, a setup for Smoking using Fire should be used for them");
@ -177,7 +176,7 @@ public class FanScenes {
scene.world().moveSection(blockInFront, util.vector().of(1, 0, 2), 0); scene.world().moveSection(blockInFront, util.vector().of(1, 0, 2), 0);
scene.idle(20); scene.idle(20);
scene.overlay().showSelectionWithText(util.select().fromTo(blockPos, blockPos.west(2)), 60) scene.overlay().showOutlineWithText(util.select().fromTo(blockPos, blockPos.west(2)), 60)
.colored(PonderPalette.MEDIUM) .colored(PonderPalette.MEDIUM)
.attachKeyFrame() .attachKeyFrame()
.text("Air Flows passing through water create a Washing Setup"); .text("Air Flows passing through water create a Washing Setup");
@ -190,9 +189,9 @@ public class FanScenes {
.above(2)), util.vector().of(0, 0.1, 0), stack); .above(2)), util.vector().of(0, 0.1, 0), stack);
scene.idle(15); scene.idle(15);
scene.world().modifyEntity(entityLink, e -> e.setDeltaMovement(-0.2f, 0, 0)); scene.world().modifyEntity(entityLink, e -> e.setDeltaMovement(-0.2f, 0, 0));
scene.overlay().showControls(new InputWindowElement(itemVec, Pointing.DOWN).withItem(stack), 20); scene.overlay().showControls(itemVec, Pointing.DOWN, 20).withItem(stack);
scene.idle(20); scene.idle(20);
scene.effects().emitParticles(itemVec.add(0, 0.2f, 0), Emitter.simple(ParticleTypes.SPIT, Vec3.ZERO), 1, 60); scene.effects().emitParticles(itemVec.add(0, 0.2f, 0), scene.effects().simpleParticleEmitter(ParticleTypes.SPIT, Vec3.ZERO), 1, 60);
scene.overlay().showText(50) scene.overlay().showText(50)
.colored(PonderPalette.WHITE) .colored(PonderPalette.WHITE)
@ -202,7 +201,7 @@ public class FanScenes {
scene.idle(60); scene.idle(60);
scene.world().modifyEntities(ItemEntity.class, ie -> ie.setItem(washed)); scene.world().modifyEntities(ItemEntity.class, ie -> ie.setItem(washed));
scene.overlay().showControls(new InputWindowElement(itemVec, Pointing.DOWN).withItem(washed), 20); scene.overlay().showControls(itemVec, Pointing.DOWN, 20).withItem(washed);
scene.idle(20); scene.idle(20);
scene.world().modifyEntities(ItemEntity.class, Entity::discard); scene.world().modifyEntities(ItemEntity.class, Entity::discard);
scene.idle(20); scene.idle(20);
@ -239,11 +238,11 @@ public class FanScenes {
scene.idle(10); scene.idle(10);
Vec3 depotTop = util.vector().topOf(2, 1, 2) Vec3 depotTop = util.vector().topOf(2, 1, 2)
.add(0, 0.25, 0); .add(0, 0.25, 0);
scene.effects().emitParticles(depotTop, Emitter.simple(ParticleTypes.SPIT, Vec3.ZERO), .5f, 30); scene.effects().emitParticles(depotTop, scene.effects().simpleParticleEmitter(ParticleTypes.SPIT, Vec3.ZERO), .5f, 30);
scene.idle(30); scene.idle(30);
scene.world().modifyBlockEntityNBT(util.select().position(depos), DepotBlockEntity.class, scene.world().modifyBlockEntityNBT(util.select().position(depos), DepotBlockEntity.class,
nbt -> nbt.put("HeldItem", new TransportedItemStack(clay).serializeNBT())); nbt -> nbt.put("HeldItem", new TransportedItemStack(clay).serializeNBT()));
scene.effects().emitParticles(depotTop, Emitter.simple(ParticleTypes.SPIT, Vec3.ZERO), .5f, 30); scene.effects().emitParticles(depotTop, scene.effects().simpleParticleEmitter(ParticleTypes.SPIT, Vec3.ZERO), .5f, 30);
scene.overlay().showText(90) scene.overlay().showText(90)
.pointAt(depotTop) .pointAt(depotTop)
.attachKeyFrame() .attachKeyFrame()
@ -261,10 +260,10 @@ public class FanScenes {
ElementLink<BeltItemElement> transported = ElementLink<BeltItemElement> transported =
scene.world().createItemOnBelt(util.grid().at(3, 3, 3), Direction.SOUTH, sand); scene.world().createItemOnBelt(util.grid().at(3, 3, 3), Direction.SOUTH, sand);
scene.idle(60); scene.idle(60);
scene.effects().emitParticles(depotTop, Emitter.simple(ParticleTypes.SPIT, Vec3.ZERO), .5f, 25); scene.effects().emitParticles(depotTop, scene.effects().simpleParticleEmitter(ParticleTypes.SPIT, Vec3.ZERO), .5f, 25);
scene.idle(25); scene.idle(25);
scene.world().changeBeltItemTo(transported, new ItemStack(Items.CLAY_BALL)); scene.world().changeBeltItemTo(transported, new ItemStack(Items.CLAY_BALL));
scene.effects().emitParticles(depotTop, Emitter.simple(ParticleTypes.SPIT, Vec3.ZERO), .5f, 25); scene.effects().emitParticles(depotTop, scene.effects().simpleParticleEmitter(ParticleTypes.SPIT, Vec3.ZERO), .5f, 25);
scene.idle(60); scene.idle(60);
scene.world().setKineticSpeed(util.select().position(1, 2, 4) scene.world().setKineticSpeed(util.select().position(1, 2, 4)

View file

@ -8,14 +8,13 @@ import com.simibubi.create.content.logistics.funnel.FunnelBlockEntity;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.EntityElement;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.EntityElement;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
@ -127,9 +126,6 @@ public class FunnelScenes {
Vec3 topCenter = util.vector().centerOf(topFunnel); Vec3 topCenter = util.vector().centerOf(topFunnel);
Vec3 topSide = util.vector().blockSurface(topFunnel, Direction.EAST); Vec3 topSide = util.vector().blockSurface(topFunnel, Direction.EAST);
InputWindowElement controlsSneak = new InputWindowElement(topCenter, Pointing.DOWN).rightClick()
.whileSneaking();
// Placing funnels without sneak // Placing funnels without sneak
scene.world().showSection(topFunnelSelection, Direction.DOWN); scene.world().showSection(topFunnelSelection, Direction.DOWN);
scene.overlay().showText(80) scene.overlay().showText(80)
@ -152,7 +148,8 @@ public class FunnelScenes {
scene.idle(5); scene.idle(5);
scene.world().showSection(topFunnelSelection, Direction.DOWN); scene.world().showSection(topFunnelSelection, Direction.DOWN);
scene.overlay().showControls(controlsSneak, 35); scene.overlay().showControls(topCenter, Pointing.DOWN, 35).rightClick()
.whileSneaking();
scene.overlay().showText(80) scene.overlay().showText(80)
.text("Placed while sneaking, it puts items into the inventory.") .text("Placed while sneaking, it puts items into the inventory.")
.attachKeyFrame() .attachKeyFrame()
@ -167,9 +164,8 @@ public class FunnelScenes {
scene.idle(45); scene.idle(45);
// Wrench interaction // Wrench interaction
InputWindowElement wrenchControls = new InputWindowElement(topSide, Pointing.RIGHT).rightClick() scene.overlay().showControls(topSide, Pointing.RIGHT, 40).rightClick()
.withItem(AllItems.WRENCH.asStack()); .withItem(AllItems.WRENCH.asStack());
scene.overlay().showControls(wrenchControls, 40);
scene.idle(10); scene.idle(10);
scene.world().modifyBlock(topFunnel, s -> s.cycle(FunnelBlock.EXTRACTING), true); scene.world().modifyBlock(topFunnel, s -> s.cycle(FunnelBlock.EXTRACTING), true);
scene.idle(10); scene.idle(10);
@ -182,7 +178,8 @@ public class FunnelScenes {
itemLink = scene.world().createItemEntity(topCenter, util.vector().of(0, 4 / 16f, 0), itemStack); itemLink = scene.world().createItemEntity(topCenter, util.vector().of(0, 4 / 16f, 0), itemStack);
scene.idle(30); scene.idle(30);
scene.overlay().showControls(wrenchControls, 40); scene.overlay().showControls(topSide, Pointing.RIGHT, 40).rightClick()
.withItem(AllItems.WRENCH.asStack());
scene.idle(10); scene.idle(10);
scene.world().modifyBlock(topFunnel, s -> s.cycle(FunnelBlock.EXTRACTING), true); scene.world().modifyBlock(topFunnel, s -> s.cycle(FunnelBlock.EXTRACTING), true);
scene.idle(10); scene.idle(10);
@ -404,7 +401,7 @@ public class FunnelScenes {
filter = filter.add(0, -5 / 16f, -1.5 / 16f); filter = filter.add(0, -5 / 16f, -1.5 / 16f);
scene.overlay().showFilterSlotInput(filter, Direction.NORTH, 80); scene.overlay().showFilterSlotInput(filter, Direction.NORTH, 80);
scene.overlay().showControls(new InputWindowElement(filter, Pointing.DOWN).rightClick(), 60); scene.overlay().showControls(filter, Pointing.DOWN, 60).rightClick();
scene.idle(10); scene.idle(10);
scene.overlay().showText(80) scene.overlay().showText(80)
.text("The value panel allows for precise control over the extracted stack size.") .text("The value panel allows for precise control over the extracted stack size.")
@ -446,8 +443,8 @@ public class FunnelScenes {
if (i == 2) { if (i == 2) {
scene.overlay().showFilterSlotInput(filter, Direction.NORTH, 40); scene.overlay().showFilterSlotInput(filter, Direction.NORTH, 40);
scene.overlay().showControls(new InputWindowElement(filter, Pointing.DOWN).rightClick() scene.overlay().showControls(filter, Pointing.DOWN, 60).rightClick()
.withItem(emerald), 60); .withItem(emerald);
scene.idle(10); scene.idle(10);
scene.overlay().showText(80) scene.overlay().showText(80)
.text("Using items on the filter slot will restrict the funnel to only transfer matching stacks.") .text("Using items on the filter slot will restrict the funnel to only transfer matching stacks.")
@ -484,7 +481,7 @@ public class FunnelScenes {
scene.world().showSection(funnelSelect, Direction.DOWN); scene.world().showSection(funnelSelect, Direction.DOWN);
scene.idle(20); scene.idle(20);
scene.overlay().showSelectionWithText(funnelSelect, 40) scene.overlay().showOutlineWithText(funnelSelect, 40)
.colored(PonderPalette.RED) .colored(PonderPalette.RED)
.text("Funnels cannot ever transfer between closed inventories directly.") .text("Funnels cannot ever transfer between closed inventories directly.")
.attachKeyFrame() .attachKeyFrame()

View file

@ -5,13 +5,12 @@ import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Iterate; import net.createmod.catnip.utility.Iterate;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.Blocks;
@ -82,8 +81,8 @@ public class GantryScenes {
scene.overlay().showOutline(PonderPalette.GREEN, "glue", util.select().position(3, 4, 2) scene.overlay().showOutline(PonderPalette.GREEN, "glue", util.select().position(3, 4, 2)
.add(util.select().fromTo(3, 3, 2, 5, 3, 2)) .add(util.select().fromTo(3, 3, 2, 5, 3, 2))
.add(util.select().position(5, 3, 1)), 40); .add(util.select().position(5, 3, 1)), 40);
scene.overlay().showControls(new InputWindowElement(util.vector().centerOf(util.grid().at(3, 3, 2)), Pointing.UP) scene.overlay().showControls(util.vector().centerOf(util.grid().at(3, 3, 2)), Pointing.UP, 40)
.withItem(AllItems.SUPER_GLUE.asStack()), 40); .withItem(AllItems.SUPER_GLUE.asStack());
scene.effects().superGlue(util.grid().at(5, 3, 1), Direction.SOUTH, true); scene.effects().superGlue(util.grid().at(5, 3, 1), Direction.SOUTH, true);
scene.idle(20); scene.idle(20);
scene.overlay().showText(80) scene.overlay().showText(80)

View file

@ -5,13 +5,12 @@ import com.simibubi.create.foundation.gui.AllIcons;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
@ -60,10 +59,9 @@ public class ItemVaultScenes {
scene.idle(15); scene.idle(15);
ItemStack hand = AllItems.BRASS_HAND.asStack(); ItemStack hand = AllItems.BRASS_HAND.asStack();
scene.overlay() scene.overlay().showControls(util.vector().blockSurface(frontVault, Direction.NORTH), Pointing.RIGHT, 40)
.showControls(new InputWindowElement(util.vector().blockSurface(frontVault, Direction.NORTH), Pointing.RIGHT)
.showing(AllIcons.I_MTD_CLOSE) .showing(AllIcons.I_MTD_CLOSE)
.withItem(hand), 40); .withItem(hand);
scene.idle(7); scene.idle(7);
scene.overlay().showText(60) scene.overlay().showText(60)

View file

@ -18,13 +18,12 @@ import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import com.tterrag.registrate.util.entry.BlockEntry; import com.tterrag.registrate.util.entry.BlockEntry;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.core.Direction.Axis; import net.minecraft.core.Direction.Axis;
@ -89,8 +88,8 @@ public class KineticsScenes {
BlockEntry<EncasedShaftBlock> andesiteEncased = AllBlocks.ANDESITE_ENCASED_SHAFT; BlockEntry<EncasedShaftBlock> andesiteEncased = AllBlocks.ANDESITE_ENCASED_SHAFT;
ItemStack andesiteCasingItem = AllBlocks.ANDESITE_CASING.asStack(); ItemStack andesiteCasingItem = AllBlocks.ANDESITE_CASING.asStack();
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(3, 1, 2), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(3, 1, 2), Pointing.DOWN, 60).rightClick()
.withItem(andesiteCasingItem), 60); .withItem(andesiteCasingItem);
scene.idle(7); scene.idle(7);
scene.world().setBlocks(andesite, andesiteEncased.getDefaultState() scene.world().setBlocks(andesite, andesiteEncased.getDefaultState()
.setValue(EncasedShaftBlock.AXIS, Axis.X), true); .setValue(EncasedShaftBlock.AXIS, Axis.X), true);
@ -100,8 +99,8 @@ public class KineticsScenes {
BlockEntry<EncasedShaftBlock> brassEncased = AllBlocks.BRASS_ENCASED_SHAFT; BlockEntry<EncasedShaftBlock> brassEncased = AllBlocks.BRASS_ENCASED_SHAFT;
ItemStack brassCasingItem = AllBlocks.BRASS_CASING.asStack(); ItemStack brassCasingItem = AllBlocks.BRASS_CASING.asStack();
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(1, 0, 2), Pointing.UP).rightClick() scene.overlay().showControls(util.vector().topOf(1, 0, 2), Pointing.UP, 60).rightClick()
.withItem(brassCasingItem), 60); .withItem(brassCasingItem);
scene.idle(7); scene.idle(7);
scene.world().setBlocks(brass, brassEncased.getDefaultState() scene.world().setBlocks(brass, brassEncased.getDefaultState()
.setValue(EncasedShaftBlock.AXIS, Axis.X), true); .setValue(EncasedShaftBlock.AXIS, Axis.X), true);
@ -327,8 +326,8 @@ public class KineticsScenes {
BlockEntry<EncasedCogwheelBlock> andesiteEncased = AllBlocks.ANDESITE_ENCASED_COGWHEEL; BlockEntry<EncasedCogwheelBlock> andesiteEncased = AllBlocks.ANDESITE_ENCASED_COGWHEEL;
ItemStack andesiteCasingItem = AllBlocks.ANDESITE_CASING.asStack(); ItemStack andesiteCasingItem = AllBlocks.ANDESITE_CASING.asStack();
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(3, 0, 2), Pointing.UP).rightClick() scene.overlay().showControls(util.vector().topOf(3, 0, 2), Pointing.UP, 100).rightClick()
.withItem(andesiteCasingItem), 100); .withItem(andesiteCasingItem);
scene.idle(7); scene.idle(7);
scene.world().setBlocks(util.select().position(3, 1, 2), andesiteEncased.getDefaultState() scene.world().setBlocks(util.select().position(3, 1, 2), andesiteEncased.getDefaultState()
.setValue(EncasedCogwheelBlock.AXIS, Axis.Y) .setValue(EncasedCogwheelBlock.AXIS, Axis.Y)
@ -336,8 +335,8 @@ public class KineticsScenes {
scene.world().setKineticSpeed(util.select().position(3, 1, 2), -32); scene.world().setKineticSpeed(util.select().position(3, 1, 2), -32);
scene.idle(15); scene.idle(15);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(2, 1, 2), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(2, 1, 2), Pointing.DOWN, 30).rightClick()
.withItem(andesiteCasingItem), 30); .withItem(andesiteCasingItem);
scene.idle(7); scene.idle(7);
scene.world().setBlocks(small2, andesiteEncased.getDefaultState() scene.world().setBlocks(small2, andesiteEncased.getDefaultState()
.setValue(EncasedCogwheelBlock.AXIS, Axis.Y), true); .setValue(EncasedCogwheelBlock.AXIS, Axis.Y), true);
@ -347,8 +346,8 @@ public class KineticsScenes {
BlockEntry<EncasedCogwheelBlock> brassEncased = AllBlocks.BRASS_ENCASED_LARGE_COGWHEEL; BlockEntry<EncasedCogwheelBlock> brassEncased = AllBlocks.BRASS_ENCASED_LARGE_COGWHEEL;
ItemStack brassCasingItem = AllBlocks.BRASS_CASING.asStack(); ItemStack brassCasingItem = AllBlocks.BRASS_CASING.asStack();
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(1, 0, 3), Pointing.UP).rightClick() scene.overlay().showControls(util.vector().topOf(1, 0, 3), Pointing.UP, 60).rightClick()
.withItem(brassCasingItem), 60); .withItem(brassCasingItem);
scene.idle(7); scene.idle(7);
scene.world().setBlocks(util.select().position(1, 1, 3), brassEncased.getDefaultState() scene.world().setBlocks(util.select().position(1, 1, 3), brassEncased.getDefaultState()
.setValue(EncasedCogwheelBlock.AXIS, Axis.Y), true); .setValue(EncasedCogwheelBlock.AXIS, Axis.Y), true);
@ -378,8 +377,8 @@ public class KineticsScenes {
scene.addKeyframe(); scene.addKeyframe();
Vec3 wrenchHere = util.vector().topOf(2, 1, 2) Vec3 wrenchHere = util.vector().topOf(2, 1, 2)
.add(.25, 0, -.25); .add(.25, 0, -.25);
scene.overlay().showControls(new InputWindowElement(wrenchHere, Pointing.RIGHT).rightClick() scene.overlay().showControls(wrenchHere, Pointing.RIGHT, 25).rightClick()
.withItem(AllItems.WRENCH.asStack()), 25); .withItem(AllItems.WRENCH.asStack());
scene.idle(7); scene.idle(7);
scene.world().cycleBlockProperty(util.grid().at(2, 1, 2), EncasedCogwheelBlock.TOP_SHAFT); scene.world().cycleBlockProperty(util.grid().at(2, 1, 2), EncasedCogwheelBlock.TOP_SHAFT);
scene.idle(15); scene.idle(15);
@ -396,8 +395,8 @@ public class KineticsScenes {
.pointAt(wrenchHere.add(-.5, 0, .5)); .pointAt(wrenchHere.add(-.5, 0, .5));
scene.idle(40); scene.idle(40);
scene.overlay().showControls(new InputWindowElement(wrenchHere, Pointing.RIGHT).rightClick() scene.overlay().showControls(wrenchHere, Pointing.RIGHT, 25).rightClick()
.withItem(AllItems.WRENCH.asStack()), 25); .withItem(AllItems.WRENCH.asStack());
scene.idle(7); scene.idle(7);
scene.world().cycleBlockProperty(util.grid().at(2, 1, 2), EncasedCogwheelBlock.TOP_SHAFT); scene.world().cycleBlockProperty(util.grid().at(2, 1, 2), EncasedCogwheelBlock.TOP_SHAFT);
scene.world().setKineticSpeed(shaft2, 0); scene.world().setKineticSpeed(shaft2, 0);
@ -612,7 +611,7 @@ public class KineticsScenes {
Vec3 blockSurface = util.vector().blockSurface(motor, Direction.NORTH) Vec3 blockSurface = util.vector().blockSurface(motor, Direction.NORTH)
.add(1 / 16f, 0, 3 / 16f); .add(1 / 16f, 0, 3 / 16f);
scene.overlay().showFilterSlotInput(blockSurface, Direction.NORTH, 80); scene.overlay().showFilterSlotInput(blockSurface, Direction.NORTH, 80);
scene.overlay().showControls(new InputWindowElement(blockSurface, Pointing.DOWN).rightClick(), 60); scene.overlay().showControls(blockSurface, Pointing.DOWN, 60).rightClick();
scene.idle(20); scene.idle(20);
scene.overlay().showText(60) scene.overlay().showText(60)
@ -703,8 +702,8 @@ public class KineticsScenes {
scene.idle(5); scene.idle(5);
ItemStack crimsonPlanks = new ItemStack(Items.CRIMSON_PLANKS); ItemStack crimsonPlanks = new ItemStack(Items.CRIMSON_PLANKS);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(wheel), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(wheel), Pointing.DOWN, 20).rightClick()
.withItem(crimsonPlanks), 20); .withItem(crimsonPlanks);
scene.idle(7); scene.idle(7);
scene.world().modifyBlockEntity(wheel, WaterWheelBlockEntity.class, be -> be.applyMaterialIfValid(crimsonPlanks)); scene.world().modifyBlockEntity(wheel, WaterWheelBlockEntity.class, be -> be.applyMaterialIfValid(crimsonPlanks));
scene.overlay().showText(50) scene.overlay().showText(50)
@ -715,15 +714,15 @@ public class KineticsScenes {
scene.idle(40); scene.idle(40);
ItemStack birchPlanks = new ItemStack(Items.BIRCH_PLANKS); ItemStack birchPlanks = new ItemStack(Items.BIRCH_PLANKS);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(wheel), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(wheel), Pointing.DOWN, 20).rightClick()
.withItem(birchPlanks), 20); .withItem(birchPlanks);
scene.idle(7); scene.idle(7);
scene.world().modifyBlockEntity(wheel, WaterWheelBlockEntity.class, be -> be.applyMaterialIfValid(birchPlanks)); scene.world().modifyBlockEntity(wheel, WaterWheelBlockEntity.class, be -> be.applyMaterialIfValid(birchPlanks));
scene.idle(40); scene.idle(40);
ItemStack junglePlanks = new ItemStack(Items.JUNGLE_PLANKS); ItemStack junglePlanks = new ItemStack(Items.JUNGLE_PLANKS);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(wheel), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(wheel), Pointing.DOWN, 20).rightClick()
.withItem(junglePlanks), 20); .withItem(junglePlanks);
scene.idle(7); scene.idle(7);
scene.world().modifyBlockEntity(wheel, WaterWheelBlockEntity.class, be -> be.applyMaterialIfValid(junglePlanks)); scene.world().modifyBlockEntity(wheel, WaterWheelBlockEntity.class, be -> be.applyMaterialIfValid(junglePlanks));
scene.idle(20); scene.idle(20);
@ -834,8 +833,8 @@ public class KineticsScenes {
scene.idle(5); scene.idle(5);
ItemStack crimsonPlanks = new ItemStack(Items.CRIMSON_PLANKS); ItemStack crimsonPlanks = new ItemStack(Items.CRIMSON_PLANKS);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(target), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(target), Pointing.DOWN, 20).rightClick()
.withItem(crimsonPlanks), 20); .withItem(crimsonPlanks);
scene.idle(7); scene.idle(7);
scene.world().modifyBlockEntity(wheel, WaterWheelBlockEntity.class, be -> be.applyMaterialIfValid(crimsonPlanks)); scene.world().modifyBlockEntity(wheel, WaterWheelBlockEntity.class, be -> be.applyMaterialIfValid(crimsonPlanks));
scene.overlay().showText(50) scene.overlay().showText(50)
@ -846,15 +845,15 @@ public class KineticsScenes {
scene.idle(40); scene.idle(40);
ItemStack birchPlanks = new ItemStack(Items.BIRCH_PLANKS); ItemStack birchPlanks = new ItemStack(Items.BIRCH_PLANKS);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(target), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(target), Pointing.DOWN, 20).rightClick()
.withItem(birchPlanks), 20); .withItem(birchPlanks);
scene.idle(7); scene.idle(7);
scene.world().modifyBlockEntity(wheel, WaterWheelBlockEntity.class, be -> be.applyMaterialIfValid(birchPlanks)); scene.world().modifyBlockEntity(wheel, WaterWheelBlockEntity.class, be -> be.applyMaterialIfValid(birchPlanks));
scene.idle(40); scene.idle(40);
ItemStack junglePlanks = new ItemStack(Items.JUNGLE_PLANKS); ItemStack junglePlanks = new ItemStack(Items.JUNGLE_PLANKS);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(target), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(target), Pointing.DOWN, 20).rightClick()
.withItem(junglePlanks), 20); .withItem(junglePlanks);
scene.idle(7); scene.idle(7);
scene.world().modifyBlockEntity(wheel, WaterWheelBlockEntity.class, be -> be.applyMaterialIfValid(junglePlanks)); scene.world().modifyBlockEntity(wheel, WaterWheelBlockEntity.class, be -> be.applyMaterialIfValid(junglePlanks));
scene.idle(20); scene.idle(20);
@ -891,7 +890,7 @@ public class KineticsScenes {
.pointAt(sideOf); .pointAt(sideOf);
scene.idle(80); scene.idle(80);
scene.overlay().showControls(new InputWindowElement(centerOf, Pointing.DOWN).rightClick(), 40); scene.overlay().showControls(centerOf, Pointing.DOWN, 40).rightClick();
scene.idle(7); scene.idle(7);
scene.world().setKineticSpeed(util.select().everywhere(), 32); scene.world().setKineticSpeed(util.select().everywhere(), 32);
scene.world().modifyKineticSpeed(util.select().column(1, 3), f -> f * -2); scene.world().modifyKineticSpeed(util.select().column(1, 3), f -> f * -2);
@ -908,8 +907,8 @@ public class KineticsScenes {
scene.world().setKineticSpeed(util.select().everywhere(), 0); scene.world().setKineticSpeed(util.select().everywhere(), 0);
scene.idle(15); scene.idle(15);
scene.overlay().showControls(new InputWindowElement(centerOf, Pointing.DOWN).rightClick() scene.overlay().showControls(centerOf, Pointing.DOWN, 40).rightClick()
.whileSneaking(), 40); .whileSneaking();
scene.idle(7); scene.idle(7);
scene.world().setKineticSpeed(util.select().everywhere(), -32); scene.world().setKineticSpeed(util.select().everywhere(), -32);
scene.world().modifyKineticSpeed(util.select().column(1, 3), f -> f * -2); scene.world().modifyKineticSpeed(util.select().column(1, 3), f -> f * -2);
@ -972,7 +971,7 @@ public class KineticsScenes {
scene.overlay().chaseBoundingBoxOutline(PonderPalette.WHITE, blockSurface, point, 1); scene.overlay().chaseBoundingBoxOutline(PonderPalette.WHITE, blockSurface, point, 1);
scene.idle(1); scene.idle(1);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.WHITE, blockSurface, expanded, 80); scene.overlay().chaseBoundingBoxOutline(PonderPalette.WHITE, blockSurface, expanded, 80);
scene.overlay().showControls(new InputWindowElement(blockSurface, Pointing.DOWN).rightClick(), 60); scene.overlay().showControls(blockSurface, Pointing.DOWN, 60).rightClick();
scene.idle(10); scene.idle(10);
scene.overlay().showText(60) scene.overlay().showText(60)
@ -982,7 +981,7 @@ public class KineticsScenes {
.pointAt(blockSurface); .pointAt(blockSurface);
scene.idle(70); scene.idle(70);
scene.overlay().showControls(new InputWindowElement(topOf, Pointing.DOWN).rightClick(), 40); scene.overlay().showControls(topOf, Pointing.DOWN, 40).rightClick();
scene.idle(7); scene.idle(7);
scene.world().rotateSection(valve, 0, 0, 90, 30); scene.world().rotateSection(valve, 0, 0, 90, 30);
scene.world().rotateSection(contraption, 0, 0, 90, 30); scene.world().rotateSection(contraption, 0, 0, 90, 30);
@ -1000,8 +999,8 @@ public class KineticsScenes {
scene.world().setKineticSpeed(util.select().everywhere(), 0); scene.world().setKineticSpeed(util.select().everywhere(), 0);
scene.idle(25); scene.idle(25);
scene.overlay().showControls(new InputWindowElement(topOf, Pointing.DOWN).rightClick() scene.overlay().showControls(topOf, Pointing.DOWN, 40).rightClick()
.whileSneaking(), 40); .whileSneaking();
scene.idle(7); scene.idle(7);
scene.world().rotateSection(valve, 0, 0, -90, 30); scene.world().rotateSection(valve, 0, 0, -90, 30);
scene.world().rotateSection(contraption, 0, 0, -90, 30); scene.world().rotateSection(contraption, 0, 0, -90, 30);
@ -1035,8 +1034,8 @@ public class KineticsScenes {
scene.idle(90); scene.idle(90);
scene.addKeyframe(); scene.addKeyframe();
scene.overlay().showControls(new InputWindowElement(topOf, Pointing.DOWN).rightClick() scene.overlay().showControls(topOf, Pointing.DOWN, 40).rightClick()
.withItem(new ItemStack(Items.BLUE_DYE)), 40); .withItem(new ItemStack(Items.BLUE_DYE));
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(valvePos, s -> AllBlocks.DYED_VALVE_HANDLES.get(DyeColor.BLUE) scene.world().modifyBlock(valvePos, s -> AllBlocks.DYED_VALVE_HANDLES.get(DyeColor.BLUE)
.getDefaultState() .getDefaultState()
@ -1086,9 +1085,9 @@ public class KineticsScenes {
.placeNearTarget(); .placeNearTarget();
scene.idle(80); scene.idle(80);
scene.overlay().showControls(new InputWindowElement(top, Pointing.DOWN).rightClick(), 40); scene.overlay().showControls(top, Pointing.DOWN, 40).rightClick();
scene.idle(7); scene.idle(7);
scene.overlay().showSelectionWithText(gearshiftSelection, 50) scene.overlay().showOutlineWithText(gearshiftSelection, 50)
.colored(PonderPalette.BLUE) .colored(PonderPalette.BLUE)
.text("Right-click it to open the Configuration UI") .text("Right-click it to open the Configuration UI")
.pointAt(top) .pointAt(top)
@ -1259,21 +1258,20 @@ public class KineticsScenes {
.text("Using the value panel on its side, the conveyed speed can be configured"); .text("Using the value panel on its side, the conveyed speed can be configured");
scene.idle(80); scene.idle(80);
InputWindowElement input = new InputWindowElement(inputVec, Pointing.UP).rightClick(); scene.overlay().showControls(inputVec, Pointing.UP, 40).rightClick();
scene.overlay().showControls(input, 40);
scene.idle(15); scene.idle(15);
scene.world().multiplyKineticSpeed(util.select().fromTo(1, 2, 1, 1, 2, 3), 4); scene.world().multiplyKineticSpeed(util.select().fromTo(1, 2, 1, 1, 2, 3), 4);
scene.effects().rotationSpeedIndicator(cogPos); scene.effects().rotationSpeedIndicator(cogPos);
scene.idle(55); scene.idle(55);
scene.markAsFinished(); scene.markAsFinished();
scene.overlay().showControls(input, 30); scene.overlay().showControls(inputVec, Pointing.UP, 30).rightClick();
scene.idle(15); scene.idle(15);
scene.world().multiplyKineticSpeed(util.select().fromTo(1, 2, 1, 1, 2, 3), 4); scene.world().multiplyKineticSpeed(util.select().fromTo(1, 2, 1, 1, 2, 3), 4);
scene.effects().rotationSpeedIndicator(cogPos); scene.effects().rotationSpeedIndicator(cogPos);
scene.idle(55); scene.idle(55);
scene.overlay().showControls(input, 30); scene.overlay().showControls(inputVec, Pointing.UP, 30).rightClick();
scene.idle(15); scene.idle(15);
scene.world().multiplyKineticSpeed(util.select().fromTo(1, 2, 1, 1, 2, 3), -.05f); scene.world().multiplyKineticSpeed(util.select().fromTo(1, 2, 1, 1, 2, 3), -.05f);
scene.effects().rotationSpeedIndicator(cogPos); scene.effects().rotationSpeedIndicator(cogPos);
@ -1345,8 +1343,7 @@ public class KineticsScenes {
scene.idle(30); scene.idle(30);
Vec3 blockSurface = util.vector().blockSurface(gaugePos, Direction.NORTH); Vec3 blockSurface = util.vector().blockSurface(gaugePos, Direction.NORTH);
scene.overlay().showControls( scene.overlay().showControls(blockSurface, Pointing.RIGHT, 80).withItem(AllItems.GOGGLES.asStack());
new InputWindowElement(blockSurface, Pointing.RIGHT).withItem(AllItems.GOGGLES.asStack()), 80);
scene.idle(7); scene.idle(7);
scene.overlay().showText(80) scene.overlay().showText(80)
.text("When wearing Engineers' Goggles, the player can get more detailed information from the Gauge") .text("When wearing Engineers' Goggles, the player can get more detailed information from the Gauge")

View file

@ -3,13 +3,12 @@ package com.simibubi.create.infrastructure.ponder.scenes;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.EntityElement;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.EntityElement;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
@ -199,8 +198,8 @@ public class MechanicalDrillScenes {
scene.idle(20); scene.idle(20);
scene.world().setKineticSpeed(drills, 0); scene.world().setKineticSpeed(drills, 0);
scene.idle(10); scene.idle(10);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(2, 3, 2), Pointing.DOWN) scene.overlay().showControls(util.vector().topOf(2, 3, 2), Pointing.DOWN, 60)
.withItem(new ItemStack(Blocks.OAK_PLANKS)), 60); .withItem(new ItemStack(Blocks.OAK_PLANKS));
scene.idle(20); scene.idle(20);
} }

View file

@ -6,14 +6,13 @@ import com.simibubi.create.content.kinetics.simpleRelays.ShaftBlock;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.EntityElement;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.EntityElement;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.core.Direction.Axis; import net.minecraft.core.Direction.Axis;
@ -62,7 +61,7 @@ public class MechanicalSawScenes {
ElementLink<EntityElement> logItem = scene.world().createItemEntity(itemSpawn, util.vector().of(0, 0, 0), log); ElementLink<EntityElement> logItem = scene.world().createItemEntity(itemSpawn, util.vector().of(0, 0, 0), log);
scene.idle(12); scene.idle(12);
scene.overlay().showControls(new InputWindowElement(itemSpawn, Pointing.DOWN).withItem(log), 20); scene.overlay().showControls(itemSpawn, Pointing.DOWN, 20).withItem(log);
scene.idle(10); scene.idle(10);
scene.world().modifyEntity(logItem, e -> e.setDeltaMovement(util.vector().of(0.05, 0.2, 0))); scene.world().modifyEntity(logItem, e -> e.setDeltaMovement(util.vector().of(0.05, 0.2, 0)));
@ -75,8 +74,7 @@ public class MechanicalSawScenes {
logItem = scene.world().createItemEntity(util.vector().topOf(sawPos) logItem = scene.world().createItemEntity(util.vector().topOf(sawPos)
.add(0.5, -.1, 0), util.vector().of(0.05, 0.18, 0), strippedLog); .add(0.5, -.1, 0), util.vector().of(0.05, 0.18, 0), strippedLog);
scene.idle(12); scene.idle(12);
scene.overlay().showControls(new InputWindowElement(itemSpawn.add(2, 0, 0), Pointing.DOWN).withItem(strippedLog), scene.overlay().showControls(itemSpawn.add(2, 0, 0), Pointing.DOWN, 20).withItem(strippedLog);
20);
scene.idle(30); scene.idle(30);
scene.overlay().showText(60) scene.overlay().showText(60)
@ -154,7 +152,7 @@ public class MechanicalSawScenes {
scene.idle(90); scene.idle(90);
ItemStack bricks = new ItemStack(Blocks.STONE_BRICKS); ItemStack bricks = new ItemStack(Blocks.STONE_BRICKS);
scene.overlay().showControls(new InputWindowElement(filter, Pointing.DOWN).withItem(bricks), 30); scene.overlay().showControls(filter, Pointing.DOWN, 30).withItem(bricks);
scene.world().modifyEntities(ItemEntity.class, Entity::discard); scene.world().modifyEntities(ItemEntity.class, Entity::discard);
scene.idle(7); scene.idle(7);
scene.world().setFilterData(util.select().position(sawPos), SawBlockEntity.class, bricks); scene.world().setFilterData(util.select().position(sawPos), SawBlockEntity.class, bricks);
@ -240,7 +238,7 @@ public class MechanicalSawScenes {
scene.world().hideSection(util.select().fromTo(2, 1, 2, 1, 1, 3) scene.world().hideSection(util.select().fromTo(2, 1, 2, 1, 1, 3)
.substract(util.select().position(breakingPos)), Direction.WEST); .substract(util.select().position(breakingPos)), Direction.WEST);
scene.idle(10); scene.idle(10);
scene.overlay().showSelectionWithText(util.select().position(breakingPos), 90) scene.overlay().showOutlineWithText(util.select().position(breakingPos), 90)
.attachKeyFrame() .attachKeyFrame()
.colored(PonderPalette.GREEN) .colored(PonderPalette.GREEN)
.placeNearTarget() .placeNearTarget()
@ -392,9 +390,7 @@ public class MechanicalSawScenes {
scene.idle(20); scene.idle(20);
scene.world().setKineticSpeed(saws, 0); scene.world().setKineticSpeed(saws, 0);
scene.idle(10); scene.idle(10);
scene.overlay().showControls( scene.overlay().showControls(util.vector().topOf(3, 2, 2), Pointing.DOWN, 60).withItem(new ItemStack(Blocks.OAK_LOG));
new InputWindowElement(util.vector().topOf(3, 2, 2), Pointing.DOWN).withItem(new ItemStack(Blocks.OAK_LOG)),
60);
scene.idle(20); scene.idle(20);
} }

View file

@ -9,15 +9,15 @@ import com.simibubi.create.content.contraptions.chassis.LinearChassisBlock;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.EntityElement;
import net.createmod.ponder.api.element.ParrotElement;
import net.createmod.ponder.api.element.ParrotPose;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.EntityElement;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.ParrotElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
@ -72,7 +72,7 @@ public class MovementActorScenes {
BlockPos psi2 = psi.west(2); BlockPos psi2 = psi.west(2);
scene.world().showSection(util.select().position(psi2), Direction.DOWN); scene.world().showSection(util.select().position(psi2), Direction.DOWN);
scene.overlay().showSelectionWithText(util.select().position(psi.west()), 50) scene.overlay().showOutlineWithText(util.select().position(psi.west()), 50)
.colored(PonderPalette.RED) .colored(PonderPalette.RED)
.placeNearTarget() .placeNearTarget()
.attachKeyFrame() .attachKeyFrame()
@ -101,7 +101,7 @@ public class MovementActorScenes {
scene.overlay().showOutline(PonderPalette.GREEN, psi, util.select().fromTo(5, 3, 2, 6, 3, 2), 80); scene.overlay().showOutline(PonderPalette.GREEN, psi, util.select().fromTo(5, 3, 2, 6, 3, 2), 80);
scene.idle(10); scene.idle(10);
scene.overlay().showSelectionWithText(util.select().position(psi2), 70) scene.overlay().showOutlineWithText(util.select().position(psi2), 70)
.placeNearTarget() .placeNearTarget()
.colored(PonderPalette.GREEN) .colored(PonderPalette.GREEN)
.attachKeyFrame() .attachKeyFrame()
@ -130,8 +130,7 @@ public class MovementActorScenes {
scene.idle(10); scene.idle(10);
scene.world().modifyEntity(entity2, Entity::discard); scene.world().modifyEntity(entity2, Entity::discard);
scene.overlay() scene.overlay().showControls(util.vector().topOf(5, 3, 2), Pointing.DOWN, 40).withItem(itemStack);
.showControls(new InputWindowElement(util.vector().topOf(5, 3, 2), Pointing.DOWN).withItem(itemStack), 40);
scene.idle(30); scene.idle(30);
scene.world().hideSection(util.select().position(hopper), Direction.UP); scene.world().hideSection(util.select().position(hopper), Direction.UP);
@ -198,7 +197,7 @@ public class MovementActorScenes {
scene.idle(10); scene.idle(10);
scene.overlay().showSelectionWithText(util.select().position(1, 1, 3), 120) scene.overlay().showOutlineWithText(util.select().position(1, 1, 3), 120)
.colored(PonderPalette.RED) .colored(PonderPalette.RED)
.text("Redstone power will prevent the stationary interface from engaging"); .text("Redstone power will prevent the stationary interface from engaging");
@ -331,8 +330,7 @@ public class MovementActorScenes {
scene.world().setBlock(current, harvested, true); scene.world().setBlock(current, harvested, true);
scene.idle(116); scene.idle(116);
scene.overlay() scene.overlay().showControls(util.vector().topOf(1, 2, 5), Pointing.DOWN, 50).withItem(wheatItem);
.showControls(new InputWindowElement(util.vector().topOf(1, 2, 5), Pointing.DOWN).withItem(wheatItem), 50);
for (int i = 0; i < 3; i++) for (int i = 0; i < 3; i++)
scene.world().modifyBlockEntity(util.grid().at(i, 1, 4), HarvesterBlockEntity.class, scene.world().modifyBlockEntity(util.grid().at(i, 1, 4), HarvesterBlockEntity.class,
hte -> hte.setAnimatedSpeed(0)); hte -> hte.setAnimatedSpeed(0));
@ -432,9 +430,7 @@ public class MovementActorScenes {
scene.world().destroyBlock(util.grid().at(1, 1, 2)); scene.world().destroyBlock(util.grid().at(1, 1, 2));
scene.idle(15); scene.idle(15);
scene.overlay().showControls( scene.overlay().showControls(util.vector().topOf(2, 2, 2), Pointing.DOWN, 40).withItem(new ItemStack(Items.SNOWBALL));
new InputWindowElement(util.vector().topOf(2, 2, 2), Pointing.DOWN).withItem(new ItemStack(Items.SNOWBALL)),
40);
scene.idle(40); scene.idle(40);
scene.world().hideIndependentSection(chest, Direction.UP); scene.world().hideIndependentSection(chest, Direction.UP);
scene.world().modifyKineticSpeed(util.select().everywhere(), f -> -f); scene.world().modifyKineticSpeed(util.select().everywhere(), f -> -f);
@ -497,7 +493,7 @@ public class MovementActorScenes {
scene.idle(10); scene.idle(10);
ElementLink<ParrotElement> birb = scene.special().createBirb(util.vector().topOf(3, 0, 2) ElementLink<ParrotElement> birb = scene.special().createBirb(util.vector().topOf(3, 0, 2)
.add(0, 0, 0.5), ParrotElement.FlappyPose::new); .add(0, 0, 0.5), ParrotPose.FlappyPose::new);
scene.idle(11); scene.idle(11);
scene.world().modifyKineticSpeed(util.select().everywhere(), f -> -2 * f); scene.world().modifyKineticSpeed(util.select().everywhere(), f -> -2 * f);
@ -617,8 +613,7 @@ public class MovementActorScenes {
scene.idle(10); scene.idle(10);
scene.world().modifyBlockEntity(harvesterPos, HarvesterBlockEntity.class, hte -> hte.setAnimatedSpeed(0)); scene.world().modifyBlockEntity(harvesterPos, HarvesterBlockEntity.class, hte -> hte.setAnimatedSpeed(0));
scene.world().setKineticSpeed(util.select().position(drillPos), 0); scene.world().setKineticSpeed(util.select().position(drillPos), 0);
scene.overlay().showControls(new InputWindowElement(util.vector().of(1.5, 2.75, 4.5), Pointing.DOWN).rightClick(), scene.overlay().showControls(util.vector().of(1.5, 2.75, 4.5), Pointing.DOWN, 15).rightClick();
15);
scene.idle(7); scene.idle(7);
scene.world().modifyBlockEntity(controlsPos1, ContraptionControlsBlockEntity.class, ccte -> ccte.disabled = true); scene.world().modifyBlockEntity(controlsPos1, ContraptionControlsBlockEntity.class, ccte -> ccte.disabled = true);
scene.effects().indicateRedstone(util.grid().at(1, 2, 4)); scene.effects().indicateRedstone(util.grid().at(1, 2, 4));
@ -627,8 +622,7 @@ public class MovementActorScenes {
scene.world().rotateSection(contraptionLink, 0, -60, 0, 40); scene.world().rotateSection(contraptionLink, 0, -60, 0, 40);
scene.idle(40); scene.idle(40);
scene.overlay().showControls(new InputWindowElement(util.vector().of(3.5, 2.75, 1), Pointing.DOWN).rightClick(), scene.overlay().showControls(util.vector().of(3.5, 2.75, 1), Pointing.DOWN, 15).rightClick();
15);
scene.idle(7); scene.idle(7);
scene.world().modifyBlockEntity(controlsPos1, ContraptionControlsBlockEntity.class, scene.world().modifyBlockEntity(controlsPos1, ContraptionControlsBlockEntity.class,
ccte -> ccte.disabled = false); ccte -> ccte.disabled = false);
@ -663,11 +657,11 @@ public class MovementActorScenes {
.text("They can be attached anywhere on the contraption"); .text("They can be attached anywhere on the contraption");
scene.idle(75); scene.idle(75);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(controlsPos2), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(controlsPos2), Pointing.DOWN, 30).rightClick()
.withItem(AllBlocks.MECHANICAL_DRILL.asStack()), 30); .withItem(AllBlocks.MECHANICAL_DRILL.asStack());
scene.idle(5); scene.idle(5);
scene.overlay().showControls(new InputWindowElement(util.vector().centerOf(controlsPos1), Pointing.UP).rightClick() scene.overlay().showControls(util.vector().centerOf(controlsPos1), Pointing.UP, 25).rightClick()
.withItem(AllBlocks.MECHANICAL_HARVESTER.asStack()), 25); .withItem(AllBlocks.MECHANICAL_HARVESTER.asStack());
scene.idle(2); scene.idle(2);
scene.world().setFilterData(util.select().position(controlsPos2), ContraptionControlsBlockEntity.class, scene.world().setFilterData(util.select().position(controlsPos2), ContraptionControlsBlockEntity.class,
AllBlocks.MECHANICAL_DRILL.asStack()); AllBlocks.MECHANICAL_DRILL.asStack());
@ -683,8 +677,7 @@ public class MovementActorScenes {
.text("While disassembled, the filter can be changed to target specific types of actors"); .text("While disassembled, the filter can be changed to target specific types of actors");
scene.idle(90); scene.idle(90);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(controlsPos2), Pointing.RIGHT).rightClick(), scene.overlay().showControls(util.vector().topOf(controlsPos2), Pointing.RIGHT, 15).rightClick();
15);
scene.idle(7); scene.idle(7);
scene.world().modifyBlockEntity(controlsPos2, ContraptionControlsBlockEntity.class, ccte -> ccte.disabled = true); scene.world().modifyBlockEntity(controlsPos2, ContraptionControlsBlockEntity.class, ccte -> ccte.disabled = true);
scene.effects().indicateRedstone(controlsPos2); scene.effects().indicateRedstone(controlsPos2);

View file

@ -5,14 +5,14 @@ import com.simibubi.create.content.contraptions.piston.MechanicalPistonHeadBlock
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.ParrotElement;
import net.createmod.ponder.api.element.ParrotPose;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.ParrotElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
@ -79,10 +79,8 @@ public class PistonScenes {
scene.world().moveSection(contraption, util.vector().of(2, 0, 0), 40); scene.world().moveSection(contraption, util.vector().of(2, 0, 0), 40);
scene.idle(60); scene.idle(60);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(piston, Direction.WEST), Pointing.DOWN, 30).rightClick()
new InputWindowElement(util.vector().blockSurface(piston, Direction.WEST), Pointing.DOWN).rightClick() .withItem(new ItemStack(Items.SLIME_BALL));
.withItem(new ItemStack(Items.SLIME_BALL)),
30);
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(piston.north(), s -> s.setValue(MechanicalPistonHeadBlock.TYPE, PistonType.STICKY), scene.world().modifyBlock(piston.north(), s -> s.setValue(MechanicalPistonHeadBlock.TYPE, PistonType.STICKY),
false); false);
@ -117,8 +115,8 @@ public class PistonScenes {
scene.overlay().showOutline(PonderPalette.GREEN, "glue", util.select().fromTo(2, 2, 3, 2, 1, 3) scene.overlay().showOutline(PonderPalette.GREEN, "glue", util.select().fromTo(2, 2, 3, 2, 1, 3)
.add(util.select().fromTo(2, 1, 3, 2, 1, 1)) .add(util.select().fromTo(2, 1, 3, 2, 1, 1))
.add(util.select().position(1, 1, 1)), 40); .add(util.select().position(1, 1, 1)), 40);
scene.overlay().showControls(new InputWindowElement(util.vector().centerOf(util.grid().at(2, 2, 0)), Pointing.RIGHT) scene.overlay().showControls(util.vector().centerOf(util.grid().at(2, 2, 0)), Pointing.RIGHT, 40)
.withItem(AllItems.SUPER_GLUE.asStack()), 40); .withItem(AllItems.SUPER_GLUE.asStack());
ElementLink<WorldSectionElement> chassis = ElementLink<WorldSectionElement> chassis =
scene.world().showIndependentSection(util.select().fromTo(2, 2, 0, 2, 3, 2), Direction.DOWN); scene.world().showIndependentSection(util.select().fromTo(2, 2, 0, 2, 3, 2), Direction.DOWN);
@ -168,7 +166,7 @@ public class PistonScenes {
scene.world().setKineticSpeed(kinetics, 16); scene.world().setKineticSpeed(kinetics, 16);
scene.idle(10); scene.idle(10);
scene.overlay().showSelectionWithText(util.select().position(piston), 50) scene.overlay().showOutlineWithText(util.select().position(piston), 50)
.colored(PonderPalette.RED) .colored(PonderPalette.RED)
.placeNearTarget() .placeNearTarget()
.attachKeyFrame() .attachKeyFrame()
@ -188,7 +186,7 @@ public class PistonScenes {
scene.overlay().showOutline(PonderPalette.RED, new Object(), util.select().fromTo(piston.east(), piston.east(2)), scene.overlay().showOutline(PonderPalette.RED, new Object(), util.select().fromTo(piston.east(), piston.east(2)),
100); 100);
scene.overlay().showSelectionWithText(util.select().fromTo(piston.west(), piston.west(2)), 100) scene.overlay().showOutlineWithText(util.select().fromTo(piston.west(), piston.west(2)), 100)
.text("The Length of pole added at its back determines the Extension Range") .text("The Length of pole added at its back determines the Extension Range")
.attachKeyFrame() .attachKeyFrame()
.placeNearTarget() .placeNearTarget()
@ -199,7 +197,7 @@ public class PistonScenes {
.west()), Direction.EAST, contraption); .west()), Direction.EAST, contraption);
scene.idle(10); scene.idle(10);
ElementLink<ParrotElement> birb = ElementLink<ParrotElement> birb =
scene.special().createBirb(util.vector().topOf(piston.west()), ParrotElement.FaceCursorPose::new); scene.special().createBirb(util.vector().topOf(piston.west()), ParrotPose.FaceCursorPose::new);
scene.idle(15); scene.idle(15);
scene.effects().indicateRedstone(leverPos); scene.effects().indicateRedstone(leverPos);
@ -256,7 +254,7 @@ public class PistonScenes {
scene.world().destroyBlock(util.grid().at(0, 1, 2)); scene.world().destroyBlock(util.grid().at(0, 1, 2));
scene.world().destroyBlock(util.grid().at(0, 2, 2)); scene.world().destroyBlock(util.grid().at(0, 2, 2));
scene.idle(10); scene.idle(10);
scene.overlay().showSelectionWithText(rose, 70) scene.overlay().showOutlineWithText(rose, 70)
.text("Whenever Pistons stop moving, the moved structure reverts to blocks") .text("Whenever Pistons stop moving, the moved structure reverts to blocks")
.attachKeyFrame() .attachKeyFrame()
.colored(PonderPalette.RED); .colored(PonderPalette.RED);
@ -277,7 +275,7 @@ public class PistonScenes {
Vec3 filter = util.vector().topOf(piston) Vec3 filter = util.vector().topOf(piston)
.add(.125, 0, 0); .add(.125, 0, 0);
scene.overlay().showFilterSlotInput(filter, Direction.UP, 60); scene.overlay().showFilterSlotInput(filter, Direction.UP, 60);
scene.overlay().showControls(new InputWindowElement(filter.add(0, .125, 0), Pointing.DOWN).rightClick(), 60); scene.overlay().showControls(filter.add(0, .125, 0), Pointing.DOWN, 60).rightClick();
scene.overlay().showText(70) scene.overlay().showText(70)
.pointAt(filter.add(-.125, 0, 0)) .pointAt(filter.add(-.125, 0, 0))
.placeNearTarget() .placeNearTarget()

View file

@ -20,15 +20,14 @@ import net.createmod.catnip.utility.IntAttached;
import net.createmod.catnip.utility.Iterate; import net.createmod.catnip.utility.Iterate;
import net.createmod.catnip.utility.NBTHelper; import net.createmod.catnip.utility.NBTHelper;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.ParticleEmitter;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.EntityElement;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.EntityElement;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.createmod.ponder.foundation.instruction.EmitParticlesInstruction.Emitter;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.core.particles.ItemParticleOption; import net.minecraft.core.particles.ItemParticleOption;
@ -99,7 +98,7 @@ public class ProcessingScenes {
scene.world().modifyBlockEntity(millstone, MillstoneBlockEntity.class, scene.world().modifyBlockEntity(millstone, MillstoneBlockEntity.class,
ms -> ms.inputInv.setStackInSlot(0, itemStack)); ms -> ms.inputInv.setStackInSlot(0, itemStack));
scene.idle(10); scene.idle(10);
scene.overlay().showControls(new InputWindowElement(millstoneTop, Pointing.DOWN).withItem(itemStack), 30); scene.overlay().showControls(millstoneTop, Pointing.DOWN, 30).withItem(itemStack);
scene.idle(7); scene.idle(7);
scene.overlay().showText(40) scene.overlay().showText(40)
@ -119,10 +118,8 @@ public class ProcessingScenes {
scene.idle(60); scene.idle(60);
ItemStack flour = AllItems.WHEAT_FLOUR.asStack(); ItemStack flour = AllItems.WHEAT_FLOUR.asStack();
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(millstone, Direction.NORTH), Pointing.RIGHT, 40).rightClick()
new InputWindowElement(util.vector().blockSurface(millstone, Direction.NORTH), Pointing.RIGHT).rightClick() .withItem(flour);
.withItem(flour),
40);
scene.idle(50); scene.idle(50);
scene.addKeyframe(); scene.addKeyframe();
@ -213,12 +210,12 @@ public class ProcessingScenes {
scene.world().createItemEntity(entitySpawn, util.vector().of(0, 0.2, 0), input); scene.world().createItemEntity(entitySpawn, util.vector().of(0, 0.2, 0), input);
scene.idle(18); scene.idle(18);
scene.world().modifyEntity(entity1, Entity::discard); scene.world().modifyEntity(entity1, Entity::discard);
Emitter blockSpace = ParticleEmitter blockSpace =
Emitter.withinBlockSpace(new ItemParticleOption(ParticleTypes.ITEM, input), util.vector().of(0, 0, 0)); scene.effects().particleEmitterWithinBlockSpace(new ItemParticleOption(ParticleTypes.ITEM, input), util.vector().of(0, 0, 0));
scene.effects().emitParticles(util.vector().centerOf(center) scene.effects().emitParticles(util.vector().centerOf(center)
.add(0, -0.2, 0), blockSpace, 3, 40); .add(0, -0.2, 0), blockSpace, 3, 40);
scene.idle(10); scene.idle(10);
scene.overlay().showControls(new InputWindowElement(centerTop, Pointing.DOWN).withItem(input), 30); scene.overlay().showControls(centerTop, Pointing.DOWN, 30).withItem(input);
scene.idle(7); scene.idle(7);
scene.overlay().showText(50) scene.overlay().showText(50)
@ -231,7 +228,7 @@ public class ProcessingScenes {
scene.world().createItemEntity(centerTop.add(0, -1.4, 0), util.vector().of(0, 0, 0), output); scene.world().createItemEntity(centerTop.add(0, -1.4, 0), util.vector().of(0, 0, 0), output);
scene.idle(10); scene.idle(10);
scene.world().createItemEntity(centerTop.add(0, -1.4, 0), util.vector().of(0, 0, 0), output); scene.world().createItemEntity(centerTop.add(0, -1.4, 0), util.vector().of(0, 0, 0), output);
scene.overlay().showControls(new InputWindowElement(centerTop.add(0, -2, 0), Pointing.UP).withItem(output), 30); scene.overlay().showControls(centerTop.add(0, -2, 0), Pointing.UP, 30).withItem(output);
scene.idle(40); scene.idle(40);
scene.world().restoreBlocks(util.select().position(2, 3, 2)); scene.world().restoreBlocks(util.select().position(2, 3, 2));
@ -314,7 +311,7 @@ public class ProcessingScenes {
ItemStack copper = new ItemStack(Items.COPPER_INGOT); ItemStack copper = new ItemStack(Items.COPPER_INGOT);
scene.world().createItemOnBeltLike(depotPos, Direction.NORTH, copper); scene.world().createItemOnBeltLike(depotPos, Direction.NORTH, copper);
Vec3 depotCenter = util.vector().centerOf(depotPos.south()); Vec3 depotCenter = util.vector().centerOf(depotPos.south());
scene.overlay().showControls(new InputWindowElement(depotCenter, Pointing.UP).withItem(copper), 30); scene.overlay().showControls(depotCenter, Pointing.UP, 30).withItem(copper);
scene.idle(10); scene.idle(10);
Class<MechanicalPressBlockEntity> type = MechanicalPressBlockEntity.class; Class<MechanicalPressBlockEntity> type = MechanicalPressBlockEntity.class;
@ -327,7 +324,7 @@ public class ProcessingScenes {
ItemStack sheet = AllItems.COPPER_SHEET.asStack(); ItemStack sheet = AllItems.COPPER_SHEET.asStack();
scene.world().createItemOnBeltLike(depotPos, Direction.UP, sheet); scene.world().createItemOnBeltLike(depotPos, Direction.UP, sheet);
scene.idle(10); scene.idle(10);
scene.overlay().showControls(new InputWindowElement(depotCenter, Pointing.UP).withItem(sheet), 50); scene.overlay().showControls(depotCenter, Pointing.UP, 50).withItem(sheet);
scene.idle(60); scene.idle(60);
scene.world().hideIndependentSection(depot, Direction.NORTH); scene.world().hideIndependentSection(depot, Direction.NORTH);
@ -415,8 +412,8 @@ public class ProcessingScenes {
.text("With a Mixer and Basin, some Crafting Recipes can be automated"); .text("With a Mixer and Basin, some Crafting Recipes can be automated");
scene.idle(40); scene.idle(40);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(basin), Pointing.LEFT).withItem(blue), 30); scene.overlay().showControls(util.vector().topOf(basin), Pointing.LEFT, 30).withItem(blue);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(basin), Pointing.RIGHT).withItem(red), 30); scene.overlay().showControls(util.vector().topOf(basin), Pointing.RIGHT, 30).withItem(red);
scene.idle(30); scene.idle(30);
Class<MechanicalMixerBlockEntity> type = MechanicalMixerBlockEntity.class; Class<MechanicalMixerBlockEntity> type = MechanicalMixerBlockEntity.class;
scene.world().modifyBlockEntity(pressPos, type, pte -> pte.startProcessingBasin()); scene.world().modifyBlockEntity(pressPos, type, pte -> pte.startProcessingBasin());
@ -497,8 +494,7 @@ public class ProcessingScenes {
.text("Pressing items held in a Basin will cause them to be Compacted"); .text("Pressing items held in a Basin will cause them to be Compacted");
scene.idle(40); scene.idle(40);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(basin), Pointing.DOWN).withItem(copper), scene.overlay().showControls(util.vector().topOf(basin), Pointing.DOWN, 30).withItem(copper);
30);
scene.idle(30); scene.idle(30);
Class<MechanicalPressBlockEntity> type = MechanicalPressBlockEntity.class; Class<MechanicalPressBlockEntity> type = MechanicalPressBlockEntity.class;
scene.world().modifyBlockEntity(pressPos, type, pte -> pte.getPressingBehaviour() scene.world().modifyBlockEntity(pressPos, type, pte -> pte.getPressingBehaviour()
@ -525,7 +521,7 @@ public class ProcessingScenes {
ItemStack log = new ItemStack(Items.OAK_LOG); ItemStack log = new ItemStack(Items.OAK_LOG);
ItemStack bark = new ItemStack(Items.OAK_WOOD); ItemStack bark = new ItemStack(Items.OAK_WOOD);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(basin), Pointing.DOWN).withItem(log), 30); scene.overlay().showControls(util.vector().topOf(basin), Pointing.DOWN, 30).withItem(log);
scene.idle(30); scene.idle(30);
scene.world().modifyBlockEntity(pressPos, type, pte -> pte.getPressingBehaviour() scene.world().modifyBlockEntity(pressPos, type, pte -> pte.getPressingBehaviour()
.start(Mode.BASIN)); .start(Mode.BASIN));
@ -582,9 +578,8 @@ public class ProcessingScenes {
}); });
scene.idle(20); scene.idle(20);
scene.overlay() scene.overlay().showControls(util.vector().centerOf(center.above(2)), Pointing.DOWN, 40).rightClick()
.showControls(new InputWindowElement(util.vector().centerOf(center.above(2)), Pointing.DOWN).rightClick() .withItem(AllItems.EMPTY_BLAZE_BURNER.asStack());
.withItem(AllItems.EMPTY_BLAZE_BURNER.asStack()), 40);
scene.idle(10); scene.idle(10);
scene.overlay().showText(60) scene.overlay().showText(60)
.text("Right-click a Blaze with the empty burner to capture it") .text("Right-click a Blaze with the empty burner to capture it")
@ -598,8 +593,8 @@ public class ProcessingScenes {
scene.world().showSection(util.select().position(2, 1, 2), Direction.DOWN); scene.world().showSection(util.select().position(2, 1, 2), Direction.DOWN);
scene.idle(20); scene.idle(20);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(center.above()), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(center.above()), Pointing.DOWN, 40).rightClick()
.withItem(AllItems.EMPTY_BLAZE_BURNER.asStack()), 40); .withItem(AllItems.EMPTY_BLAZE_BURNER.asStack());
scene.idle(10); scene.idle(10);
scene.overlay().showText(60) scene.overlay().showText(60)
.text("Alternatively, Blazes can be collected from their Spawners directly") .text("Alternatively, Blazes can be collected from their Spawners directly")
@ -624,10 +619,8 @@ public class ProcessingScenes {
scene.world().showSection(util.select().position(3, 1, 2), Direction.DOWN); scene.world().showSection(util.select().position(3, 1, 2), Direction.DOWN);
scene.idle(20); scene.idle(20);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(center.east() scene.overlay().showControls(util.vector().topOf(center.east().above()), Pointing.DOWN, 40).rightClick()
.above()), Pointing.DOWN).rightClick() .withItem(new ItemStack(Items.FLINT_AND_STEEL));
.withItem(new ItemStack(Items.FLINT_AND_STEEL)),
40);
scene.idle(7); scene.idle(7);
scene.world().setBlock(util.grid().at(3, 1, 2), AllBlocks.LIT_BLAZE_BURNER.getDefaultState(), false); scene.world().setBlock(util.grid().at(3, 1, 2), AllBlocks.LIT_BLAZE_BURNER.getDefaultState(), false);
scene.idle(10); scene.idle(10);
@ -638,10 +631,8 @@ public class ProcessingScenes {
.above(), Direction.UP)) .above(), Direction.UP))
.placeNearTarget(); .placeNearTarget();
scene.idle(80); scene.idle(80);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(center.east() scene.overlay().showControls(util.vector().topOf(center.east().above()), Pointing.DOWN, 40).rightClick()
.above()), Pointing.DOWN).rightClick() .withItem(new ItemStack(Items.SOUL_SAND));
.withItem(new ItemStack(Items.SOUL_SAND)),
40);
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(util.grid().at(3, 1, 2), scene.world().modifyBlock(util.grid().at(3, 1, 2),
s -> s.setValue(LitBlazeBurnerBlock.FLAME_TYPE, LitBlazeBurnerBlock.FlameType.SOUL), false); s -> s.setValue(LitBlazeBurnerBlock.FLAME_TYPE, LitBlazeBurnerBlock.FlameType.SOUL), false);
@ -682,8 +673,8 @@ public class ProcessingScenes {
scene.world().hideSection(util.select().position(burner.above()), Direction.UP); scene.world().hideSection(util.select().position(burner.above()), Direction.UP);
scene.idle(20); scene.idle(20);
scene.world().setBlock(burner.above(), Blocks.AIR.defaultBlockState(), false); scene.world().setBlock(burner.above(), Blocks.AIR.defaultBlockState(), false);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(burner), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(burner), Pointing.DOWN, 15).rightClick()
.withItem(new ItemStack(Items.OAK_PLANKS)), 15); .withItem(new ItemStack(Items.OAK_PLANKS));
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(burner, s -> s.setValue(BlazeBurnerBlock.HEAT_LEVEL, HeatLevel.KINDLED), false); scene.world().modifyBlock(burner, s -> s.setValue(BlazeBurnerBlock.HEAT_LEVEL, HeatLevel.KINDLED), false);
scene.idle(20); scene.idle(20);
@ -696,8 +687,8 @@ public class ProcessingScenes {
scene.idle(80); scene.idle(80);
scene.idle(20); scene.idle(20);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(burner), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(burner), Pointing.DOWN, 30).rightClick()
.withItem(AllItems.BLAZE_CAKE.asStack()), 30); .withItem(AllItems.BLAZE_CAKE.asStack());
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(burner, s -> s.setValue(BlazeBurnerBlock.HEAT_LEVEL, HeatLevel.SEETHING), false); scene.world().modifyBlock(burner, s -> s.setValue(BlazeBurnerBlock.HEAT_LEVEL, HeatLevel.SEETHING), false);
scene.idle(20); scene.idle(20);
@ -756,8 +747,7 @@ public class ProcessingScenes {
scene.idle(10); scene.idle(10);
} }
scene.idle(10); scene.idle(10);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(basinPos), Pointing.DOWN).withItem(stack), scene.overlay().showControls(util.vector().topOf(basinPos), Pointing.DOWN, 30).withItem(stack);
30);
scene.idle(30); scene.idle(30);
for (Direction d : Iterate.horizontalDirections) { for (Direction d : Iterate.horizontalDirections) {
@ -840,8 +830,7 @@ public class ProcessingScenes {
.serializeNBT())); .serializeNBT()));
}); });
scene.idle(4); scene.idle(4);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(basinPos.below() scene.overlay().showControls(util.vector().topOf(basinPos.below().north()), Pointing.RIGHT, 30).withItem(new ItemStack(Items.BRICKS));
.north()), Pointing.RIGHT).withItem(new ItemStack(Items.BRICKS)), 30);
scene.overlay().showText(60) scene.overlay().showText(60)
.attachKeyFrame() .attachKeyFrame()
@ -864,8 +853,7 @@ public class ProcessingScenes {
scene.idle(50); scene.idle(50);
ItemStack nugget = AllItems.COPPER_NUGGET.asStack(); ItemStack nugget = AllItems.COPPER_NUGGET.asStack();
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(basinPos), Pointing.RIGHT).withItem(nugget), scene.overlay().showControls(util.vector().topOf(basinPos), Pointing.RIGHT, 30).withItem(nugget);
30);
scene.idle(30); scene.idle(30);
scene.world().modifyBlockEntity(pressPos, type, pte -> pte.getPressingBehaviour() scene.world().modifyBlockEntity(pressPos, type, pte -> pte.getPressingBehaviour()
.start(Mode.BASIN)); .start(Mode.BASIN));
@ -875,8 +863,7 @@ public class ProcessingScenes {
ItemStack ingot = new ItemStack(Items.COPPER_INGOT); ItemStack ingot = new ItemStack(Items.COPPER_INGOT);
scene.idle(30); scene.idle(30);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(basinPos), Pointing.RIGHT).withItem(ingot), scene.overlay().showControls(util.vector().topOf(basinPos), Pointing.RIGHT, 30).withItem(ingot);
30);
scene.idle(30); scene.idle(30);
scene.world().modifyBlockEntity(pressPos, type, pte -> pte.getPressingBehaviour() scene.world().modifyBlockEntity(pressPos, type, pte -> pte.getPressingBehaviour()
.start(Mode.BASIN)); .start(Mode.BASIN));
@ -886,8 +873,7 @@ public class ProcessingScenes {
ItemStack block = new ItemStack(Items.COPPER_BLOCK); ItemStack block = new ItemStack(Items.COPPER_BLOCK);
scene.idle(30); scene.idle(30);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(basinPos), Pointing.RIGHT).withItem(block), scene.overlay().showControls(util.vector().topOf(basinPos), Pointing.RIGHT, 30).withItem(block);
30);
scene.overlay().showText(70) scene.overlay().showText(70)
.attachKeyFrame() .attachKeyFrame()
.colored(PonderPalette.GREEN) .colored(PonderPalette.GREEN)

View file

@ -4,13 +4,12 @@ import com.simibubi.create.AllItems;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.Blocks;
@ -86,8 +85,8 @@ public class PulleyScenes {
scene.overlay().showOutline(PonderPalette.GREEN, "glue", util.select().position(3, 1, 1) scene.overlay().showOutline(PonderPalette.GREEN, "glue", util.select().position(3, 1, 1)
.add(util.select().fromTo(1, 1, 2, 3, 1, 2)) .add(util.select().fromTo(1, 1, 2, 3, 1, 2))
.add(util.select().position(1, 2, 2)), 40); .add(util.select().position(1, 2, 2)), 40);
scene.overlay().showControls(new InputWindowElement(util.vector().centerOf(util.grid().at(2, 2, 0)), Pointing.RIGHT) scene.overlay().showControls(util.vector().centerOf(util.grid().at(2, 2, 0)), Pointing.RIGHT, 40)
.withItem(AllItems.SUPER_GLUE.asStack()), 40); .withItem(AllItems.SUPER_GLUE.asStack());
scene.idle(15); scene.idle(15);
scene.effects().superGlue(util.grid().at(3, 1, 1), Direction.SOUTH, true); scene.effects().superGlue(util.grid().at(3, 1, 1), Direction.SOUTH, true);
scene.overlay().showText(80) scene.overlay().showText(80)
@ -148,7 +147,7 @@ public class PulleyScenes {
scene.world().destroyBlock(flowerPos); scene.world().destroyBlock(flowerPos);
scene.idle(10); scene.idle(10);
scene.overlay().showSelectionWithText(util.select().position(flowerPos), 70) scene.overlay().showOutlineWithText(util.select().position(flowerPos), 70)
.text("Whenever Pulleys stop moving, the moved structure reverts to blocks") .text("Whenever Pulleys stop moving, the moved structure reverts to blocks")
.attachKeyFrame() .attachKeyFrame()
.placeNearTarget() .placeNearTarget()
@ -167,8 +166,7 @@ public class PulleyScenes {
scene.world().setBlock(flowerPos, Blocks.BLUE_ORCHID.defaultBlockState(), false); scene.world().setBlock(flowerPos, Blocks.BLUE_ORCHID.defaultBlockState(), false);
scene.world().showSection(util.select().position(flowerPos), Direction.DOWN); scene.world().showSection(util.select().position(flowerPos), Direction.DOWN);
scene.overlay().showCenteredScrollInput(pulleyPos, Direction.UP, 60); scene.overlay().showCenteredScrollInput(pulleyPos, Direction.UP, 60);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(pulleyPos), Pointing.DOWN).rightClick(), scene.overlay().showControls(util.vector().topOf(pulleyPos), Pointing.DOWN, 60).rightClick();
60);
scene.overlay().showText(70) scene.overlay().showText(70)
.pointAt(util.vector().topOf(pulleyPos)) .pointAt(util.vector().topOf(pulleyPos))
.placeNearTarget() .placeNearTarget()
@ -231,7 +229,7 @@ public class PulleyScenes {
scene.world().moveSection(pulley, util.vector().of(-2, 0, 0), 40); scene.world().moveSection(pulley, util.vector().of(-2, 0, 0), 40);
scene.idle(40); scene.idle(40);
scene.overlay().showSelectionWithText(util.select().fromTo(1, 1, 1, 1, 1, 2), 50) scene.overlay().showOutlineWithText(util.select().fromTo(1, 1, 1, 1, 1, 2), 50)
.colored(PonderPalette.GREEN) .colored(PonderPalette.GREEN)
.placeNearTarget() .placeNearTarget()
.attachKeyFrame() .attachKeyFrame()

View file

@ -20,14 +20,13 @@ import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.catnip.utility.lang.Components; import net.createmod.catnip.utility.lang.Components;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.ParrotPose;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.ParrotElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
@ -250,7 +249,7 @@ public class RedstoneScenes {
scene.idle(50); scene.idle(50);
scene.overlay().showRepeaterScrollInput(circuitPos, 60); scene.overlay().showRepeaterScrollInput(circuitPos, 60);
scene.overlay().showControls(new InputWindowElement(circuitTop, Pointing.DOWN).rightClick(), 60); scene.overlay().showControls(circuitTop, Pointing.DOWN, 60).rightClick();
scene.idle(10); scene.idle(10);
scene.overlay().showText(60) scene.overlay().showText(60)
.text("Using the value panel, the discharge time can be configured") .text("Using the value panel, the discharge time can be configured")
@ -323,7 +322,7 @@ public class RedstoneScenes {
scene.idle(70); scene.idle(70);
scene.overlay().showRepeaterScrollInput(circuitPos, 60); scene.overlay().showRepeaterScrollInput(circuitPos, 60);
scene.overlay().showControls(new InputWindowElement(circuitTop, Pointing.DOWN).rightClick(), 60); scene.overlay().showControls(circuitTop, Pointing.DOWN, 60).rightClick();
scene.idle(10); scene.idle(10);
scene.overlay().showText(60) scene.overlay().showText(60)
.text("Using the value panel, the charge time can be configured") .text("Using the value panel, the charge time can be configured")
@ -412,7 +411,7 @@ public class RedstoneScenes {
scene.addKeyframe(); scene.addKeyframe();
scene.idle(10); scene.idle(10);
scene.overlay().showControls(new InputWindowElement(circuitTop, Pointing.DOWN).rightClick(), 40); scene.overlay().showControls(circuitTop, Pointing.DOWN, 40).rightClick();
scene.idle(7); scene.idle(7);
scene.world().toggleRedstonePower(util.select().fromTo(2, 1, 2, 0, 1, 2)); scene.world().toggleRedstonePower(util.select().fromTo(2, 1, 2, 0, 1, 2));
scene.world().cycleBlockProperty(circuitPos, PoweredLatchBlock.POWERING); scene.world().cycleBlockProperty(circuitPos, PoweredLatchBlock.POWERING);
@ -424,7 +423,7 @@ public class RedstoneScenes {
.pointAt(circuitTop); .pointAt(circuitTop);
scene.idle(60); scene.idle(60);
scene.overlay().showControls(new InputWindowElement(circuitTop, Pointing.DOWN).rightClick(), 40); scene.overlay().showControls(circuitTop, Pointing.DOWN, 40).rightClick();
scene.idle(7); scene.idle(7);
scene.world().toggleRedstonePower(util.select().fromTo(2, 1, 2, 0, 1, 2)); scene.world().toggleRedstonePower(util.select().fromTo(2, 1, 2, 0, 1, 2));
scene.world().cycleBlockProperty(circuitPos, PoweredLatchBlock.POWERING); scene.world().cycleBlockProperty(circuitPos, PoweredLatchBlock.POWERING);
@ -485,7 +484,7 @@ public class RedstoneScenes {
scene.addKeyframe(); scene.addKeyframe();
scene.idle(10); scene.idle(10);
scene.overlay().showControls(new InputWindowElement(circuitTop, Pointing.DOWN).rightClick(), 40); scene.overlay().showControls(circuitTop, Pointing.DOWN, 40).rightClick();
scene.idle(7); scene.idle(7);
scene.world().toggleRedstonePower(util.select().fromTo(2, 1, 2, 0, 1, 2)); scene.world().toggleRedstonePower(util.select().fromTo(2, 1, 2, 0, 1, 2));
scene.world().cycleBlockProperty(circuitPos, ToggleLatchBlock.POWERING); scene.world().cycleBlockProperty(circuitPos, ToggleLatchBlock.POWERING);
@ -497,7 +496,7 @@ public class RedstoneScenes {
.pointAt(circuitTop); .pointAt(circuitTop);
scene.idle(60); scene.idle(60);
scene.overlay().showControls(new InputWindowElement(circuitTop, Pointing.DOWN).rightClick(), 40); scene.overlay().showControls(circuitTop, Pointing.DOWN, 40).rightClick();
scene.idle(7); scene.idle(7);
scene.world().toggleRedstonePower(util.select().fromTo(2, 1, 2, 0, 1, 2)); scene.world().toggleRedstonePower(util.select().fromTo(2, 1, 2, 0, 1, 2));
scene.world().cycleBlockProperty(circuitPos, ToggleLatchBlock.POWERING); scene.world().cycleBlockProperty(circuitPos, ToggleLatchBlock.POWERING);
@ -537,7 +536,7 @@ public class RedstoneScenes {
scene.idle(70); scene.idle(70);
IntegerProperty power = RedStoneWireBlock.POWER; IntegerProperty power = RedStoneWireBlock.POWER;
scene.overlay().showControls(new InputWindowElement(leverVec, Pointing.DOWN).rightClick(), 40); scene.overlay().showControls(leverVec, Pointing.DOWN, 40).rightClick();
scene.idle(7); scene.idle(7);
for (int i = 0; i < 7; i++) { for (int i = 0; i < 7; i++) {
scene.idle(2); scene.idle(2);
@ -556,8 +555,8 @@ public class RedstoneScenes {
.pointAt(leverVec); .pointAt(leverVec);
scene.idle(70); scene.idle(70);
scene.overlay().showControls(new InputWindowElement(leverVec, Pointing.DOWN).rightClick() scene.overlay().showControls(leverVec, Pointing.DOWN, 40).rightClick()
.whileSneaking(), 40); .whileSneaking();
scene.idle(7); scene.idle(7);
for (int i = 7; i > 0; i--) { for (int i = 7; i > 0; i--) {
scene.idle(2); scene.idle(2);
@ -579,7 +578,7 @@ public class RedstoneScenes {
.pointAt(leverVec); .pointAt(leverVec);
scene.idle(70); scene.idle(70);
scene.overlay().showControls(new InputWindowElement(leverVec, Pointing.DOWN).rightClick(), 40); scene.overlay().showControls(leverVec, Pointing.DOWN, 40).rightClick();
scene.idle(7); scene.idle(7);
for (int i = 0; i < 15; i++) { for (int i = 0; i < 15; i++) {
scene.idle(2); scene.idle(2);
@ -635,8 +634,8 @@ public class RedstoneScenes {
ItemStack clipboard = AllBlocks.CLIPBOARD.asStack(); ItemStack clipboard = AllBlocks.CLIPBOARD.asStack();
ClipboardOverrides.switchTo(ClipboardType.WRITTEN, clipboard); ClipboardOverrides.switchTo(ClipboardType.WRITTEN, clipboard);
scene.overlay().showControls(new InputWindowElement(centerTube.add(1, .35, 0), Pointing.DOWN).rightClick() scene.overlay().showControls(centerTube.add(1, .35, 0), Pointing.DOWN, 40).rightClick()
.withItem(clipboard), 40); .withItem(clipboard);
scene.idle(7); scene.idle(7);
Component component = Components.literal("CREATE"); Component component = Components.literal("CREATE");
@ -652,7 +651,7 @@ public class RedstoneScenes {
scene.idle(10); scene.idle(10);
scene.world().showSection(util.select().position(4, 1, 3), Direction.DOWN); scene.world().showSection(util.select().position(4, 1, 3), Direction.DOWN);
scene.idle(10); scene.idle(10);
scene.special().createBirb(util.vector().topOf(util.grid().at(0, 0, 3)), ParrotElement.DancePose::new); scene.special().createBirb(util.vector().topOf(util.grid().at(0, 0, 3)), ParrotPose.DancePose::new);
scene.idle(20); scene.idle(20);
scene.overlay().showText(80) scene.overlay().showText(80)
@ -663,10 +662,8 @@ public class RedstoneScenes {
.add(-.75, -.05f, 0)); .add(-.75, -.05f, 0));
scene.idle(90); scene.idle(90);
InputWindowElement input = scene.overlay().showControls(util.vector().blockSurface(util.grid().at(3, 1, 3), Direction.UP), Pointing.DOWN, 30)
new InputWindowElement(util.vector().blockSurface(util.grid().at(3, 1, 3), Direction.UP), Pointing.DOWN) .withItem(new ItemStack(Items.BLUE_DYE));
.withItem(new ItemStack(Items.BLUE_DYE));
scene.overlay().showControls(input, 30);
scene.idle(7); scene.idle(7);
scene.world().setBlocks(util.select().fromTo(1, 1, 3, 3, 1, 3), AllBlocks.NIXIE_TUBES.get(DyeColor.BLUE) scene.world().setBlocks(util.select().fromTo(1, 1, 3, 3, 1, 3), AllBlocks.NIXIE_TUBES.get(DyeColor.BLUE)
.getDefaultState() .getDefaultState()
@ -720,8 +717,8 @@ public class RedstoneScenes {
.pointAt(link1Vec); .pointAt(link1Vec);
scene.idle(60); scene.idle(60);
scene.overlay().showControls(new InputWindowElement(link2Vec, Pointing.UP).rightClick() scene.overlay().showControls(link2Vec, Pointing.UP, 40).rightClick()
.whileSneaking(), 40); .whileSneaking();
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(link2Pos, s -> s.cycle(RedstoneLinkBlock.RECEIVER), true); scene.world().modifyBlock(link2Pos, s -> s.cycle(RedstoneLinkBlock.RECEIVER), true);
scene.idle(10); scene.idle(10);
@ -731,8 +728,8 @@ public class RedstoneScenes {
.pointAt(link2Vec); .pointAt(link2Vec);
scene.idle(60); scene.idle(60);
scene.overlay().showControls(new InputWindowElement(link3Vec, Pointing.UP).rightClick() scene.overlay().showControls(link3Vec, Pointing.UP, 40).rightClick()
.withItem(AllItems.WRENCH.asStack()), 40); .withItem(AllItems.WRENCH.asStack());
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(link3Pos, s -> s.cycle(RedstoneLinkBlock.RECEIVER), true); scene.world().modifyBlock(link3Pos, s -> s.cycle(RedstoneLinkBlock.RECEIVER), true);
scene.idle(10); scene.idle(10);
@ -786,9 +783,9 @@ public class RedstoneScenes {
ItemStack gold = new ItemStack(Items.GOLD_INGOT); ItemStack gold = new ItemStack(Items.GOLD_INGOT);
ItemStack sapling = new ItemStack(Items.OAK_SAPLING); ItemStack sapling = new ItemStack(Items.OAK_SAPLING);
scene.overlay().showControls(new InputWindowElement(frontSlot, Pointing.UP).withItem(iron), 30); scene.overlay().showControls(frontSlot, Pointing.UP, 30).withItem(iron);
scene.idle(7); scene.idle(7);
scene.overlay().showControls(new InputWindowElement(backSlot, Pointing.DOWN).withItem(sapling), 30); scene.overlay().showControls(backSlot, Pointing.DOWN, 30).withItem(sapling);
scene.world().modifyBlockEntityNBT(link1Select, RedstoneLinkBlockEntity.class, scene.world().modifyBlockEntityNBT(link1Select, RedstoneLinkBlockEntity.class,
nbt -> nbt.put("FrequencyLast", iron.save(new CompoundTag()))); nbt -> nbt.put("FrequencyLast", iron.save(new CompoundTag())));
scene.idle(7); scene.idle(7);
@ -796,9 +793,9 @@ public class RedstoneScenes {
nbt -> nbt.put("FrequencyFirst", sapling.save(new CompoundTag()))); nbt -> nbt.put("FrequencyFirst", sapling.save(new CompoundTag())));
scene.idle(20); scene.idle(20);
scene.overlay().showControls(new InputWindowElement(bottom2Slot, Pointing.UP).withItem(iron), 30); scene.overlay().showControls(bottom2Slot, Pointing.UP, 30).withItem(iron);
scene.idle(7); scene.idle(7);
scene.overlay().showControls(new InputWindowElement(top2Slot, Pointing.DOWN).withItem(sapling), 30); scene.overlay().showControls(top2Slot, Pointing.DOWN, 30).withItem(sapling);
scene.world().modifyBlockEntityNBT(link2Select, RedstoneLinkBlockEntity.class, scene.world().modifyBlockEntityNBT(link2Select, RedstoneLinkBlockEntity.class,
nbt -> nbt.put("FrequencyLast", iron.save(new CompoundTag()))); nbt -> nbt.put("FrequencyLast", iron.save(new CompoundTag())));
scene.idle(7); scene.idle(7);
@ -806,9 +803,9 @@ public class RedstoneScenes {
nbt -> nbt.put("FrequencyFirst", sapling.save(new CompoundTag()))); nbt -> nbt.put("FrequencyFirst", sapling.save(new CompoundTag())));
scene.idle(20); scene.idle(20);
scene.overlay().showControls(new InputWindowElement(bottom3Slot, Pointing.UP).withItem(gold), 30); scene.overlay().showControls(bottom3Slot, Pointing.UP, 30).withItem(gold);
scene.idle(7); scene.idle(7);
scene.overlay().showControls(new InputWindowElement(top3Slot, Pointing.DOWN).withItem(sapling), 30); scene.overlay().showControls(top3Slot, Pointing.DOWN, 30).withItem(sapling);
scene.world().modifyBlockEntityNBT(link3Select, RedstoneLinkBlockEntity.class, scene.world().modifyBlockEntityNBT(link3Select, RedstoneLinkBlockEntity.class,
nbt -> nbt.put("FrequencyLast", gold.save(new CompoundTag()))); nbt -> nbt.put("FrequencyLast", gold.save(new CompoundTag())));
scene.idle(7); scene.idle(7);

View file

@ -6,12 +6,11 @@ import com.simibubi.create.content.redstone.nixieTube.NixieTubeBlockEntity;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
@ -116,9 +115,8 @@ public class RedstoneScenes2 {
.text("Comparators output based on the distance to a powered lamp"); .text("Comparators output based on the distance to a powered lamp");
scene.idle(90); scene.idle(90);
scene.overlay() scene.overlay().showControls(util.vector().topOf(centerLamp.east(2)), Pointing.DOWN, 20).rightClick()
.showControls(new InputWindowElement(util.vector().topOf(centerLamp.east(2)), Pointing.DOWN).rightClick() .withItem(AllItems.WRENCH.asStack());
.withItem(AllItems.WRENCH.asStack()), 20);
scene.idle(6); scene.idle(6);
scene.world().cycleBlockProperty(centerLamp.east(), RoseQuartzLampBlock.POWERING); scene.world().cycleBlockProperty(centerLamp.east(), RoseQuartzLampBlock.POWERING);
scene.world().toggleRedstonePower(comparator); scene.world().toggleRedstonePower(comparator);
@ -126,8 +124,8 @@ public class RedstoneScenes2 {
.modifyBlockEntityNBT(comparator, NixieTubeBlockEntity.class, nbt -> nbt.putInt("RedstoneStrength", 0)); .modifyBlockEntityNBT(comparator, NixieTubeBlockEntity.class, nbt -> nbt.putInt("RedstoneStrength", 0));
scene.idle(20); scene.idle(20);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(centerLamp), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(centerLamp), Pointing.DOWN, 20).rightClick()
.withItem(AllItems.WRENCH.asStack()), 20); .withItem(AllItems.WRENCH.asStack());
scene.idle(6); scene.idle(6);
scene.world().cycleBlockProperty(centerLamp.west(), RoseQuartzLampBlock.POWERING); scene.world().cycleBlockProperty(centerLamp.west(), RoseQuartzLampBlock.POWERING);
scene.world().toggleRedstonePower(comparator); scene.world().toggleRedstonePower(comparator);

View file

@ -6,14 +6,14 @@ import com.simibubi.create.foundation.gui.AllIcons;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.ParrotElement;
import net.createmod.ponder.api.element.ParrotPose;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.ParrotElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
@ -54,7 +54,7 @@ public class RollerScenes {
scene.world().showSection(util.select().position(stationPos), Direction.DOWN); scene.world().showSection(util.select().position(stationPos), Direction.DOWN);
scene.idle(5); scene.idle(5);
ElementLink<ParrotElement> birbLink = ElementLink<ParrotElement> birbLink =
scene.special().createBirb(util.vector().centerOf(8, 3, 4), ParrotElement.FacePointOfInterestPose::new); scene.special().createBirb(util.vector().centerOf(8, 3, 4), ParrotPose.FacePointOfInterestPose::new);
ElementLink<WorldSectionElement> trainLink = scene.world().showIndependentSection(train, Direction.DOWN); ElementLink<WorldSectionElement> trainLink = scene.world().showIndependentSection(train, Direction.DOWN);
scene.idle(5); scene.idle(5);
scene.world().showSectionAndMerge(rollers, Direction.EAST, trainLink); scene.world().showSectionAndMerge(rollers, Direction.EAST, trainLink);
@ -85,8 +85,8 @@ public class RollerScenes {
scene.world().modifyBlockEntity(util.grid().at(6, 2, 3 + i), RollerBlockEntity.class, scene.world().modifyBlockEntity(util.grid().at(6, 2, 3 + i), RollerBlockEntity.class,
rte -> rte.setAnimatedSpeed(0)); rte -> rte.setAnimatedSpeed(0));
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(util.grid().at(2, 2, 4)), Pointing.DOWN) scene.overlay().showControls(util.vector().topOf(util.grid().at(2, 2, 4)), Pointing.DOWN, 70)
.showing(AllIcons.I_ROLLER_PAVE), 70); .showing(AllIcons.I_ROLLER_PAVE);
scene.overlay().showText(80) scene.overlay().showText(80)
.pointAt(util.vector().topOf(util.grid().at(2, 2, 4))) .pointAt(util.vector().topOf(util.grid().at(2, 2, 4)))
@ -133,7 +133,7 @@ public class RollerScenes {
scene.world().hideIndependentSection(trainLink, Direction.UP); scene.world().hideIndependentSection(trainLink, Direction.UP);
scene.idle(15); scene.idle(15);
birbLink = scene.special().createBirb(util.vector().centerOf(8, 3, 4), ParrotElement.FacePointOfInterestPose::new); birbLink = scene.special().createBirb(util.vector().centerOf(8, 3, 4), ParrotPose.FacePointOfInterestPose::new);
trainLink = scene.world().showIndependentSection(train, Direction.DOWN); trainLink = scene.world().showIndependentSection(train, Direction.DOWN);
scene.world().toggleControls(controlsPos); scene.world().toggleControls(controlsPos);
scene.idle(5); scene.idle(5);
@ -154,7 +154,7 @@ public class RollerScenes {
Block paveMaterial = Blocks.TUFF; Block paveMaterial = Blocks.TUFF;
ItemStack paveItem = new ItemStack(paveMaterial); ItemStack paveItem = new ItemStack(paveMaterial);
scene.overlay().showControls(new InputWindowElement(filterSlot, Pointing.DOWN).withItem(paveItem), 40); scene.overlay().showControls(filterSlot, Pointing.DOWN, 40).withItem(paveItem);
scene.idle(7); scene.idle(7);
scene.world().setFilterData(rollers, RollerBlockEntity.class, paveItem); scene.world().setFilterData(rollers, RollerBlockEntity.class, paveItem);
scene.idle(20); scene.idle(20);
@ -246,7 +246,7 @@ public class RollerScenes {
scene.world().hideSection(util.select().position(stationPos), Direction.UP); scene.world().hideSection(util.select().position(stationPos), Direction.UP);
scene.idle(10); scene.idle(10);
scene.overlay().showSelectionWithText(util.select().fromTo(5, 0, 3, 0, 0, 5), 90) scene.overlay().showOutlineWithText(util.select().fromTo(5, 0, 3, 0, 0, 5), 90)
.pointAt(util.vector().topOf(util.grid().at(3, 0, 4))) .pointAt(util.vector().topOf(util.grid().at(3, 0, 4)))
.attachKeyFrame() .attachKeyFrame()
.colored(PonderPalette.RED) .colored(PonderPalette.RED)
@ -268,7 +268,7 @@ public class RollerScenes {
paveMaterial = Blocks.GRASS_BLOCK; paveMaterial = Blocks.GRASS_BLOCK;
paveItem = new ItemStack(paveMaterial); paveItem = new ItemStack(paveMaterial);
scene.overlay().showControls(new InputWindowElement(filterSlot, Pointing.DOWN).withItem(paveItem), 40); scene.overlay().showControls(filterSlot, Pointing.DOWN, 40).withItem(paveItem);
scene.idle(7); scene.idle(7);
scene.world().setFilterData(rollers, RollerBlockEntity.class, paveItem); scene.world().setFilterData(rollers, RollerBlockEntity.class, paveItem);
scene.idle(20); scene.idle(20);
@ -339,7 +339,7 @@ public class RollerScenes {
ElementLink<WorldSectionElement> trainLink = scene.world().showIndependentSection(train, Direction.DOWN); ElementLink<WorldSectionElement> trainLink = scene.world().showIndependentSection(train, Direction.DOWN);
ElementLink<ParrotElement> birbLink = ElementLink<ParrotElement> birbLink =
scene.special().createBirb(util.vector().centerOf(8, 7, 4), ParrotElement.FacePointOfInterestPose::new); scene.special().createBirb(util.vector().centerOf(8, 7, 4), ParrotPose.FacePointOfInterestPose::new);
scene.idle(5); scene.idle(5);
scene.world().showSectionAndMerge(rollers, Direction.EAST, trainLink); scene.world().showSectionAndMerge(rollers, Direction.EAST, trainLink);
scene.idle(15); scene.idle(15);
@ -353,20 +353,18 @@ public class RollerScenes {
.placeNearTarget(); .placeNearTarget();
scene.idle(70); scene.idle(70);
scene.overlay().showSelectionWithText(util.select().fromTo(5, 3, 3, 0, 1, 5), 90) scene.overlay().showOutlineWithText(util.select().fromTo(5, 3, 3, 0, 1, 5), 90)
.attachKeyFrame() .attachKeyFrame()
.colored(PonderPalette.BLUE) .colored(PonderPalette.BLUE)
.text("The 'fill' modes can help to bridge gaps between pavement and terrain") .text("The 'fill' modes can help to bridge gaps between pavement and terrain")
.placeNearTarget(); .placeNearTarget();
scene.idle(100); scene.idle(100);
scene.overlay().showControls(new InputWindowElement(filterSlot, Pointing.DOWN).showing(AllIcons.I_ROLLER_FILL), scene.overlay().showControls(filterSlot, Pointing.DOWN, 50).showing(AllIcons.I_ROLLER_FILL);
50);
scene.idle(15); scene.idle(15);
Block paveMaterial = Blocks.COARSE_DIRT; Block paveMaterial = Blocks.COARSE_DIRT;
ItemStack paveItem = new ItemStack(paveMaterial); ItemStack paveItem = new ItemStack(paveMaterial);
scene.overlay() scene.overlay().showControls(filterSlot.add(0, 0, -6 / 16f), Pointing.UP, 35).withItem(paveItem);
.showControls(new InputWindowElement(filterSlot.add(0, 0, -6 / 16f), Pointing.UP).withItem(paveItem), 35);
scene.idle(7); scene.idle(7);
scene.world().setFilterData(rollers, RollerBlockEntity.class, paveItem); scene.world().setFilterData(rollers, RollerBlockEntity.class, paveItem);
scene.idle(10); scene.idle(10);
@ -423,14 +421,13 @@ public class RollerScenes {
scene.world().cycleBlockProperty(stationPos, StationBlock.ASSEMBLING); scene.world().cycleBlockProperty(stationPos, StationBlock.ASSEMBLING);
scene.world().animateTrainStation(stationPos, true); scene.world().animateTrainStation(stationPos, true);
birbLink = scene.special().createBirb(util.vector().centerOf(8, 7, 4), ParrotElement.FacePointOfInterestPose::new); birbLink = scene.special().createBirb(util.vector().centerOf(8, 7, 4), ParrotPose.FacePointOfInterestPose::new);
trainLink = scene.world().showIndependentSection(train, Direction.DOWN); trainLink = scene.world().showIndependentSection(train, Direction.DOWN);
scene.idle(5); scene.idle(5);
scene.world().showSectionAndMerge(rollers, Direction.EAST, trainLink); scene.world().showSectionAndMerge(rollers, Direction.EAST, trainLink);
scene.idle(25); scene.idle(25);
scene.overlay() scene.overlay().showControls(filterSlot, Pointing.DOWN, 40).showing(AllIcons.I_ROLLER_WIDE_FILL);
.showControls(new InputWindowElement(filterSlot, Pointing.DOWN).showing(AllIcons.I_ROLLER_WIDE_FILL), 40);
scene.idle(45); scene.idle(45);
scene.world().cycleBlockProperty(stationPos, StationBlock.ASSEMBLING); scene.world().cycleBlockProperty(stationPos, StationBlock.ASSEMBLING);
@ -488,7 +485,7 @@ public class RollerScenes {
scene.world().cycleBlockProperty(stationPos, StationBlock.ASSEMBLING); scene.world().cycleBlockProperty(stationPos, StationBlock.ASSEMBLING);
scene.world().animateTrainStation(stationPos, true); scene.world().animateTrainStation(stationPos, true);
scene.world().showSection(util.select().fromTo(5, 1, 3, 0, 3, 5), Direction.NORTH); scene.world().showSection(util.select().fromTo(5, 1, 3, 0, 3, 5), Direction.NORTH);
birbLink = scene.special().createBirb(util.vector().centerOf(8, 7, 4), ParrotElement.FacePointOfInterestPose::new); birbLink = scene.special().createBirb(util.vector().centerOf(8, 7, 4), ParrotPose.FacePointOfInterestPose::new);
trainLink = scene.world().showIndependentSection(train, Direction.DOWN); trainLink = scene.world().showIndependentSection(train, Direction.DOWN);
scene.idle(5); scene.idle(5);
scene.world().showSectionAndMerge(rollers, Direction.EAST, trainLink); scene.world().showSectionAndMerge(rollers, Direction.EAST, trainLink);

View file

@ -12,13 +12,12 @@ import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Iterate; import net.createmod.catnip.utility.Iterate;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.core.Direction.Axis; import net.minecraft.core.Direction.Axis;
@ -103,12 +102,9 @@ public class SteamScenes {
scene.world().toggleRedstonePower(lever); scene.world().toggleRedstonePower(lever);
scene.idle(40); scene.idle(40);
InputWindowElement rightClick = scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.EAST), Pointing.RIGHT, 50)
new InputWindowElement(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.EAST), Pointing.RIGHT) .withItem(AllBlocks.STEAM_WHISTLE.asStack())
.withItem(AllBlocks.STEAM_WHISTLE.asStack()) .rightClick();
.rightClick();
scene.overlay().showControls(rightClick, 50);
scene.idle(6); scene.idle(6);
BlockState extension = AllBlocks.STEAM_WHISTLE_EXTENSION.getDefaultState(); BlockState extension = AllBlocks.STEAM_WHISTLE_EXTENSION.getDefaultState();
scene.world().setBlock(whistlePos.above(), extension, false); scene.world().setBlock(whistlePos.above(), extension, false);
@ -122,31 +118,36 @@ public class SteamScenes {
scene.idle(40); scene.idle(40);
scene.overlay().showControls(rightClick, 2); scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.EAST), Pointing.RIGHT, 2)
.withItem(AllBlocks.STEAM_WHISTLE.asStack())
.rightClick();
scene.idle(6); scene.idle(6);
scene.world().cycleBlockProperty(whistlePos.above(), WhistleExtenderBlock.SHAPE); scene.world().cycleBlockProperty(whistlePos.above(), WhistleExtenderBlock.SHAPE);
scene.idle(4); scene.idle(4);
scene.overlay().showControls(rightClick, 2); scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.EAST), Pointing.RIGHT, 2)
.withItem(AllBlocks.STEAM_WHISTLE.asStack())
.rightClick();
scene.idle(6); scene.idle(6);
scene.world().setBlock(whistlePos.above(2), extension, false); scene.world().setBlock(whistlePos.above(2), extension, false);
scene.world().cycleBlockProperty(whistlePos.above(), WhistleExtenderBlock.SHAPE); scene.world().cycleBlockProperty(whistlePos.above(), WhistleExtenderBlock.SHAPE);
scene.idle(4); scene.idle(4);
scene.overlay().showControls(rightClick, 2); scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.EAST), Pointing.RIGHT, 2)
.withItem(AllBlocks.STEAM_WHISTLE.asStack())
.rightClick();
scene.idle(6); scene.idle(6);
scene.world().cycleBlockProperty(whistlePos.above(2), WhistleExtenderBlock.SHAPE); scene.world().cycleBlockProperty(whistlePos.above(2), WhistleExtenderBlock.SHAPE);
scene.idle(4); scene.idle(4);
scene.overlay().showControls(rightClick, 2); scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.EAST), Pointing.RIGHT, 2)
.withItem(AllBlocks.STEAM_WHISTLE.asStack())
.rightClick();
scene.idle(6); scene.idle(6);
scene.world().cycleBlockProperty(whistlePos.above(2), WhistleExtenderBlock.SHAPE); scene.world().cycleBlockProperty(whistlePos.above(2), WhistleExtenderBlock.SHAPE);
scene.world().setBlock(whistlePos.above(3), extension, false); scene.world().setBlock(whistlePos.above(3), extension, false);
scene.idle(20); scene.idle(20);
rightClick = scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.EAST), Pointing.RIGHT, 50)
new InputWindowElement(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.EAST), Pointing.RIGHT) .withItem(AllItems.WRENCH.asStack())
.withItem(AllItems.WRENCH.asStack()) .rightClick();
.rightClick();
scene.overlay().showControls(rightClick, 50);
scene.idle(6); scene.idle(6);
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
scene.world().cycleBlockProperty(whistlePos.above(i), WhistleBlock.SIZE); scene.world().cycleBlockProperty(whistlePos.above(i), WhistleBlock.SIZE);
@ -161,7 +162,9 @@ public class SteamScenes {
.placeNearTarget(); .placeNearTarget();
scene.idle(40); scene.idle(40);
scene.overlay().showControls(rightClick, 4); scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.EAST), Pointing.RIGHT, 4)
.withItem(AllItems.WRENCH.asStack())
.rightClick();
scene.idle(6); scene.idle(6);
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
scene.world().cycleBlockProperty(whistlePos.above(i), WhistleBlock.SIZE); scene.world().cycleBlockProperty(whistlePos.above(i), WhistleBlock.SIZE);
@ -177,10 +180,8 @@ public class SteamScenes {
scene.world().toggleRedstonePower(lever); scene.world().toggleRedstonePower(lever);
scene.idle(20); scene.idle(20);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.DOWN), Pointing.UP, 80)
new InputWindowElement(util.vector().blockSurface(util.grid().at(2, 3, 1), Direction.DOWN), Pointing.UP) .withItem(AllItems.GOGGLES.asStack());
.withItem(AllItems.GOGGLES.asStack()),
80);
scene.idle(6); scene.idle(6);
scene.overlay().showText(70) scene.overlay().showText(70)
@ -253,11 +254,9 @@ public class SteamScenes {
.placeNearTarget(); .placeNearTarget();
scene.idle(60); scene.idle(60);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(3, 1, 3), Direction.UP), Pointing.DOWN, 60)
new InputWindowElement(util.vector().blockSurface(util.grid().at(3, 1, 3), Direction.UP), Pointing.DOWN)
.withItem(AllBlocks.SHAFT.asStack()) .withItem(AllBlocks.SHAFT.asStack())
.rightClick(), .rightClick();
60);
scene.idle(10); scene.idle(10);
scene.world().setBlock(engine1ShaftPos, AllBlocks.SHAFT.getDefaultState() scene.world().setBlock(engine1ShaftPos, AllBlocks.SHAFT.getDefaultState()
.setValue(ShaftBlock.AXIS, Axis.Z), false); .setValue(ShaftBlock.AXIS, Axis.Z), false);
@ -317,7 +316,7 @@ public class SteamScenes {
.placeNearTarget(); .placeNearTarget();
scene.idle(70); scene.idle(70);
scene.overlay().showSelectionWithText(util.select().fromTo(5, 2, 3, 4, 2, 4), 50) scene.overlay().showOutlineWithText(util.select().fromTo(5, 2, 3, 4, 2, 4), 50)
.attachKeyFrame() .attachKeyFrame()
.text("The minimal setup requires 4 Fluid Tanks") .text("The minimal setup requires 4 Fluid Tanks")
.pointAt(util.vector().blockSurface(util.grid().at(4, 2, 4), Direction.UP)) .pointAt(util.vector().blockSurface(util.grid().at(4, 2, 4), Direction.UP))
@ -330,11 +329,9 @@ public class SteamScenes {
scene.world().moveSection(burnersElement, util.vector().of(2, 0, 0), 0); scene.world().moveSection(burnersElement, util.vector().of(2, 0, 0), 0);
scene.idle(25); scene.idle(25);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(4, 1, 3), Direction.EAST), Pointing.RIGHT, 60)
new InputWindowElement(util.vector().blockSurface(util.grid().at(4, 1, 3), Direction.EAST), Pointing.RIGHT)
.withItem(new ItemStack(Items.OAK_LOG)) .withItem(new ItemStack(Items.OAK_LOG))
.rightClick(), .rightClick();
60);
scene.idle(10); scene.idle(10);
scene.world().setBlocks(burners, AllBlocks.BLAZE_BURNER.getDefaultState() scene.world().setBlocks(burners, AllBlocks.BLAZE_BURNER.getDefaultState()
.setValue(BlazeBurnerBlock.HEAT_LEVEL, HeatLevel.KINDLED), false); .setValue(BlazeBurnerBlock.HEAT_LEVEL, HeatLevel.KINDLED), false);
@ -370,8 +367,7 @@ public class SteamScenes {
.placeNearTarget(); .placeNearTarget();
scene.idle(90); scene.idle(90);
scene.overlay().showControls( scene.overlay().showControls(target.add(0, 0, 0.5), Pointing.DOWN, 60).withItem(AllItems.GOGGLES.asStack());
new InputWindowElement(target.add(0, 0, 0.5), Pointing.DOWN).withItem(AllItems.GOGGLES.asStack()), 60);
scene.idle(6); scene.idle(6);
scene.overlay().showText(80) scene.overlay().showText(80)
.text("The boiler's current power level can be inspected with Engineer's Goggles") .text("The boiler's current power level can be inspected with Engineer's Goggles")
@ -410,7 +406,7 @@ public class SteamScenes {
.pointAt(util.vector().blockSurface(util.grid().at(4, 4, 4), Direction.WEST)) .pointAt(util.vector().blockSurface(util.grid().at(4, 4, 4), Direction.WEST))
.placeNearTarget(); .placeNearTarget();
scene.idle(40); scene.idle(40);
scene.overlay().showSelectionWithText(util.select().fromTo(3, 2, 3, 3, 3, 4), 30) scene.overlay().showOutlineWithText(util.select().fromTo(3, 2, 3, 3, 3, 4), 30)
.text("4 Engines") .text("4 Engines")
.colored(PonderPalette.BLUE) .colored(PonderPalette.BLUE)
.pointAt(util.vector().blockSurface(util.grid().at(3, 3, 4), Direction.UP)) .pointAt(util.vector().blockSurface(util.grid().at(3, 3, 4), Direction.UP))
@ -424,10 +420,8 @@ public class SteamScenes {
scene.world().hideIndependentSection(engineShaftElement, Direction.SOUTH); scene.world().hideIndependentSection(engineShaftElement, Direction.SOUTH);
scene.idle(20); scene.idle(20);
scene.overlay().showControls( scene.overlay().showControls(util.vector().of(5, 2, 4), Pointing.DOWN, 10).withItem(AllItems.BLAZE_CAKE.asStack())
new InputWindowElement(util.vector().of(5, 2, 4), Pointing.DOWN).withItem(AllItems.BLAZE_CAKE.asStack()) .rightClick();
.rightClick(),
10);
scene.idle(6); scene.idle(6);
scene.world().setBlocks(burners, AllBlocks.BLAZE_BURNER.getDefaultState() scene.world().setBlocks(burners, AllBlocks.BLAZE_BURNER.getDefaultState()
.setValue(BlazeBurnerBlock.HEAT_LEVEL, HeatLevel.SEETHING), false); .setValue(BlazeBurnerBlock.HEAT_LEVEL, HeatLevel.SEETHING), false);
@ -470,7 +464,7 @@ public class SteamScenes {
.pointAt(util.vector().blockSurface(util.grid().at(4, 4, 3), Direction.NORTH)) .pointAt(util.vector().blockSurface(util.grid().at(4, 4, 3), Direction.NORTH))
.placeNearTarget(); .placeNearTarget();
scene.idle(40); scene.idle(40);
scene.overlay().showSelectionWithText(util.select().fromTo(3, 2, 3, 3, 6, 4), 30) scene.overlay().showOutlineWithText(util.select().fromTo(3, 2, 3, 3, 6, 4), 30)
.text("8 Engines") .text("8 Engines")
.colored(PonderPalette.BLUE) .colored(PonderPalette.BLUE)
.pointAt(util.vector().blockSurface(util.grid().at(3, 3, 4), Direction.UP)) .pointAt(util.vector().blockSurface(util.grid().at(3, 3, 4), Direction.UP))

View file

@ -15,12 +15,11 @@ import net.createmod.catnip.utility.Iterate;
import net.createmod.catnip.utility.NBTHelper; import net.createmod.catnip.utility.NBTHelper;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.catnip.utility.VecHelper; import net.createmod.catnip.utility.VecHelper;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
@ -87,8 +86,8 @@ public class TunnelScenes {
.text("Whenever an Andesite Tunnel has connections to the sides..."); .text("Whenever an Andesite Tunnel has connections to the sides...");
scene.idle(70); scene.idle(70);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(util.grid().at(4, 1, 2)), Pointing.DOWN) scene.overlay().showControls(util.vector().topOf(util.grid().at(4, 1, 2)), Pointing.DOWN, 20)
.withItem(new ItemStack(Items.COPPER_INGOT)), 20); .withItem(new ItemStack(Items.COPPER_INGOT));
scene.idle(7); scene.idle(7);
scene.world().createItemOnBelt(util.grid().at(4, 1, 2), Direction.UP, new ItemStack(Items.COPPER_INGOT, 64)); scene.world().createItemOnBelt(util.grid().at(4, 1, 2), Direction.UP, new ItemStack(Items.COPPER_INGOT, 64));
scene.idle(40); scene.idle(40);
@ -184,7 +183,7 @@ public class TunnelScenes {
Class<BrassTunnelBlockEntity> tunnelClass = BrassTunnelBlockEntity.class; Class<BrassTunnelBlockEntity> tunnelClass = BrassTunnelBlockEntity.class;
scene.world().modifyBlockEntity(tunnelPos, tunnelClass, be -> be.getBehaviour(SidedFilteringBehaviour.TYPE) scene.world().modifyBlockEntity(tunnelPos, tunnelClass, be -> be.getBehaviour(SidedFilteringBehaviour.TYPE)
.setFilter(Direction.EAST, copper)); .setFilter(Direction.EAST, copper));
scene.overlay().showControls(new InputWindowElement(tunnelFilterVec, Pointing.DOWN).withItem(copper), 30); scene.overlay().showControls(tunnelFilterVec, Pointing.DOWN, 30).withItem(copper);
ItemStack zinc = AllItems.ZINC_INGOT.asStack(); ItemStack zinc = AllItems.ZINC_INGOT.asStack();
scene.world().createItemOnBelt(util.grid().at(5, 1, 2), Direction.EAST, zinc); scene.world().createItemOnBelt(util.grid().at(5, 1, 2), Direction.EAST, zinc);
scene.idle(70); scene.idle(70);
@ -207,12 +206,12 @@ public class TunnelScenes {
.text("Filters on outbound connections can be used to sort items by type"); .text("Filters on outbound connections can be used to sort items by type");
scene.idle(70); scene.idle(70);
scene.overlay().showControls(new InputWindowElement(tunnelFilterVec, Pointing.LEFT).withItem(copper), 30); scene.overlay().showControls(tunnelFilterVec, Pointing.LEFT, 30).withItem(copper);
scene.world().modifyBlockEntity(tunnelPos, tunnelClass, be -> be.getBehaviour(SidedFilteringBehaviour.TYPE) scene.world().modifyBlockEntity(tunnelPos, tunnelClass, be -> be.getBehaviour(SidedFilteringBehaviour.TYPE)
.setFilter(Direction.WEST, copper)); .setFilter(Direction.WEST, copper));
scene.idle(4); scene.idle(4);
tunnelFilterVec = getTunnelFilterVec(tunnelPos, Direction.NORTH); tunnelFilterVec = getTunnelFilterVec(tunnelPos, Direction.NORTH);
scene.overlay().showControls(new InputWindowElement(tunnelFilterVec, Pointing.RIGHT).withItem(zinc), 30); scene.overlay().showControls(tunnelFilterVec, Pointing.RIGHT, 30).withItem(zinc);
scene.world().modifyBlockEntity(tunnelPos, tunnelClass, be -> be.getBehaviour(SidedFilteringBehaviour.TYPE) scene.world().modifyBlockEntity(tunnelPos, tunnelClass, be -> be.getBehaviour(SidedFilteringBehaviour.TYPE)
.setFilter(Direction.NORTH, zinc)); .setFilter(Direction.NORTH, zinc));
@ -258,7 +257,7 @@ public class TunnelScenes {
scene.world().showSectionAndMerge(util.select().position(3, 4, 2 + i), Direction.DOWN, newBelt); scene.world().showSectionAndMerge(util.select().position(3, 4, 2 + i), Direction.DOWN, newBelt);
} }
scene.overlay().showSelectionWithText(util.select().fromTo(3, 1, 1, 3, 2, 3), 80) scene.overlay().showOutlineWithText(util.select().fromTo(3, 1, 1, 3, 2, 3), 80)
.attachKeyFrame() .attachKeyFrame()
.placeNearTarget() .placeNearTarget()
.text("Brass Tunnels on parallel belts will form a group"); .text("Brass Tunnels on parallel belts will form a group");
@ -271,18 +270,16 @@ public class TunnelScenes {
tunnelFilterVec = getTunnelFilterVec(tunnelPos, Direction.WEST); tunnelFilterVec = getTunnelFilterVec(tunnelPos, Direction.WEST);
BlockPos newTunnelPos = tunnelPos.above(2) BlockPos newTunnelPos = tunnelPos.above(2)
.south(); .south();
scene.overlay() scene.overlay().showControls(tunnelFilterVec.add(0, 0, -1), Pointing.RIGHT, 20).withItem(item1);
.showControls(new InputWindowElement(tunnelFilterVec.add(0, 0, -1), Pointing.RIGHT).withItem(item1), 20);
scene.world().modifyBlockEntity(newTunnelPos.north(), tunnelClass, scene.world().modifyBlockEntity(newTunnelPos.north(), tunnelClass,
be -> be.getBehaviour(SidedFilteringBehaviour.TYPE) be -> be.getBehaviour(SidedFilteringBehaviour.TYPE)
.setFilter(Direction.WEST, item1)); .setFilter(Direction.WEST, item1));
scene.idle(4); scene.idle(4);
scene.overlay().showControls(new InputWindowElement(tunnelFilterVec, Pointing.DOWN).withItem(item2), 20); scene.overlay().showControls(tunnelFilterVec, Pointing.DOWN, 20).withItem(item2);
scene.world().modifyBlockEntity(newTunnelPos, tunnelClass, be -> be.getBehaviour(SidedFilteringBehaviour.TYPE) scene.world().modifyBlockEntity(newTunnelPos, tunnelClass, be -> be.getBehaviour(SidedFilteringBehaviour.TYPE)
.setFilter(Direction.WEST, item2)); .setFilter(Direction.WEST, item2));
scene.idle(4); scene.idle(4);
scene.overlay().showControls(new InputWindowElement(tunnelFilterVec.add(0, 0, 1), Pointing.LEFT).withItem(item3), scene.overlay().showControls(tunnelFilterVec.add(0, 0, 1), Pointing.LEFT, 20).withItem(item3);
20);
scene.world().modifyBlockEntity(newTunnelPos.south(), tunnelClass, scene.world().modifyBlockEntity(newTunnelPos.south(), tunnelClass,
be -> be.getBehaviour(SidedFilteringBehaviour.TYPE) be -> be.getBehaviour(SidedFilteringBehaviour.TYPE)
.setFilter(Direction.WEST, item3)); .setFilter(Direction.WEST, item3));
@ -362,7 +359,7 @@ public class TunnelScenes {
} }
Vec3 tunnelTop = util.vector().topOf(util.grid().at(2, 2, 3)); Vec3 tunnelTop = util.vector().topOf(util.grid().at(2, 2, 3));
scene.overlay().showControls(new InputWindowElement(tunnelTop, Pointing.DOWN).rightClick(), 80); scene.overlay().showControls(tunnelTop, Pointing.DOWN, 80).rightClick();
scene.idle(7); scene.idle(7);
scene.overlay().showCenteredScrollInput(util.grid().at(2, 2, 3), Direction.UP, 120); scene.overlay().showCenteredScrollInput(util.grid().at(2, 2, 3), Direction.UP, 120);
scene.overlay().showText(120) scene.overlay().showText(120)
@ -378,8 +375,7 @@ public class TunnelScenes {
scene.world().moveSection(blockage, util.vector().of(-3, 0, 0), 0); scene.world().moveSection(blockage, util.vector().of(-3, 0, 0), 0);
Vec3 modeVec = util.vector().of(4, 2.5, 3); Vec3 modeVec = util.vector().of(4, 2.5, 3);
scene.overlay().showControls(new InputWindowElement(modeVec, Pointing.RIGHT).showing(AllIcons.I_TUNNEL_SPLIT), scene.overlay().showControls(modeVec, Pointing.RIGHT, 140).showing(AllIcons.I_TUNNEL_SPLIT);
140);
ElementLink<WorldSectionElement> blockage2 = null; ElementLink<WorldSectionElement> blockage2 = null;
@ -405,8 +401,7 @@ public class TunnelScenes {
} }
if (i == 4) { if (i == 4) {
scene.overlay().showControls( scene.overlay().showControls(modeVec, Pointing.RIGHT, 140).showing(AllIcons.I_TUNNEL_FORCED_SPLIT);
new InputWindowElement(modeVec, Pointing.RIGHT).showing(AllIcons.I_TUNNEL_FORCED_SPLIT), 140);
scene.world().modifyBlockEntity(util.grid().at(1, 2, 3), tunnelClass, scene.world().modifyBlockEntity(util.grid().at(1, 2, 3), tunnelClass,
be -> be.getBehaviour(ScrollOptionBehaviour.TYPE) be -> be.getBehaviour(ScrollOptionBehaviour.TYPE)
.setValue(BrassTunnelBlockEntity.SelectionMode.FORCED_SPLIT.ordinal())); .setValue(BrassTunnelBlockEntity.SelectionMode.FORCED_SPLIT.ordinal()));
@ -429,8 +424,7 @@ public class TunnelScenes {
scene.world().modifyBlockEntity(util.grid().at(1, 2, 3), tunnelClass, scene.world().modifyBlockEntity(util.grid().at(1, 2, 3), tunnelClass,
be -> be.getBehaviour(ScrollOptionBehaviour.TYPE) be -> be.getBehaviour(ScrollOptionBehaviour.TYPE)
.setValue(BrassTunnelBlockEntity.SelectionMode.ROUND_ROBIN.ordinal())); .setValue(BrassTunnelBlockEntity.SelectionMode.ROUND_ROBIN.ordinal()));
scene.overlay().showControls( scene.overlay().showControls(modeVec, Pointing.RIGHT, 140).showing(AllIcons.I_TUNNEL_ROUND_ROBIN);
new InputWindowElement(modeVec, Pointing.RIGHT).showing(AllIcons.I_TUNNEL_ROUND_ROBIN), 140);
scene.overlay().showText(80) scene.overlay().showText(80)
.attachKeyFrame() .attachKeyFrame()
.pointAt(tunnelTop) .pointAt(tunnelTop)
@ -452,8 +446,7 @@ public class TunnelScenes {
} }
if (i == 15) { if (i == 15) {
scene.overlay().showControls( scene.overlay().showControls(modeVec, Pointing.RIGHT, 140).showing(AllIcons.I_TUNNEL_FORCED_ROUND_ROBIN);
new InputWindowElement(modeVec, Pointing.RIGHT).showing(AllIcons.I_TUNNEL_FORCED_ROUND_ROBIN), 140);
scene.world().modifyBlockEntity(util.grid().at(1, 2, 3), tunnelClass, scene.world().modifyBlockEntity(util.grid().at(1, 2, 3), tunnelClass,
be -> be.getBehaviour(ScrollOptionBehaviour.TYPE) be -> be.getBehaviour(ScrollOptionBehaviour.TYPE)
.setValue(BrassTunnelBlockEntity.SelectionMode.FORCED_ROUND_ROBIN.ordinal())); .setValue(BrassTunnelBlockEntity.SelectionMode.FORCED_ROUND_ROBIN.ordinal()));
@ -472,8 +465,7 @@ public class TunnelScenes {
} }
if (i == 19) { if (i == 19) {
scene.overlay().showControls( scene.overlay().showControls(modeVec, Pointing.RIGHT, 140).showing(AllIcons.I_TUNNEL_PREFER_NEAREST);
new InputWindowElement(modeVec, Pointing.RIGHT).showing(AllIcons.I_TUNNEL_PREFER_NEAREST), 140);
scene.world().modifyBlockEntity(util.grid().at(1, 2, 3), tunnelClass, scene.world().modifyBlockEntity(util.grid().at(1, 2, 3), tunnelClass,
be -> be.getBehaviour(ScrollOptionBehaviour.TYPE) be -> be.getBehaviour(ScrollOptionBehaviour.TYPE)
.setValue(BrassTunnelBlockEntity.SelectionMode.PREFER_NEAREST.ordinal())); .setValue(BrassTunnelBlockEntity.SelectionMode.PREFER_NEAREST.ordinal()));
@ -501,8 +493,7 @@ public class TunnelScenes {
} }
if (i == 26) { if (i == 26) {
scene.overlay().showControls( scene.overlay().showControls(modeVec, Pointing.RIGHT, 140).showing(AllIcons.I_TUNNEL_RANDOMIZE);
new InputWindowElement(modeVec, Pointing.RIGHT).showing(AllIcons.I_TUNNEL_RANDOMIZE), 140);
scene.world().modifyBlockEntity(util.grid().at(1, 2, 3), tunnelClass, scene.world().modifyBlockEntity(util.grid().at(1, 2, 3), tunnelClass,
be -> be.getBehaviour(ScrollOptionBehaviour.TYPE) be -> be.getBehaviour(ScrollOptionBehaviour.TYPE)
.setValue(BrassTunnelBlockEntity.SelectionMode.RANDOMIZE.ordinal())); .setValue(BrassTunnelBlockEntity.SelectionMode.RANDOMIZE.ordinal()));
@ -519,8 +510,7 @@ public class TunnelScenes {
scene.world().hideSection(util.select().fromTo(3, 2, 5, 1, 2, 5), Direction.UP); scene.world().hideSection(util.select().fromTo(3, 2, 5, 1, 2, 5), Direction.UP);
scene.idle(10); scene.idle(10);
scene.overlay() scene.overlay().showControls(modeVec, Pointing.RIGHT, 140).showing(AllIcons.I_TUNNEL_SYNCHRONIZE);
.showControls(new InputWindowElement(modeVec, Pointing.RIGHT).showing(AllIcons.I_TUNNEL_SYNCHRONIZE), 140);
scene.world().modifyBlockEntity(util.grid().at(1, 2, 3), tunnelClass, scene.world().modifyBlockEntity(util.grid().at(1, 2, 3), tunnelClass,
be -> be.getBehaviour(ScrollOptionBehaviour.TYPE) be -> be.getBehaviour(ScrollOptionBehaviour.TYPE)
.setValue(BrassTunnelBlockEntity.SelectionMode.SYNCHRONIZE.ordinal())); .setValue(BrassTunnelBlockEntity.SelectionMode.SYNCHRONIZE.ordinal()));

View file

@ -5,12 +5,11 @@ import com.simibubi.create.foundation.blockEntity.behaviour.fluid.SmartFluidTank
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
@ -51,10 +50,8 @@ public class DrainScenes {
scene.idle(50); scene.idle(50);
ItemStack lavaBucket = new ItemStack(Items.LAVA_BUCKET); ItemStack lavaBucket = new ItemStack(Items.LAVA_BUCKET);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(drainPos.west(), Direction.UP), Pointing.DOWN, 40).rightClick()
new InputWindowElement(util.vector().blockSurface(drainPos.west(), Direction.UP), Pointing.DOWN).rightClick() .withItem(lavaBucket);
.withItem(lavaBucket),
40);
scene.idle(7); scene.idle(7);
scene.world().modifyBlockEntity(drainPos, ItemDrainBlockEntity.class, be -> { scene.world().modifyBlockEntity(drainPos, ItemDrainBlockEntity.class, be -> {
be.getBehaviour(SmartFluidTankBehaviour.TYPE) be.getBehaviour(SmartFluidTankBehaviour.TYPE)
@ -90,8 +87,7 @@ public class DrainScenes {
.pointAt(util.vector().topOf(util.grid().at(2, 1, 2))); .pointAt(util.vector().topOf(util.grid().at(2, 1, 2)));
scene.idle(40); scene.idle(40);
scene.overlay() scene.overlay().showControls(util.vector().topOf(beltPos), Pointing.DOWN, 20).withItem(lavaBucket);
.showControls(new InputWindowElement(util.vector().topOf(beltPos), Pointing.DOWN).withItem(lavaBucket), 20);
scene.idle(7); scene.idle(7);
scene.world().createItemOnBelt(beltPos, Direction.NORTH, lavaBucket); scene.world().createItemOnBelt(beltPos, Direction.NORTH, lavaBucket);
scene.idle(30); scene.idle(30);

View file

@ -8,13 +8,12 @@ import com.simibubi.create.foundation.fluid.FluidHelper;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
@ -88,7 +87,7 @@ public class FluidMovementActorScenes {
BlockPos psi2 = psi.west(2); BlockPos psi2 = psi.west(2);
scene.world().showSection(util.select().position(psi2), Direction.DOWN); scene.world().showSection(util.select().position(psi2), Direction.DOWN);
scene.overlay().showSelectionWithText(util.select().position(psi.west()), 50) scene.overlay().showOutlineWithText(util.select().position(psi.west()), 50)
.colored(PonderPalette.RED) .colored(PonderPalette.RED)
.placeNearTarget() .placeNearTarget()
.attachKeyFrame() .attachKeyFrame()
@ -117,7 +116,7 @@ public class FluidMovementActorScenes {
scene.overlay().showOutline(PonderPalette.GREEN, psi, util.select().fromTo(5, 3, 2, 6, 4, 2), 80); scene.overlay().showOutline(PonderPalette.GREEN, psi, util.select().fromTo(5, 3, 2, 6, 4, 2), 80);
scene.idle(10); scene.idle(10);
scene.overlay().showSelectionWithText(util.select().position(psi2), 70) scene.overlay().showOutlineWithText(util.select().position(psi2), 70)
.placeNearTarget() .placeNearTarget()
.colored(PonderPalette.GREEN) .colored(PonderPalette.GREEN)
.attachKeyFrame() .attachKeyFrame()
@ -142,9 +141,11 @@ public class FluidMovementActorScenes {
for (int i = 0; i < 16; i++) { for (int i = 0; i < 16; i++) {
if (i == 8) if (i == 8)
scene.overlay() scene.overlay().showControls(util.vector().blockSurface(
.showControls(new InputWindowElement(util.vector().blockSurface(util.grid().at(5, 3, 2), Direction.WEST) util.grid().at(5, 3, 2), Direction.WEST)
.add(0, 0.5, 0), Pointing.LEFT).withItem(bucket), 30); .add(0, 0.5, 0), Pointing.LEFT, 30)
.withItem(bucket);
scene.world().modifyBlockEntity(st, type, be -> be.getCapability(fhc) scene.world().modifyBlockEntity(st, type, be -> be.getCapability(fhc)
.ifPresent(ifh -> ifh.drain(1000, FluidAction.EXECUTE))); .ifPresent(ifh -> ifh.drain(1000, FluidAction.EXECUTE)));
scene.world().modifyBlockEntity(ct1, type, be -> be.getCapability(fhc) scene.world().modifyBlockEntity(ct1, type, be -> be.getCapability(fhc)

View file

@ -17,14 +17,12 @@ import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.catnip.utility.VecHelper; import net.createmod.catnip.utility.VecHelper;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.createmod.ponder.foundation.instruction.EmitParticlesInstruction.Emitter;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.util.RandomSource; import net.minecraft.util.RandomSource;
@ -157,13 +155,11 @@ public class FluidTankScenes {
scene.idle(20); scene.idle(20);
ItemStack bucket = new ItemStack(Items.BUCKET, 1); ItemStack bucket = new ItemStack(Items.BUCKET, 1);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 2, 2), Direction.NORTH), Pointing.RIGHT, 40)
new InputWindowElement(util.vector().blockSurface(util.grid().at(2, 2, 2), Direction.NORTH), Pointing.RIGHT)
.showing(AllIcons.I_MTD_CLOSE) .showing(AllIcons.I_MTD_CLOSE)
.withItem(bucket), .withItem(bucket);
40);
scene.idle(7); scene.idle(7);
scene.overlay().showSelectionWithText(util.select().fromTo(2, 1, 2, 2, 2, 2), 70) scene.overlay().showOutlineWithText(util.select().fromTo(2, 1, 2, 2, 2, 2), 70)
.text("However, in Survival Mode Fluids cannot be added or taken manually") .text("However, in Survival Mode Fluids cannot be added or taken manually")
.attachKeyFrame() .attachKeyFrame()
.colored(PonderPalette.RED) .colored(PonderPalette.RED)
@ -209,7 +205,7 @@ public class FluidTankScenes {
for (int i = 0; i < 10; i++) { for (int i = 0; i < 10; i++) {
scene.effects().emitParticles(util.vector().topOf(3, 1, 1) scene.effects().emitParticles(util.vector().topOf(3, 1, 1)
.add(0, 1 / 16f, 0), .add(0, 1 / 16f, 0),
Emitter.simple(FluidFX.getFluidParticle(content), scene.effects().simpleParticleEmitter(FluidFX.getFluidParticle(content),
VecHelper.offsetRandomly(Vec3.ZERO, random, .1f)), VecHelper.offsetRandomly(Vec3.ZERO, random, .1f)),
1, 1); 1, 1);
} }
@ -332,11 +328,9 @@ public class FluidTankScenes {
.pointAt(blockSurface); .pointAt(blockSurface);
scene.idle(70); scene.idle(70);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(3, 3, 1), Direction.NORTH), Pointing.RIGHT, 60)
new InputWindowElement(util.vector().blockSurface(util.grid().at(3, 3, 1), Direction.NORTH), Pointing.RIGHT)
.rightClick() .rightClick()
.withItem(AllItems.WRENCH.asStack()), .withItem(AllItems.WRENCH.asStack());
60);
scene.idle(7); scene.idle(7);
scene.world().modifyBlocks(full2, s -> s.setValue(FluidTankBlock.SHAPE, FluidTankBlock.Shape.PLAIN), false); scene.world().modifyBlocks(full2, s -> s.setValue(FluidTankBlock.SHAPE, FluidTankBlock.Shape.PLAIN), false);
scene.idle(30); scene.idle(30);
@ -375,11 +369,9 @@ public class FluidTankScenes {
scene.idle(80); scene.idle(80);
ItemStack bucket = new ItemStack(Items.LAVA_BUCKET); ItemStack bucket = new ItemStack(Items.LAVA_BUCKET);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 2, 2), Direction.NORTH), Pointing.RIGHT, 40)
new InputWindowElement(util.vector().blockSurface(util.grid().at(2, 2, 2), Direction.NORTH), Pointing.RIGHT)
.rightClick() .rightClick()
.withItem(bucket), .withItem(bucket);
40);
scene.idle(7); scene.idle(7);
scene.world().modifyBlockEntity(cTankPos, CreativeFluidTankBlockEntity.class, scene.world().modifyBlockEntity(cTankPos, CreativeFluidTankBlockEntity.class,
be -> ((CreativeSmartFluidTank) be.getTankInventory()) be -> ((CreativeSmartFluidTank) be.getTankInventory())

View file

@ -10,12 +10,12 @@ import com.simibubi.create.content.fluids.pump.PumpBlock;
import com.simibubi.create.content.fluids.tank.FluidTankBlockEntity; import com.simibubi.create.content.fluids.tank.FluidTankBlockEntity;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.Blocks;
@ -204,7 +204,7 @@ public class HosePulleyScenes {
scene.world().showSectionAndMerge(crank, Direction.EAST, hoselink); scene.world().showSectionAndMerge(crank, Direction.EAST, hoselink);
scene.idle(20); scene.idle(20);
scene.overlay().showSelectionWithText(util.select().position(hosePos.below()), 50) scene.overlay().showOutlineWithText(util.select().position(hosePos.below()), 50)
.text("While fully retracted, the Hose Pulley cannot operate") .text("While fully retracted, the Hose Pulley cannot operate")
.placeNearTarget() .placeNearTarget()
.colored(PonderPalette.RED) .colored(PonderPalette.RED)
@ -352,7 +352,7 @@ public class HosePulleyScenes {
scene.idle(30); scene.idle(30);
Selection pulleyPos = util.select().position(1, 3, 2); Selection pulleyPos = util.select().position(1, 3, 2);
scene.overlay().showSelectionWithText(pulleyPos, 60) scene.overlay().showOutlineWithText(pulleyPos, 60)
.text("It will provide/dispose fluids without affecting the source") .text("It will provide/dispose fluids without affecting the source")
.attachKeyFrame() .attachKeyFrame()
.colored(PonderPalette.BLUE) .colored(PonderPalette.BLUE)

View file

@ -18,13 +18,12 @@ import com.simibubi.create.foundation.fluid.FluidHelper;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.core.Direction.Axis; import net.minecraft.core.Direction.Axis;
@ -94,8 +93,8 @@ public class PipeScenes {
scene.idle(60); scene.idle(60);
scene.overlay().showControls(new InputWindowElement(util.vector().centerOf(2, 1, 1), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().centerOf(2, 1, 1), Pointing.DOWN, 40).rightClick()
.withItem(AllItems.WRENCH.asStack()), 40); .withItem(AllItems.WRENCH.asStack());
scene.idle(7); scene.idle(7);
scene.world().restoreBlocks(util.select().position(2, 1, 1)); scene.world().restoreBlocks(util.select().position(2, 1, 1));
scene.overlay().showText(70) scene.overlay().showText(70)
@ -105,8 +104,8 @@ public class PipeScenes {
.text("Using a wrench, a straight pipe segment can be given a window"); .text("Using a wrench, a straight pipe segment can be given a window");
scene.idle(40); scene.idle(40);
scene.overlay().showControls(new InputWindowElement(util.vector().centerOf(1, 1, 2), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().centerOf(1, 1, 2), Pointing.DOWN, 10).rightClick()
.withItem(AllItems.WRENCH.asStack()), 10); .withItem(AllItems.WRENCH.asStack());
scene.idle(7); scene.idle(7);
scene.world().restoreBlocks(util.select().position(1, 1, 2)); scene.world().restoreBlocks(util.select().position(1, 1, 2));
scene.idle(40); scene.idle(40);
@ -151,7 +150,7 @@ public class PipeScenes {
.placeNearTarget() .placeNearTarget()
.text("Powered by Mechanical Pumps, the Pipes can transport Fluids"); .text("Powered by Mechanical Pumps, the Pipes can transport Fluids");
scene.idle(85); scene.idle(85);
scene.overlay().showSelectionWithText(tank, 40) scene.overlay().showOutlineWithText(tank, 40)
.colored(PonderPalette.RED) .colored(PonderPalette.RED)
.placeNearTarget() .placeNearTarget()
.text("No fluid is being extracted at first"); .text("No fluid is being extracted at first");
@ -323,8 +322,8 @@ public class PipeScenes {
.setValue(FluidPipeBlock.WEST, true); .setValue(FluidPipeBlock.WEST, true);
ItemStack casingItem = AllBlocks.COPPER_CASING.asStack(); ItemStack casingItem = AllBlocks.COPPER_CASING.asStack();
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(3, 1, 1), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(3, 1, 1), Pointing.DOWN, 60).rightClick()
.withItem(casingItem), 60); .withItem(casingItem);
scene.idle(7); scene.idle(7);
scene.world().setBlock(util.grid().at(3, 1, 1), copperEncased, true); scene.world().setBlock(util.grid().at(3, 1, 1), copperEncased, true);
scene.idle(10); scene.idle(10);
@ -527,7 +526,7 @@ public class PipeScenes {
.pointAt(filterVec); .pointAt(filterVec);
scene.idle(60); scene.idle(60);
scene.overlay().showSelectionWithText(util.select().position(basinPos), 80) scene.overlay().showOutlineWithText(util.select().position(basinPos), 80)
.placeNearTarget() .placeNearTarget()
.colored(PonderPalette.GREEN) .colored(PonderPalette.GREEN)
.text("When placed directly at the source, they can specify the type of fluid to extract") .text("When placed directly at the source, they can specify the type of fluid to extract")
@ -540,8 +539,8 @@ public class PipeScenes {
.getFluidType() .getFluidType()
.getBucket(chocolate); .getBucket(chocolate);
ItemStack milkBucket = new ItemStack(Items.MILK_BUCKET); ItemStack milkBucket = new ItemStack(Items.MILK_BUCKET);
scene.overlay().showControls(new InputWindowElement(filterVec, Pointing.DOWN).rightClick() scene.overlay().showControls(filterVec, Pointing.DOWN, 80).rightClick()
.withItem(bucket), 80); .withItem(bucket);
scene.idle(7); scene.idle(7);
scene.world().setFilterData(util.select().position(3, 1, 1), SmartFluidPipeBlockEntity.class, bucket); scene.world().setFilterData(util.select().position(3, 1, 1), SmartFluidPipeBlockEntity.class, bucket);
scene.idle(10); scene.idle(10);
@ -589,14 +588,14 @@ public class PipeScenes {
.pointAt(filterVec.add(-1, 0, 2)); .pointAt(filterVec.add(-1, 0, 2));
scene.idle(90); scene.idle(90);
scene.overlay().showControls(new InputWindowElement(filterVec.add(-1, 0, 3), Pointing.DOWN).rightClick() scene.overlay().showControls(filterVec.add(-1, 0, 3), Pointing.DOWN, 30).rightClick()
.withItem(milkBucket), 30); .withItem(milkBucket);
scene.idle(7); scene.idle(7);
scene.world().setFilterData(util.select().position(2, 1, 4), SmartFluidPipeBlockEntity.class, milkBucket); scene.world().setFilterData(util.select().position(2, 1, 4), SmartFluidPipeBlockEntity.class, milkBucket);
scene.idle(30); scene.idle(30);
scene.overlay().showControls(new InputWindowElement(filterVec.add(-1, 0, 2), Pointing.DOWN).rightClick() scene.overlay().showControls(filterVec.add(-1, 0, 2), Pointing.DOWN, 30).rightClick()
.withItem(bucket), 30); .withItem(bucket);
scene.idle(7); scene.idle(7);
scene.world().setFilterData(util.select().position(2, 1, 3), SmartFluidPipeBlockEntity.class, bucket); scene.world().setFilterData(util.select().position(2, 1, 3), SmartFluidPipeBlockEntity.class, bucket);
scene.idle(30); scene.idle(30);

View file

@ -10,13 +10,12 @@ import com.simibubi.create.content.kinetics.simpleRelays.CogWheelBlock;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.core.Direction.Axis; import net.minecraft.core.Direction.Axis;
@ -139,8 +138,8 @@ public class PumpScenes {
scene.overlay().chaseBoundingBoxOutline(PonderPalette.RED, in, new AABB(leverPos.below()), 30); scene.overlay().chaseBoundingBoxOutline(PonderPalette.RED, in, new AABB(leverPos.below()), 30);
scene.idle(45); scene.idle(45);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(pumpPos), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(pumpPos), Pointing.DOWN, 40).rightClick()
.withItem(AllItems.WRENCH.asStack()), 40); .withItem(AllItems.WRENCH.asStack());
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(pumpPos, s -> s.setValue(PumpBlock.FACING, Direction.EAST), true); scene.world().modifyBlock(pumpPos, s -> s.setValue(PumpBlock.FACING, Direction.EAST), true);
scene.overlay().showText(70) scene.overlay().showText(70)
@ -291,7 +290,7 @@ public class PumpScenes {
scene.world().setKineticSpeed(largeCog, 8); scene.world().setKineticSpeed(largeCog, 8);
scene.idle(20); scene.idle(20);
scene.overlay().showSelectionWithText(util.select().fromTo(2, 1, 1, 2, 1, 3), 60) scene.overlay().showOutlineWithText(util.select().fromTo(2, 1, 1, 2, 1, 3), 60)
.attachKeyFrame() .attachKeyFrame()
.colored(PonderPalette.GREEN) .colored(PonderPalette.GREEN)
.pointAt(util.vector().topOf(pumpPos)) .pointAt(util.vector().topOf(pumpPos))
@ -300,9 +299,8 @@ public class PumpScenes {
scene.idle(70); scene.idle(70);
scene.idle(30); scene.idle(30);
scene.overlay() scene.overlay().showControls(util.vector().topOf(pumpPos.north()), Pointing.DOWN, 30).rightClick()
.showControls(new InputWindowElement(util.vector().topOf(pumpPos.north()), Pointing.DOWN).rightClick() .withItem(AllItems.WRENCH.asStack());
.withItem(AllItems.WRENCH.asStack()), 30);
scene.idle(7); scene.idle(7);
scene.world().modifyBlock(pumpPos.north(), s -> s.setValue(PumpBlock.FACING, Direction.WEST), true); scene.world().modifyBlock(pumpPos.north(), s -> s.setValue(PumpBlock.FACING, Direction.WEST), true);
scene.idle(30); scene.idle(30);

View file

@ -11,14 +11,12 @@ import com.simibubi.create.foundation.ponder.element.BeltItemElement;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.catnip.utility.VecHelper; import net.createmod.catnip.utility.VecHelper;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.createmod.ponder.foundation.instruction.EmitParticlesInstruction.Emitter;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.core.particles.ParticleOptions; import net.minecraft.core.particles.ParticleOptions;
@ -77,13 +75,11 @@ public class SpoutScenes {
ItemStack bucket = AllFluids.HONEY.get() ItemStack bucket = AllFluids.HONEY.get()
.getFluidType() .getFluidType()
.getBucket(honey); .getBucket(honey);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(util.grid().at(2, 3, 2), Direction.NORTH), Pointing.RIGHT, 40)
new InputWindowElement(util.vector().blockSurface(util.grid().at(2, 3, 2), Direction.NORTH), Pointing.RIGHT)
.showing(AllIcons.I_MTD_CLOSE) .showing(AllIcons.I_MTD_CLOSE)
.withItem(bucket), .withItem(bucket);
40);
scene.idle(7); scene.idle(7);
scene.overlay().showSelectionWithText(util.select().position(2, 3, 2), 50) scene.overlay().showOutlineWithText(util.select().position(2, 3, 2), 50)
.pointAt(util.vector().blockSurface(util.grid().at(2, 3, 2), Direction.WEST)) .pointAt(util.vector().blockSurface(util.grid().at(2, 3, 2), Direction.WEST))
.attachKeyFrame() .attachKeyFrame()
.colored(PonderPalette.RED) .colored(PonderPalette.RED)
@ -106,7 +102,7 @@ public class SpoutScenes {
ItemStack bottle = new ItemStack(Items.GLASS_BOTTLE); ItemStack bottle = new ItemStack(Items.GLASS_BOTTLE);
scene.world().createItemOnBeltLike(depotPos, Direction.NORTH, bottle); scene.world().createItemOnBeltLike(depotPos, Direction.NORTH, bottle);
Vec3 depotCenter = util.vector().centerOf(depotPos.south()); Vec3 depotCenter = util.vector().centerOf(depotPos.south());
scene.overlay().showControls(new InputWindowElement(depotCenter, Pointing.UP).withItem(bottle), 30); scene.overlay().showControls(depotCenter, Pointing.UP, 30).withItem(bottle);
scene.idle(10); scene.idle(10);
scene.idle(20); scene.idle(20);
@ -119,10 +115,10 @@ public class SpoutScenes {
for (int i = 0; i < 10; i++) { for (int i = 0; i < 10; i++) {
scene.effects().emitParticles(util.vector().topOf(depotPos.south()) scene.effects().emitParticles(util.vector().topOf(depotPos.south())
.add(0, 1 / 16f, 0), .add(0, 1 / 16f, 0),
Emitter.simple(fluidParticle, VecHelper.offsetRandomly(Vec3.ZERO, random, .1f)), 1, 1); scene.effects().simpleParticleEmitter(fluidParticle, VecHelper.offsetRandomly(Vec3.ZERO, random, .1f)), 1, 1);
} }
scene.idle(10); scene.idle(10);
scene.overlay().showControls(new InputWindowElement(depotCenter, Pointing.UP).withItem(potion), 50); scene.overlay().showControls(depotCenter, Pointing.UP, 50).withItem(potion);
scene.idle(60); scene.idle(60);
scene.world().hideIndependentSection(depot, Direction.NORTH); scene.world().hideIndependentSection(depot, Direction.NORTH);
@ -156,7 +152,7 @@ public class SpoutScenes {
for (int i = 0; i < 10; i++) { for (int i = 0; i < 10; i++) {
scene.effects().emitParticles(util.vector().topOf(depotPos.south()) scene.effects().emitParticles(util.vector().topOf(depotPos.south())
.add(0, 1 / 16f, 0), .add(0, 1 / 16f, 0),
Emitter.simple(fluidParticle, VecHelper.offsetRandomly(Vec3.ZERO, random, .1f)), 1, 1); scene.effects().simpleParticleEmitter(fluidParticle, VecHelper.offsetRandomly(Vec3.ZERO, random, .1f)), 1, 1);
} }
scene.world().removeItemsFromBelt(spoutPos.below(2)); scene.world().removeItemsFromBelt(spoutPos.below(2));
ingot = scene.world().createItemOnBelt(spoutPos.below(2), Direction.UP, potion); ingot = scene.world().createItemOnBelt(spoutPos.below(2), Direction.UP, potion);
@ -170,7 +166,7 @@ public class SpoutScenes {
for (int i = 0; i < 10; i++) { for (int i = 0; i < 10; i++) {
scene.effects().emitParticles(util.vector().topOf(depotPos.south()) scene.effects().emitParticles(util.vector().topOf(depotPos.south())
.add(0, 1 / 16f, 0), .add(0, 1 / 16f, 0),
Emitter.simple(fluidParticle, VecHelper.offsetRandomly(Vec3.ZERO, random, .1f)), 1, 1); scene.effects().simpleParticleEmitter(fluidParticle, VecHelper.offsetRandomly(Vec3.ZERO, random, .1f)), 1, 1);
} }
scene.world().removeItemsFromBelt(spoutPos.below(2)); scene.world().removeItemsFromBelt(spoutPos.below(2));
ingot2 = scene.world().createItemOnBelt(spoutPos.below(2), Direction.UP, potion); ingot2 = scene.world().createItemOnBelt(spoutPos.below(2), Direction.UP, potion);

View file

@ -5,14 +5,14 @@ import com.simibubi.create.content.trains.observer.TrackObserverBlockEntity;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.ParrotElement;
import net.createmod.ponder.api.element.ParrotPose;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.ParrotElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items; import net.minecraft.world.item.Items;
@ -50,8 +50,8 @@ public class TrackObserverScenes {
Vec3 target = util.vector().topOf(5, 0, 7); Vec3 target = util.vector().topOf(5, 0, 7);
AABB bb = new AABB(target, target).move(0, 2 / 16f, 0); AABB bb = new AABB(target, target).move(0, 2 / 16f, 0);
scene.overlay().showControls(new InputWindowElement(target, Pointing.DOWN).rightClick() scene.overlay().showControls(target, Pointing.DOWN, 40).rightClick()
.withItem(AllBlocks.TRACK_OBSERVER.asStack()), 40); .withItem(AllBlocks.TRACK_OBSERVER.asStack());
scene.idle(6); scene.idle(6);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, bb, bb, 1); scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, bb, bb, 1);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, bb, bb.inflate(.45f, 1 / 16f, .45f), 60); scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, bb, bb.inflate(.45f, 1 / 16f, .45f), 60);
@ -83,7 +83,7 @@ public class TrackObserverScenes {
scene.world().moveSection(trainInstance1, util.vector().of(-16, 0, 0), 80); scene.world().moveSection(trainInstance1, util.vector().of(-16, 0, 0), 80);
scene.world().animateBogey(util.grid().at(5, 2, 7), 16, 80); scene.world().animateBogey(util.grid().at(5, 2, 7), 16, 80);
ElementLink<ParrotElement> birb = ElementLink<ParrotElement> birb =
scene.special().createBirb(util.vector().centerOf(12, 3, 7), ParrotElement.FacePointOfInterestPose::new); scene.special().createBirb(util.vector().centerOf(12, 3, 7), ParrotPose.FacePointOfInterestPose::new);
scene.special().moveParrot(birb, util.vector().of(-16, 0, 0), 80); scene.special().moveParrot(birb, util.vector().of(-16, 0, 0), 80);
scene.idle(10); scene.idle(10);
@ -118,7 +118,7 @@ public class TrackObserverScenes {
scene.idle(40); scene.idle(40);
ItemStack waterBucket = new ItemStack(Items.WATER_BUCKET); ItemStack waterBucket = new ItemStack(Items.WATER_BUCKET);
scene.overlay().showControls(new InputWindowElement(target, Pointing.DOWN).withItem(waterBucket), 30); scene.overlay().showControls(target, Pointing.DOWN, 30).withItem(waterBucket);
scene.idle(6); scene.idle(6);
scene.world().setFilterData(observer, TrackObserverBlockEntity.class, waterBucket); scene.world().setFilterData(observer, TrackObserverBlockEntity.class, waterBucket);
scene.idle(50); scene.idle(50);
@ -127,7 +127,7 @@ public class TrackObserverScenes {
scene.world().moveSection(trainInstance1, util.vector().of(6, 0, 0), 0); scene.world().moveSection(trainInstance1, util.vector().of(6, 0, 0), 0);
scene.world().moveSection(trainInstance1, util.vector().of(-16, 0, 0), 80); scene.world().moveSection(trainInstance1, util.vector().of(-16, 0, 0), 80);
scene.world().animateBogey(util.grid().at(5, 2, 7), 16, 80); scene.world().animateBogey(util.grid().at(5, 2, 7), 16, 80);
birb = scene.special().createBirb(util.vector().centerOf(12, 3, 7), ParrotElement.FacePointOfInterestPose::new); birb = scene.special().createBirb(util.vector().centerOf(12, 3, 7), ParrotPose.FacePointOfInterestPose::new);
scene.special().moveParrot(birb, util.vector().of(-16, 0, 0), 80); scene.special().moveParrot(birb, util.vector().of(-16, 0, 0), 80);
scene.idle(10); scene.idle(10);
@ -147,7 +147,7 @@ public class TrackObserverScenes {
scene.world().moveSection(trainInstance1, util.vector().of(6, 0, 0), 0); scene.world().moveSection(trainInstance1, util.vector().of(6, 0, 0), 0);
scene.world().moveSection(trainInstance1, util.vector().of(-16, 0, 0), 80); scene.world().moveSection(trainInstance1, util.vector().of(-16, 0, 0), 80);
scene.world().animateBogey(util.grid().at(5, 2, 7), 16, 80); scene.world().animateBogey(util.grid().at(5, 2, 7), 16, 80);
birb = scene.special().createBirb(util.vector().centerOf(12, 3, 7), ParrotElement.FacePointOfInterestPose::new); birb = scene.special().createBirb(util.vector().centerOf(12, 3, 7), ParrotPose.FacePointOfInterestPose::new);
scene.special().moveParrot(birb, util.vector().of(-16, 0, 0), 80); scene.special().moveParrot(birb, util.vector().of(-16, 0, 0), 80);
scene.idle(10); scene.idle(10);

View file

@ -7,14 +7,14 @@ import com.simibubi.create.content.processing.burner.BlazeBurnerBlock;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.ParrotElement;
import net.createmod.ponder.api.element.ParrotPose;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.ParrotElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.Blocks;
@ -62,16 +62,21 @@ public class TrackScenes {
scene.idle(30); scene.idle(30);
ItemStack trackStack = AllBlocks.TRACK.asStack(); ItemStack trackStack = AllBlocks.TRACK.asStack();
scene.overlay().showControls(new InputWindowElement(startTrack, Pointing.DOWN).rightClick()
.withItem(trackStack), 40); scene.overlay().showControls(startTrack, Pointing.DOWN, 40)
.rightClick()
.withItem(trackStack);
scene.overlay().showControls(startTrack, Pointing.DOWN, 40).rightClick()
.withItem(trackStack);
scene.idle(6); scene.idle(6);
AABB bb = new AABB(util.grid().at(3, 1, 5)).contract(0, .75f, 0) AABB bb = new AABB(util.grid().at(3, 1, 5)).contract(0, .75f, 0)
.inflate(0, 0, .85f); .inflate(0, 0, .85f);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, startTrack, bb, 32); scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, startTrack, bb, 32);
scene.idle(45); scene.idle(45);
scene.overlay().showControls(new InputWindowElement(startTrack.add(9, 0, 0), Pointing.DOWN).rightClick() scene.overlay().showControls(startTrack.add(9, 0, 0), Pointing.DOWN, 40).rightClick()
.withItem(trackStack), 40); .withItem(trackStack);
scene.idle(6); scene.idle(6);
scene.overlay().showText(40) scene.overlay().showText(40)
.pointAt(util.vector().topOf(12, 0, 5)) .pointAt(util.vector().topOf(12, 0, 5))
@ -93,11 +98,11 @@ public class TrackScenes {
scene.idle(10); scene.idle(10);
scene.addKeyframe(); scene.addKeyframe();
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(8, 0, 2), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(8, 0, 2), Pointing.DOWN, 15).rightClick()
.withItem(trackStack), 15); .withItem(trackStack);
scene.idle(15); scene.idle(15);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(2, 0, 8), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(2, 0, 8), Pointing.DOWN, 15).rightClick()
.withItem(trackStack), 15); .withItem(trackStack);
scene.idle(7); scene.idle(7);
scene.world().showSection(util.select().position(2, 1, 8), Direction.DOWN); scene.world().showSection(util.select().position(2, 1, 8), Direction.DOWN);
scene.idle(25); scene.idle(25);
@ -111,11 +116,11 @@ public class TrackScenes {
scene.world().showSection(util.select().position(12, 1, 2), Direction.SOUTH); scene.world().showSection(util.select().position(12, 1, 2), Direction.SOUTH);
scene.idle(10); scene.idle(10);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(12, 0, 2), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(12, 0, 2), Pointing.DOWN, 10).rightClick()
.withItem(trackStack), 10); .withItem(trackStack);
scene.idle(15); scene.idle(15);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(2, 0, 12), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(2, 0, 12), Pointing.DOWN, 10).rightClick()
.withItem(trackStack), 10); .withItem(trackStack);
scene.idle(7); scene.idle(7);
scene.world().showSection(util.select().fromTo(12, 1, 3, 12, 1, 5), Direction.DOWN); scene.world().showSection(util.select().fromTo(12, 1, 3, 12, 1, 5), Direction.DOWN);
scene.idle(3); scene.idle(3);
@ -148,13 +153,13 @@ public class TrackScenes {
scene.world().showSection(util.select().position(12, 1, 2), Direction.SOUTH); scene.world().showSection(util.select().position(12, 1, 2), Direction.SOUTH);
scene.idle(20); scene.idle(20);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(12, 0, 2), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(12, 0, 2), Pointing.DOWN, 10).rightClick()
.withItem(trackStack), 10); .withItem(trackStack);
scene.idle(10); scene.idle(10);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(2, 0, 12), Pointing.DOWN).rightClick() scene.overlay().showControls(util.vector().topOf(2, 0, 12), Pointing.DOWN, 60).rightClick()
.withItem(trackStack) .withItem(trackStack)
.whileCTRL(), 60); .whileCTRL();
scene.idle(10); scene.idle(10);
scene.overlay().showText(60) scene.overlay().showText(60)
@ -192,19 +197,15 @@ public class TrackScenes {
scene.world().showSectionAndMerge(util.select().fromTo(2, 6, 10, 2, 11, 12), Direction.DOWN, slopeStart); scene.world().showSectionAndMerge(util.select().fromTo(2, 6, 10, 2, 11, 12), Direction.DOWN, slopeStart);
scene.idle(20); scene.idle(20);
scene.overlay() scene.overlay().showControls(util.vector().topOf(12, 3, 11), Pointing.LEFT, 30).withItem(trackStack);
.showControls(new InputWindowElement(util.vector().topOf(12, 3, 11), Pointing.LEFT).withItem(trackStack), 30);
scene.idle(4); scene.idle(4);
ItemStack smoothStone = new ItemStack(Blocks.SMOOTH_STONE); ItemStack smoothStone = new ItemStack(Blocks.SMOOTH_STONE);
scene.overlay().showControls( scene.overlay().showControls(util.vector().topOf(12, 3, 11), Pointing.RIGHT, 26).withItem(smoothStone);
new InputWindowElement(util.vector().topOf(12, 3, 11), Pointing.RIGHT).withItem(smoothStone), 26);
scene.idle(30); scene.idle(30);
scene.overlay() scene.overlay().showControls(util.vector().topOf(2, 6, 11), Pointing.LEFT, 30).withItem(trackStack);
.showControls(new InputWindowElement(util.vector().topOf(2, 6, 11), Pointing.LEFT).withItem(trackStack), 30);
scene.idle(4); scene.idle(4);
scene.overlay().showControls( scene.overlay().showControls(util.vector().topOf(2, 6, 11), Pointing.RIGHT, 26).withItem(smoothStone);
new InputWindowElement(util.vector().topOf(2, 6, 11), Pointing.RIGHT).withItem(smoothStone), 26);
scene.idle(10); scene.idle(10);
scene.world().showSectionAndMerge(util.select().position(2, 12, 11), Direction.DOWN, slopeStart); scene.world().showSectionAndMerge(util.select().position(2, 12, 11), Direction.DOWN, slopeStart);
@ -219,19 +220,15 @@ public class TrackScenes {
.text("Materials in the off-hand will be paved under tracks automatically"); .text("Materials in the off-hand will be paved under tracks automatically");
scene.idle(80); scene.idle(80);
scene.overlay() scene.overlay().showControls(util.vector().topOf(12, 2, 7), Pointing.LEFT, 30).withItem(trackStack);
.showControls(new InputWindowElement(util.vector().topOf(12, 2, 7), Pointing.LEFT).withItem(trackStack), 30);
scene.idle(4); scene.idle(4);
smoothStone = new ItemStack(Blocks.SMOOTH_STONE_SLAB); smoothStone = new ItemStack(Blocks.SMOOTH_STONE_SLAB);
scene.overlay().showControls( scene.overlay().showControls(util.vector().topOf(12, 2, 7), Pointing.RIGHT, 26).withItem(smoothStone);
new InputWindowElement(util.vector().topOf(12, 2, 7), Pointing.RIGHT).withItem(smoothStone), 26);
scene.idle(30); scene.idle(30);
scene.overlay() scene.overlay().showControls(util.vector().topOf(2, 4, 7), Pointing.LEFT, 30).withItem(trackStack);
.showControls(new InputWindowElement(util.vector().topOf(2, 4, 7), Pointing.LEFT).withItem(trackStack), 30);
scene.idle(4); scene.idle(4);
scene.overlay() scene.overlay().showControls(util.vector().topOf(2, 4, 7), Pointing.RIGHT, 26).withItem(smoothStone);
.showControls(new InputWindowElement(util.vector().topOf(2, 4, 7), Pointing.RIGHT).withItem(smoothStone), 26);
scene.idle(10); scene.idle(10);
scene.world().showSectionAndMerge(util.select().position(2, 10, 7), Direction.DOWN, slopeStart); scene.world().showSectionAndMerge(util.select().position(2, 10, 7), Direction.DOWN, slopeStart);
@ -239,19 +236,15 @@ public class TrackScenes {
scene.world().showSectionAndMerge(util.select().fromTo(11, 7, 6, 3, 11, 8), Direction.UP, slopeStart); scene.world().showSectionAndMerge(util.select().fromTo(11, 7, 6, 3, 11, 8), Direction.UP, slopeStart);
scene.idle(20); scene.idle(20);
scene.overlay() scene.overlay().showControls(util.vector().topOf(12, 1, 3), Pointing.LEFT, 30).withItem(trackStack);
.showControls(new InputWindowElement(util.vector().topOf(12, 1, 3), Pointing.LEFT).withItem(trackStack), 30);
scene.idle(4); scene.idle(4);
smoothStone = AllBlocks.METAL_GIRDER.asStack(); smoothStone = AllBlocks.METAL_GIRDER.asStack();
scene.overlay().showControls( scene.overlay().showControls(util.vector().topOf(12, 1, 3), Pointing.RIGHT, 26).withItem(smoothStone);
new InputWindowElement(util.vector().topOf(12, 1, 3), Pointing.RIGHT).withItem(smoothStone), 26);
scene.idle(30); scene.idle(30);
scene.overlay() scene.overlay().showControls(util.vector().topOf(2, 2, 3), Pointing.LEFT, 30).withItem(trackStack);
.showControls(new InputWindowElement(util.vector().topOf(2, 2, 3), Pointing.LEFT).withItem(trackStack), 30);
scene.idle(4); scene.idle(4);
scene.overlay() scene.overlay().showControls(util.vector().topOf(2, 2, 3), Pointing.RIGHT, 26).withItem(smoothStone);
.showControls(new InputWindowElement(util.vector().topOf(2, 2, 3), Pointing.RIGHT).withItem(smoothStone), 26);
scene.idle(10); scene.idle(10);
scene.world().showSectionAndMerge(util.select().position(2, 8, 3), Direction.DOWN, slopeStart); scene.world().showSectionAndMerge(util.select().position(2, 8, 3), Direction.DOWN, slopeStart);
@ -299,7 +292,7 @@ public class TrackScenes {
scene.world().showIndependentSection(util.select().fromTo(5, 2, 4, 3, 3, 5), Direction.DOWN); scene.world().showIndependentSection(util.select().fromTo(5, 2, 4, 3, 3, 5), Direction.DOWN);
ElementLink<ParrotElement> birb = ElementLink<ParrotElement> birb =
scene.special().createBirb(util.vector().centerOf(4, 3, 2), ParrotElement.FacePointOfInterestPose::new); scene.special().createBirb(util.vector().centerOf(4, 3, 2), ParrotPose.FacePointOfInterestPose::new);
scene.special().conductorBirb(birb, true); scene.special().conductorBirb(birb, true);
scene.special().movePointOfInterest(util.grid().at(4, 4, 10)); scene.special().movePointOfInterest(util.grid().at(4, 4, 10));
@ -379,7 +372,7 @@ public class TrackScenes {
scene.idle(5); scene.idle(5);
scene.world().showSectionAndMerge(vStation, Direction.DOWN, stationElement); scene.world().showSectionAndMerge(vStation, Direction.DOWN, stationElement);
ElementLink<ParrotElement> birb = ElementLink<ParrotElement> birb =
scene.special().createBirb(util.vector().centerOf(2, 2, 7), ParrotElement.FacePointOfInterestPose::new); scene.special().createBirb(util.vector().centerOf(2, 2, 7), ParrotPose.FacePointOfInterestPose::new);
scene.special().movePointOfInterest(util.grid().at(4, 3, 4)); scene.special().movePointOfInterest(util.grid().at(4, 3, 4));
scene.idle(5); scene.idle(5);
ElementLink<WorldSectionElement> trainElement = scene.world().showIndependentSection(train, Direction.DOWN); ElementLink<WorldSectionElement> trainElement = scene.world().showIndependentSection(train, Direction.DOWN);
@ -446,7 +439,7 @@ public class TrackScenes {
.add(dStation), null); .add(dStation), null);
ElementLink<WorldSectionElement> dPlatformElement = ElementLink<WorldSectionElement> dPlatformElement =
scene.world().showIndependentSection(dPlatform, null); scene.world().showIndependentSection(dPlatform, null);
birb = scene.special().createBirb(util.vector().centerOf(-2, 2, 7), ParrotElement.FacePointOfInterestPose::new); birb = scene.special().createBirb(util.vector().centerOf(-2, 2, 7), ParrotPose.FacePointOfInterestPose::new);
scene.world().moveSection(dPlatformElement, util.vector().of(-8, -2, 0), 0); scene.world().moveSection(dPlatformElement, util.vector().of(-8, -2, 0), 0);
scene.world().moveSection(stationElement, util.vector().of(-8, 0, 0), 0); scene.world().moveSection(stationElement, util.vector().of(-8, 0, 0), 0);
scene.world().moveSection(stationElement, util.vector().of(8, 0, 0), 80); scene.world().moveSection(stationElement, util.vector().of(8, 0, 0), 80);

View file

@ -6,14 +6,14 @@ import com.simibubi.create.content.trains.station.StationBlock;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.ParrotElement;
import net.createmod.ponder.api.element.ParrotPose;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.ParrotElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
@ -67,8 +67,7 @@ public class TrainScenes {
scene.world().toggleControls(initialControlsPos); scene.world().toggleControls(initialControlsPos);
scene.idle(20); scene.idle(20);
scene.overlay().showControls( scene.overlay().showControls(util.vector().topOf(initialControlsPos), Pointing.DOWN, 70).rightClick();
new InputWindowElement(util.vector().topOf(initialControlsPos), Pointing.DOWN).rightClick(), 70);
scene.idle(20); scene.idle(20);
scene.overlay().showText(60) scene.overlay().showText(60)
@ -93,8 +92,7 @@ public class TrainScenes {
scene.world().animateBogey(util.grid().at(3, 2, 4), 4f, 30); scene.world().animateBogey(util.grid().at(3, 2, 4), 4f, 30);
scene.idle(40); scene.idle(40);
scene.overlay() scene.overlay().showControls(util.vector().topOf(initialControlsPos), Pointing.DOWN, 70).scroll();
.showControls(new InputWindowElement(util.vector().topOf(initialControlsPos), Pointing.DOWN).scroll(), 70);
scene.idle(20); scene.idle(20);
scene.overlay().showText(90) scene.overlay().showText(90)
@ -199,8 +197,8 @@ public class TrainScenes {
scene.idle(80); scene.idle(80);
Vec3 target = util.vector().topOf(util.grid().at(4, 0, 2)); Vec3 target = util.vector().topOf(util.grid().at(4, 0, 2));
scene.overlay().showControls(new InputWindowElement(target, Pointing.RIGHT).rightClick() scene.overlay().showControls(target, Pointing.RIGHT, 80).rightClick()
.withItem(AllItems.SCHEDULE.asStack()), 80); .withItem(AllItems.SCHEDULE.asStack());
scene.overlay().showText(80) scene.overlay().showText(80)
.pointAt(target) .pointAt(target)
.placeNearTarget() .placeNearTarget()
@ -209,9 +207,8 @@ public class TrainScenes {
.text("Right-click with the item in hand to open its Interface"); .text("Right-click with the item in hand to open its Interface");
scene.idle(100); scene.idle(100);
scene.overlay() scene.overlay().showControls(util.vector().topOf(util.grid().at(3, 3, 4)), Pointing.DOWN, 80).rightClick()
.showControls(new InputWindowElement(util.vector().topOf(util.grid().at(3, 3, 4)), Pointing.DOWN).rightClick() .withItem(AllItems.SCHEDULE.asStack());
.withItem(AllItems.SCHEDULE.asStack()), 80);
scene.idle(6); scene.idle(6);
scene.world().conductorBlaze(util.grid().at(3, 3, 4), true); scene.world().conductorBlaze(util.grid().at(3, 3, 4), true);
scene.overlay().showText(70) scene.overlay().showText(70)
@ -232,7 +229,7 @@ public class TrainScenes {
scene.world().moveSection(trainElement2, util.vector().of(0, 0, -3), 0); scene.world().moveSection(trainElement2, util.vector().of(0, 0, -3), 0);
scene.idle(10); scene.idle(10);
Vec3 birbVec = util.vector().topOf(util.grid().at(3, 0, 7)); Vec3 birbVec = util.vector().topOf(util.grid().at(3, 0, 7));
ElementLink<ParrotElement> birb = scene.special().createBirb(birbVec, ParrotElement.FacePointOfInterestPose::new); ElementLink<ParrotElement> birb = scene.special().createBirb(birbVec, ParrotPose.FacePointOfInterestPose::new);
scene.world().animateTrainStation(stationPos, true); scene.world().animateTrainStation(stationPos, true);
scene.overlay().showText(110) scene.overlay().showText(110)
@ -242,12 +239,12 @@ public class TrainScenes {
.text("Any mob or blaze burner sitting in front of Train Controls is an eligible conductor"); .text("Any mob or blaze burner sitting in front of Train Controls is an eligible conductor");
scene.idle(80); scene.idle(80);
scene.overlay().showControls(new InputWindowElement(util.vector().centerOf(util.grid().at(3, 1, 7)), Pointing.DOWN) scene.overlay().showControls(util.vector().centerOf(util.grid().at(3, 1, 7)), Pointing.DOWN, 30)
.withItem(new ItemStack(Items.LEAD)), 30); .withItem(new ItemStack(Items.LEAD));
scene.idle(40); scene.idle(40);
target = util.vector().centerOf(util.grid().at(3, 3, 4)); target = util.vector().centerOf(util.grid().at(3, 3, 4));
scene.overlay().showControls(new InputWindowElement(target.add(0.5, 0, 0), Pointing.RIGHT).rightClick() scene.overlay().showControls(target.add(0.5, 0, 0), Pointing.RIGHT, 30).rightClick()
.withItem(new ItemStack(Items.LEAD)), 30); .withItem(new ItemStack(Items.LEAD));
scene.idle(6); scene.idle(6);
scene.special().moveParrot(birb, target.subtract(birbVec), 5); scene.special().moveParrot(birb, target.subtract(birbVec), 5);
scene.effects().indicateSuccess(util.grid().at(3, 3, 4)); scene.effects().indicateSuccess(util.grid().at(3, 3, 4));
@ -261,8 +258,8 @@ public class TrainScenes {
.text("Creatures on a lead can be given their seat more conveniently"); .text("Creatures on a lead can be given their seat more conveniently");
scene.idle(80); scene.idle(80);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(util.grid().at(3, 3, 4)), Pointing.DOWN) scene.overlay().showControls(util.vector().topOf(util.grid().at(3, 3, 4)), Pointing.DOWN, 15)
.withItem(AllItems.SCHEDULE.asStack()), 15); .withItem(AllItems.SCHEDULE.asStack());
scene.idle(6); scene.idle(6);
scene.special().conductorBirb(birb, true); scene.special().conductorBirb(birb, true);
scene.special().movePointOfInterest(util.grid().at(16, 4, 4)); scene.special().movePointOfInterest(util.grid().at(16, 4, 4));
@ -273,8 +270,7 @@ public class TrainScenes {
scene.special().moveParrot(birb, util.vector().of(3, 0, 0), 30); scene.special().moveParrot(birb, util.vector().of(3, 0, 0), 30);
scene.idle(40); scene.idle(40);
scene.overlay().showControls( scene.overlay().showControls(util.vector().topOf(util.grid().at(6, 3, 4)), Pointing.DOWN, 70).rightClick();
new InputWindowElement(util.vector().topOf(util.grid().at(6, 3, 4)), Pointing.DOWN).rightClick(), 70);
scene.idle(6); scene.idle(6);
scene.special().conductorBirb(birb, false); scene.special().conductorBirb(birb, false);
scene.special().movePointOfInterest(util.grid().at(3, 4, 1)); scene.special().movePointOfInterest(util.grid().at(3, 4, 1));

View file

@ -7,14 +7,14 @@ import com.simibubi.create.content.trains.signal.SignalBlockEntity.SignalState;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.ParrotElement;
import net.createmod.ponder.api.element.ParrotPose;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.ParrotElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.AABB;
@ -57,8 +57,8 @@ public class TrainSignalScenes {
AABB bb = new AABB(marker, marker); AABB bb = new AABB(marker, marker);
AABB bb3 = bb.move(3, 0, 0); AABB bb3 = bb.move(3, 0, 0);
scene.overlay().showControls(new InputWindowElement(marker, Pointing.DOWN).rightClick() scene.overlay().showControls(marker, Pointing.DOWN, 40).rightClick()
.withItem(AllBlocks.TRACK_SIGNAL.asStack()), 40); .withItem(AllBlocks.TRACK_SIGNAL.asStack());
scene.idle(6); scene.idle(6);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, bb, bb.move(0, -1 / 16f, 0), 1); scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, bb, bb.move(0, -1 / 16f, 0), 1);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, bb, bb.move(0, -1 / 16f, 0) scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, bb, bb.move(0, -1 / 16f, 0)
@ -87,7 +87,7 @@ public class TrainSignalScenes {
ElementLink<WorldSectionElement> trainElement = scene.world().showIndependentSection(train, Direction.DOWN); ElementLink<WorldSectionElement> trainElement = scene.world().showIndependentSection(train, Direction.DOWN);
Vec3 birbVec = util.vector().centerOf(util.grid().at(2, 3, 6)); Vec3 birbVec = util.vector().centerOf(util.grid().at(2, 3, 6));
ElementLink<ParrotElement> birb = scene.special().createBirb(birbVec, ParrotElement.FacePointOfInterestPose::new); ElementLink<ParrotElement> birb = scene.special().createBirb(birbVec, ParrotPose.FacePointOfInterestPose::new);
scene.idle(10); scene.idle(10);
scene.world().showSection(station, Direction.DOWN); scene.world().showSection(station, Direction.DOWN);
@ -102,8 +102,7 @@ public class TrainSignalScenes {
.text("Scheduled Trains will never cross signals in the opposite direction"); .text("Scheduled Trains will never cross signals in the opposite direction");
scene.idle(90); scene.idle(90);
scene.overlay().showControls( scene.overlay().showControls(birbVec.add(0, 0.5, 0), Pointing.DOWN, 40).withItem(AllItems.SCHEDULE.asStack());
new InputWindowElement(birbVec.add(0, 0.5, 0), Pointing.DOWN).withItem(AllItems.SCHEDULE.asStack()), 40);
scene.idle(6); scene.idle(6);
scene.special().movePointOfInterest(util.grid().at(19, 4, 6)); scene.special().movePointOfInterest(util.grid().at(19, 4, 6));
@ -124,8 +123,8 @@ public class TrainSignalScenes {
scene.special().movePointOfInterest(util.grid().at(5, 1, 4)); scene.special().movePointOfInterest(util.grid().at(5, 1, 4));
scene.idle(20); scene.idle(20);
scene.overlay().showControls(new InputWindowElement(marker, Pointing.DOWN).rightClick() scene.overlay().showControls(marker, Pointing.DOWN, 40).rightClick()
.withItem(AllBlocks.TRACK_SIGNAL.asStack()), 40); .withItem(AllBlocks.TRACK_SIGNAL.asStack());
scene.idle(6); scene.idle(6);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, bb, bb.move(0, -1 / 16f, 0), 1); scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, bb, bb.move(0, -1 / 16f, 0), 1);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, bb, bb.move(0, -1 / 16f, 0) scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, bb, bb.move(0, -1 / 16f, 0)
@ -145,8 +144,7 @@ public class TrainSignalScenes {
scene.idle(90); scene.idle(90);
scene.world().hideIndependentSection(signalElement, null); scene.world().hideIndependentSection(signalElement, null);
scene.overlay().showControls( scene.overlay().showControls(birbVec.add(0, 0.5, 0), Pointing.DOWN, 40).withItem(AllItems.SCHEDULE.asStack());
new InputWindowElement(birbVec.add(0, 0.5, 0), Pointing.DOWN).withItem(AllItems.SCHEDULE.asStack()), 40);
scene.idle(6); scene.idle(6);
scene.special().movePointOfInterest(util.grid().at(19, 4, 6)); scene.special().movePointOfInterest(util.grid().at(19, 4, 6));
@ -288,7 +286,7 @@ public class TrainSignalScenes {
ElementLink<WorldSectionElement> trainElement = scene.world().showIndependentSection(train1, null); ElementLink<WorldSectionElement> trainElement = scene.world().showIndependentSection(train1, null);
ElementLink<ParrotElement> birb1 = ElementLink<ParrotElement> birb1 =
scene.special().createBirb(util.vector().centerOf(18, 3, 7), ParrotElement.FacePointOfInterestPose::new); scene.special().createBirb(util.vector().centerOf(18, 3, 7), ParrotPose.FacePointOfInterestPose::new);
scene.world().moveSection(trainElement, util.vector().of(4, 0, 0), 0); scene.world().moveSection(trainElement, util.vector().of(4, 0, 0), 0);
scene.world().moveSection(trainElement, util.vector().of(-9, 0, 0), 45); scene.world().moveSection(trainElement, util.vector().of(-9, 0, 0), 45);
scene.world().animateBogey(util.grid().at(13, 2, 7), 9f, 45); scene.world().animateBogey(util.grid().at(13, 2, 7), 9f, 45);
@ -313,7 +311,7 @@ public class TrainSignalScenes {
ElementLink<WorldSectionElement> trainElement2 = scene.world().showIndependentSection(train3, null); ElementLink<WorldSectionElement> trainElement2 = scene.world().showIndependentSection(train3, null);
ElementLink<ParrotElement> birb2 = ElementLink<ParrotElement> birb2 =
scene.special().createBirb(util.vector().centerOf(18, 3, 7), ParrotElement.FacePointOfInterestPose::new); scene.special().createBirb(util.vector().centerOf(18, 3, 7), ParrotPose.FacePointOfInterestPose::new);
scene.world().moveSection(trainElement2, util.vector().of(4, 0, 6), 0); scene.world().moveSection(trainElement2, util.vector().of(4, 0, 6), 0);
scene.world().moveSection(trainElement2, util.vector().of(-4.5, 0, 0), 35); scene.world().moveSection(trainElement2, util.vector().of(-4.5, 0, 0), 35);
scene.world().animateBogey(util.grid().at(13, 2, 1), 4.5f, 35); scene.world().animateBogey(util.grid().at(13, 2, 1), 4.5f, 35);
@ -340,10 +338,8 @@ public class TrainSignalScenes {
scene.world().changeSignalState(s3Pos, SignalState.GREEN); scene.world().changeSignalState(s3Pos, SignalState.GREEN);
scene.idle(20); scene.idle(20);
scene.overlay().showControls( scene.overlay().showControls(util.vector().blockSurface(s1Pos, Direction.EAST), Pointing.RIGHT, 80).rightClick()
new InputWindowElement(util.vector().blockSurface(s1Pos, Direction.EAST), Pointing.RIGHT).rightClick() .withItem(AllItems.WRENCH.asStack());
.withItem(AllItems.WRENCH.asStack()),
80);
scene.idle(6); scene.idle(6);
scene.world().cycleBlockProperty(s1Pos, SignalBlock.TYPE); scene.world().cycleBlockProperty(s1Pos, SignalBlock.TYPE);
scene.idle(15); scene.idle(15);
@ -387,7 +383,7 @@ public class TrainSignalScenes {
trainElement = scene.world().showIndependentSection(train1, Direction.DOWN); trainElement = scene.world().showIndependentSection(train1, Direction.DOWN);
scene.world().moveSection(trainElement, util.vector().of(-10.5, 0, 0), 0); scene.world().moveSection(trainElement, util.vector().of(-10.5, 0, 0), 0);
birb1 = scene.special().createBirb(util.vector().centerOf(3, 3, 7) birb1 = scene.special().createBirb(util.vector().centerOf(3, 3, 7)
.add(.5, 0, 0), ParrotElement.DancePose::new); .add(.5, 0, 0), ParrotPose.DancePose::new);
scene.idle(10); scene.idle(10);
scene.world().changeSignalState(s2Pos, SignalState.RED); scene.world().changeSignalState(s2Pos, SignalState.RED);
scene.effects().indicateRedstone(s2Pos.above()); scene.effects().indicateRedstone(s2Pos.above());
@ -403,7 +399,7 @@ public class TrainSignalScenes {
scene.idle(10); scene.idle(10);
trainElement2 = scene.world().showIndependentSection(train3, null); trainElement2 = scene.world().showIndependentSection(train3, null);
birb2 = scene.special().createBirb(util.vector().centerOf(18, 3, 7), ParrotElement.FacePointOfInterestPose::new); birb2 = scene.special().createBirb(util.vector().centerOf(18, 3, 7), ParrotPose.FacePointOfInterestPose::new);
scene.world().moveSection(trainElement2, util.vector().of(4, 0, 6), 0); scene.world().moveSection(trainElement2, util.vector().of(4, 0, 6), 0);
scene.world().moveSection(trainElement2, util.vector().of(-4.5, 0, 0), 35); scene.world().moveSection(trainElement2, util.vector().of(-4.5, 0, 0), 35);
@ -449,7 +445,7 @@ public class TrainSignalScenes {
scene.world().moveSection(trainElement3a, util.vector().of(-20, 0, 20), 40); scene.world().moveSection(trainElement3a, util.vector().of(-20, 0, 20), 40);
scene.world().animateBogey(util.grid().at(13, 2, 4), -20f, 40); scene.world().animateBogey(util.grid().at(13, 2, 4), -20f, 40);
ElementLink<ParrotElement> birb3 = ElementLink<ParrotElement> birb3 =
scene.special().createBirb(util.vector().of(18, 3.5, -2), ParrotElement.FacePointOfInterestPose::new); scene.special().createBirb(util.vector().of(18, 3.5, -2), ParrotPose.FacePointOfInterestPose::new);
scene.special().moveParrot(birb3, util.vector().of(-20, 0, 20), 40); scene.special().moveParrot(birb3, util.vector().of(-20, 0, 20), 40);
scene.idle(5); scene.idle(5);
@ -546,7 +542,7 @@ public class TrainSignalScenes {
scene.world().toggleControls(util.grid().at(6, 3, 5)); scene.world().toggleControls(util.grid().at(6, 3, 5));
scene.world().showSection(train, Direction.DOWN); scene.world().showSection(train, Direction.DOWN);
scene.special().createBirb(util.vector().centerOf(util.grid().at(6, 3, 4)), ParrotElement.DancePose::new); scene.special().createBirb(util.vector().centerOf(util.grid().at(6, 3, 4)), ParrotPose.DancePose::new);
scene.idle(10); scene.idle(10);
scene.world().toggleRedstonePower(comparator); scene.world().toggleRedstonePower(comparator);
scene.effects().indicateRedstone(signalPos); scene.effects().indicateRedstone(signalPos);

View file

@ -6,14 +6,14 @@ import com.simibubi.create.content.trains.station.StationBlock;
import com.simibubi.create.foundation.ponder.CreateSceneBuilder; import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
import net.createmod.catnip.utility.Pointing; import net.createmod.catnip.utility.Pointing;
import net.createmod.ponder.api.PonderPalette;
import net.createmod.ponder.api.element.ElementLink;
import net.createmod.ponder.api.element.ParrotElement;
import net.createmod.ponder.api.element.ParrotPose;
import net.createmod.ponder.api.element.WorldSectionElement;
import net.createmod.ponder.api.scene.SceneBuilder; import net.createmod.ponder.api.scene.SceneBuilder;
import net.createmod.ponder.api.scene.SceneBuildingUtil; import net.createmod.ponder.api.scene.SceneBuildingUtil;
import net.createmod.ponder.foundation.ElementLink; import net.createmod.ponder.api.scene.Selection;
import net.createmod.ponder.foundation.PonderPalette;
import net.createmod.ponder.foundation.Selection;
import net.createmod.ponder.foundation.element.InputWindowElement;
import net.createmod.ponder.foundation.element.ParrotElement;
import net.createmod.ponder.foundation.element.WorldSectionElement;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction; import net.minecraft.core.Direction;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
@ -61,8 +61,8 @@ public class TrainStationScenes {
AABB bb = new AABB(util.vector().topOf(11, 0, 6), util.vector().topOf(11, 0, 6)).move(0, 2 / 16f, 0); AABB bb = new AABB(util.vector().topOf(11, 0, 6), util.vector().topOf(11, 0, 6)).move(0, 2 / 16f, 0);
scene.overlay().showControls(new InputWindowElement(marker, Pointing.DOWN).rightClick() scene.overlay().showControls(marker, Pointing.DOWN, 40).rightClick()
.withItem(AllBlocks.TRACK_STATION.asStack()), 40); .withItem(AllBlocks.TRACK_STATION.asStack());
scene.idle(6); scene.idle(6);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, bb, bb, 1); scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, bb, bb, 1);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, bb, bb.inflate(.45f, 1 / 16f, .45f), 100); scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, bb, bb.inflate(.45f, 1 / 16f, .45f), 100);
@ -88,7 +88,7 @@ public class TrainStationScenes {
.text("Stations are the Waypoints of your Track Network"); .text("Stations are the Waypoints of your Track Network");
scene.idle(90); scene.idle(90);
scene.overlay().showControls(new InputWindowElement(stationTop, Pointing.DOWN).rightClick(), 50); scene.overlay().showControls(stationTop, Pointing.DOWN, 50).rightClick();
scene.idle(16); scene.idle(16);
scene.overlay().showText(70) scene.overlay().showText(70)
.pointAt(stationTop) .pointAt(stationTop)
@ -101,8 +101,7 @@ public class TrainStationScenes {
scene.effects().indicateSuccess(stationPos); scene.effects().indicateSuccess(stationPos);
scene.idle(20); scene.idle(20);
scene.overlay().showControls(new InputWindowElement(marker, Pointing.DOWN).withItem(new ItemStack(Items.BARRIER)), scene.overlay().showControls(marker, Pointing.DOWN, 60).withItem(new ItemStack(Items.BARRIER));
60);
scene.idle(6); scene.idle(6);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.RED, bb, bb, 1); scene.overlay().chaseBoundingBoxOutline(PonderPalette.RED, bb, bb, 1);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.RED, bb, bb.inflate(.45f, 1 / 16f, .45f), 80); scene.overlay().chaseBoundingBoxOutline(PonderPalette.RED, bb, bb.inflate(.45f, 1 / 16f, .45f), 80);
@ -115,8 +114,8 @@ public class TrainStationScenes {
scene.idle(85); scene.idle(85);
ItemStack casing = AllBlocks.RAILWAY_CASING.asStack(); ItemStack casing = AllBlocks.RAILWAY_CASING.asStack();
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(11, 0, 6), Pointing.RIGHT).rightClick() scene.overlay().showControls(util.vector().topOf(11, 0, 6), Pointing.RIGHT, 80).rightClick()
.withItem(casing), 80); .withItem(casing);
scene.idle(6); scene.idle(6);
scene.world().restoreBlocks(util.select().position(10, 2, 6)); scene.world().restoreBlocks(util.select().position(10, 2, 6));
ElementLink<WorldSectionElement> trainElement1 = ElementLink<WorldSectionElement> trainElement1 =
@ -130,15 +129,15 @@ public class TrainStationScenes {
.text("Create new bogeys by using Train Casing on Tracks"); .text("Create new bogeys by using Train Casing on Tracks");
scene.idle(55); scene.idle(55);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(4, 0, 6), Pointing.RIGHT).rightClick() scene.overlay().showControls(util.vector().topOf(4, 0, 6), Pointing.RIGHT, 15).rightClick()
.withItem(casing), 15); .withItem(casing);
scene.idle(6); scene.idle(6);
scene.world().setBlock(util.grid().at(3, 2, 6), AllBlocks.SMALL_BOGEY.getDefaultState(), false); scene.world().setBlock(util.grid().at(3, 2, 6), AllBlocks.SMALL_BOGEY.getDefaultState(), false);
ElementLink<WorldSectionElement> trainElement2 = ElementLink<WorldSectionElement> trainElement2 =
scene.world().showIndependentSection(util.select().position(3, 2, 6), Direction.DOWN); scene.world().showIndependentSection(util.select().position(3, 2, 6), Direction.DOWN);
scene.idle(20); scene.idle(20);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(7, 0, 6), Pointing.RIGHT).rightClick() scene.overlay().showControls(util.vector().topOf(7, 0, 6), Pointing.RIGHT, 15).rightClick()
.withItem(casing), 15); .withItem(casing);
scene.idle(6); scene.idle(6);
scene.world().setBlock(util.grid().at(6, 2, 6), AllBlocks.SMALL_BOGEY.getDefaultState(), false); scene.world().setBlock(util.grid().at(6, 2, 6), AllBlocks.SMALL_BOGEY.getDefaultState(), false);
scene.world().showSectionAndMerge(util.select().position(6, 2, 6), Direction.DOWN, trainElement2); scene.world().showSectionAndMerge(util.select().position(6, 2, 6), Direction.DOWN, trainElement2);
@ -152,11 +151,11 @@ public class TrainStationScenes {
.text("Click the track again to cycle between bogey designs"); .text("Click the track again to cycle between bogey designs");
scene.idle(35); scene.idle(35);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(4, 0, 6), Pointing.RIGHT).rightClick(), 15); scene.overlay().showControls(util.vector().topOf(4, 0, 6), Pointing.RIGHT, 15).rightClick();
scene.idle(6); scene.idle(6);
scene.world().restoreBlocks(util.select().position(3, 2, 6)); scene.world().restoreBlocks(util.select().position(3, 2, 6));
scene.idle(20); scene.idle(20);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(7, 0, 6), Pointing.RIGHT).rightClick(), 15); scene.overlay().showControls(util.vector().topOf(7, 0, 6), Pointing.RIGHT, 15).rightClick();
scene.idle(6); scene.idle(6);
scene.world().restoreBlocks(util.select().position(6, 2, 6)); scene.world().restoreBlocks(util.select().position(6, 2, 6));
scene.idle(30); scene.idle(30);
@ -200,15 +199,15 @@ public class TrainStationScenes {
scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, glue1, glue1.inflate(1.25, 0, .25) scene.overlay().chaseBoundingBoxOutline(PonderPalette.GREEN, glue1, glue1.inflate(1.25, 0, .25)
.expandTowards(0, 1, 0), 60); .expandTowards(0, 1, 0), 60);
scene.idle(15); scene.idle(15);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(util.grid().at(4, 2, 6)), Pointing.UP) scene.overlay().showControls(util.vector().topOf(util.grid().at(4, 2, 6)), Pointing.UP, 40)
.withItem(AllItems.SUPER_GLUE.asStack()), 40); .withItem(AllItems.SUPER_GLUE.asStack());
scene.idle(5); scene.idle(5);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(util.grid().at(10, 2, 6)), Pointing.UP) scene.overlay().showControls(util.vector().topOf(util.grid().at(10, 2, 6)), Pointing.UP, 40)
.withItem(AllItems.SUPER_GLUE.asStack()), 40); .withItem(AllItems.SUPER_GLUE.asStack());
scene.idle(55); scene.idle(55);
scene.overlay().showControls(new InputWindowElement(util.vector().topOf(util.grid().at(5, 3, 5)), Pointing.DOWN) scene.overlay().showControls(util.vector().topOf(util.grid().at(5, 3, 5)), Pointing.DOWN, 40)
.withItem(new ItemStack(Items.CHARCOAL)), 40); .withItem(new ItemStack(Items.CHARCOAL));
scene.idle(10); scene.idle(10);
scene.overlay().showText(90) scene.overlay().showText(90)
.pointAt(util.vector().blockSurface(util.grid().at(5, 3, 5), Direction.WEST)) .pointAt(util.vector().blockSurface(util.grid().at(5, 3, 5), Direction.WEST))
@ -217,7 +216,7 @@ public class TrainStationScenes {
.colored(PonderPalette.BLUE) .colored(PonderPalette.BLUE)
.text("Assembled Trains will move faster if they can find fuel in assembled chests or barrels"); .text("Assembled Trains will move faster if they can find fuel in assembled chests or barrels");
scene.idle(100); scene.idle(100);
scene.overlay().showSelectionWithText(util.select().fromTo(4, 3, 6, 5, 4, 7), 60) scene.overlay().showOutlineWithText(util.select().fromTo(4, 3, 6, 5, 4, 7), 60)
.pointAt(util.vector().blockSurface(util.grid().at(5, 4, 6), Direction.UP)) .pointAt(util.vector().blockSurface(util.grid().at(5, 4, 6), Direction.UP))
.colored(PonderPalette.RED) .colored(PonderPalette.RED)
.placeNearTarget() .placeNearTarget()
@ -243,7 +242,7 @@ public class TrainStationScenes {
.text("An optional second one allows departure from Stations in both directions"); .text("An optional second one allows departure from Stations in both directions");
scene.idle(75); scene.idle(75);
scene.overlay().showControls(new InputWindowElement(stationTop, Pointing.DOWN).rightClick(), 50); scene.overlay().showControls(stationTop, Pointing.DOWN, 50).rightClick();
scene.idle(16); scene.idle(16);
scene.overlay().showText(60) scene.overlay().showText(60)
.pointAt(stationTop) .pointAt(stationTop)
@ -260,7 +259,7 @@ public class TrainStationScenes {
scene.idle(20); scene.idle(20);
ElementLink<ParrotElement> birb = ElementLink<ParrotElement> birb =
scene.special().createBirb(util.vector().centerOf(10, 3, 6), ParrotElement.FacePointOfInterestPose::new); scene.special().createBirb(util.vector().centerOf(10, 3, 6), ParrotPose.FacePointOfInterestPose::new);
scene.idle(15); scene.idle(15);
scene.special().movePointOfInterest(util.grid().at(18, 3, 6)); scene.special().movePointOfInterest(util.grid().at(18, 3, 6));
scene.idle(15); scene.idle(15);
@ -288,8 +287,8 @@ public class TrainStationScenes {
.text("Trains can be disassembled back into blocks at stations only"); .text("Trains can be disassembled back into blocks at stations only");
scene.idle(85); scene.idle(85);
scene.overlay().showControls(new InputWindowElement(stationTop, Pointing.DOWN).rightClick() scene.overlay().showControls(stationTop, Pointing.DOWN, 75).rightClick()
.withItem(new ItemStack(Items.FILLED_MAP)), 75); .withItem(new ItemStack(Items.FILLED_MAP));
scene.idle(15); scene.idle(15);
scene.overlay().showText(70) scene.overlay().showText(70)
.pointAt(stationTop) .pointAt(stationTop)
@ -311,8 +310,8 @@ public class TrainStationScenes {
scene.idle(15); scene.idle(15);
Vec3 target = util.vector().topOf(util.grid().at(5, 3, 6)); Vec3 target = util.vector().topOf(util.grid().at(5, 3, 6));
scene.overlay().showControls(new InputWindowElement(target, Pointing.DOWN).rightClick() scene.overlay().showControls(target, Pointing.DOWN, 75).rightClick()
.withItem(AllItems.WRENCH.asStack()), 75); .withItem(AllItems.WRENCH.asStack());
scene.idle(15); scene.idle(15);
scene.overlay().showText(70) scene.overlay().showText(70)
@ -323,9 +322,8 @@ public class TrainStationScenes {
.text("Assembled Trains can be relocated to nearby Tracks using the Wrench"); .text("Assembled Trains can be relocated to nearby Tracks using the Wrench");
scene.idle(60); scene.idle(60);
scene.overlay() scene.overlay().showControls(util.vector().topOf(util.grid().at(6, 0, 2)), Pointing.DOWN, 15).rightClick()
.showControls(new InputWindowElement(util.vector().topOf(util.grid().at(6, 0, 2)), Pointing.DOWN).rightClick() .withItem(AllItems.WRENCH.asStack());
.withItem(AllItems.WRENCH.asStack()), 15);
scene.idle(15); scene.idle(15);
scene.world().moveSection(trainElement3, util.vector().of(0, 0, -4), 5); scene.world().moveSection(trainElement3, util.vector().of(0, 0, -4), 5);
@ -361,7 +359,7 @@ public class TrainStationScenes {
ElementLink<WorldSectionElement> trainElement = scene.world().showIndependentSection(train, Direction.DOWN); ElementLink<WorldSectionElement> trainElement = scene.world().showIndependentSection(train, Direction.DOWN);
scene.world().moveSection(trainElement, util.vector().of(-4, 0, 0), 0); scene.world().moveSection(trainElement, util.vector().of(-4, 0, 0), 0);
Vec3 target = util.vector().centerOf(2, 3, 6); Vec3 target = util.vector().centerOf(2, 3, 6);
ElementLink<ParrotElement> birb = scene.special().createBirb(target, ParrotElement.FacePointOfInterestPose::new); ElementLink<ParrotElement> birb = scene.special().createBirb(target, ParrotPose.FacePointOfInterestPose::new);
scene.idle(10); scene.idle(10);
scene.overlay().showText(90) scene.overlay().showText(90)
@ -370,8 +368,7 @@ public class TrainStationScenes {
.attachKeyFrame() .attachKeyFrame()
.text("Schedules can be used to provide drivers with a destination"); .text("Schedules can be used to provide drivers with a destination");
scene.idle(70); scene.idle(70);
scene.overlay().showControls( scene.overlay().showControls(target.add(0, 0.5, 0), Pointing.DOWN, 40).withItem(AllItems.SCHEDULE.asStack());
new InputWindowElement(target.add(0, 0.5, 0), Pointing.DOWN).withItem(AllItems.SCHEDULE.asStack()), 40);
scene.idle(6); scene.idle(6);
scene.special().movePointOfInterest(util.grid().at(9, 4, 6)); scene.special().movePointOfInterest(util.grid().at(9, 4, 6));
@ -431,8 +428,7 @@ public class TrainStationScenes {
.attachKeyFrame() .attachKeyFrame()
.text("Mind that a Station can only be approached from the indicated direction"); .text("Mind that a Station can only be approached from the indicated direction");
scene.idle(70); scene.idle(70);
scene.overlay().showControls( scene.overlay().showControls(target.add(0, 0.5, 0), Pointing.DOWN, 40).withItem(AllItems.SCHEDULE.asStack());
new InputWindowElement(target.add(0, 0.5, 0), Pointing.DOWN).withItem(AllItems.SCHEDULE.asStack()), 40);
scene.idle(6); scene.idle(6);
scene.overlay().chaseBoundingBoxOutline(PonderPalette.OUTPUT, bb, bb, 1); scene.overlay().chaseBoundingBoxOutline(PonderPalette.OUTPUT, bb, bb, 1);
@ -474,7 +470,7 @@ public class TrainStationScenes {
trainElement = scene.world().showIndependentSection(train, Direction.DOWN); trainElement = scene.world().showIndependentSection(train, Direction.DOWN);
scene.world().moveSection(trainElement, util.vector().of(-4, 0, 0), 0); scene.world().moveSection(trainElement, util.vector().of(-4, 0, 0), 0);
target = util.vector().centerOf(2, 3, 6); target = util.vector().centerOf(2, 3, 6);
birb = scene.special().createBirb(target, ParrotElement.FacePointOfInterestPose::new); birb = scene.special().createBirb(target, ParrotPose.FacePointOfInterestPose::new);
scene.idle(10); scene.idle(10);
scene.world().moveSection(trainElement, util.vector().of(4, 0, 0), 20); scene.world().moveSection(trainElement, util.vector().of(4, 0, 0), 20);
scene.world().animateBogey(util.grid().at(7, 2, 6), -4f, 20); scene.world().animateBogey(util.grid().at(7, 2, 6), -4f, 20);
@ -485,9 +481,7 @@ public class TrainStationScenes {
scene.idle(10); scene.idle(10);
scene.world().animateTrainStation(stationPos, true); scene.world().animateTrainStation(stationPos, true);
scene.idle(10); scene.idle(10);
scene.overlay().showControls( scene.overlay().showControls(util.vector().topOf(stationPos), Pointing.DOWN, 20).withItem(AllItems.SCHEDULE.asStack());
new InputWindowElement(util.vector().topOf(stationPos), Pointing.DOWN).withItem(AllItems.SCHEDULE.asStack()),
20);
scene.idle(30); scene.idle(30);
scene.effects().indicateSuccess(stationPos); scene.effects().indicateSuccess(stationPos);
scene.idle(10); scene.idle(10);