Search in sources :

Example 1 with MechanicalMixerTileEntity

use of com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerTileEntity in project Create by Creators-of-Create.

the class BasinTileEntity method lazyTick.

@Override
public void lazyTick() {
    super.lazyTick();
    updateSpoutput();
    if (!level.isClientSide)
        return;
    BlockEntity tileEntity = level.getBlockEntity(worldPosition.above(2));
    if (!(tileEntity instanceof MechanicalMixerTileEntity)) {
        setAreFluidsMoving(false);
        return;
    }
    MechanicalMixerTileEntity mixer = (MechanicalMixerTileEntity) tileEntity;
    setAreFluidsMoving(mixer.running && mixer.runningTicks <= 20);
}
Also used : MechanicalMixerTileEntity(com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerTileEntity) BlockEntity(net.minecraft.world.level.block.entity.BlockEntity)

Example 2 with MechanicalMixerTileEntity

use of com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerTileEntity in project Create by Creators-of-Create.

the class ProcessingScenes method mixing.

public static void mixing(SceneBuilder scene, SceneBuildingUtil util) {
    scene.title("mechanical_mixer", "Processing Items with the Mechanical Mixer");
    scene.configureBasePlate(0, 0, 5);
    scene.world.setBlock(util.grid.at(1, 1, 2), AllBlocks.ANDESITE_CASING.getDefaultState(), false);
    scene.world.showSection(util.select.layer(0), Direction.UP);
    scene.idle(5);
    scene.world.showSection(util.select.fromTo(1, 4, 3, 1, 1, 5), Direction.DOWN);
    scene.idle(5);
    scene.world.showSection(util.select.position(1, 1, 2), Direction.DOWN);
    scene.idle(5);
    scene.world.showSection(util.select.position(1, 2, 2), Direction.DOWN);
    scene.idle(5);
    scene.world.showSection(util.select.position(1, 4, 2), Direction.SOUTH);
    scene.idle(5);
    scene.world.showSection(util.select.fromTo(3, 1, 1, 1, 1, 1), Direction.SOUTH);
    scene.world.showSection(util.select.fromTo(3, 1, 5, 3, 1, 2), Direction.SOUTH);
    scene.idle(20);
    BlockPos basin = util.grid.at(1, 2, 2);
    BlockPos pressPos = util.grid.at(1, 4, 2);
    Vec3 basinSide = util.vector.blockSurface(basin, Direction.WEST);
    ItemStack blue = new ItemStack(Items.BLUE_DYE);
    ItemStack red = new ItemStack(Items.RED_DYE);
    ItemStack purple = new ItemStack(Items.PURPLE_DYE);
    scene.overlay.showText(60).pointAt(basinSide).placeNearTarget().attachKeyFrame().text("With a Mixer and Basin, some Crafting Recipes can be automated");
    scene.idle(40);
    scene.overlay.showControls(new InputWindowElement(util.vector.topOf(basin), Pointing.LEFT).withItem(blue), 30);
    scene.overlay.showControls(new InputWindowElement(util.vector.topOf(basin), Pointing.RIGHT).withItem(red), 30);
    scene.idle(30);
    Class<MechanicalMixerTileEntity> type = MechanicalMixerTileEntity.class;
    scene.world.modifyTileEntity(pressPos, type, pte -> pte.startProcessingBasin());
    scene.world.createItemOnBeltLike(basin, Direction.UP, red);
    scene.world.createItemOnBeltLike(basin, Direction.UP, blue);
    scene.idle(80);
    scene.world.modifyTileNBT(util.select.position(basin), BasinTileEntity.class, nbt -> {
        nbt.put("VisualizedItems", NBTHelper.writeCompoundList(ImmutableList.of(IntAttached.with(1, purple)), ia -> ia.getValue().serializeNBT()));
    });
    scene.idle(4);
    scene.world.createItemOnBelt(util.grid.at(1, 1, 1), Direction.UP, purple);
    scene.idle(30);
    scene.overlay.showText(80).pointAt(basinSide).placeNearTarget().attachKeyFrame().text("Available recipes include any Shapeless Crafting Recipe, plus a couple extra ones");
    scene.idle(80);
    scene.rotateCameraY(-30);
    scene.idle(10);
    scene.world.setBlock(util.grid.at(1, 1, 2), AllBlocks.BLAZE_BURNER.getDefaultState().setValue(BlazeBurnerBlock.HEAT_LEVEL, HeatLevel.KINDLED), true);
    scene.idle(10);
    scene.overlay.showText(80).pointAt(basinSide.subtract(0, 1, 0)).placeNearTarget().text("Some of those recipes may require the heat of a Blaze Burner");
    scene.idle(40);
    scene.rotateCameraY(30);
    scene.idle(60);
    Vec3 filterPos = util.vector.of(1, 2.75f, 2.5f);
    scene.overlay.showFilterSlotInput(filterPos, 100);
    scene.overlay.showText(120).pointAt(filterPos).placeNearTarget().attachKeyFrame().text("The filter slot can be used in case two recipes are conflicting.");
    scene.idle(60);
}
Also used : Items(net.minecraft.world.item.Items) SceneBuilder(com.simibubi.create.foundation.ponder.SceneBuilder) InputWindowElement(com.simibubi.create.foundation.ponder.element.InputWindowElement) Direction(net.minecraft.core.Direction) EntityType(net.minecraft.world.entity.EntityType) BasinTileEntity(com.simibubi.create.content.contraptions.processing.BasinTileEntity) Pointing(com.simibubi.create.foundation.utility.Pointing) MechanicalPressTileEntity(com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity) ItemParticleOption(net.minecraft.core.particles.ItemParticleOption) AllItems(com.simibubi.create.AllItems) ElementLink(com.simibubi.create.foundation.ponder.ElementLink) ImmutableList(com.google.common.collect.ImmutableList) BasinBlock(com.simibubi.create.content.contraptions.processing.BasinBlock) PonderPalette(com.simibubi.create.foundation.ponder.PonderPalette) BeltItemElement(com.simibubi.create.foundation.ponder.element.BeltItemElement) DeployerTileEntity(com.simibubi.create.content.contraptions.components.deployer.DeployerTileEntity) AllBlocks(com.simibubi.create.AllBlocks) Selection(com.simibubi.create.foundation.ponder.Selection) Iterate(com.simibubi.create.foundation.utility.Iterate) Mode(com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity.Mode) EntityElement(com.simibubi.create.foundation.ponder.element.EntityElement) Emitter(com.simibubi.create.foundation.ponder.instruction.EmitParticlesInstruction.Emitter) Blaze(net.minecraft.world.entity.monster.Blaze) SceneBuildingUtil(com.simibubi.create.foundation.ponder.SceneBuildingUtil) BlazeBurnerBlock(com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock) HeatLevel(com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel) IntAttached(com.simibubi.create.foundation.utility.IntAttached) Blocks(net.minecraft.world.level.block.Blocks) WorldSectionElement(com.simibubi.create.foundation.ponder.element.WorldSectionElement) Entity(net.minecraft.world.entity.Entity) BlockPos(net.minecraft.core.BlockPos) ItemEntity(net.minecraft.world.entity.item.ItemEntity) Vec3(net.minecraft.world.phys.Vec3) LitBlazeBurnerBlock(com.simibubi.create.content.contraptions.processing.burner.LitBlazeBurnerBlock) NBTHelper(com.simibubi.create.foundation.utility.NBTHelper) ItemStack(net.minecraft.world.item.ItemStack) MillstoneTileEntity(com.simibubi.create.content.contraptions.components.millstone.MillstoneTileEntity) MechanicalMixerTileEntity(com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerTileEntity) ParticleTypes(net.minecraft.core.particles.ParticleTypes) MechanicalMixerTileEntity(com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerTileEntity) Vec3(net.minecraft.world.phys.Vec3) InputWindowElement(com.simibubi.create.foundation.ponder.element.InputWindowElement) BlockPos(net.minecraft.core.BlockPos) ItemStack(net.minecraft.world.item.ItemStack)

Aggregations

MechanicalMixerTileEntity (com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerTileEntity)2 ImmutableList (com.google.common.collect.ImmutableList)1 AllBlocks (com.simibubi.create.AllBlocks)1 AllItems (com.simibubi.create.AllItems)1 DeployerTileEntity (com.simibubi.create.content.contraptions.components.deployer.DeployerTileEntity)1 MillstoneTileEntity (com.simibubi.create.content.contraptions.components.millstone.MillstoneTileEntity)1 MechanicalPressTileEntity (com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity)1 Mode (com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity.Mode)1 BasinBlock (com.simibubi.create.content.contraptions.processing.BasinBlock)1 BasinTileEntity (com.simibubi.create.content.contraptions.processing.BasinTileEntity)1 BlazeBurnerBlock (com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock)1 HeatLevel (com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel)1 LitBlazeBurnerBlock (com.simibubi.create.content.contraptions.processing.burner.LitBlazeBurnerBlock)1 ElementLink (com.simibubi.create.foundation.ponder.ElementLink)1 PonderPalette (com.simibubi.create.foundation.ponder.PonderPalette)1 SceneBuilder (com.simibubi.create.foundation.ponder.SceneBuilder)1 SceneBuildingUtil (com.simibubi.create.foundation.ponder.SceneBuildingUtil)1 Selection (com.simibubi.create.foundation.ponder.Selection)1 BeltItemElement (com.simibubi.create.foundation.ponder.element.BeltItemElement)1 EntityElement (com.simibubi.create.foundation.ponder.element.EntityElement)1