Class BundledBlockData

java.lang.Object
com.sk89q.worldedit.world.registry.BundledBlockData

public final class BundledBlockData extends Object
Provides block data based on the built-in block database that is bundled with WorldEdit.

A new instance cannot be created. Use getInstance() to get an instance.

The data is read from a JSON file that is bundled with WorldEdit. If reading fails (which occurs when this class is first instantiated), then the methods will return nulls for all blocks.

  • Method Details

    • findById

      @Nullable public BundledBlockData.BlockEntry findById(String id)
      Return the entry for the given block ID.
      Parameters:
      id - the ID
      Returns:
      the entry, or null
    • getMaterialById

      @Nullable public BlockMaterial getMaterialById(String id)
      Get the material properties for the given block.
      Parameters:
      id - the string ID
      Returns:
      the material's properties, or null
    • getInstance

      public static BundledBlockData getInstance()
      Get a singleton instance of this object.
      Returns:
      the instance