#How does the interaction manager work?

3 messages · Page 1 of 1 (latest)

clear lion
#

I am trying to make it so the fishing rod automatically reels in and casts. I have it working so when there is a fish on the bobber it reels in and sets a 20 tick timer until recasting. I am trying to use the interaction manager to recast the fishing rod but it does nothing. Heres my code:

    public int timeTilNextCast = 1;
    @Override
    public void toggle() {
        super.toggle();
    }

    public void setNextCastTime(int count){
        timeTilNextCast = count;
    }

    @Override
    public void tick() {

        if(timeTilNextCast < 0){
            timeTilNextCast ++;
        }
        if(timeTilNextCast == 0 && this.isEnabled()){
            MinecraftClient.getInstance().interactionManager.interactItem(MinecraftClient.getInstance().player, Hand.MAIN_HAND);
            System.out.println("next cast");
            timeTilNextCast = 1;
        }
        super.tick();
    }

#

I have figured it out

serene folio
#

!!cheats