java.lang.Object
dev.latvian.mods.kubejs.plugin.builtin.wrapper.BlockWrapper

@Info("Various block related helper functions") public class BlockWrapper extends Object
  • Field Details

    • TYPE_INFO

      public static final dev.latvian.mods.rhino.type.TypeInfo TYPE_INFO
    • STATE_TYPE_INFO

      public static final dev.latvian.mods.rhino.type.TypeInfo STATE_TYPE_INFO
  • Constructor Details

    • BlockWrapper

      public BlockWrapper()
  • Method Details

    • id

      public static BlockIDPredicate id(net.minecraft.resources.ResourceLocation id)
    • id

      public static BlockIDPredicate id(net.minecraft.resources.ResourceLocation id, Map<String,Object> properties)
    • entity

      public static BlockEntityPredicate entity(net.minecraft.resources.ResourceLocation id)
    • custom

      public static BlockPredicate custom(BlockPredicate predicate)
    • getFacing

      @Info("Get a map of direction name to Direction. Functionally identical to Direction.ALL") public static Map<String,net.minecraft.core.Direction> getFacing()
    • getBlock

      @Info("Gets a Block from a block id") public static net.minecraft.world.level.block.Block getBlock(net.minecraft.resources.ResourceLocation id)
    • getId

      @Info("Gets a blocks id from the Block") @Nullable public static @Nullable net.minecraft.resources.ResourceLocation getId(net.minecraft.world.level.block.Block block)
    • getTypeList

      @Info("Gets a list of the classname of all registered blocks") public static List<String> getTypeList()
    • getTaggedIds

      @Info("Gets a list of all blocks with tags") public static List<net.minecraft.resources.ResourceLocation> getTaggedIds(net.minecraft.resources.ResourceLocation tag)
    • getAllBlockStates

      public static Collection<net.minecraft.world.level.block.state.BlockState> getAllBlockStates()
    • parseBlockState

      public static net.minecraft.world.level.block.state.BlockState parseBlockState(RegistryAccessContainer registries, String string)
    • wrapSetType

      public static net.minecraft.world.level.block.state.properties.BlockSetType wrapSetType(dev.latvian.mods.rhino.Context cx, Object from, dev.latvian.mods.rhino.type.TypeInfo target)
    • wrapBlockState

      @Info("Parses a block state from the input string. May throw for invalid inputs!") public static net.minecraft.world.level.block.state.BlockState wrapBlockState(RegistryAccessContainer registries, Object o)
    • withProperties

      public static net.minecraft.world.level.block.state.BlockState withProperties(net.minecraft.world.level.block.state.BlockState state, Map<?,?> properties)
    • registerBuildingMaterial

      public static void registerBuildingMaterial(dev.latvian.mods.rhino.Context cx, RegistryKubeEvent<net.minecraft.world.level.block.Block> event, KubeResourceLocation id, BuildingMaterialProperties properties)
    • registerBuildingMaterial

      public static void registerBuildingMaterial(dev.latvian.mods.rhino.Context cx, RegistryKubeEvent<net.minecraft.world.level.block.Block> event, KubeResourceLocation id)