Skip to content
Discussion options

You must be logged in to vote

You can't just write LivingEntity, you have to use full class name. This is how I would write your script:

void enableBowAssist() {
    if (!aimAssist.isBowAssistEnabled()) {
        aimAssist.toggleBowAssist();
        ui.systemMessage("Bow assist: ON"); // comment out if not needed, but good for initial debugging
    }
}

void disableBowAssist() {
    if (aimAssist.isBowAssistEnabled()) {
        aimAssist.toggleBowAssist();
        ui.systemMessage("Bow assist: OFF"); // same
    }
}

events.onTickEnd(() => {
    if (input.isKeyDown("R")) {
        let targetId = game.entities.findClosestEntityByClass("net.minecraft.world.entity.LivingEntity");
        if (targetId > 0) {
            let 

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Andy718811
Comment options

@Zergatul
Comment options

Answer selected by Andy718811
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants