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
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=16.0.0-SNAPSHOT
version=17.0.0-SNAPSHOT
organization=SpongePowered
projectUrl=https://www.spongepowered.org
projectDescription=A plugin API for Minecraft: Java Edition
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ junit-launcher = { module = "org.junit.platform:junit-platform-launcher" }
mockito = { module = "org.mockito:mockito-core", version.ref = "mockito" }

[plugins]
errorprone = { id = "net.ltgt.errorprone", version = "3.1.0" }
errorprone = { id = "net.ltgt.errorprone", version = "4.3.0" }
eventImplGen = { id = "org.spongepowered.gradle.event-impl-gen", version = "7.1.0" }
ideaExt = { id = "org.jetbrains.gradle.plugin.idea-ext", version.ref = "ideaExt" }
indra-checkstyle = { id = "net.kyori.indra.checkstyle", version.ref = "indra" }
Expand Down
13 changes: 13 additions & 0 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,11 @@
<sha256 value="8776a213deaa1cbbadb77820225211e1b9adead2341b55cc35bc92c9076620a3" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="net.ltgt.errorprone" name="net.ltgt.errorprone.gradle.plugin" version="4.3.0">
<artifact name="net.ltgt.errorprone.gradle.plugin-4.3.0.pom">
<sha256 value="3370e20ef3213ffce47f7fda31266c33e9cca3b1b7f4d54169b482277042654b" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="net.ltgt.gradle" name="gradle-errorprone-plugin" version="3.1.0">
<artifact name="gradle-errorprone-plugin-3.1.0.jar">
<sha256 value="10fb66b55747ced1db9c89c8c3d0adb5dbd3f8f12f2a183bee2b5ff818d1fd6c" origin="Generated by Gradle"/>
Expand All @@ -1324,6 +1329,14 @@
<sha256 value="d393a0d3337193cb21b64a98714a1da8a966349be214cbb16171a9925a7985ee" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="net.ltgt.gradle" name="gradle-errorprone-plugin" version="4.3.0">
<artifact name="gradle-errorprone-plugin-4.3.0.jar">
<sha256 value="42f89c1f582ecd09459586d3d19c0fa92a332035e4a70b5699a8ec6a81aec32c" origin="Generated by Gradle"/>
</artifact>
<artifact name="gradle-errorprone-plugin-4.3.0.module">
<sha256 value="6d2b0a7809ffde227ec15a4cf28e68929be22a1a12a0f56ad5e795d5058f2f6e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="net.sf.saxon" name="Saxon-HE" version="12.4">
<artifact name="Saxon-HE-12.4.jar">
<sha256 value="575f8b696e3b6f9aa7a3bf01611b8bf1b84576b55ce29bc16656a53a147ef441" origin="Generated by Gradle"/>
Expand Down
126 changes: 124 additions & 2 deletions src/main/java/org/spongepowered/api/block/BlockTypes.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public final class BlockEntityTypes {

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

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

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

public static final DefaultedRegistryReference<BlockEntityType> CREAKING_HEART = BlockEntityTypes.key(ResourceKey.minecraft("creaking_heart"));
Expand Down Expand Up @@ -114,6 +116,8 @@ public final class BlockEntityTypes {

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

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

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

public static final DefaultedRegistryReference<BlockEntityType> SIGN = BlockEntityTypes.key(ResourceKey.minecraft("sign"));
Expand Down
30 changes: 18 additions & 12 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.CopperGolemPose;
import org.spongepowered.api.data.type.CreakingHeartState;
import org.spongepowered.api.data.type.DoorHinge;
import org.spongepowered.api.data.type.DripstoneSegment;
Expand All @@ -39,6 +40,7 @@
import org.spongepowered.api.data.type.PortionType;
import org.spongepowered.api.data.type.RailDirection;
import org.spongepowered.api.data.type.SculkSensorState;
import org.spongepowered.api.data.type.SideChain;
import org.spongepowered.api.data.type.SlabPortion;
import org.spongepowered.api.data.type.StairShape;
import org.spongepowered.api.data.type.StructureMode;
Expand Down Expand Up @@ -100,20 +102,10 @@ public final class BlockStateKeys {

public static final Key<Value<ChestAttachmentType>> CHEST_TYPE = BlockStateKeys.key(ResourceKey.minecraft("property/type"), ChestAttachmentType.class);

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

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

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

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

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

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

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

public static final Key<Value<CopperGolemPose>> COPPER_GOLEM_POSE = BlockStateKeys.key(ResourceKey.minecraft("property/copper_golem_pose"), CopperGolemPose.class);

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

public static final Key<Value<Boolean>> CRAFTING = BlockStateKeys.key(ResourceKey.minecraft("property/crafting"), Boolean.class);
Expand Down Expand Up @@ -254,10 +246,24 @@ public final class BlockStateKeys {

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

public static final Key<Value<SideChain>> SIDE_CHAIN_PART = BlockStateKeys.key(ResourceKey.minecraft("property/side_chain"), SideChain.class);

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

public static final Key<Value<SlabPortion>> SLAB_TYPE = BlockStateKeys.key(ResourceKey.minecraft("property/type"), SlabPortion.class);

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

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

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

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

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

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

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

public static final Key<Value<Boolean>> SOUTH = BlockStateKeys.key(ResourceKey.minecraft("property/south"), Boolean.class);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/spongepowered/api/data/DataManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public interface DataManager {
* be read by a plugin-data datastore.
*
* @param legacyId The legacy id
* @param dataStoreKey The dataStore key set in {@link org.spongepowered.api.data.persistence.DataStore.Builder.HolderStep#pluginData(ResourceKey)}
* @param dataStoreKey The dataStore key set in {@link org.spongepowered.api.data.persistence.DataStore.Builder#pluginData(ResourceKey)}
*/
void registerLegacyManipulatorIds(String legacyId, ResourceKey dataStoreKey);

Expand Down
16 changes: 16 additions & 0 deletions src/main/java/org/spongepowered/api/data/Keys.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
import org.spongepowered.api.data.type.CatType;
import org.spongepowered.api.data.type.ChestAttachmentType;
import org.spongepowered.api.data.type.ComparatorMode;
import org.spongepowered.api.data.type.CopperOxidation;
import org.spongepowered.api.data.type.DoorHinge;
import org.spongepowered.api.data.type.DripstoneSegment;
import org.spongepowered.api.data.type.DyeColor;
Expand Down Expand Up @@ -173,6 +174,7 @@
import org.spongepowered.api.entity.living.aquatic.fish.Pufferfish;
import org.spongepowered.api.entity.living.aquatic.fish.school.Salmon;
import org.spongepowered.api.entity.living.aquatic.fish.school.TropicalFish;
import org.spongepowered.api.entity.living.golem.CopperGolem;
import org.spongepowered.api.entity.living.golem.IronGolem;
import org.spongepowered.api.entity.living.golem.Shulker;
import org.spongepowered.api.entity.living.monster.Blaze;
Expand Down Expand Up @@ -256,6 +258,7 @@
import org.spongepowered.api.raid.RaidWave;
import org.spongepowered.api.registry.DefaultedRegistryType;
import org.spongepowered.api.statistic.Statistic;
import org.spongepowered.api.tag.BlockTypeTags;
import org.spongepowered.api.tag.Tag;
import org.spongepowered.api.util.Axis;
import org.spongepowered.api.util.Color;
Expand Down Expand Up @@ -788,6 +791,13 @@ public final class Keys {
*/
public static final Key<Value<ItemType>> CONTAINER_ITEM = Keys.key(ResourceKey.sponge("container_item"), ItemType.class);

/**
* The {@link CopperOxidation} state of a {@link BlockState block}
* (given that it applies to the {@link BlockTypeTags#COPPER} tag) or
* a {@link CopperGolem}
*/
public static final Key<Value<CopperOxidation>> COPPER_OXIDATION = Keys.key(ResourceKey.sponge("copper_oxidation"), CopperOxidation.class);

/**
* The {@link ItemStack} a food {@link ItemStack} converts to when eaten.
*/
Expand Down Expand Up @@ -3507,6 +3517,12 @@ public final class Keys {
*/
public static final Key<Value<Color>> WATER_FOG_COLOR = Keys.key(ResourceKey.sponge("water_fog_color"), Color.class);

/**
* The state of whether a {@link BlockState} that is a copper block is waxed, or if a {@link CopperGolem}
* is waxed.
*/
public static final Key<Value<Boolean>> WAXED = Keys.key(ResourceKey.sponge("waxed"), Boolean.class);

/**
* The weather of a {@link ServerWorldProperties}.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public final class ArmorMaterials {

public static final DefaultedRegistryReference<ArmorMaterial> CHAINMAIL = ArmorMaterials.key(ResourceKey.minecraft("chainmail"));

public static final DefaultedRegistryReference<ArmorMaterial> COPPER = ArmorMaterials.key(ResourceKey.minecraft("copper"));

public static final DefaultedRegistryReference<ArmorMaterial> DIAMOND = ArmorMaterials.key(ResourceKey.minecraft("diamond"));

public static final DefaultedRegistryReference<ArmorMaterial> GOLD = ArmorMaterials.key(ResourceKey.minecraft("gold"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
import org.spongepowered.api.util.annotation.CatalogedBy;

@CatalogedBy(ChickenVariants.class)
public interface ChickenVariant extends DefaultedRegistryValue {
public interface ChickenVariant extends DefaultedRegistryValue<ChickenVariant> {
}
32 changes: 32 additions & 0 deletions src/main/java/org/spongepowered/api/data/type/CopperGolemPose.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(CopperGolemPoses.class)
public interface CopperGolemPose extends DefaultedRegistryValue<CopperGolemPose>, StringRepresentable, Comparable<CopperGolemPose> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* 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;

/**
* <!-- This file is automatically generated. Any manual changes will be overwritten. -->
*/
@RegistryScopes(scopes = RegistryScope.GAME)
public final class CopperGolemPoses {

public static final DefaultedRegistryReference<CopperGolemPose> RUNNING = CopperGolemPoses.key(ResourceKey.sponge("running"));

public static final DefaultedRegistryReference<CopperGolemPose> SITTING = CopperGolemPoses.key(ResourceKey.sponge("sitting"));

public static final DefaultedRegistryReference<CopperGolemPose> STANDING = CopperGolemPoses.key(ResourceKey.sponge("standing"));

public static final DefaultedRegistryReference<CopperGolemPose> STAR = CopperGolemPoses.key(ResourceKey.sponge("star"));

private CopperGolemPoses() {
}

public static Registry<CopperGolemPose> registry() {
return Sponge.game().registry(RegistryTypes.COPPER_GOLEM_POSE);
}

private static DefaultedRegistryReference<CopperGolemPose> key(final ResourceKey location) {
return RegistryKey.of(RegistryTypes.COPPER_GOLEM_POSE, location).asDefaultedReference(Sponge::game);
}
}
34 changes: 34 additions & 0 deletions src/main/java/org/spongepowered/api/data/type/CopperOxidation.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* 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.DefaultedRegistryType;
import org.spongepowered.api.util.Cycleable;
import org.spongepowered.api.util.annotation.CatalogedBy;

@CatalogedBy(CopperOxidations.class)
public interface CopperOxidation extends DefaultedRegistryType<CopperOxidations>, Comparable<CopperOxidation>, StringRepresentable, Cycleable<CopperOxidation> {

}
Loading
Loading