mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Update forge for new block API
This commit is contained in:
@ -51,6 +51,11 @@ public abstract class AbstractProperty<T> implements Property<T> {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass().getSimpleName() + "{name=" + name + "}";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return name.hashCode();
|
||||
|
@ -168,6 +168,17 @@ public class BlockType {
|
||||
return ImmutableList.copyOf(getBlockStatesMap().values());
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a state of this BlockType with the given properties.
|
||||
*
|
||||
* @return The state, if it exists
|
||||
*/
|
||||
public BlockState getState(Map<Property<?>, Object> key) {
|
||||
BlockState state = getBlockStatesMap().get(key);
|
||||
checkArgument(state != null, "%s has no state for %s", this, key);
|
||||
return state;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether this block type has an item representation.
|
||||
*
|
||||
|
Reference in New Issue
Block a user