public abstract class BlockRenderProvider extends Object
Constructor and Description |
---|
BlockRenderProvider() |
Modifier and Type | Method and Description |
---|---|
void |
addOptions(BlockRenderOptions options,
org.bukkit.World world,
int x,
int y,
int z)
Adds options specific to the provider.
|
Model |
createModel(MapResourcePack resources,
BlockRenderOptions options)
Creates the displayed Block Model for certain block render options
|
static BlockRenderProvider |
get(BlockData blockData)
Gets the render provider for a certain Block Material Type Data
|
abstract Collection<org.bukkit.Material> |
getTypes()
Gets all Material types handled by this provider
|
protected void |
linkResource(MapResourcePack.ResourceType type,
String path,
String resource)
Adds a link to a resource stored in BKCommonLib itself
|
InputStream |
openResource(MapResourcePack.ResourceType type,
String path)
Retrieves the resource (model json, png texture, etc.) at a particular path.
|
static void |
register(BlockRenderProvider provider)
Registers a new render provider
|
public static void register(BlockRenderProvider provider)
provider
- to registerpublic static BlockRenderProvider get(BlockData blockData)
blockData
- to get the provider forprotected void linkResource(MapResourcePack.ResourceType type, String path, String resource)
type
- of resourcepath
- to the resourceresource
- path within BKCommonLibpublic InputStream openResource(MapResourcePack.ResourceType type, String path) throws IOException
type
- of resourcepath
- to get the resource atIOException
public Model createModel(MapResourcePack resources, BlockRenderOptions options)
resources
- from which model dependencies (textures, other models) can be loadedoptions
- for rendering the block modelpublic void addOptions(BlockRenderOptions options, org.bukkit.World world, int x, int y, int z)
options
- to add toworld
- the block is atx
- - coordinate of the Blocky
- - coordinate of the Blockz
- - coordinate of the Blockpublic abstract Collection<org.bukkit.Material> getTypes()
Copyright © 2019. All rights reserved.