From 019a61c4440a612fb0fa4198ef12e2688d10577a Mon Sep 17 00:00:00 2001 From: PepperBell <44146161+PepperCode1@users.noreply.github.com> Date: Sat, 7 Aug 2021 21:10:38 -0700 Subject: [PATCH] Expose ponder instruction addition --- .../foundation/ponder/SceneBuilder.java | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/simibubi/create/foundation/ponder/SceneBuilder.java b/src/main/java/com/simibubi/create/foundation/ponder/SceneBuilder.java index 63e7b06bf..2415e6fcf 100644 --- a/src/main/java/com/simibubi/create/foundation/ponder/SceneBuilder.java +++ b/src/main/java/com/simibubi/create/foundation/ponder/SceneBuilder.java @@ -192,6 +192,24 @@ public class SceneBuilder { Direction.UP); } + /** + * Adds an instruction to the scene. It is recommended to only use this method + * if another method in this class or its subclasses does not already allow + * adding a certain instruction. + */ + public void addInstruction(PonderInstruction instruction) { + scene.schedule.add(instruction); + } + + /** + * Adds a simple instruction to the scene. It is recommended to only use this + * method if another method in this class or its subclasses does not already + * allow adding a certain instruction. + */ + public void addInstruction(Consumer callback) { + addInstruction(PonderInstruction.simple(callback)); + } + /** * Before running the upcoming instructions, wait for a duration to let previous * actions play out.
@@ -816,12 +834,4 @@ public class SceneBuilder { } - private void addInstruction(PonderInstruction instruction) { - scene.schedule.add(instruction); - } - - private void addInstruction(Consumer callback) { - scene.schedule.add(PonderInstruction.simple(callback)); - } - }