Neon Addons API
  • Introduction
    • Informations
    • Ways of writing Addons
      • Java "Scripting"
      • Normal Java "Project"
  • Examples
    • Simple Chams
    • Simple ESP
    • Simple Ground Spoof Flight
    • Text Rendering
    • Sending/Intercepting Packets
    • Settings
  • The API
    • Addon API
      • AbstractNeonAddon
      • Objects
        • Events
          • NeonEvent
          • NeonPacketEvent
          • NeonPlayerMotionEvent
          • NeonPlayerMoveEvent
          • NeonPostProcessEvent
          • NeonRenderEvent
          • NeonRenderPlayerEvent
          • NeonRotationEvent
          • NeonGameTickEvent
        • Interfaces
          • INeon
          • INeonModuleManager
          • INeonModule
          • INeonSettingManager
          • INeonRenderer
          • INeonRectanglePublisher
          • INeonRoundRectanglePublisher
          • INeonMathUtil
          • INeonMovementUtil
          • INeonRotationUtil
          • INeonUnsafeFunctions
        • Other Types
          • NeonFontType
          • NeonNotificationType
          • NeonPair
          • NeonMusicMetadata
          • NeonMusicType
Powered by GitBook
On this page
  1. Examples

Simple ESP

SimpleESP.java
@name("Simple ESP")
@author("Author")
@description("Simple ESP Addon")

public void onRenderEvent(NeonRenderEvent event) {
    if (!event.isOverlay() && !event.isWorldPass()) return;

    // loop through all the players
    for (EntityPlayer player : mc.theWorld.playerEntities) {
        // don't draw anything if the entity is the local player
        if (player instanceof EntityPlayerSP) continue;

        Vector3d worldPosition = getMathUtil().lerp(player, event.getPartialTicks());

        // 2d screen rendering
        if (event.isOverlay()) {
            Vector2f screenPosition = getRenderer().worldToScreen(worldPosition);

            // skip off-screen entities
            if (screenPosition == null) continue;

            // draw a 2d white rectangle on the player's position
            getRenderer().rectangle2D(
                event.getRenderStack(),
                screenPosition.x,
                screenPosition.y,
                5.0f, 5.0f, // width, height
                Color.WHITE
            );
        } else {
            // 3d rendering
            getRenderer().circle3D(
                event.getRenderStack(),
                (float) worldPosition.x,
                (float) worldPosition.y,
                (float) worldPosition.z,
                1.0f, // radius
                2.0f, // thickness
                Color.WHITE
            );
        }
    }
}
PreviousSimple ChamsNextSimple Ground Spoof Flight

Last updated 6 months ago