GithubHelp home page GithubHelp logo

entityutils's Introduction

Entity Utils

MIT License

A papermc plugin that adds various quality of life features for entities.

Structure

EntityUtils is broken into two main packages: an entity package and a utils package (pun intended!).
The entity package contains the code for creating, managing, and modifying entities, while the utils package contains more general utilities that most entities need, like a packet listener, data classes, math utilities, and custom event classes. In a future update the math utilities should be replaced with MathUtils, a more polished version created for more than just this project.

Features

The main feature is a player-model NPC system. This system includes managing static NPCs, teleporting, making the NPC headtrack, setting skins (with any combination of skin layers), and making the NPC walk, complete with custom pathfinding and animations.
The pathfinding is done with a slightly modified version of the A* algorithm, which works very well since minecraft is already seperated into nodes (blocks). The pathfinding code is totally seperate from minecraft though, so in theory it could be moved to another java project successfully.

Another feature is the hologram system, currently living on the hologram-board branch. This was created by @MarvelousAnything, and makes scoreboards that self align and update using an event based system. It is not finished yet though.

Getting Started

Clone this repository and move the code into your project (no need to put it in a jar, I really don't care if you use it decompiled). Copy the code from the main class here into your plugins main class, making sure that all the event registration stuff is good to go. Now just make an instance of the static or animated PlayerNpc class you're good to go!

Run Locally

Clone the project

  git clone https://github.com/Yoursole1/EntityUtils.git

Go to the project directory

  cd EntityUtils

Build jar

  ./gradlew build

Start the paper server

  ./gradlew :runServer

Authors

entityutils's People

Contributors

yoursole1 avatar marvelousanything avatar blackknight625 avatar

Stargazers

YYYork avatar no fucking shit code! avatar Adam Pavie avatar  avatar  avatar

Watchers

 avatar Adam Pavie avatar  avatar

entityutils's Issues

SnowLayers pathfinding

The pathfinder does not recognize snow layers as traversable. This is a simple fix within the node class isTraversable method.

Clicking on NPC desync

After relogging to generate a new NPC, when clicking on it it damages the original NPC

Entity Features

  • Remove all entities without killing them
  • Get all entities on the server
  • Get entity by ID
  • Set entity NBT (and add methods to do common things with this so users don't need to use NBT)
  • Set targets and modify pathfinding with a simpler system
  • Cross version compatibility (NMS)
  • Set poses
  • Have entities be only visible to certain players if desired
  • Custom events to listen for clicking

NPC System

  • Abstract NPC with various implementations
    • General NPC
    • Custom events
    • Specific NPC types
    • Different walk types? Strategy pattern?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.