module Rosegold::SlotOffsets::ContainerMenuOffsets

Overview

Network protocol player inventory order: [main(0-26), hotbar(27-35)] ContainerMenu treats network slots as: container_slots + [network_main + network_hotbar]

Defined in:

rosegold/inventory/slot_offsets.cr

Class Method Summary

Class Method Detail

def self.hotbar_slot_index(container_size : Int32, hotbar_nr : Int32) : Int32 #

Get the absolute slot index for a hotbar slot in a container menu


[View source]
def self.hotbar_start_index(container_size : Int32) : Int32 #

Get the start index for hotbar slots in a container menu


[View source]
def self.main_inventory_start_index(container_size : Int32) : Int32 #

Get the start index for main inventory slots in a container menu


[View source]
def self.offhand_slot_index(container_size : Int32) : Int32 #

Get the absolute slot index for offhand in a container menu


[View source]