MCBlockState
Questa classe è stata aggiunta da una mod con ID crafttweaker
. Perciò, è necessario avere questa mod installata per poter utilizzare questa funzione.
Importing the class
Potrebbe essere necessario importare il pacchetto, se si incontrano dei problemi (come castare un vettore), quindi meglio essere sicuri e aggiungere la direttiva di importazione.
crafttweaker.api.block.MCBlockState
Interfacce Implementate
MCBlockState implementa le seguenti interfacce. Ciò significa che ogni metodo presente nell'interfaccia può essere usato anche per questa classe.
Methods
getAllowedValuesForProperty
Restituisce List
myMCBlockState.getAllowedValuesForProperty(nome as String);
Parameter | Type | Description |
---|
name | String | Nessuna descrizione fornita |
getProperties
Ritorna String[String]
myMCBlockState.getProperties();
getPropertyNames
Restituisce List
myMCBlockState.getPropertyNames();
getPropertyValue
Ritorna una stringa
myMCBlockState.getPropertyValue(nome as String);
Parameter | Type | Description |
---|
name | String | Nessuna descrizione fornita |
hasProperty
Restituisce un booleano
myMCBlockState.hasProperty(nome as String);
Parameter | Type | Description |
---|
name | String | Nessuna descrizione fornita |
withProperty
Restituisce un crafttweaker.api.block.MCBlockState
myMCBlockState.withProperty(nome as String, valore as String);
Parameter | Type | Description |
---|
name | String | Nessuna descrizione fornita |
value | String | Nessuna descrizione fornita |
Properties
Name | Type | Ha Getter | Ha Setter |
---|
block | crafttweaker.api.block.MCBlock | true | false |
canProvidePower | boolean | true | false |
commandString | String | true | false |
hasTileEntity | boolean | true | false |
isSolid | boolean | true | false |
isSticky | boolean | true | false |
lightLevel | int | true | false |
ticksRandomly | boolean | true | false |
Caster