Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions verification/src/changes/accepted-core-public-api-changes.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,79 @@
"CONSTRUCTOR_REMOVED"
]
}
],
"Removal of deprecated API for WorldEdit 8": [
{
"type": "com.sk89q.worldedit.world.biome.BiomeData",
"member": "Class com.sk89q.worldedit.world.biome.BiomeData",
"changes": [
"CLASS_REMOVED",
"ANNOTATION_REMOVED"
]
},
{
"type": "com.sk89q.worldedit.world.biome.BiomeData",
"member": "Method com.sk89q.worldedit.world.biome.BiomeData.getName()",
"changes": [
"METHOD_REMOVED",
"ANNOTATION_REMOVED"
]
},
{
"type": "com.sk89q.worldedit.world.biome.Biomes",
"member": "Class com.sk89q.worldedit.world.biome.Biomes",
"changes": [
"CLASS_REMOVED",
"ANNOTATION_REMOVED"
]
},
{
"type": "com.sk89q.worldedit.world.biome.Biomes",
"member": "Method com.sk89q.worldedit.world.biome.Biomes.findBiomeByName(java.util.Collection,java.lang.String,com.sk89q.worldedit.world.registry.BiomeRegistry)",
"changes": [
"METHOD_REMOVED",
"ANNOTATION_REMOVED"
]
},
{
"type": "com.sk89q.worldedit.world.registry.BiomeRegistry",
"member": "Method com.sk89q.worldedit.world.registry.BiomeRegistry.getData(com.sk89q.worldedit.world.biome.BiomeType)",
"changes": [
"METHOD_REMOVED",
"ANNOTATION_REMOVED"
]
},
{
"type": "com.sk89q.worldedit.world.block.BlockType",
"member": "Method com.sk89q.worldedit.world.block.BlockType.getName()",
"changes": [
"METHOD_REMOVED",
"ANNOTATION_REMOVED"
]
},
{
"type": "com.sk89q.worldedit.world.item.ItemType",
"member": "Method com.sk89q.worldedit.world.item.ItemType.getName()",
"changes": [
"METHOD_REMOVED",
"ANNOTATION_REMOVED"
]
},
{
"type": "com.sk89q.worldedit.world.registry.BlockRegistry",
"member": "Method com.sk89q.worldedit.world.registry.BlockRegistry.getName(com.sk89q.worldedit.world.block.BlockType)",
"changes": [
"METHOD_REMOVED",
"ANNOTATION_REMOVED"
]
},
{
"type": "com.sk89q.worldedit.world.registry.ItemRegistry",
"member": "Method com.sk89q.worldedit.world.registry.ItemRegistry.getName(com.sk89q.worldedit.world.item.ItemType)",
"changes": [
"METHOD_REMOVED",
"ANNOTATION_REMOVED"
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@
import com.sk89q.worldedit.util.formatting.text.Component;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.sk89q.worldedit.util.translation.TranslationManager;
import com.sk89q.worldedit.world.biome.BiomeData;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.registry.BiomeRegistry;
import org.bukkit.block.Biome;

import javax.annotation.Nullable;

/**
* A biome registry for Bukkit.
Expand All @@ -43,14 +39,4 @@ public Component getRichName(BiomeType biomeType) {
TranslationManager.makeTranslationKey("biome", biomeType.id())
);
}

@SuppressWarnings({ "removal" })
@Deprecated
@Nullable
@Override
public BiomeData getData(BiomeType biome) {
final Biome bukkitBiome = BukkitAdapter.adapt(biome);
return bukkitBiome == null ? null : bukkitBiome::name;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import com.sk89q.worldedit.util.formatting.text.Component;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.sk89q.worldedit.world.biome.BiomeData;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.registry.BiomeRegistry;
import net.minecraft.resources.Identifier;
Expand All @@ -36,31 +35,4 @@ public final class CoreMcBiomeRegistry implements BiomeRegistry {
public Component getRichName(BiomeType biomeType) {
return TranslatableComponent.of(Util.makeDescriptionId("biome", Identifier.parse(biomeType.id())));
}

@Deprecated
@Override
public BiomeData getData(BiomeType biome) {
return new CoreMcBiomeData(biome);
}

@Deprecated
private static final class CoreMcBiomeData implements BiomeData {
private final BiomeType biome;

/**
* Create a new instance.
*
* @param biome the base biome
*/
private CoreMcBiomeData(BiomeType biome) {
this.biome = biome;
}

@SuppressWarnings("deprecation")
@Override
public String getName() {
return biome.id();
}
}

}

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ public class BlockType implements Keyed {
= LazyReference.from(() -> WorldEdit.getInstance().getPlatformManager()
.queryCapability(Capability.GAME_HOOKS).getRegistries().getBlockRegistry().getMaterial(this));
@SuppressWarnings("this-escape")
@Deprecated
private final LazyReference<String> name = LazyReference.from(() -> WorldEdit.getInstance().getPlatformManager()
.queryCapability(Capability.GAME_HOOKS).getRegistries().getBlockRegistry().getName(this));
@SuppressWarnings("this-escape")
private final LazyReference<Integer> legacyId = LazyReference.from(() -> computeLegacy(0));
@SuppressWarnings("this-escape")
private final LazyReference<Integer> legacyData = LazyReference.from(() -> computeLegacy(1));
Expand Down Expand Up @@ -123,21 +119,6 @@ public Component getRichName() {
.getRegistries().getBlockRegistry().getRichName(this);
}

/**
* Gets the name of this block, or the ID if the name cannot be found.
*
* @return The name, or ID
* @deprecated The name is now translatable, use {@link #getRichName()}.
*/
@Deprecated
public String getName() {
String name = this.name.getValue();
if (name == null || name.isEmpty()) {
return id();
}
return name;
}

/**
* Gets the properties of this BlockType in a {@code key->property} mapping.
*
Expand Down
Loading
Loading