GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - asphyxia1337/LegoClient: A base for any utility client or mod

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
gradle/wrapper
gradle/wrapper
 
 
src/client
src/client
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

LEGO CLIENT

An open-source utility client base for making a well written client/mod as fast and easy as possible.

Make modules

public class YourModule extends LegoModule {
    public YourModule(Lego lego) {
        super(lego, "YourModule", Category.RENDER, "Does something on your screen");
    }

}

Make commands

public class YourCommand extends LegoCommand {
    public YourCommand(Lego lego) {
        super(lego, "command", "Does something");
    }

    @Override
    public void build(Lego lego, LiteralArgumentBuilder<CommandSource> builder) {
        builder.executes(context -> { // execute immediately
            // do something
            return COMPLETED;
        });
    }

}

Why is the Lego class is the argument in everything?

Lego is the record class with all the necessary managers and the eventbus. It serves as an access point for all of them. Whenever you need a manager instance, you can do this:

      lego.moduleManager().getModules()

How to use the event bus?

      // subscribe the listener class to the eventBus
      lego.eventBus().subscribe(new ListenerClass());
      
      // post the event to the eventBus.
      lego.eventBus().post(new CustomEvent());

Using events within the listener classes

    @Listener // for a regular listener
    public void onEvent(CustomEvent event) { // the method MUST BE PUBLIC
        // do something.
    }

    @SafeListener // for a nullsafe listener (the listeer that checks mc.player, mc.world and mc.interactionManager for being null)
    public void onEvent(CustomEvent event) {
        // do something.
    }

About

A base for any utility client or mod

Resources

Readme
License
Activity

Stars

1 star

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.