Category
Minecraft (mc)
The mc table: game state, the player, the world, entities and actions.
The mc table is how scripts read and act on the game. It targets Minecraft 1.21.11 with Fabric.
Pages in this category
- State: connection, server, screen, target and client information
- Player and world: the player, blocks, entities, inventory
- Actions: rotation, velocity, attacking, clicking, keys, chat
Reading values safely
Most read functions return nil (or false) when there is nothing to report, for example when you are on the title screen. Check before using the result:
local p = mc.getPlayer()
if not p then
return
end
Vector arguments
Functions that take coordinates (mc.getBlock, mc.lookAt, mc.setVelocity, mc.distance) accept either three numbers or one table with X, Y, Z (a Vector3), lowercase x, y, z, or array form {x, y, z}.
Events
mc.Events is documented under Scheduler: Events.