chore: address deprecations from new records (#2768)

* Category should implement Keyed
This commit is contained in:
Jordan
2024-06-12 15:00:40 +02:00
committed by GitHub
parent 62297f9479
commit 9843bb0188
70 changed files with 166 additions and 167 deletions

View File

@ -68,7 +68,7 @@ public class CLIBlockRegistry extends BundledBlockRegistry {
@Override
public Map<String, ? extends Property<?>> getProperties(BlockType blockType) {
Map<String, FileRegistries.BlockProperty> properties =
CLIWorldEdit.inst.getFileRegistries().getDataFile().blocks.get(blockType.getId()).properties;
CLIWorldEdit.inst.getFileRegistries().getDataFile().blocks.get(blockType.id()).properties;
Maps.EntryTransformer<String, FileRegistries.BlockProperty, Property<?>> entryTransform =
(key, value) -> createProperty(value.type, key, value.values);
return ImmutableMap.copyOf(Maps.transformEntries(properties, entryTransform));

View File

@ -115,7 +115,7 @@ class CLIPlatform extends AbstractPlatform {
@Override
public World matchWorld(World world) {
return this.worlds.stream()
.filter(w -> w.getId().equals(world.getId()))
.filter(w -> w.id().equals(world.id()))
.findAny()
.orElse(null);
}

View File

@ -85,7 +85,7 @@ public class ClipboardWorld extends AbstractWorld implements Clipboard, CLIWorld
//FAWE end
@Override
public String getId() {
public String id() {
return getName().replace(" ", "_").toLowerCase(Locale.ROOT);
}