Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group=org.spongepowered
version=14.0.0-SNAPSHOT
version=15.0.0-SNAPSHOT
organization=SpongePowered
projectUrl=https://www.spongepowered.org
projectDescription=A plugin API for Minecraft: Java Edition
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/org/spongepowered/api/block/BlockTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,12 @@ public final class BlockTypes {

public static final DefaultedRegistryReference<BlockType> BUDDING_AMETHYST = BlockTypes.key(ResourceKey.minecraft("budding_amethyst"));

public static final DefaultedRegistryReference<BlockType> BUSH = BlockTypes.key(ResourceKey.minecraft("bush"));

public static final DefaultedRegistryReference<BlockType> CACTUS = BlockTypes.key(ResourceKey.minecraft("cactus"));

public static final DefaultedRegistryReference<BlockType> CACTUS_FLOWER = BlockTypes.key(ResourceKey.minecraft("cactus_flower"));

public static final DefaultedRegistryReference<BlockType> CAKE = BlockTypes.key(ResourceKey.minecraft("cake"));

public static final DefaultedRegistryReference<BlockType> CALCITE = BlockTypes.key(ResourceKey.minecraft("calcite"));
Expand Down Expand Up @@ -792,6 +796,8 @@ public final class BlockTypes {

public static final DefaultedRegistryReference<BlockType> FIRE = BlockTypes.key(ResourceKey.minecraft("fire"));

public static final DefaultedRegistryReference<BlockType> FIREFLY_BUSH = BlockTypes.key(ResourceKey.minecraft("firefly_bush"));

public static final DefaultedRegistryReference<BlockType> FIRE_CORAL = BlockTypes.key(ResourceKey.minecraft("fire_coral"));

public static final DefaultedRegistryReference<BlockType> FIRE_CORAL_BLOCK = BlockTypes.key(ResourceKey.minecraft("fire_coral_block"));
Expand Down Expand Up @@ -1006,6 +1012,8 @@ public final class BlockTypes {

public static final DefaultedRegistryReference<BlockType> LAVA_CAULDRON = BlockTypes.key(ResourceKey.minecraft("lava_cauldron"));

public static final DefaultedRegistryReference<BlockType> LEAF_LITTER = BlockTypes.key(ResourceKey.minecraft("leaf_litter"));

public static final DefaultedRegistryReference<BlockType> LECTERN = BlockTypes.key(ResourceKey.minecraft("lectern"));

public static final DefaultedRegistryReference<BlockType> LEVER = BlockTypes.key(ResourceKey.minecraft("lever"));
Expand Down Expand Up @@ -1770,6 +1778,8 @@ public final class BlockTypes {

public static final DefaultedRegistryReference<BlockType> SEA_PICKLE = BlockTypes.key(ResourceKey.minecraft("sea_pickle"));

public static final DefaultedRegistryReference<BlockType> SHORT_DRY_GRASS = BlockTypes.key(ResourceKey.minecraft("short_dry_grass"));

public static final DefaultedRegistryReference<BlockType> SHORT_GRASS = BlockTypes.key(ResourceKey.minecraft("short_grass"));

public static final DefaultedRegistryReference<BlockType> SHROOMLIGHT = BlockTypes.key(ResourceKey.minecraft("shroomlight"));
Expand Down Expand Up @@ -1956,6 +1966,8 @@ public final class BlockTypes {

public static final DefaultedRegistryReference<BlockType> SWEET_BERRY_BUSH = BlockTypes.key(ResourceKey.minecraft("sweet_berry_bush"));

public static final DefaultedRegistryReference<BlockType> TALL_DRY_GRASS = BlockTypes.key(ResourceKey.minecraft("tall_dry_grass"));

public static final DefaultedRegistryReference<BlockType> TALL_GRASS = BlockTypes.key(ResourceKey.minecraft("tall_grass"));

public static final DefaultedRegistryReference<BlockType> TALL_SEAGRASS = BlockTypes.key(ResourceKey.minecraft("tall_seagrass"));
Expand All @@ -1964,6 +1976,10 @@ public final class BlockTypes {

public static final DefaultedRegistryReference<BlockType> TERRACOTTA = BlockTypes.key(ResourceKey.minecraft("terracotta"));

public static final DefaultedRegistryReference<BlockType> TEST_BLOCK = BlockTypes.key(ResourceKey.minecraft("test_block"));

public static final DefaultedRegistryReference<BlockType> TEST_INSTANCE_BLOCK = BlockTypes.key(ResourceKey.minecraft("test_instance_block"));

public static final DefaultedRegistryReference<BlockType> TINTED_GLASS = BlockTypes.key(ResourceKey.minecraft("tinted_glass"));

public static final DefaultedRegistryReference<BlockType> TNT = BlockTypes.key(ResourceKey.minecraft("tnt"));
Expand Down Expand Up @@ -2192,6 +2208,8 @@ public final class BlockTypes {

public static final DefaultedRegistryReference<BlockType> WHITE_WOOL = BlockTypes.key(ResourceKey.minecraft("white_wool"));

public static final DefaultedRegistryReference<BlockType> WILDFLOWERS = BlockTypes.key(ResourceKey.minecraft("wildflowers"));

public static final DefaultedRegistryReference<BlockType> WITHER_ROSE = BlockTypes.key(ResourceKey.minecraft("wither_rose"));

public static final DefaultedRegistryReference<BlockType> WITHER_SKELETON_SKULL = BlockTypes.key(ResourceKey.minecraft("wither_skeleton_skull"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ public final class BlockEntityTypes {

public static final DefaultedRegistryReference<BlockEntityType> STRUCTURE_BLOCK = BlockEntityTypes.key(ResourceKey.minecraft("structure_block"));

public static final DefaultedRegistryReference<BlockEntityType> TEST_BLOCK = BlockEntityTypes.key(ResourceKey.minecraft("test_block"));

public static final DefaultedRegistryReference<BlockEntityType> TEST_INSTANCE_BLOCK = BlockEntityTypes.key(ResourceKey.minecraft("test_instance_block"));

public static final DefaultedRegistryReference<BlockEntityType> TRAPPED_CHEST = BlockEntityTypes.key(ResourceKey.minecraft("trapped_chest"));

public static final DefaultedRegistryReference<BlockEntityType> TRIAL_SPAWNER = BlockEntityTypes.key(ResourceKey.minecraft("trial_spawner"));
Expand Down
12 changes: 10 additions & 2 deletions src/main/java/org/spongepowered/api/data/BlockStateKeys.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.spongepowered.api.data.type.BellAttachmentType;
import org.spongepowered.api.data.type.ChestAttachmentType;
import org.spongepowered.api.data.type.ComparatorMode;
import org.spongepowered.api.data.type.CreakingHeartState;
import org.spongepowered.api.data.type.DoorHinge;
import org.spongepowered.api.data.type.DripstoneSegment;
import org.spongepowered.api.data.type.InstrumentType;
Expand All @@ -41,6 +42,7 @@
import org.spongepowered.api.data.type.SlabPortion;
import org.spongepowered.api.data.type.StairShape;
import org.spongepowered.api.data.type.StructureMode;
import org.spongepowered.api.data.type.TestBlockMode;
import org.spongepowered.api.data.type.Tilt;
import org.spongepowered.api.data.type.TrialSpawnerState;
import org.spongepowered.api.data.type.VaultState;
Expand All @@ -56,8 +58,6 @@
@SuppressWarnings("unused")
public final class BlockStateKeys {

public static final Key<Value<Boolean>> ACTIVE = BlockStateKeys.key(ResourceKey.minecraft("property/active"), Boolean.class);

public static final Key<Value<Integer>> AGE_1 = BlockStateKeys.key(ResourceKey.minecraft("property/age"), Integer.class);

public static final Key<Value<Integer>> AGE_15 = BlockStateKeys.key(ResourceKey.minecraft("property/age"), Integer.class);
Expand Down Expand Up @@ -118,6 +118,8 @@ public final class BlockStateKeys {

public static final Key<Value<Boolean>> CRAFTING = BlockStateKeys.key(ResourceKey.minecraft("property/crafting"), Boolean.class);

public static final Key<Value<CreakingHeartState>> CREAKING_HEART_STATE = BlockStateKeys.key(ResourceKey.minecraft("property/creaking_heart_state"), CreakingHeartState.class);

public static final Key<Value<Integer>> DELAY = BlockStateKeys.key(ResourceKey.minecraft("property/delay"), Integer.class);

public static final Key<Value<Boolean>> DISARMED = BlockStateKeys.key(ResourceKey.minecraft("property/disarmed"), Boolean.class);
Expand Down Expand Up @@ -198,6 +200,8 @@ public final class BlockStateKeys {

public static final Key<Value<Boolean>> LOCKED = BlockStateKeys.key(ResourceKey.minecraft("property/locked"), Boolean.class);

public static final Key<Value<Boolean>> MAP = BlockStateKeys.key(ResourceKey.minecraft("property/map"), Boolean.class);

public static final Key<Value<ComparatorMode>> MODE_COMPARATOR = BlockStateKeys.key(ResourceKey.minecraft("property/mode"), ComparatorMode.class);

public static final Key<Value<Integer>> MOISTURE = BlockStateKeys.key(ResourceKey.minecraft("property/moisture"), Integer.class);
Expand Down Expand Up @@ -242,6 +246,8 @@ public final class BlockStateKeys {

public static final Key<Value<SculkSensorState>> SCULK_SENSOR_PHASE = BlockStateKeys.key(ResourceKey.minecraft("property/sculk_sensor_phase"), SculkSensorState.class);

public static final Key<Value<Integer>> SEGMENT_AMOUNT = BlockStateKeys.key(ResourceKey.minecraft("property/segment_amount"), Integer.class);

public static final Key<Value<Boolean>> SHORT = BlockStateKeys.key(ResourceKey.minecraft("property/short"), Boolean.class);

public static final Key<Value<Boolean>> SHRIEKING = BlockStateKeys.key(ResourceKey.minecraft("property/shrieking"), Boolean.class);
Expand All @@ -266,6 +272,8 @@ public final class BlockStateKeys {

public static final Key<Value<StructureMode>> STRUCTUREBLOCK_MODE = BlockStateKeys.key(ResourceKey.minecraft("property/mode"), StructureMode.class);

public static final Key<Value<TestBlockMode>> TEST_BLOCK_MODE = BlockStateKeys.key(ResourceKey.minecraft("property/mode"), TestBlockMode.class);

public static final Key<Value<Tilt>> TILT = BlockStateKeys.key(ResourceKey.minecraft("property/tilt"), Tilt.class);

public static final Key<Value<Boolean>> TIP = BlockStateKeys.key(ResourceKey.minecraft("property/tip"), Boolean.class);
Expand Down
17 changes: 17 additions & 0 deletions src/main/java/org/spongepowered/api/data/Keys.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
import org.spongepowered.api.data.type.ParrotType;
import org.spongepowered.api.data.type.PhantomPhase;
import org.spongepowered.api.data.type.PickupRule;
import org.spongepowered.api.data.type.PigType;
import org.spongepowered.api.data.type.PistonType;
import org.spongepowered.api.data.type.PortionType;
import org.spongepowered.api.data.type.ProfessionType;
Expand All @@ -100,6 +101,7 @@
import org.spongepowered.api.data.type.VillagerType;
import org.spongepowered.api.data.type.WallConnectionState;
import org.spongepowered.api.data.type.WireAttachmentType;
import org.spongepowered.api.data.type.WolfSoundVariant;
import org.spongepowered.api.data.type.WolfVariant;
import org.spongepowered.api.data.value.ListValue;
import org.spongepowered.api.data.value.MapValue;
Expand Down Expand Up @@ -2655,6 +2657,14 @@ public final class Keys {
*/
public static final Key<Value<PickupRule>> PICKUP_RULE = Keys.key(ResourceKey.sponge("pickup_rule"), PickupRule.class);

/**
* The {@link PigType} for a {@link Pig}, which can vary based on
* {@link Biome}.
*
* @see <a href="https://minecraft.wiki/w/Java_Edition_25w02a#Mobs">Pig Variant Changes</a>
*/
public static final Key<Value<PigType>> PIG_TYPE = Keys.key(ResourceKey.sponge("pig_variant"), PigType.class);

/**
* Whether a {@link WorldType} is safe for {@link Piglin} to not transform
* into {@link ZombifiedPiglin} over time in a {@link ServerWorld world} of that type
Expand Down Expand Up @@ -3544,6 +3554,13 @@ public final class Keys {
*/
public static final Key<Value<WolfVariant>> WOLF_VARIANT = Keys.key(ResourceKey.sponge("wolf_variant"), WolfVariant.class);

/**
* The {@link WolfSoundVariant} of a {@link Wolf}.
*
* @see <a href="https://minecraft.wiki/w/Wolf#Sound_variants_2">Wolves wiki</a>
*/
public static final Key<Value<WolfSoundVariant>> WOLF_SOUND_VARIANT = Keys.key(ResourceKey.sponge("wolf_sound_variant"), WolfSoundVariant.class);

/**
* The {@link Sheep} who is being targeted by the {@link SpellTypes#WOLOLO}
* spell being casted by an {@link Evoker}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ public class AxolotlVariants {

public static final DefaultedRegistryReference<AxolotlVariant> WILD = AxolotlVariants.key(ResourceKey.sponge("wild"));


private static DefaultedRegistryReference<AxolotlVariant> key(final ResourceKey location) {
return RegistryKey.of(RegistryTypes.AXOLOTL_VARIANT, location).asDefaultedReference(Sponge::game);
}

}
6 changes: 3 additions & 3 deletions src/main/java/org/spongepowered/api/data/type/CatTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* <!-- This file is automatically generated. Any manual changes will be overwritten. -->
*/
@SuppressWarnings("unused")
@RegistryScopes(scopes = RegistryScope.GAME)
@RegistryScopes(scopes = RegistryScope.ENGINE)
public final class CatTypes {

public static final DefaultedRegistryReference<CatType> ALL_BLACK = CatTypes.key(ResourceKey.minecraft("all_black"));
Expand Down Expand Up @@ -66,10 +66,10 @@ private CatTypes() {
}

public static Registry<CatType> registry() {
return Sponge.game().registry(RegistryTypes.CAT_TYPE);
return Sponge.server().registry(RegistryTypes.CAT_TYPE);
}

private static DefaultedRegistryReference<CatType> key(final ResourceKey location) {
return RegistryKey.of(RegistryTypes.CAT_TYPE, location).asDefaultedReference(Sponge::game);
return RegistryKey.of(RegistryTypes.CAT_TYPE, location).asDefaultedReference(Sponge::server);
}
}
32 changes: 32 additions & 0 deletions src/main/java/org/spongepowered/api/data/type/ChickenVariant.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* This file is part of SpongeAPI, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.spongepowered.api.data.type;

import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.util.annotation.CatalogedBy;

@CatalogedBy(ChickenVariants.class)
public interface ChickenVariant extends DefaultedRegistryValue {
}
56 changes: 56 additions & 0 deletions src/main/java/org/spongepowered/api/data/type/ChickenVariants.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* This file is part of SpongeAPI, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.spongepowered.api.data.type;

import org.spongepowered.api.ResourceKey;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.registry.DefaultedRegistryReference;
import org.spongepowered.api.registry.Registry;
import org.spongepowered.api.registry.RegistryKey;
import org.spongepowered.api.registry.RegistryScope;
import org.spongepowered.api.registry.RegistryScopes;
import org.spongepowered.api.registry.RegistryTypes;

@SuppressWarnings("unused")
@RegistryScopes(scopes = RegistryScope.ENGINE)
public final class ChickenVariants {

public static final DefaultedRegistryReference<ChickenVariant> COLD = ChickenVariants.key(ResourceKey.minecraft("cold"));

public static final DefaultedRegistryReference<ChickenVariant> TEMPERATE = ChickenVariants.key(ResourceKey.minecraft("temperate"));

public static final DefaultedRegistryReference<ChickenVariant> WARM = ChickenVariants.key(ResourceKey.minecraft("warm"));

private ChickenVariants() {
}

public static Registry<ChickenVariant> registry() {
return Sponge.server().registry(RegistryTypes.CHICKEN_VARIANT);
}

private static DefaultedRegistryReference<ChickenVariant> key(final ResourceKey location) {
return RegistryKey.of(RegistryTypes.CHICKEN_VARIANT, location).asDefaultedReference(Sponge::server);
}
}
32 changes: 32 additions & 0 deletions src/main/java/org/spongepowered/api/data/type/CowVariant.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* This file is part of SpongeAPI, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.spongepowered.api.data.type;

import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.util.annotation.CatalogedBy;

@CatalogedBy(CowVariants.class)
public interface CowVariant extends DefaultedRegistryValue {
}
Loading
Loading