mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
Update from sk89q/master
This commit is contained in:
@ -19,6 +19,7 @@
|
||||
|
||||
package com.sk89q.worldedit.world.block;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.blocks.BlockMaterial;
|
||||
@ -155,6 +156,13 @@ public interface BlockType extends FawePattern, Comparable<BlockTypes> {
|
||||
*/
|
||||
BlockState getDefaultState();
|
||||
|
||||
/**
|
||||
* Gets a list of all possible states for this BlockType.
|
||||
*
|
||||
* @return All possible states
|
||||
*/
|
||||
List<BlockState> getAllStates();
|
||||
|
||||
/**
|
||||
* Gets whether this block type has an item representation.
|
||||
*
|
||||
|
@ -820,7 +820,7 @@ public enum BlockTypes implements BlockType {
|
||||
* @return collection of states
|
||||
*/
|
||||
@Deprecated
|
||||
public Collection<BlockState> getStates() {
|
||||
public List<BlockState> getAllStates() {
|
||||
if (settings.stateOrdinals == null) return Collections.singletonList(getDefaultState());
|
||||
return IntStream.of(settings.stateOrdinals).filter(i -> i != -1).mapToObj(i -> states[i]).collect(Collectors.toList());
|
||||
}
|
||||
|
Reference in New Issue
Block a user