-
Notifications
You must be signed in to change notification settings - Fork 420
Using custom block renderers
A number of types of blocks require more complex rendering logic than simple static models tied to specific block ID and metadata values can allow. These include blocks whose presentation is sensitive to neighboring blocks (redstone wire, fences, walls, glass panes, stairs) as well as those that depend upon TileEntity data or other information (skulls, Railcraft tracks, Immibis' Microblocks).
To define a model using a custom block renderer, a "customblock:" line needs to be defined. The base attributes for this line include:
- id - the block ID that the model is to be used for. At least one id attribute is required, but as many as are needed can be used - allowing the same model to be used for multiple blocks. See Block ID Numbers for details on specifying block ID numbers.
- data - this provides the specific metadata values that the model is to be applied to. The default, data=*, indicates all metadata values for each of the blocks IDs indicated by the id attributes. Otherwise, one or more data=number attributes can be used to select specific metadata values for the model.
- class - this provides the fully qualified classname of the class for the custom block renderer. This attribute is required.
The "customblock:" line may also have additional attributes, as indicated by the specific custom block renderer selected.
Custom block renderer always generate a defined sequence of patches (surfaces to which textures can be applied). The indexes of the corresponding patches are defined by the custom block renderer. The texture references supplied by the Texture Definition Files need to be specified by patch<N> attributes in the corresponding "block:" lines.
The following Custom Block Renderers are provided by Dynmap, and can be used for new custom blocks when appropriate.
- Class org.dynmap.hdmap.renderer.BoxRenderer - the renderer used to implement cubiod models
- Class org.dynmap.hdmap.renderer.CTMVertTextureRenderer
- Class org.dynmap.hdmap.renderer.FenceWallBlockRenderer - the renderer used for fences and walls
- Class org.dynmap.hdmap.renderer.FrameRenderer
- Class org.dynmap.hdmap.renderer.ImmibisMicroRenderer
- Class org.dynmap.hdmap.renderer.PaneRenderer - the renderer used for glass panes and iron fences
- Class org.dynmap.hdmap.renderer.RailCraftSlabBlockRenderer
- Class org.dynmap.hdmap.renderer.RailCraftTrackRenderer
- Class org.dynmap.hdmap.renderer.RedstoneWireRenderer - the renderer used for redstone wire
- Class org.dynmap.hdmap.renderer.RotatedBoxRenderer
- Class org.dynmap.hdmap.renderer.RotatedPatchRenderer
- Class org.dynmap.hdmap.renderer.RPMicroRenderer
- Class org.dynmap.hdmap.renderer.RPRotatedBoxRenderer
- Class org.dynmap.hdmap.renderer.RPSupportFrameRenderer
- Class org.dynmap.hdmap.renderer.SkullRenderer - the renderer used for vanilla skulls/heads
- Class org.dynmap.hdmap.renderer.StairBlockRenderer - the renderer used for standard stairs blocks
- Class org.dynmap.hdmap.renderer.TFCLooseRockRenderer
- Class org.dynmap.hdmap.renderer.TFCSupportRenderer
- Class org.dynmap.hdmap.renderer.TFCWoodRenderer
- Class org.dynmap.hdmap.renderer.ThaumFurnaceRenderer
- Base Plugin Settings
- Web Setup
- Storage Setup
- HD Map Configuration
- World and template settings
- Guides
- Advanced Map Configuration
- Component Configuration
- Configuration of worlds
- Exporting World Data in Wavefront OBJ Format
- External Webserver Advanced
- Support for Minecraft Servers other than CraftBukkit
- Support for MinecraftForge based mods
- Support for Tekkit
- Custom Block Definitions
- Model Definition Files
- Texture Definition Files
- Defining a Block using a Custom Block Renderer
- Defining a Block using a Volumetric Model
- Defining a Cuboid Block
- Defining a Simple Block
- Defining Cuboid Models
- Defining Volumetric Models
- Special texture file types
- Using custom block renderers
- Incompatible mods