Class BlockState

java.lang.Object
com.github.darksoulq.abyssallib.server.resource.asset.BlockState
All Implemented Interfaces:
Asset

public class BlockState extends Object implements Asset
Represents a blockstate JSON: assets/<namespace>/blockstates/<id>.json
  • Constructor Details

    • BlockState

      public BlockState(@NotNull @NotNull String namespace, @NotNull @NotNull String id)
    • BlockState

      public BlockState(@NotNull @NotNull String namespace, @NotNull @NotNull String id, byte[] data)
    • BlockState

      public BlockState(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull String namespace, @NotNull @NotNull String id)
  • Method Details

    • variant

      public BlockState variant(@NotNull @NotNull String variantKey, BlockState.Variant variant)
      Adds a variant mapping for a variant key (e.g. "", "axis=x")
    • multipart

      public BlockState multipart(@NotNull @NotNull BlockState.Multipart multipart)
      Adds a multipart condition+model object
    • emit

      public void emit(@NotNull @NotNull Map<String,byte[]> files)
      Description copied from interface: Asset
      Emits the asset's files into the provided output map.
      Specified by:
      emit in interface Asset
      Parameters:
      files - the output map where keys are file paths and values are file contents