Skip to content

Commit

Permalink
Merge pull request #2501 from SpongePowered/update/1.20.6
Browse files Browse the repository at this point in the history
Update/1.20.6
  • Loading branch information
ImMorpheus authored May 15, 2024
2 parents 1621e3d + e469687 commit 5f93bbb
Show file tree
Hide file tree
Showing 57 changed files with 991 additions and 501 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-spotless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ jobs:
call-check:
uses: SpongePowered/.github/.github/workflows/shared-check-spotless.yaml@master
with:
runtime_version: 17
runtime_version: 21
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/check-style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ jobs:
call-check:
uses: SpongePowered/.github/.github/workflows/shared-check-style.yaml@master
with:
runtime_version: 17
runtime_version: 21
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
call-build:
uses: SpongePowered/.github/.github/workflows/shared-ci.yaml@master
with:
runtime_version: 17
runtime_version: 21
publish_snapshot_javadoc: true
publishing_branch_regex: 'api-\d+'
secrets: inherit
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SpongeAPI ![Build Status](https://github.com/SpongePowered/SpongeAPI/actions/workflows/ci.yaml/badge.svg?branch=api-10)
SpongeAPI ![Build Status](https://github.com/SpongePowered/SpongeAPI/actions/workflows/ci.yaml/badge.svg?branch=api-11)
=============
A mature Minecraft plugin API (not including an implementation), licensed under the [MIT License].

Expand All @@ -11,7 +11,7 @@ A mature Minecraft plugin API (not including an implementation), licensed under
* [Discord] `#plugins`

## Prerequisites
* [Java] 17
* [Java] 21

## Clone
The following steps will ensure your project is cloned properly.
Expand All @@ -24,7 +24,7 @@ __Note:__ If you do not have [Gradle] installed then use ./gradlew for Unix syst

In order to build SpongeAPI you simply need to run the `gradle` command. You can find the compiled JAR file in `./build/libs` labeled similarly to 'spongeapi-x.x.x-SNAPSHOT.jar'.

Sponge will use a javac version of *at least* 17. If an older JDK is used to launch Gradle, JDK 17 will be downloaded automatically.
Sponge will use a javac version of *at least* 21. If an older JDK is used to launch Gradle, JDK 21 will be downloaded automatically.

## Contributing
Are you a talented programmer looking to contribute some code? We'd love the help!
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ dependencies {

tasks {
genEventImpl {
sourceCompatibility = javaTarget
sourceCompatibility = "17" // TODO use javaTarget here
destinationDirectory = project.layout.buildDirectory.dir("generated/event-factory")

outputFactory = "org.spongepowered.api.event.SpongeEventFactory"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version=11.0.0-SNAPSHOT
organization=SpongePowered
projectUrl=https://www.spongepowered.org
projectDescription=A plugin API for Minecraft: Java Edition
javaTarget=17
javaTarget=21

javadocPublishRoot=https://jd.spongepowered.org/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
import javax.tools.Diagnostic;

@SupportedAnnotationTypes(ListenerProcessor.LISTENER_ANNOTATION_CLASS)
@SupportedSourceVersion(SourceVersion.RELEASE_17)
@SupportedSourceVersion(SourceVersion.RELEASE_21)
public class ListenerProcessor extends AbstractProcessor {

static final String LISTENER_ANNOTATION_CLASS = "org.spongepowered.api.event.Listener";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public final class Triggers {

public static final DefaultedRegistryReference<Trigger<?>> ALLAY_DROP_ITEM_ON_BLOCK = Triggers.key(ResourceKey.minecraft("allay_drop_item_on_block"));

public static final DefaultedRegistryReference<Trigger<?>> ANY_BLOCK_USE = Triggers.key(ResourceKey.minecraft("any_block_use"));

public static final DefaultedRegistryReference<Trigger<?>> AVOID_VIBRATION = Triggers.key(ResourceKey.minecraft("avoid_vibration"));

public static final DefaultedRegistryReference<Trigger<?>> BEE_NEST_DESTROYED = Triggers.key(ResourceKey.minecraft("bee_nest_destroyed"));
Expand All @@ -58,8 +60,12 @@ public final class Triggers {

public static final DefaultedRegistryReference<Trigger<?>> CONSUME_ITEM = Triggers.key(ResourceKey.minecraft("consume_item"));

public static final DefaultedRegistryReference<Trigger<?>> CRAFTER_RECIPE_CRAFTED = Triggers.key(ResourceKey.minecraft("crafter_recipe_crafted"));

public static final DefaultedRegistryReference<Trigger<?>> CURED_ZOMBIE_VILLAGER = Triggers.key(ResourceKey.minecraft("cured_zombie_villager"));

public static final DefaultedRegistryReference<Trigger<?>> DEFAULT_BLOCK_USE = Triggers.key(ResourceKey.minecraft("default_block_use"));

public static final DefaultedRegistryReference<Trigger<?>> EFFECTS_CHANGED = Triggers.key(ResourceKey.minecraft("effects_changed"));

public static final DefaultedRegistryReference<Trigger<?>> ENCHANTED_ITEM = Triggers.key(ResourceKey.minecraft("enchanted_item"));
Expand All @@ -70,6 +76,8 @@ public final class Triggers {

public static final DefaultedRegistryReference<Trigger<?>> ENTITY_KILLED_PLAYER = Triggers.key(ResourceKey.minecraft("entity_killed_player"));

public static final DefaultedRegistryReference<Trigger<?>> FALL_AFTER_EXPLOSION = Triggers.key(ResourceKey.minecraft("fall_after_explosion"));

public static final DefaultedRegistryReference<Trigger<?>> FALL_FROM_HEIGHT = Triggers.key(ResourceKey.minecraft("fall_from_height"));

public static final DefaultedRegistryReference<Trigger<?>> FILLED_BUCKET = Triggers.key(ResourceKey.minecraft("filled_bucket"));
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/spongepowered/api/block/BlockTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,8 @@ public final class BlockTypes {

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

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

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

public static final DefaultedRegistryReference<BlockType> HONEY_BLOCK = BlockTypes.key(ResourceKey.minecraft("honey_block"));
Expand Down Expand Up @@ -1940,6 +1942,8 @@ public final class BlockTypes {

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

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

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

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

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

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

private BlockEntityTypes() {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.spongepowered.api.data.type.BannerPatternShape;
import org.spongepowered.api.data.type.DyeColor;
import org.spongepowered.api.registry.DefaultedRegistryReference;
import org.spongepowered.api.registry.RegistryReference;
import org.spongepowered.api.util.CopyableBuilder;

import java.util.function.Supplier;
Expand All @@ -48,7 +49,7 @@ public interface BannerPatternLayer extends DataSerializable {
* @param color The color
* @return The new pattern layer
*/
static BannerPatternLayer of(Supplier<? extends BannerPatternShape> shape, DefaultedRegistryReference<? extends DyeColor> color) {
static BannerPatternLayer of(RegistryReference<? extends BannerPatternShape> shape, DefaultedRegistryReference<? extends DyeColor> color) {
return BannerPatternLayer.of(shape.get(), color.get());
}

Expand All @@ -60,7 +61,7 @@ static BannerPatternLayer of(Supplier<? extends BannerPatternShape> shape, Defau
* @param color The color
* @return The new pattern layer
*/
static BannerPatternLayer of(Supplier<? extends BannerPatternShape> shape, DyeColor color) {
static BannerPatternLayer of(RegistryReference<? extends BannerPatternShape> shape, DyeColor color) {
return BannerPatternLayer.of(shape.get(), color);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,21 @@
@RegistryScopes(scopes = RegistryScope.GAME)
public final class ArmorMaterials {

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

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

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

public static final DefaultedRegistryReference<ArmorMaterial> IRON = ArmorMaterials.key(ResourceKey.sponge("iron"));
public static final DefaultedRegistryReference<ArmorMaterial> GOLD = ArmorMaterials.key(ResourceKey.minecraft("gold"));

public static final DefaultedRegistryReference<ArmorMaterial> LEATHER = ArmorMaterials.key(ResourceKey.sponge("leather"));
public static final DefaultedRegistryReference<ArmorMaterial> IRON = ArmorMaterials.key(ResourceKey.minecraft("iron"));

public static final DefaultedRegistryReference<ArmorMaterial> NETHERITE = ArmorMaterials.key(ResourceKey.sponge("netherite"));
public static final DefaultedRegistryReference<ArmorMaterial> LEATHER = ArmorMaterials.key(ResourceKey.minecraft("leather"));

public static final DefaultedRegistryReference<ArmorMaterial> TURTLE = ArmorMaterials.key(ResourceKey.sponge("turtle"));
public static final DefaultedRegistryReference<ArmorMaterial> NETHERITE = ArmorMaterials.key(ResourceKey.minecraft("netherite"));

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

private ArmorMaterials() {
}
Expand Down
Loading

0 comments on commit 5f93bbb

Please sign in to comment.