use of net.minecraft.world.level.block.state.IBlockData in project dynmap by webbukkit.
the class BukkitVersionHelperSpigot118_2 method getBlockNames.
/**
* Get block short name list
*/
@Override
public String[] getBlockNames() {
RegistryBlockID<IBlockData> bsids = Block.o;
Block baseb = null;
Iterator<IBlockData> iter = bsids.iterator();
ArrayList<String> names = new ArrayList<String>();
while (iter.hasNext()) {
IBlockData bs = iter.next();
Block b = bs.b();
// If this is new block vs last, it's the base block state
if (b != baseb) {
baseb = b;
continue;
}
MinecraftKey id = RegistryBlocks.U.b(b);
String bn = id.toString();
if (bn != null) {
names.add(bn);
Log.info("block=" + bn);
}
}
return names.toArray(new String[0]);
}
Aggregations