Global Scope

Classes and utilities available from anywhere


#Primitive prototype additions

  • string#namespace: string - namespace part of namespaced string, aka of minecraft:oak_planks it's minecraft. Defaults to minecraft if there's no :.
  • string#path: string - path part of namespaced string, aka of minecraft:oak_planks it's oak_planks

#Constants and Objects

NameTypeDescription
globalMap<String, Object>Global object, you can use this to set objects and callbacks in startup script and reference them from server or client scripts
consoleConsoleConsole object, used for logging
SECONDnumber1000
MINUTEnumber60000 (60 * SECOND)
HOURnumber3600000 (60 * MINUTE)

#Classes

  • Platform
  • ResourceLocation
  • Utils
  • Java
  • Text
  • UUID
  • JsonIO
  • Block
  • Item
  • Ingredient
  • IngredientHelper
  • NBT
  • NBTIO
  • Direction
  • Facing
  • AABB
  • Fluid
  • Color
  • BlockStatePredicate

#Wrapped Classes

NameClass
JavaMathjava.lang.Math
Blocksnet.minecraft.world.level.block.Blocks
Itemsnet.minecraft.world.item.Items
Statsnet.minecraft.stats.Stats
BlockPosnet.minecraft.core.BlockPos
DamageSourcenet.minecraft.world.damagesource.DamageSource
BlockPropertiesnet.minecraft.world.level.block.state.properties.BlockStateProperties
Vec3, Vec3dnet.minecraft.world.phys.Vec3
Vec3inet.minecraft.core.Vec3i