可从任何位置访问的类和实用工具
string#namespace: string - 命名空间字符串的命名空间部分,例如 minecraft:oak_planks 的命名空间是 minecraft。如果没有 :,默认为 minecraft。string#path: string - 命名空间字符串的路径部分,例如 minecraft:oak_planks 的路径是 oak_planks| 名称 | 类型 | 描述 |
|---|---|---|
global | Map<String, Object> | 全局对象,您可以使用它在启动脚本中设置对象和回调,并从服务器或客户端脚本中引用它们 |
console | Console | 控制台对象,用于日志记录 |
SECOND | number | 1000 |
MINUTE | number | 60000 (60 * SECOND) |
HOUR | number | 3600000 (60 * MINUTE) |
1.20.1 / 1.19.2 / 1.18.2
PlatformResourceLocationUtilsJavaTextUUIDJsonIOBlockItemIngredientIngredientHelperNBTNBTIODirectionFacingAABBFluidColorBlockStatePredicate| 名称 | 类 |
|---|---|
| JavaMath | java.lang.Math |
| Blocks | net.minecraft.world.level.block.Blocks |
| Items | net.minecraft.world.item.Items |
| Stats | net.minecraft.stats.Stats |
| BlockPos | net.minecraft.core.BlockPos |
| DamageSource | net.minecraft.world.damagesource.DamageSource |
| BlockProperties | net.minecraft.world.level.block.state.properties.BlockStateProperties |
| Vec3, Vec3d | net.minecraft.world.phys.Vec3 |
| Vec3i | net.minecraft.core.Vec3i |