Class BlockProperties
java.lang.Object
fr.fidorial.world.block.BlockProperties
The properties shared by many vanilla blocks, and factories for new ones.
- Since:
- 0.1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BlockPropertyAlignment on any axis.static final BlockPropertyUpper or lower half, for doors and tall plants.static final BlockPropertyFacing on all six sides.static final BlockPropertyFluid level, from0(source) to15.static final BlockPropertyTop or bottom half, for slabs, stairs and trapdoors.static final BlockPropertyFacing of a hopper: down or horizontal.static final BlockPropertyAlignment on a horizontal axis.static final BlockPropertyFacing on the four horizontal sides.static final BlockPropertyWhether the block is lit.static final BlockPropertyWhether the block is open.static final BlockPropertyWhether the block receives redstone power.static final BlockPropertySixteen-step rotation, for signs, banners and heads.static final BlockPropertyWhether snow covers the block.static final BlockPropertyWhether the block holds water. -
Method Summary
Modifier and TypeMethodDescriptionstatic BlockPropertyReturns a boolean property, acceptingtrueandfalse.static BlockPropertyReturns an integer property accepting every value of a range.static BlockPropertyReturns a property accepting the given values.
-
Field Details
-
FACING
-
HORIZONTAL_FACING
Facing on the four horizontal sides.- Since:
- 0.1.0
-
HOPPER_FACING
Facing of a hopper: down or horizontal.- Since:
- 0.1.0
-
AXIS
-
HORIZONTAL_AXIS
-
WATERLOGGED
-
POWERED
-
LIT
-
OPEN
-
SNOWY
-
HALF
Top or bottom half, for slabs, stairs and trapdoors.- Since:
- 0.1.0
-
DOUBLE_BLOCK_HALF
Upper or lower half, for doors and tall plants.- Since:
- 0.1.0
-
ROTATION
Sixteen-step rotation, for signs, banners and heads.- Since:
- 0.1.0
-
FLUID_LEVEL
-
-
Method Details
-
bool
Returns a boolean property, acceptingtrueandfalse.- Parameters:
name- the property name- Returns:
- a boolean property, accepting
trueandfalse - Since:
- 0.1.0
-
integer
Returns an integer property accepting every value of a range.- Parameters:
name- the property namemin- the lowest value, inclusivemax- the highest value, inclusive- Returns:
- an integer property accepting every value of a range
- Throws:
IllegalArgumentException- ifmin > max- Since:
- 0.1.0
-
of
Returns a property accepting the given values.- Parameters:
name- the property namevalues- the accepted values, the first one being the default- Returns:
- a property accepting the given values
- Since:
- 0.1.0
-