Event Types

enabled

  • Called when the feature is enabled

disabled

  • Called when the feature is disabled

game_tick

  • Called every game tick

game_loop

  • Called every frame

game_fov

  • Called when the world is about to be rendered, can be used to modify the FOV

class GameFOVEvent {
    public fov: number;
}

rotation

  • Called when the rotation handler ticks, can be used to silently set rotations, will also automatically be corrected my Movement Fix

class RotationEvent {
    public tickDelta: number;
    public angle: Angle;
}

key_press

  • Called when a key is pressed

class KeyPressEvent {
    public cancelled: boolean;
    
    public keyCode: number;
    public keyName: string;
}

packet

  • Called when a game packet is sent/received

class PacketEvent {
    public cancelled: boolean;
    
    public packet: Packet;
    public packetType: string; // either "client" or "server"
}

mouse

  • Called when the mouse is moved, button clicked etc

class MouseEvent {
    public cancelled: boolean;
       
    public position: org.joml.Vector2f;
    public button: number;
    public state: string; // either "click" or "released"
}

movement_input

  • Called when a movement input is being read

class MovementInputEvent {
    public cancelled: boolean;

    public readonly originalRecord: MovementRecord;
    public record: MovementRecord;
}

play_sound

  • Called when a sound is played

class PlaySoundEvent {
    public cancelled: boolean;
    
    public sound: SoundInstance;
}

draw_overlay

  • Called when the game overlay is rendered in-game

class DrawOverlayEvent {
    public window: Window;
    public mousePosition: org.joml.Vector2f;
    public modelMatrix: org.joml.Matrix4f;
    public tickDelta: number;

    public scaledSize: org.joml.Vector2f;
    public drawContext: DrawContext;
}

draw_world

  • Called when the world is rendered

class DrawOverlayEvent {
    public window: Window;
    public mousePosition: org.joml.Vector2f;
    public modelMatrix: org.joml.Matrix4f;
    public tickDelta: number;
}

post_process

  • Called when Neon's post processing pipeline is drawn, anything drawn here will be either blurred / shadowed

class PostProcessEvent {
    public overlay: DrawOverlayEvent;
    public type: string; // either "shadow" or "blur"
}

player_tick

  • Called when the player ticks

player_move

  • Called when the player movement is being handled

class PlayerMoveEvent {
    public cancelled: boolean;
   
    public deltaX: number;
    public deltaY: number;
    public deltaZ: number;
}

player_jump

  • Called when the player jumps

class PlayerJumpEvent {
    public cancelled: boolean;
     
    public yaw: number;
    public deltaY: number;
}

player_attack

  • Called when the player attacks an entity

class PlayerAttackEvent {
    public cancelled: boolean;

    public entity: Entity;
    public type: string; // either "pre" or "post"
}

player_block_collision

  • Called when the player collisions are being handled

class PlayerBlockCollisionEvent {
    public voxelShape: VoxelShape;
    public readonly position: BlockPos;
    public readonly blockState: BlockState;
}

player_chat_message

  • Called when the player sends a chat message

class PlayerChatMessageEvent {
    public readonly message: string;
}

player_update_velocity

  • Called when the player's velocity is updated

class PlayerUpdateVelocityEvent {
    public movementInput: Vec3d;
    public velocity: Vec3d;
    public speed: number;
    public yaw: number;
}

player_step

  • Called when the player is stepping up a block

class PlayerStepEvent {
    public height: number;
}

player_send_update

  • Called when the player sends position update packets to the server

class PlayerSendUpdateEvent {
    public x: number;
    public y: number;
    public z: number;
    public yaw: number;
    public pitch: number;
    public onGround: boolean;
    public type: string; // either "pre" or "post"
}

player_push

  • Called when the player is being pushed by another entity

class PlayerPushEvent {
    public cancelled: boolean;
}

Last updated