Skip to content

Commit a9e5275

Browse files
committed
wip: start updating to 24w34a
A lot doesn't compile with some registries having changed. Some kinds have migrated to records, moving away from enums. This poses some slight problem with representing the kinds themselves for API usage.
1 parent 42dc372 commit a9e5275

File tree

8 files changed

+6
-99
lines changed

8 files changed

+6
-99
lines changed

src/main/java/org/spongepowered/api/data/Keys.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@
265265
import org.spongepowered.api.world.explosion.Explosion;
266266
import org.spongepowered.api.world.generation.ChunkGenerator;
267267
import org.spongepowered.api.world.generation.carver.Carver;
268-
import org.spongepowered.api.world.generation.carver.CarvingStep;
269268
import org.spongepowered.api.world.generation.config.WorldGenerationConfig;
270269
import org.spongepowered.api.world.generation.feature.DecorationStep;
271270
import org.spongepowered.api.world.generation.feature.PlacedFeature;
@@ -656,7 +655,7 @@ public final class Keys {
656655
* The carvers of a {@link Biome} used during world generation.
657656
* Readonly
658657
*/
659-
public static final Key<MapValue<CarvingStep, List<Carver>>> CARVERS = Keys.mapKey(ResourceKey.sponge("carvers"), TypeToken.get(CarvingStep.class), new TypeToken<List<Carver>>() {});
658+
public static final Key<ListValue<Carver>> CARVERS = Keys.listKey(ResourceKey.sponge("carvers"), Carver.class);
660659

661660
/**
662661
* The current casting time of a {@link Spellcaster}.

src/main/java/org/spongepowered/api/entity/living/monster/zombie/Zombie.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public interface Zombie extends Monster {
3838
*
3939
* @return Whether this zombie is an adult or not
4040
*/
41+
@Override
4142
default Value.Mutable<Boolean> adult() {
4243
return this.requireValue(Keys.IS_ADULT).asMutable();
4344
}

src/main/java/org/spongepowered/api/registry/RegistryTypes.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@
165165
import org.spongepowered.api.world.gamerule.GameRule;
166166
import org.spongepowered.api.world.generation.carver.Carver;
167167
import org.spongepowered.api.world.generation.carver.CarverType;
168-
import org.spongepowered.api.world.generation.carver.CarvingStep;
169168
import org.spongepowered.api.world.generation.config.flat.FlatGeneratorConfig;
170169
import org.spongepowered.api.world.generation.config.noise.DensityFunction;
171170
import org.spongepowered.api.world.generation.config.noise.Noise;
@@ -306,8 +305,6 @@ public final class RegistryTypes {
306305

307306
public static final DefaultedRegistryType<CatType> CAT_TYPE = RegistryTypes.minecraftKeyInGame("cat_variant");
308307

309-
public static final DefaultedRegistryType<CarvingStep> CARVING_STEP = RegistryTypes.spongeKeyInGame("carving_step");
310-
311308
public static final DefaultedRegistryType<ChatVisibility> CHAT_VISIBILITY = RegistryTypes.spongeKeyInGame("chat_visibility");
312309

313310
public static final DefaultedRegistryType<ChestAttachmentType> CHEST_ATTACHMENT_TYPE = RegistryTypes.spongeKeyInGame("chest_attachment_type");

src/main/java/org/spongepowered/api/world/WorldTypeTemplate.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,12 @@ interface Builder extends DataPackEntryBuilder<WorldType, WorldTypeTemplate, Bui
7070
* @param pack The data
7171
* @return This builder, for chaining
7272
*/
73+
@Override
7374
Builder fromDataPack(DataView pack) throws IOException;
7475

7576
Builder from(WorldType type);
7677

78+
@Override
7779
Builder pack(DataPack<WorldTypeTemplate> pack);
7880
}
7981

src/main/java/org/spongepowered/api/world/biome/Biome.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
import org.spongepowered.api.world.biome.spawner.NaturalSpawnCost;
4343
import org.spongepowered.api.world.biome.spawner.NaturalSpawner;
4444
import org.spongepowered.api.world.generation.carver.Carver;
45-
import org.spongepowered.api.world.generation.carver.CarvingStep;
4645
import org.spongepowered.api.world.generation.feature.DecorationStep;
4746
import org.spongepowered.api.world.generation.feature.PlacedFeature;
4847

@@ -116,7 +115,7 @@ default TemperatureModifier temperatureModifier() {
116115
*
117116
* @return The carvers
118117
*/
119-
default Map<CarvingStep, List<Carver>> carvers() {
118+
default List<Carver> carvers() {
120119
return this.require(Keys.CARVERS);
121120
}
122121

src/main/java/org/spongepowered/api/world/generation/carver/CarvingStep.java

Lines changed: 0 additions & 35 deletions
This file was deleted.

src/main/java/org/spongepowered/api/world/generation/carver/CarvingSteps.java

Lines changed: 0 additions & 57 deletions
This file was deleted.

src/main/java/org/spongepowered/api/world/schematic/Schematic.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ static Builder builder() {
6767
*
6868
* @return The block palette
6969
*/
70+
@Override
7071
Palette<BlockState, BlockType> blockPalette();
7172

7273
/**

0 commit comments

Comments
 (0)