use of net.minecraft.world.entity.vehicle.MinecartChest in project Create by Creators-of-Create.
the class CartAssemblerScenes method dual.
public static void dual(SceneBuilder scene, SceneBuildingUtil util) {
scene.title("cart_assembler_dual", "Assembling Carriage Contraptions");
scene.configureBasePlate(0, 0, 6);
scene.scaleSceneView(.9f);
scene.world.showSection(util.select.layer(0), Direction.UP);
scene.idle(5);
for (int z = 0; z < 5; z++) {
scene.world.showSection(util.select.position(1, 1, z), Direction.DOWN);
scene.idle(2);
}
for (int x = 2; x < 6; x++) {
scene.world.showSection(util.select.position(x, 1, 4), Direction.DOWN);
scene.idle(2);
}
BlockPos assembler1 = util.grid.at(2, 1, 4);
BlockPos assembler2 = util.grid.at(5, 1, 4);
Selection chassis = util.select.fromTo(5, 2, 4, 2, 2, 4);
scene.idle(5);
scene.world.showSection(util.select.fromTo(2, 1, 3, 2, 1, 2), Direction.SOUTH);
scene.idle(5);
ElementLink<MinecartElement> cart = scene.special.createCart(util.vector.topOf(assembler1.below()), 0, Minecart::new);
ElementLink<MinecartElement> cart2 = scene.special.createCart(util.vector.topOf(assembler2.below()), 0, MinecartChest::new);
scene.idle(15);
scene.world.setBlock(assembler1, AllBlocks.CART_ASSEMBLER.getDefaultState().setValue(CartAssemblerBlock.RAIL_SHAPE, RailShape.EAST_WEST).setValue(CartAssemblerBlock.RAIL_TYPE, CartAssembleRailType.CONTROLLER_RAIL), true);
scene.idle(5);
scene.world.setBlock(assembler2, AllBlocks.CART_ASSEMBLER.getDefaultState().setValue(CartAssemblerBlock.RAIL_SHAPE, RailShape.EAST_WEST).setValue(CartAssemblerBlock.RAIL_TYPE, CartAssembleRailType.REGULAR), true);
scene.idle(5);
ElementLink<WorldSectionElement> contraption = scene.world.showIndependentSection(chassis, Direction.DOWN);
scene.idle(15);
scene.overlay.showOutline(PonderPalette.GREEN, new Object(), util.select.position(assembler2), 60);
scene.overlay.showSelectionWithText(util.select.position(assembler1), 60).colored(PonderPalette.GREEN).pointAt(util.vector.blockSurface(util.grid.at(2, 2, 4), Direction.NORTH)).placeNearTarget().text("Whenever two Cart Assembers share an attached structure...").attachKeyFrame();
scene.idle(70);
scene.overlay.showText(60).pointAt(util.vector.blockSurface(util.grid.at(2, 1, 4), Direction.NORTH)).placeNearTarget().text("Powering either of them will create a Carriage Contraption");
scene.idle(70);
scene.effects.indicateRedstone(util.grid.at(2, 1, 2));
scene.world.toggleRedstonePower(util.select.fromTo(2, 1, 2, 2, 1, 4));
ElementLink<WorldSectionElement> anchors = scene.world.showIndependentSectionImmediately(util.select.fromTo(assembler1.south(), assembler2.south()));
scene.world.moveSection(anchors, util.vector.of(0, 0, -1), 0);
scene.world.configureCenterOfRotation(anchors, util.vector.centerOf(util.grid.at(2, 2, 5)));
scene.world.configureCenterOfRotation(contraption, util.vector.centerOf(util.grid.at(2, 2, 4)));
scene.idle(5);
Vec3 m = util.vector.of(-0.5, 0, 0);
scene.special.moveCart(cart, m, 5);
scene.special.moveCart(cart2, m, 5);
scene.world.moveSection(contraption, m, 5);
scene.world.moveSection(anchors, m, 5);
scene.idle(5);
scene.special.rotateCart(cart, -45, 2);
scene.special.moveCart(cart2, util.vector.of(-.3, 0, 0), 8);
m = util.vector.of(-.5, 0, -.5);
scene.special.moveCart(cart, m, 8);
scene.world.moveSection(anchors, m, 8);
scene.world.moveSection(contraption, m, 8);
scene.world.rotateSection(anchors, 0, -10, 0, 8);
scene.world.rotateSection(contraption, 0, -10, 0, 8);
scene.idle(8);
scene.special.rotateCart(cart, -45, 2);
scene.special.moveCart(cart2, util.vector.of(-.4, 0, 0), 5);
m = util.vector.of(0, 0, -3.5);
scene.special.moveCart(cart, m, 25);
scene.world.moveSection(anchors, m, 25);
scene.world.moveSection(contraption, m, 25);
scene.world.rotateSection(anchors, 0, -33, 0, 10);
scene.world.rotateSection(contraption, 0, -33, 0, 10);
scene.idle(5);
scene.special.moveCart(cart2, util.vector.of(-0.8, 0, 0), 5);
scene.idle(5);
scene.special.moveCart(cart2, util.vector.of(-1.5, 0, 0), 9);
scene.world.rotateSection(anchors, 0, -42, 0, 9);
scene.world.rotateSection(contraption, 0, -42, 0, 9);
scene.idle(9);
m = util.vector.of(-.5, 0, -.5);
scene.special.moveCart(cart2, m, 2);
scene.special.rotateCart(cart2, -45, 2);
scene.world.rotateSection(anchors, 0, -5, 0, 5);
scene.world.rotateSection(contraption, 0, -5, 0, 5);
scene.idle(2);
scene.special.moveCart(cart2, util.vector.of(0, 0, -.5), 5);
scene.special.rotateCart(cart2, -45, 2);
scene.idle(10);
scene.overlay.showText(70).attachKeyFrame().pointAt(util.vector.blockSurface(util.grid.at(1, 1, 3), Direction.WEST)).placeNearTarget().text("The carts will behave like those connected via Minecart Coupling");
scene.idle(80);
}
Aggregations