Giter Site home page Giter Site logo

hardcore-hearts's Introduction

hardcore-hearts

This plugin will trick your Minecraft client into displaying the hardcore hearts instead of the default ones.

Images

Hardcore hearts:

Hardcore Hearts

Default hearts:

Hardcore Hearts

Requirements

(Checkout specific version branches for other versions)

  • Spigot 1.20.2
  • Java 17

Incompatibilities

There are no incompatible plugins as far as I know.

How it works

Short answer: The plugin listens for outgoing packets. When the JoinGame packet is sent to a player, the plugin modifies the packet by setting the " hardcore" flag to "true".

Long answer:
When I started to work on this project I thought the solution was pretty easy: Subscribe to the LoginEvent, inject a packet listener and modify the JoinGame packet. Unfortunately there is no way to get the player's Netty channel during the login because it gets set right before the player receives the JoinGame packet. While I was looking through the NMS code I stumbled upon a ITextFilter field. I suppose it's some sort of chat filter, but I have no idea what its purpose is. I did notice however that the server calls this text filter right before it sends the JoinGame packet. The players Netty channel is also set right before this. I just had to set my own text filter to receive the callback, and now I was able to inject my packet listener!

hardcore-hearts's People

Contributors

cerus avatar

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.