Minecraft

The Minecraft object (mc) is only provided to events.

TypeNameDescriptionSignature

field

thePlayer

Player Object

field

theWorld

World Object

field

fontRendererObj

Main Font Renderer

field

timer

Game Timer

field

debug

Debug information

string

field

displayWidth

Window Width * Scale factor

decimal

field

displayHeight

Window Height * Scale factor

decimal

field

leftClickCounter

Mouse left click counter

int

field

rightClickDelayTimer

Mouse right click delay, decreases each tick

int

function

getDebugFPS

Returns FPS displayed in F3

int

function

getFramebuffer

Returns the root framebuffer

function

isSingleplayer

Whether the User is playing on Singleplayer

boolean

function

getCurrentServerData

Returns current ServerData, if not connected to a server - null

Framebuffer

TypeNameDescriptionSignature

field

framebufferTextureWidth

Bound texture width

int

field

framebufferTextureHeight

Bound texture height

int

field

framebufferWidth

Framebuffer width

int

field

framebufferHeight

Framebuffer height

int

field

useDepth

Use depth

boolean

field

framebufferObject

Framebuffer object id

int

field

framebufferTexture

Bound texture id

int

field

depthBuffer

Render buffer for depth

int

field

framebufferColor

Hex color for framebuffer

float[]

field

framebufferFilter

Framebuffer filter

int

function

createBindFramebuffer

Creates and binds the framebuffer (args: width, height)

void(int, int)

function

deleteFramebuffer

Deletes and unbinds the framebuffer

void

function

createFramebuffer

Creates the framebuffer

void(int, int)

function

setFramebufferFilter

Sets the framebuffer texture filter

void(int)

function

checkFramebufferComplete

Checks framebuffer status via glCheckFramebufferStatus

void()

function

bindFramebufferTexture

Binds the framebuffer texture

void()

function

unbindFramebufferTexture

Unbinds the framebuffer texture

void()

function

bindFramebuffer

Binds the framebuffer (args: viewport - sets the viewport to framebuffer width and height)

void(boolean)

function

unbindFramebuffer

Unbinds the framebuffer

void()

function

setFramebufferColor

Sets the framebuffer color (args: r, g, b, a - in range of 0.0 to 1.0)

void(float, float, float, float)

function

framebufferRender

Renders the framebuffer on the screen (args: width, height)

void(int, int)

function

framebufferRenderExt

Renders the framebuffer on the screen, optionally disables blend (args: width, height, disableBlend)

void(int, int, boolean)

function

framebufferClear

Clears the color and unbinds the framebuffer

void()

Instantiation

You can create a Framebuffer object by invoking the global Framebuffer function: new Framebuffer(displayWidth, displayHeight, useDepth)

ServerData

TypeNameDescriptionSignature

field

serverIP

Connected Server IP

string

field

serverName

Connected Server Name

string

field

serverMOTD

Connected Server MOTD

string

field

pingToServer

Ping to the connected server

long

field

populationInfo

Populated slots/total info

string

field

version

Protocol version

int

field

gameVersion

Game version for this server

string

field

playerList

Players separated by newlines

string

field

lanServer

Whether this server is hosted locally

boolean

FontRenderer

TypeNameDescriptionSignature

function

drawString

Draws a string on the screen (args: text, x, y, color)

void(string, int, int, int)

function

drawStringWithShadow

Draws a string on the screen with a shadow (args: text, x, y, color)

void(string, float, float, int)

function

getStringWidth

Returns the string's width

int(string)

function

listFormattedStringToWidth

Returns wrapped strings to width as a list (args: text, wrapWidth)

List<String>(string, int)

function

trimStringToWidth

Trims a string to some width (args: string, width)

string(string, int)

function

trimStringToWidthReverse

Trims a string to some width, from right to left (args: string, width)

string(string, int)

function

getCharWidth

Returns a char's width

int(char)

function

getColorCode

Returns the color of a char. Used when parsing the string for Minecraft color codes.

int(char)

function

getUnicodeFlag

Whether the Force Unicode Font option is enabled.

boolean()

WorldClient

TypeNameDescriptionSignature

function

getBlockState

Returns the block state of a block in the world. Default state if the position is invalid.

IBlockState(BlockPos)

function

getLoadedEntityList

Returns the visible entity list.

List<Entity>()

Timer

Controls the speed of the game.

TypeNameDescriptionSignature

function

updateTimer

Updates the game timer

void()

field

timerSpeed

Game speed

float

field

renderPartialTicks

Time elapsed since the last tick, used for rendering, and is frozen

float

field

elapsedPartialTicks

Time elapsed since the last tick

float

field

elapsedTicks

Ticks elapsed since the last timer update

float

Vec3

3-dimensional Decimal vector.

TypeNameDescriptionSignature

field

xCoord

X Coordinate of the Vector

double, immutable

field

yCoord

Y Coordinate of the Vector

double, immutable

field

zCoord

Z Coordinate of the Vector

double, immutable

function

add

Adds two Vectors together

Vec3(Vec3)

function

addVector

Adds X/Y/Z coordinates to the Vector

Vec3(double, double, double)

function

subtract

Subtract a Vector from this Vector

Vec3(Vec3)

function

subtractVector

Subtract X/Y/Z coordinates from this Vector

Vec3(double, double, double)

function

rotateYaw

Rotate Vector around yaw

Vec3(float)

function

rotatePitch

Rotate Vector around pitch

Vec3(float)

function

crossProduct

Returns a cross product of another vector and this vector

Vec3(Vec3)

function

dotProduct

Returns a dot product of another vector and this vector

double(Vec3)

function

distanceTo

Returns distance to another vector

double(Vec3)

function

lengthVector

Returns the length of this vector

double()

function

normalize

Normalizes this vector

Vec3()

Instantiation

You can create a Vec3 object by invoking the global Vec3 function: new Vec3(1.0, 2.0, 3.0)

Vec3i

3-dimensional Integer vector.

TypeNameDescriptionSignature

function

getX

Returns the X Coordinate of the Vector

double()

function

getY

Returns the Y Coordinate of the Vector

double()

function

getZ

Returns the Z Coordinate of the Vector

double()

function

crossProduct

Returns a cross product of another vector and this vector

Vec3i(Vec3i)

function

compareTo

Compares this vector to another vector

int(Vec3i)

function

distanceSq

Returns squared distance to another vector

double(Vec3i)

Instantiation

You can create a Vec3i object by invoking the global Vec3i function: new Vec3i(1, 2, 3)

Inherits

BlockPos

TypeNameDescriptionSignature

function

offset

Offsets this BlockPos n blocks in the given direction

BlockPos(EnumFacing, int)

function

add

Adds the vector to this BlockPos

BlockPos(Vec3i)

function

subtract

Subtracts the vector from this BlockPos

BlockPos(Vec3i)

function

toLong

Serializes the coordinates to a long value

long()

You can create a BlockPos object by invoking the global BlockPos function: new BlockPos(1, 2, 3)

ScaledResolution

Window resolution with a scale factor.

TypeNameDescriptionSignature

function

getScaleFactor

Returns the scale factor

int()

function

getScaledWidth

Returns the scaled window width

int()

function

getScaledHeight

Returns the scaled window height

int()

function

getScaledWidth_double

Returns the scaled window width

double()

function

getScaledHeight_double

Returns the scaled window height

double()

Instantiation

You can create a ScaledResolution object by invoking the global ScaledResolution function: new ScaledResolution(mc)

AxisAlignedBB

Represents an axis-aligned bounding box.

TypeNameDescriptionSignature

field

minX

Minimum X point

double, immutable

field

minY

Minimum Y point

double, immutable

field

minZ

Minimum Z point

double, immutable

field

maxX

Maximum X point

double, immutable

field

maxY

Maximum Y point

double, immutable

field

maxZ

Maximum Z point

double, immutable

function

addCoord

Add X/Y/Z coordinates to the AABB

AxisAlignedBB(double, double, double)

function

offset

Offset an AABB by X/Y/Z coordinates

AxisAlignedBB(double, double, double)

function

expand

Expand an AABB by X/Y/Z coordinates

AxisAlignedBB(double, double, double)

function

contract

Inset an AABB by X/Y/Z coordinates

AxisAlignedBB(double, double, double)

function

calculateIntercept

Calculate interception of two vector

MovingObjectPosition(Vec3, Vec3)

function

calculateXOffset

Calculate the offset between two boxes in the X dimension

double(AxisAlignedBB, double)

function

calculateYOffset

Calculate the offset between two boxes in the Y dimension

double(AxisAlignedBB, double)

function

calculateZOffset

Calculate the offset between two boxes in the Z dimension

double(AxisAlignedBB, double)

function

intersectsWith

Whether the given AABB intersects with this AABB

boolean(AxisAlignedBB)

function

isVecInside

Whether a Vec3 is inside this AABB

boolean(Vec3)

function

union

Union with another AABB (use min/max coords of this and another)

AxisAlignedBB(AxisAlignedBB)

Instantiation

You can create an AxisAlignedBB object by using the global AxisAlignedBB function: new AxisAlignedBB(new BlockPos(0, 1, 0), new BlockPos(1, 2, 1)). First BlockPos represents the min X/Y/Z coordinates, second - maximum.

MovingObjectPosition

Represents object being ray traced.

TypeNameDescriptionSignature

field

entityHit

Raytraced Entity, present if type of hit is entity

Entity, nullable

field

hitVec

Raytrace Hit vector

Vec3, nullable

field

sideHit

Raytrace Side of hit

EnumFacing, nullable

function

getBlockPos

Raytraced BlockPos, present if type of hit is block

field

typeOfHit

Raytrace result, one of: miss, block, entity

string

PacketBuffer

This object is a wrapper around the Netty's ByteBuf, used to easily pack game objects. Currently, only a part of the ByteBuf methods are provided dynamically, with no own members.

List of provided ByteBuf methods
  1. io.netty.buffer.ByteBuf#compareTo((Lio/netty/buffer/ByteBuf;)I)

  2. io.netty.buffer.ByteBuf#compareTo$1((Ljava/lang/Object;)I)

  3. io.netty.buffer.ByteBuf#getBoolean((I)Z)

  4. io.netty.buffer.ByteBuf#getByte((I)B)

  5. io.netty.buffer.ByteBuf#getShort((I)S)

  6. io.netty.buffer.ByteBuf#getChar((I)C)

  7. io.netty.buffer.ByteBuf#getInt((I)I)

  8. io.netty.buffer.ByteBuf#getLong((I)J)

  9. io.netty.buffer.ByteBuf#getFloat((I)F)

  10. io.netty.buffer.ByteBuf#getDouble((I)D)

  11. io.netty.buffer.ByteBuf#clear(()Lio/netty/buffer/ByteBuf;)

  12. io.netty.buffer.ByteBuf#isDirect(()Z)

  13. io.netty.buffer.ByteBuf#hasArray(()Z)

  14. io.netty.buffer.ByteBuf#array(()[B)

  15. io.netty.buffer.ByteBuf#arrayOffset(()I)

  16. io.netty.buffer.ByteBuf#writeInt((I)Lio/netty/buffer/ByteBuf;)

  17. io.netty.buffer.ByteBuf#readInt(()I)

  18. io.netty.buffer.ByteBuf#copy(()Lio/netty/buffer/ByteBuf;)

  19. io.netty.buffer.ByteBuf#unwrap(()Lio/netty/buffer/ByteBuf;)

  20. io.netty.buffer.ByteBuf#capacity(()I)

  21. io.netty.buffer.ByteBuf#capacity$1((I)Lio/netty/buffer/ByteBuf;)

  22. io.netty.buffer.ByteBuf#isReadOnly(()Z)

  23. io.netty.buffer.ByteBuf#slice(()Lio/netty/buffer/ByteBuf;)

  24. io.netty.buffer.ByteBuf#duplicate(()Lio/netty/buffer/ByteBuf;)

  25. io.netty.buffer.ByteBuf#order(()Ljava/nio/ByteOrder;)

  26. io.netty.buffer.ByteBuf#order$1((Ljava/nio/ByteOrder;)Lio/netty/buffer/ByteBuf;)

  27. io.netty.buffer.ByteBuf#readBytes((Lio/netty/buffer/ByteBuf;)Lio/netty/buffer/ByteBuf;)

  28. io.netty.buffer.ByteBuf#readBytes$1((Ljava/nio/ByteBuffer;)Lio/netty/buffer/ByteBuf;)

  29. io.netty.buffer.ByteBuf#readBytes$2(([B)Lio/netty/buffer/ByteBuf;)

  30. io.netty.buffer.ByteBuf#readBytes$3((I)Lio/netty/buffer/ByteBuf;)

  31. io.netty.buffer.ByteBuf#writeBytes(([B)Lio/netty/buffer/ByteBuf;)

  32. io.netty.buffer.ByteBuf#writeBytes$1((Lio/netty/buffer/ByteBuf;)Lio/netty/buffer/ByteBuf;)

  33. io.netty.buffer.ByteBuf#writeBytes$2((Ljava/nio/ByteBuffer;)Lio/netty/buffer/ByteBuf;)

  34. io.netty.buffer.ByteBuf#writeChar((I)Lio/netty/buffer/ByteBuf;)

  35. io.netty.buffer.ByteBuf#readChar(()C)

  36. io.netty.buffer.ByteBuf#writeFloat((F)Lio/netty/buffer/ByteBuf;)

  37. io.netty.buffer.ByteBuf#readFloat(()F)

  38. io.netty.buffer.ByteBuf#readUnsignedShort(()I)

  39. io.netty.buffer.ByteBuf#readLong(()J)

  40. io.netty.buffer.ByteBuf#readByte(()B)

  41. io.netty.buffer.ByteBuf#readShort(()S)

  42. io.netty.buffer.ByteBuf#isReadable(()Z)

  43. io.netty.buffer.ByteBuf#isReadable$1((I)Z)

  44. io.netty.buffer.ByteBuf#isWritable(()Z)

  45. io.netty.buffer.ByteBuf#isWritable$1((I)Z)

  46. io.netty.buffer.ByteBuf#writeBoolean((Z)Lio/netty/buffer/ByteBuf;)

  47. io.netty.buffer.ByteBuf#writeByte((I)Lio/netty/buffer/ByteBuf;)

  48. io.netty.buffer.ByteBuf#writeShort((I)Lio/netty/buffer/ByteBuf;)

  49. io.netty.buffer.ByteBuf#writeLong((J)Lio/netty/buffer/ByteBuf;)

  50. io.netty.buffer.ByteBuf#writeDouble((D)Lio/netty/buffer/ByteBuf;)

  51. io.netty.buffer.ByteBuf#skipBytes((I)Lio/netty/buffer/ByteBuf;)

  52. io.netty.buffer.ByteBuf#readBoolean(()Z)

  53. io.netty.buffer.ByteBuf#readUnsignedByte(()S)

  54. io.netty.buffer.ByteBuf#readDouble(()D)

  55. io.netty.buffer.ByteBuf#readUnsignedInt(()J)

  56. io.netty.buffer.ByteBuf#readUnsignedMediumLE(()I)

  57. io.netty.buffer.ByteBuf#readUnsignedShortLE(()I)

  58. io.netty.buffer.ByteBuf#getUnsignedMediumLE((I)I)

  59. io.netty.buffer.ByteBuf#discardSomeReadBytes(()Lio/netty/buffer/ByteBuf;)

  60. io.netty.buffer.ByteBuf#alloc(()Lio/netty/buffer/ByteBufAllocator;)

  61. io.netty.buffer.ByteBuf#writerIndex((I)Lio/netty/buffer/ByteBuf;)

  62. io.netty.buffer.ByteBuf#writerIndex$1(()I)

  63. io.netty.buffer.ByteBuf#touch(()Lio/netty/buffer/ByteBuf;)

  64. io.netty.buffer.ByteBuf#touch$1(()Lio/netty/util/ReferenceCounted;)

  65. io.netty.buffer.ByteBuf#touch$2((Ljava/lang/Object;)Lio/netty/util/ReferenceCounted;)

  66. io.netty.buffer.ByteBuf#touch$3((Ljava/lang/Object;)Lio/netty/buffer/ByteBuf;)

  67. io.netty.buffer.ByteBuf#maxCapacity(()I)

  68. io.netty.buffer.ByteBuf#readableBytes(()I)

  69. io.netty.buffer.ByteBuf#readerIndex(()I)

  70. io.netty.buffer.ByteBuf#readerIndex$1((I)Lio/netty/buffer/ByteBuf;)

  71. io.netty.buffer.ByteBuf#readSlice((I)Lio/netty/buffer/ByteBuf;)

  72. io.netty.buffer.ByteBuf#asReadOnly(()Lio/netty/buffer/ByteBuf;)

  73. io.netty.buffer.ByteBuf#discardReadBytes(()Lio/netty/buffer/ByteBuf;)

  74. io.netty.buffer.ByteBuf#getUnsignedShortLE((I)I)

  75. io.netty.buffer.ByteBuf#getUnsignedShort((I)I)

  76. io.netty.buffer.ByteBuf#getMediumLE((I)I)

  77. io.netty.buffer.ByteBuf#getUnsignedInt((I)J)

  78. io.netty.buffer.ByteBuf#ensureWritable((I)Lio/netty/buffer/ByteBuf;)

  79. io.netty.buffer.ByteBuf#getUnsignedByte((I)S)

  80. io.netty.buffer.ByteBuf#markReaderIndex(()Lio/netty/buffer/ByteBuf;)

  81. io.netty.buffer.ByteBuf#getLongLE((I)J)

  82. io.netty.buffer.ByteBuf#getIntLE((I)I)

  83. io.netty.buffer.ByteBuf#markWriterIndex(()Lio/netty/buffer/ByteBuf;)

  84. io.netty.buffer.ByteBuf#maxWritableBytes(()I)

  85. io.netty.buffer.ByteBuf#resetWriterIndex(()Lio/netty/buffer/ByteBuf;)

  86. io.netty.buffer.ByteBuf#getMedium((I)I)

  87. io.netty.buffer.ByteBuf#resetReaderIndex(()Lio/netty/buffer/ByteBuf;)

  88. io.netty.buffer.ByteBuf#getUnsignedMedium((I)I)

  89. io.netty.buffer.ByteBuf#getUnsignedIntLE((I)J)

  90. io.netty.buffer.ByteBuf#getShortLE((I)S)

  91. io.netty.buffer.ByteBuf#writableBytes(()I)

  92. io.netty.buffer.ByteBuf#readUnsignedMedium(()I)

  93. io.netty.buffer.ByteBuf#readIntLE(()I)

  94. io.netty.buffer.ByteBuf#readShortLE(()S)

  95. io.netty.buffer.ByteBuf#readMediumLE(()I)

  96. io.netty.buffer.ByteBuf#readRetainedSlice((I)Lio/netty/buffer/ByteBuf;)

  97. io.netty.buffer.ByteBuf#readLongLE(()J)

  98. io.netty.buffer.ByteBuf#writeShortLE((I)Lio/netty/buffer/ByteBuf;)

  99. io.netty.buffer.ByteBuf#writeMedium((I)Lio/netty/buffer/ByteBuf;)

  100. io.netty.buffer.ByteBuf#writeMediumLE((I)Lio/netty/buffer/ByteBuf;)

  101. io.netty.buffer.ByteBuf#writeIntLE((I)Lio/netty/buffer/ByteBuf;)

  102. io.netty.buffer.ByteBuf#readMedium(()I)

  103. io.netty.buffer.ByteBuf#readUnsignedIntLE(()J)

  104. io.netty.buffer.ByteBuf#writeZero((I)Lio/netty/buffer/ByteBuf;)

  105. io.netty.buffer.ByteBuf#nioBufferCount(()I)

  106. io.netty.buffer.ByteBuf#forEachByteDesc((Lio/netty/util/ByteProcessor;)I)

  107. io.netty.buffer.ByteBuf#writeLongLE((J)Lio/netty/buffer/ByteBuf;)

  108. io.netty.buffer.ByteBuf#hasMemoryAddress(()Z)

  109. io.netty.buffer.ByteBuf#retain(()Lio/netty/buffer/ByteBuf;)

  110. io.netty.buffer.ByteBuf#retain$1(()Lio/netty/util/ReferenceCounted;)

  111. io.netty.buffer.ByteBuf#retain$2((I)Lio/netty/buffer/ByteBuf;)

  112. io.netty.buffer.ByteBuf#retain$3((I)Lio/netty/util/ReferenceCounted;)

  113. io.netty.buffer.ByteBuf#nioBuffer(()Ljava/nio/ByteBuffer;)

  114. io.netty.buffer.ByteBuf#retainedDuplicate(()Lio/netty/buffer/ByteBuf;)

  115. io.netty.buffer.ByteBuf#retainedSlice(()Lio/netty/buffer/ByteBuf;)

  116. io.netty.buffer.ByteBuf#nioBuffers(()[Ljava/nio/ByteBuffer;)

  117. io.netty.buffer.ByteBuf#bytesBefore((B)I)

  118. io.netty.buffer.ByteBuf#memoryAddress(()J)

  119. io.netty.buffer.ByteBuf#forEachByte((Lio/netty/util/ByteProcessor;)I)

Instantiation

You can create a PacketBuffer object by using the global PacketBuffer function: new PacketBuffer(io.netty.buffer.Unpooled.buffer())

EnumFacing

Represents block facings.

TypeNameDescriptionSignature

function

getIndex

Returns the Facing's index

int()

function

getName

Returns the Facing's name

string()

function

getHorizontalIndex

Returns the Facing's horizontal index

int()

function

getFrontOffsetX

Returns X front offset, if the Facing is of X axis, otherwise 0

int()

function

getFrontOffsetZ

Returns Z front offset, if the Facing is of Z axis, otherwise 0

int()

function

getAxis

Returns Facing's axis

Axis()

function

getAxisDirection

Returns Facing's axis direction

AxisDirection()

function

getOpposite

Returns the opposite Facing

EnumFacing()

function

rotateY

Returns clockwise rotated Facing by Y, clockwise

EnumFacing()

function

rotateYCCW

Returns counterclockwise rotated Facing by Y

EnumFacing()

function

rotateAround

Returns a rotated clockwise Facing around the given axis

EnumFacing(Axis)

Can be obtained by referencing values in the EnumFacing global variable. Acceptable values:

  1. UP

  2. DOWN

  3. NORTH

  4. SOUTH

  5. EAST

  6. WEST

Axis

Represents EnumFacing's Axis (x/y/z)

TypeNameDescriptionSignature

function

apply

Checks if the Facing's Axis is the same as this Axis

boolean(EnumFacing)

function

getPlane

Returns Axis' Plane

Plane()

function

getName

Returns Axis' Name

string()

function

isHorizontal

Whether this Axis is horizontal

boolean()

function

isVertical

Whether this Axis is vertical

boolean()

AxisDirection

Represents EnumFacing's Axis Direction (Towards positive/negative)

TypeNameDescriptionSignature

function

getOffset

Returns direction's offset (-1/1)

int()

function

name

Returns direction offset's name

string()

Plane

Represents Axis' plane (horizontal/vertical)

TypeNameDescriptionSignature

function

facings

Returns EnumFacings on this plane

EnumFacing[]

function

name

Returns the Plane's name

string()

function

apply

Returns true if the EnumFacing's Plane matches with this Plane

boolean(EnumFacing)

ItemStack

Represents an Item stack.

TypeNameDescriptionSignature

function

getDisplayName

Returns the item's display name

string()

function

getUnlocalizedName

Returns the item's unlocalized name

string()

IBlockState

Represents the Block and its properties.

TypeNameDescriptionSignature

function

getBlock

Returns the state's Block

Block()

Block

Represents a registered game Block.

TypeNameDescriptionSignature

function

getLocalizedName

Returns the block's localized name

string()

function

getUnlocalizedName

Returns the block's unlocalized name

string()

IChatComponent

Represents a Chat object.

TypeNameDescriptionSignature

function

getFormattedText

Returns the text of the component with color codes

string()

function

getUnformattedText

Returns the text of the component and all its siblings, with color codes stripped

string()

Last updated