Add data version to BukkitImplAdapter.

Also throttle unknown-block warning when loading MCEdit schematics.
This commit is contained in:
wizjany
2019-04-25 18:58:06 -04:00
committed by Matthew Miller
parent f0587354be
commit 31a8328fb5
11 changed files with 21 additions and 7 deletions

View File

@ -67,8 +67,10 @@ public class BukkitServerInterface implements MultiUserPlatform {
@Override
public int getDataVersion() {
// TODO - add to adapter - CraftMagicNumbers#getDataVersion
return 1631;
if (plugin.getBukkitImplAdapter() != null) {
return plugin.getBukkitImplAdapter().getDataVersion();
}
return 0;
}
@Override

View File

@ -40,6 +40,13 @@ import javax.annotation.Nullable;
*/
public interface BukkitImplAdapter {
/**
* Get the Minecraft data version for the current world data.
*
* @return the data version
*/
int getDataVersion();
/**
* Get the block at the given location.
*