Skip to content
Merged
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
42 changes: 42 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,47 @@
"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"
]
}
]
}
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 @@ -20,11 +20,8 @@
package com.sk89q.worldedit.world.registry;

import com.sk89q.worldedit.util.formatting.text.Component;
import com.sk89q.worldedit.world.biome.BiomeData;
import com.sk89q.worldedit.world.biome.BiomeType;

import javax.annotation.Nullable;

/**
* Provides information on biomes.
*/
Expand All @@ -38,16 +35,4 @@ public interface BiomeRegistry {
*/
Component getRichName(BiomeType biomeType);

/**
* Get data about a biome.
*
* @param biome the biome
* @return a data object or null if information is not known
* @deprecated This method no longer returns any useful information.
* Use {@link #getRichName(BiomeType)} for the name of the biome.
*/
@Deprecated
@Nullable
BiomeData getData(BiomeType biome);

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +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 javax.annotation.Nullable;

/**
* A biome registry that knows nothing.
*/
Expand All @@ -44,14 +41,4 @@ public Component getRichName(BiomeType biomeType) {
TranslationManager.makeTranslationKey("biome", biomeType.id())
);
}

// Suppress InlineMeSuggester: This method cannot be made final due to backwards compatibility
@SuppressWarnings("InlineMeSuggester")
@Deprecated
@Nullable
@Override
public BiomeData getData(BiomeType biome) {
return null;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@
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.registry.BiomeRegistry;
import org.spongepowered.api.registry.RegistryReference;
import org.spongepowered.api.world.biome.Biome;

import javax.annotation.Nullable;

/**
* Provides access to biome data in Sponge.
Expand All @@ -40,32 +35,4 @@ public Component getRichName(com.sk89q.worldedit.world.biome.BiomeType biomeType
TranslationManager.makeTranslationKey("biome", biomeType.id())
);
}

@Deprecated
@Nullable
@Override
public BiomeData getData(com.sk89q.worldedit.world.biome.BiomeType biome) {
return new SpongeBiomeData(SpongeAdapter.adapt(biome));
}

@Deprecated
private static class SpongeBiomeData implements BiomeData {
private final RegistryReference<Biome> biome;

/**
* Create a new instance.
*
* @param biome the base biome
*/
private SpongeBiomeData(RegistryReference<Biome> biome) {
this.biome = biome;
}

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

}
Loading