Skip to content

Look into Captured Statement error #150

@kindlich

Description

@kindlich
CTEventManager.register<RightClickBlockEvent>((event) => {
    var level = event.player.level;
    var pos = event.hitVec.blockPos;
    var block = level.getBlockState(pos);
    level.schedule()
        .sleep(20)
        .run((level) => {
            level.setBlockAndUpdate(event.hitVec.blockPos, <blockstate:minecraft:dirt>);
        })
        .sleep(20)
        .run((level) => {
            level.setBlockAndUpdate(pos, <blockstate:minecraft:grass_block>);
        })
        .sleep(20)
        .run((level) => {
            level.setBlockAndUpdate(pos, block);
        })
        .build();
});

gives a captured statement error

Metadata

Metadata

Assignees

No one assigned

    Labels

    CraftTweakerAll Issues that are needed by CraftTweakerbugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions