Fixed the bundle being directly used outside of the registry system.

This commit is contained in:
Matthew Miller
2018-12-23 21:43:20 +10:00
parent 1d5e9b7d04
commit b75d5149eb
9 changed files with 74 additions and 12 deletions

View File

@ -101,11 +101,11 @@ public class BlockType {
* @return The name, or ID
*/
public String getName() {
BundledBlockData.BlockEntry entry = BundledBlockData.getInstance().findById(this.id);
if (entry == null) {
String name = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.GAME_HOOKS).getRegistries().getBlockRegistry().getName(this);
if (name == null) {
return getId();
} else {
return entry.localizedName;
return name;
}
}