dev.polymodloader.api.content.block.state
이 페이지는 소스의 Javadoc에서 ./gradlew apiReference로 만든 것입니다. 설명은 코드에 적힌 영어 그대로입니다. 직접 고치지 말고 소스의 주석을 고친 뒤 다시 만드세요.
| 형식 | 종류 | 설명 |
|---|---|---|
BlockProperty | 인터페이스 | A block state property such as lit=true, level=3, or facing=north. |
BlockProperty.BooleanProperty | 레코드 | A boolean property. |
BlockProperty.ChoiceProperty | 레코드 | A property with named values. |
BlockProperty.DirectionProperty | 레코드 | A direction property. |
BlockProperty.IntegerProperty | 레코드 | An integer property. |
BlockProperty.Names | 클래스 | Name validation shared by the property records. |
BlockStateView | 인터페이스 | A block together with the values of its properties; an immutable snapshot. |
BlockProperty
인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public sealed interface BlockProperty<T>
A block state property such as lit=true, level=3, or facing=north. Each combination of values is one block state; blockstate files in the resource pack select models by these names and values. Property names use a-z 0-9 _. The same property object may be read from any block that has a property with the same name and value type, including the game's own blocks (for example facing of a furnace).
A choice property has named values (shape=round); it also reads the game's own named properties such as half of stairs or axis of logs.
name()
String name()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Property name used in blockstate files and commands.
반환 String
defaultValue()
T defaultValue()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Value of the block's default state.
반환 T
values()
List<T> values()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Every allowed value, in the game's order.
반환 List<T>
bool(String)
static BlockProperty.BooleanProperty bool(String name)
추가된 버전 0.1.0-alpha.4 또는 그 이전
A true/false property, default false.
| 인자 | 타입 | 설명 |
|---|---|---|
name | String | — |
반환 BlockProperty.BooleanProperty
integer(String, int, int)
static BlockProperty.IntegerProperty integer(String name, int min, int max)
추가된 버전 0.1.0-alpha.4 또는 그 이전
A whole-number property in [min, max] with 0 <= min < max <= min + 255, default min.
| 인자 | 타입 | 설명 |
|---|---|---|
name | String | — |
min | int | — |
max | int | — |
반환 BlockProperty.IntegerProperty
horizontalFacing(String)
static BlockProperty.DirectionProperty horizontalFacing(String name)
추가된 버전 0.1.0-alpha.4 또는 그 이전
A horizontal facing (north, south, west, east), default north.
| 인자 | 타입 | 설명 |
|---|---|---|
name | String | — |
반환 BlockProperty.DirectionProperty
direction(String)
static BlockProperty.DirectionProperty direction(String name)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Any of the six directions, default north.
| 인자 | 타입 | 설명 |
|---|---|---|
name | String | — |
반환 BlockProperty.DirectionProperty
choice(String, String[])
static BlockProperty.ChoiceProperty choice(String name, String... values)
추가된 버전 0.1.0-alpha.4 또는 그 이전
A property with named values, in this order; the first is the default. Values use a-z 0-9 _.
| 인자 | 타입 | 설명 |
|---|---|---|
name | String | — |
values | String[] | — |
반환 BlockProperty.ChoiceProperty
BlockProperty.BooleanProperty
레코드 · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public static record BooleanProperty(String name, Boolean defaultValue) implements BlockProperty<Boolean>
A boolean property.
| 구성 요소 | 타입 | 설명 |
|---|---|---|
name | String | — |
defaultValue | Boolean | — |
상위 형식: BlockProperty
values()
public List<Boolean> values()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Every allowed value, in the game's order.
반환 List<Boolean>
withDefault(boolean)
public BlockProperty.BooleanProperty withDefault(boolean value)
추가된 버전 0.1.0-alpha.4 또는 그 이전
The same property with another default.
| 인자 | 타입 | 설명 |
|---|---|---|
value | boolean | — |
반환 BlockProperty.BooleanProperty
name()
public String name()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Property name used in blockstate files and commands.
반환 String
defaultValue()
public Boolean defaultValue()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Value of the block's default state.
반환 Boolean
BlockProperty.ChoiceProperty
레코드 · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public static record ChoiceProperty(String name, List<String> values, String defaultValue) implements BlockProperty<String>
A property with named values.
| 구성 요소 | 타입 | 설명 |
|---|---|---|
name | String | — |
values | List<String> | — |
defaultValue | String | — |
상위 형식: BlockProperty
withDefault(String)
public BlockProperty.ChoiceProperty withDefault(String value)
추가된 버전 0.1.0-alpha.4 또는 그 이전
The same property with another default.
| 인자 | 타입 | 설명 |
|---|---|---|
value | String | — |
반환 BlockProperty.ChoiceProperty
name()
public String name()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Property name used in blockstate files and commands.
반환 String
values()
public List<String> values()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Every allowed value, in the game's order.
반환 List<String>
defaultValue()
public String defaultValue()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Value of the block's default state.
반환 String
BlockProperty.DirectionProperty
레코드 · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public static record DirectionProperty(String name, boolean horizontalOnly, Direction defaultValue) implements BlockProperty<Direction>
A direction property.
| 구성 요소 | 타입 | 설명 |
|---|---|---|
name | String | — |
horizontalOnly | boolean | — |
defaultValue | Direction | — |
상위 형식: BlockProperty
values()
public List<Direction> values()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Every allowed value, in the game's order.
반환 List<Direction>
withDefault(Direction)
public BlockProperty.DirectionProperty withDefault(Direction value)
추가된 버전 0.1.0-alpha.4 또는 그 이전
The same property with another default.
| 인자 | 타입 | 설명 |
|---|---|---|
value | Direction | — |
반환 BlockProperty.DirectionProperty
name()
public String name()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Property name used in blockstate files and commands.
반환 String
defaultValue()
public Direction defaultValue()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Value of the block's default state.
반환 Direction
BlockProperty.IntegerProperty
레코드 · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public static record IntegerProperty(String name, int min, int max, Integer defaultValue) implements BlockProperty<Integer>
An integer property.
| 구성 요소 | 타입 | 설명 |
|---|---|---|
name | String | — |
min | int | — |
max | int | — |
defaultValue | Integer | — |
상위 형식: BlockProperty
values()
public List<Integer> values()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Every allowed value, in the game's order.
반환 List<Integer>
withDefault(int)
public BlockProperty.IntegerProperty withDefault(int value)
추가된 버전 0.1.0-alpha.4 또는 그 이전
The same property with another default.
| 인자 | 타입 | 설명 |
|---|---|---|
value | int | — |
반환 BlockProperty.IntegerProperty
name()
public String name()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Property name used in blockstate files and commands.
반환 String
defaultValue()
public Integer defaultValue()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Value of the block's default state.
반환 Integer
BlockProperty.Names
클래스 · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public static final class Names
Name validation shared by the property records.
BlockStateView
인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface BlockStateView
A block together with the values of its properties; an immutable snapshot.
block()
ResourceId block()
추가된 버전 0.1.0-alpha.4 또는 그 이전
The block, for example minecraft:furnace.
반환 ResourceId
has(BlockProperty<?>)
boolean has(BlockProperty<?> property)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Whether the block has a property with this name and value type.
| 인자 | 타입 | 설명 |
|---|---|---|
property | BlockProperty<?> | — |
반환 boolean
get(BlockProperty<T>)
<T> T get(BlockProperty<T> property)
추가된 버전 0.1.0-alpha.4 또는 그 이전
The property's value.
| 인자 | 타입 | 설명 |
|---|---|---|
property | BlockProperty<T> | — |
반환 T
예외 IllegalArgumentException — when the block has no such property
find(BlockProperty<T>)
default <T> Optional<T> find(BlockProperty<T> property)
추가된 버전 0.1.0-alpha.4 또는 그 이전
The property's value, or empty when the block has no such property.
| 인자 | 타입 | 설명 |
|---|---|---|
property | BlockProperty<T> | — |
반환 Optional<T>
with(BlockProperty<T>, T)
<T> BlockStateView with(BlockProperty<T> property, T value)
추가된 버전 0.1.0-alpha.4 또는 그 이전
This state with one property changed; this snapshot stays as it is. It does not change the world: use WorldView.setProperty for that.
| 인자 | 타입 | 설명 |
|---|---|---|
property | BlockProperty<T> | — |
value | T | — |
반환 BlockStateView
예외 IllegalArgumentException — when the block has no such property or the value is not allowed