Skip to content
This repository was archived by the owner on Jan 15, 2026. It is now read-only.

Object Types

EmosewaPixel edited this page Nov 24, 2019 · 6 revisions

Overview

Object Types are one of the two main parts of the [[Material System]. They hold the common properties for all items/blocks/fluid of a certain type, such as Ingots, Nuggets, regular Blocks, etc.

Defaults

Although there realistically aren't different types of object types in the sense of inheritance, there a default combinations of properties commonly used for creating object types. As such these defaults have their own builders. This includes:

  • Item Types - just generates an item
  • Block Types - generates a block and block item
  • Fluid Types - generates a fluid, fluid block and bucket

Parts

Name

The name is the only thing that sets object types apart from each other. If two object types have the same name, they will be merged into one.

Index Blacklist

The index blacklist is list of all the color indices of the models generated from this object type that won't be colored.

Properties

Aside from the those 2 things, object types don't really use regular field-based properties. Instead they use Properties stored in a map. PixelLib adds a plethora of object types properties, which have getters and setters in the material object class.

Bucket Volume

The Bucket Volume is the amount of milibuckets items from the object type would melt down to.

Registry Name Function

This is a function that takes a material and creates the base registry name used for generated items, blocks and fluids.

Item Tag Name

This is the name of the tag for items generated from this object type.

Block Tag Name

This is the name of the tag for blocks generated from this object type.

Fluid Tag Name

This is the name of the tag for fluids generated from this object type.

Color Function

This is a function that gets the color used for coloring the generated objects from a material.

Density Multiplier

Not much to be said here

Is Gas Function

This is a function which determines if the generated fluid is a gas based on its material.

Temperature Function

This is a function that determines the temperature of generated fluid based on the material.

Single Texture Type

This means that everything generated from this object type will use only one texture.

Burn Time Function

This function gets the burn time for items generated from this time from a material.

Item Model Function

This functions creates the model JSON for items generated from this object type based on a material.

Block State JSON Function

This functions creates the block state JSON for blocks generated from this object type based on a material.

Item Constructor

This function is used for creating items based on the object type and a material.

Item Properties Function

This function gets the item properties used by generated items based on this object type and a material.

Block Constructor

This function is used for creating blocks based on the object type and a material.

Block Properties Function

This function gets the block properties used by generated blocks based on this object type and a material.

Fluid Pair Constructor

This function is used for creating pairs of flowing and still fluids based on the object type and a material.

Fluid Attributes Function

This function gets the fluid attributes builder used by generated items based on this object type and a material.

Type Priority

The Type Priority is a property that determines which object type becomes the main item type of a material when two are merged. The one with the higher priority becomes the main item type.

Clone this wiki locally