From 0a341e3acbe389d2e9312b7a2a46ebf4ab7d9d80 Mon Sep 17 00:00:00 2001 From: Gabriel Harris-Rouquette Date: Tue, 31 Dec 2024 19:38:46 -0800 Subject: [PATCH] feat: update to event-impl-gen 8 release --- .checkstyle/checkstyle-suppressions.xml | 1 + .gitignore | 2 +- build.gradle.kts | 23 +++++++-- gradle/libs.versions.toml | 4 +- gradle/verification-metadata.xml | 50 +++++++++++++++++-- .../api/data/DataManipulator.java | 2 +- .../entity/living/monster/zombie/Zombie.java | 1 + .../api/event/CompositeEvent.java | 24 +++++++++ .../api/event/action/CollideEvent.java | 2 +- .../api/event/block/InteractBlockEvent.java | 2 +- .../event/block/ScheduleBlockUpdateEvent.java | 2 +- .../api/event/entity/AffectEntityEvent.java | 4 +- .../api/event/entity/AttackEntityEvent.java | 4 +- .../event/entity/ChangeEntityWorldEvent.java | 2 +- .../api/event/entity/DamageEntityEvent.java | 4 +- .../api/event/entity/DestructEntityEvent.java | 2 +- .../api/event/entity/InvokePortalEvent.java | 6 ++- .../event/impl/AbstractCompositeEvent.java | 24 +++++++++ .../impl/world/AbstractDetonateEvent.java | 2 +- .../api/event/message/PlayerChatEvent.java | 1 - .../network/ServerSideConnectionEvent.java | 2 +- .../event/world/ChangeWorldBorderEvent.java | 5 +- .../api/event/world/ExplosionEvent.java | 4 +- .../api/event/world/chunk/ChunkEvent.java | 2 +- .../item/recipe/crafting/RecipeResult.java | 2 +- .../api/world/WorldTypeTemplate.java | 2 + .../api/world/schematic/Schematic.java | 1 + 27 files changed, 149 insertions(+), 31 deletions(-) diff --git a/.checkstyle/checkstyle-suppressions.xml b/.checkstyle/checkstyle-suppressions.xml index 5c677e151a..2bf5687b5d 100644 --- a/.checkstyle/checkstyle-suppressions.xml +++ b/.checkstyle/checkstyle-suppressions.xml @@ -17,4 +17,5 @@ + diff --git a/.gitignore b/.gitignore index b394daef25..18d199dd0d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ dependency-reduced-pom.xml !.checkstyle/ # We exclude the generated events from git to avoid # temptation to edit said generated files. -src/main/generated/ +src/generated/ # Compiled # ############ diff --git a/build.gradle.kts b/build.gradle.kts index c1a495c3f6..d0b28de6af 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,6 @@ import net.ltgt.gradle.errorprone.errorprone import org.jetbrains.gradle.ext.delegateActions import org.jetbrains.gradle.ext.settings -import org.jetbrains.gradle.ext.taskTriggers plugins { @@ -18,7 +17,7 @@ plugins { // Enable event generation to be considered part of // the main source set -val generatedEventSourcesDir = project.file("src/main/generated") +val generatedEventSourcesDir = project.file("src/generated/java") val javaTarget: String by project val ap by sourceSets.registering { compileClasspath += sourceSets.main.get().compileClasspath + sourceSets.main.get().output @@ -44,7 +43,9 @@ tasks { sourceSets { main { - java.srcDirs(generatedEventSourcesDir) + java { + srcDirs(generatedEventSourcesDir) + } } } @@ -145,6 +146,13 @@ dependencies { testImplementation(libs.mockito) } +spotless { + java { + target("src/main/java/**/*.java") + targetExclude("src/gen/java/**/*.java") + } +} + tasks { compileJava { @@ -170,6 +178,15 @@ tasks { indraGit.applyVcsInformationToManifest(this) } } + checkstyleMain { + dependsOn(compileJava) + } + spotlessJava { + dependsOn(compileJava) + } + sourcesJar { + dependsOn(compileJava) + } withType(JavaCompile::class).configureEach { options.apply { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6b7e1acf2a..ce3398b856 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -37,8 +37,8 @@ guice = { module = "com.google.inject:guice", version.ref = "guice" } log4j-api = { module = "org.apache.logging.log4j:log4j-api", version.ref = "log4j" } math = { module = "org.spongepowered:math", version.ref = "math" } pluginSpi = { module = "org.spongepowered:plugin-spi", version.ref = "pluginSpi" } -eventImplGen-processor = {module = "org.spongepowered:event-impl-gen", version = "8.0.0-SNAPSHOT"} -eventImplGen-annotations = { module = "org.spongepowered:event-impl-gen-annotations", version = "8.0.0-SNAPSHOT"} +eventImplGen-processor = {module = "org.spongepowered:event-impl-gen", version = "8.0.0"} +eventImplGen-annotations = { module = "org.spongepowered:event-impl-gen-annotations", version = "8.0.0"} # build-time/annotations diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 8fabcce1d8..b8f1d59684 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -3,10 +3,6 @@ true false - - - - @@ -272,6 +268,14 @@ + + + + + + + + @@ -569,6 +573,14 @@ + + + + + + + + @@ -1552,6 +1564,9 @@ + + + @@ -1810,6 +1825,14 @@ + + + + + + + + @@ -2134,6 +2157,25 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/spongepowered/api/data/DataManipulator.java b/src/main/java/org/spongepowered/api/data/DataManipulator.java index ed41c99ac1..e70aba2b52 100644 --- a/src/main/java/org/spongepowered/api/data/DataManipulator.java +++ b/src/main/java/org/spongepowered/api/data/DataManipulator.java @@ -30,8 +30,8 @@ import org.spongepowered.api.data.value.Value; import org.spongepowered.api.data.value.ValueContainer; import org.spongepowered.api.entity.Entity; -import org.spongepowered.eventgen.annotations.TransformWith; import org.spongepowered.api.world.World; +import org.spongepowered.eventgen.annotations.TransformWith; import java.util.Arrays; import java.util.Objects; diff --git a/src/main/java/org/spongepowered/api/entity/living/monster/zombie/Zombie.java b/src/main/java/org/spongepowered/api/entity/living/monster/zombie/Zombie.java index 12a8bf17bd..17aaa51335 100644 --- a/src/main/java/org/spongepowered/api/entity/living/monster/zombie/Zombie.java +++ b/src/main/java/org/spongepowered/api/entity/living/monster/zombie/Zombie.java @@ -38,6 +38,7 @@ public interface Zombie extends Monster { * * @return Whether this zombie is an adult or not */ + @Override default Value.Mutable adult() { return this.requireValue(Keys.IS_ADULT).asMutable(); } diff --git a/src/main/java/org/spongepowered/api/event/CompositeEvent.java b/src/main/java/org/spongepowered/api/event/CompositeEvent.java index 8bd53dd817..5fa4a10819 100644 --- a/src/main/java/org/spongepowered/api/event/CompositeEvent.java +++ b/src/main/java/org/spongepowered/api/event/CompositeEvent.java @@ -1,3 +1,27 @@ +/* + * This file is part of SpongeAPI, licensed under the MIT License (MIT). + * + * Copyright (c) SpongePowered + * 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.event; import org.spongepowered.api.event.impl.AbstractCompositeEvent; diff --git a/src/main/java/org/spongepowered/api/event/action/CollideEvent.java b/src/main/java/org/spongepowered/api/event/action/CollideEvent.java index 04c73854ac..31dae13241 100644 --- a/src/main/java/org/spongepowered/api/event/action/CollideEvent.java +++ b/src/main/java/org/spongepowered/api/event/action/CollideEvent.java @@ -28,8 +28,8 @@ import org.spongepowered.api.entity.Entity; import org.spongepowered.api.event.Cancellable; import org.spongepowered.api.event.Event; -import org.spongepowered.eventgen.annotations.NoFactoryMethod; import org.spongepowered.api.world.server.ServerLocation; +import org.spongepowered.eventgen.annotations.NoFactoryMethod; /** * Fired when an {@link Entity} or {@link BlockSnapshot} collide with each other. diff --git a/src/main/java/org/spongepowered/api/event/block/InteractBlockEvent.java b/src/main/java/org/spongepowered/api/event/block/InteractBlockEvent.java index bac5293da0..4ad061e14f 100644 --- a/src/main/java/org/spongepowered/api/event/block/InteractBlockEvent.java +++ b/src/main/java/org/spongepowered/api/event/block/InteractBlockEvent.java @@ -35,9 +35,9 @@ import org.spongepowered.api.item.inventory.ItemStack; import org.spongepowered.api.util.Direction; import org.spongepowered.api.util.Tristate; +import org.spongepowered.api.world.server.ServerLocation; import org.spongepowered.eventgen.annotations.GenerateFactoryMethod; import org.spongepowered.eventgen.annotations.ImplementedBy; -import org.spongepowered.api.world.server.ServerLocation; import org.spongepowered.math.vector.Vector3d; /** diff --git a/src/main/java/org/spongepowered/api/event/block/ScheduleBlockUpdateEvent.java b/src/main/java/org/spongepowered/api/event/block/ScheduleBlockUpdateEvent.java index ac3fb5f782..0b4a5f748b 100644 --- a/src/main/java/org/spongepowered/api/event/block/ScheduleBlockUpdateEvent.java +++ b/src/main/java/org/spongepowered/api/event/block/ScheduleBlockUpdateEvent.java @@ -37,7 +37,7 @@ * Fired when a {@link ScheduledUpdate scheduled block update} * is being proposed to the engine. */ -public interface ScheduleBlockUpdateEvent extends GenericEvent, Cancellable { +public interface ScheduleBlockUpdateEvent extends GenericEvent, Cancellable { /** * Gets a list of the {@link ScheduleUpdateTicket}s for this event. diff --git a/src/main/java/org/spongepowered/api/event/entity/AffectEntityEvent.java b/src/main/java/org/spongepowered/api/event/entity/AffectEntityEvent.java index dafe15f018..b18526af11 100644 --- a/src/main/java/org/spongepowered/api/event/entity/AffectEntityEvent.java +++ b/src/main/java/org/spongepowered/api/event/entity/AffectEntityEvent.java @@ -30,11 +30,11 @@ import org.spongepowered.api.event.Event; import org.spongepowered.api.event.Order; import org.spongepowered.api.event.impl.entity.AbstractAffectEntityEvent; +import org.spongepowered.api.world.explosion.Explosion; +import org.spongepowered.api.world.server.ServerLocation; import org.spongepowered.eventgen.annotations.ImplementedBy; import org.spongepowered.eventgen.annotations.NoFactoryMethod; import org.spongepowered.eventgen.annotations.PropertySettings; -import org.spongepowered.api.world.explosion.Explosion; -import org.spongepowered.api.world.server.ServerLocation; import java.util.List; import java.util.function.Predicate; diff --git a/src/main/java/org/spongepowered/api/event/entity/AttackEntityEvent.java b/src/main/java/org/spongepowered/api/event/entity/AttackEntityEvent.java index b5f17d4c7b..730037117d 100644 --- a/src/main/java/org/spongepowered/api/event/entity/AttackEntityEvent.java +++ b/src/main/java/org/spongepowered/api/event/entity/AttackEntityEvent.java @@ -45,11 +45,11 @@ import org.spongepowered.api.item.inventory.ItemStack; import org.spongepowered.api.item.inventory.ItemStackSnapshot; import org.spongepowered.api.util.Tuple; -import org.spongepowered.eventgen.annotations.ImplementedBy; -import org.spongepowered.eventgen.annotations.PropertySettings; import org.spongepowered.api.world.World; import org.spongepowered.api.world.difficulty.Difficulties; import org.spongepowered.api.world.difficulty.Difficulty; +import org.spongepowered.eventgen.annotations.ImplementedBy; +import org.spongepowered.eventgen.annotations.PropertySettings; import java.util.List; import java.util.Map; diff --git a/src/main/java/org/spongepowered/api/event/entity/ChangeEntityWorldEvent.java b/src/main/java/org/spongepowered/api/event/entity/ChangeEntityWorldEvent.java index 48e489f971..55ced7a4ac 100644 --- a/src/main/java/org/spongepowered/api/event/entity/ChangeEntityWorldEvent.java +++ b/src/main/java/org/spongepowered/api/event/entity/ChangeEntityWorldEvent.java @@ -27,8 +27,8 @@ import org.spongepowered.api.entity.Entity; import org.spongepowered.api.event.Cancellable; import org.spongepowered.api.event.Event; -import org.spongepowered.eventgen.annotations.AbsoluteSortPosition; import org.spongepowered.api.world.server.ServerWorld; +import org.spongepowered.eventgen.annotations.AbsoluteSortPosition; /** * Called when an {@link Entity} is changing {@link ServerWorld worlds}. diff --git a/src/main/java/org/spongepowered/api/event/entity/DamageEntityEvent.java b/src/main/java/org/spongepowered/api/event/entity/DamageEntityEvent.java index 66827f2c45..5854bdcc90 100644 --- a/src/main/java/org/spongepowered/api/event/entity/DamageEntityEvent.java +++ b/src/main/java/org/spongepowered/api/event/entity/DamageEntityEvent.java @@ -42,11 +42,11 @@ import org.spongepowered.api.item.ItemTypes; import org.spongepowered.api.item.inventory.ItemStack; import org.spongepowered.api.util.Tuple; -import org.spongepowered.eventgen.annotations.ImplementedBy; -import org.spongepowered.eventgen.annotations.PropertySettings; import org.spongepowered.api.world.World; import org.spongepowered.api.world.difficulty.Difficulties; import org.spongepowered.api.world.difficulty.Difficulty; +import org.spongepowered.eventgen.annotations.ImplementedBy; +import org.spongepowered.eventgen.annotations.PropertySettings; import java.util.List; import java.util.Map; diff --git a/src/main/java/org/spongepowered/api/event/entity/DestructEntityEvent.java b/src/main/java/org/spongepowered/api/event/entity/DestructEntityEvent.java index e1e00f2651..853ba04ef8 100644 --- a/src/main/java/org/spongepowered/api/event/entity/DestructEntityEvent.java +++ b/src/main/java/org/spongepowered/api/event/entity/DestructEntityEvent.java @@ -29,8 +29,8 @@ import org.spongepowered.api.event.Cancellable; import org.spongepowered.api.event.message.AudienceMessageEvent; import org.spongepowered.api.event.message.MessageCancellable; -import org.spongepowered.eventgen.annotations.GenerateFactoryMethod; import org.spongepowered.api.world.gamerule.GameRules; +import org.spongepowered.eventgen.annotations.GenerateFactoryMethod; /** * An event where the {@link Entity} is being either removed usually due to diff --git a/src/main/java/org/spongepowered/api/event/entity/InvokePortalEvent.java b/src/main/java/org/spongepowered/api/event/entity/InvokePortalEvent.java index a9deb7d81f..e2e27b0a74 100644 --- a/src/main/java/org/spongepowered/api/event/entity/InvokePortalEvent.java +++ b/src/main/java/org/spongepowered/api/event/entity/InvokePortalEvent.java @@ -27,9 +27,10 @@ import org.spongepowered.api.entity.Entity; import org.spongepowered.api.event.Cancellable; import org.spongepowered.api.event.Event; +import org.spongepowered.api.world.portal.PortalLogic; import org.spongepowered.eventgen.annotations.AbsoluteSortPosition; +import org.spongepowered.eventgen.annotations.GenerateFactoryMethod; import org.spongepowered.eventgen.annotations.NoFactoryMethod; -import org.spongepowered.api.world.portal.PortalLogic; import org.spongepowered.math.vector.Vector3d; import java.util.Optional; @@ -59,6 +60,7 @@ public interface InvokePortalEvent extends Event { * Called when entering a portal. * Cancel to prevent portal effects. */ + @GenerateFactoryMethod interface Enter extends InvokePortalEvent, Cancellable { /** @@ -88,6 +90,7 @@ interface Enter extends InvokePortalEvent, Cancellable { * Canceling resets the portal transition time * Setting custom portal logic can change the teleport behaviour. */ + @GenerateFactoryMethod interface Prepare extends InvokePortalEvent, Cancellable { /** @@ -102,6 +105,7 @@ interface Prepare extends InvokePortalEvent, Cancellable { * Called after a {@link PortalLogic} calculated and found or generated the portal exit. * Note that {@link ChangeEntityWorldEvent} still fire after this. */ + @GenerateFactoryMethod interface Execute extends InvokePortalEvent, ChangeEntityWorldEvent.Reposition, RotateEntityEvent { /** diff --git a/src/main/java/org/spongepowered/api/event/impl/AbstractCompositeEvent.java b/src/main/java/org/spongepowered/api/event/impl/AbstractCompositeEvent.java index 22db9c2791..cc4389429f 100644 --- a/src/main/java/org/spongepowered/api/event/impl/AbstractCompositeEvent.java +++ b/src/main/java/org/spongepowered/api/event/impl/AbstractCompositeEvent.java @@ -1,3 +1,27 @@ +/* + * This file is part of SpongeAPI, licensed under the MIT License (MIT). + * + * Copyright (c) SpongePowered + * 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.event.impl; import org.spongepowered.api.event.Cancellable; diff --git a/src/main/java/org/spongepowered/api/event/impl/world/AbstractDetonateEvent.java b/src/main/java/org/spongepowered/api/event/impl/world/AbstractDetonateEvent.java index 7754b29d43..e88affc0d6 100644 --- a/src/main/java/org/spongepowered/api/event/impl/world/AbstractDetonateEvent.java +++ b/src/main/java/org/spongepowered/api/event/impl/world/AbstractDetonateEvent.java @@ -26,8 +26,8 @@ import org.spongepowered.api.event.impl.entity.AbstractAffectEntityEvent; import org.spongepowered.api.event.world.ExplosionEvent; -import org.spongepowered.eventgen.annotations.UseField; import org.spongepowered.api.world.server.ServerLocation; +import org.spongepowered.eventgen.annotations.UseField; import java.util.Collections; import java.util.List; diff --git a/src/main/java/org/spongepowered/api/event/message/PlayerChatEvent.java b/src/main/java/org/spongepowered/api/event/message/PlayerChatEvent.java index 1634ad55e2..2aa914a35e 100644 --- a/src/main/java/org/spongepowered/api/event/message/PlayerChatEvent.java +++ b/src/main/java/org/spongepowered/api/event/message/PlayerChatEvent.java @@ -30,7 +30,6 @@ import org.spongepowered.api.event.Cancellable; import org.spongepowered.api.event.Cause; import org.spongepowered.api.registry.RegistryReference; -import org.spongepowered.eventgen.annotations.NoFactoryMethod; import java.util.Optional; import java.util.function.Predicate; diff --git a/src/main/java/org/spongepowered/api/event/network/ServerSideConnectionEvent.java b/src/main/java/org/spongepowered/api/event/network/ServerSideConnectionEvent.java index 427deed856..e9fc2bb233 100644 --- a/src/main/java/org/spongepowered/api/event/network/ServerSideConnectionEvent.java +++ b/src/main/java/org/spongepowered/api/event/network/ServerSideConnectionEvent.java @@ -39,9 +39,9 @@ import org.spongepowered.api.profile.GameProfile; import org.spongepowered.api.service.ban.BanService; import org.spongepowered.api.service.whitelist.WhitelistService; -import org.spongepowered.eventgen.annotations.NoFactoryMethod; import org.spongepowered.api.world.server.ServerLocation; import org.spongepowered.api.world.server.ServerWorld; +import org.spongepowered.eventgen.annotations.NoFactoryMethod; import org.spongepowered.math.vector.Vector3d; import java.net.InetAddress; diff --git a/src/main/java/org/spongepowered/api/event/world/ChangeWorldBorderEvent.java b/src/main/java/org/spongepowered/api/event/world/ChangeWorldBorderEvent.java index 8d1cac64bd..92077ea3d1 100644 --- a/src/main/java/org/spongepowered/api/event/world/ChangeWorldBorderEvent.java +++ b/src/main/java/org/spongepowered/api/event/world/ChangeWorldBorderEvent.java @@ -27,9 +27,10 @@ import org.spongepowered.api.entity.living.player.server.ServerPlayer; import org.spongepowered.api.event.Cancellable; import org.spongepowered.api.event.Event; -import org.spongepowered.eventgen.annotations.NoFactoryMethod; import org.spongepowered.api.world.border.WorldBorder; import org.spongepowered.api.world.server.ServerWorld; +import org.spongepowered.eventgen.annotations.GenerateFactoryMethod; +import org.spongepowered.eventgen.annotations.NoFactoryMethod; import java.util.Optional; @@ -78,6 +79,7 @@ public interface ChangeWorldBorderEvent extends Event, Cancellable { /** * Fired when a value on a world's {@link WorldBorder} is changed. */ + @GenerateFactoryMethod interface World extends ChangeWorldBorderEvent { /** @@ -93,6 +95,7 @@ interface World extends ChangeWorldBorderEvent { * An event that is fired when a player's world border is changed. This may * also be fired when a player's border is set or unset. */ + @GenerateFactoryMethod interface Player extends ChangeWorldBorderEvent { /** diff --git a/src/main/java/org/spongepowered/api/event/world/ExplosionEvent.java b/src/main/java/org/spongepowered/api/event/world/ExplosionEvent.java index f27fdead9c..af247cb017 100644 --- a/src/main/java/org/spongepowered/api/event/world/ExplosionEvent.java +++ b/src/main/java/org/spongepowered/api/event/world/ExplosionEvent.java @@ -28,12 +28,12 @@ import org.spongepowered.api.event.Event; import org.spongepowered.api.event.entity.AffectEntityEvent; import org.spongepowered.api.event.impl.world.AbstractDetonateEvent; -import org.spongepowered.eventgen.annotations.ImplementedBy; -import org.spongepowered.eventgen.annotations.PropertySettings; import org.spongepowered.api.world.World; import org.spongepowered.api.world.explosion.Explosion; import org.spongepowered.api.world.server.ServerLocation; import org.spongepowered.api.world.server.ServerWorld; +import org.spongepowered.eventgen.annotations.ImplementedBy; +import org.spongepowered.eventgen.annotations.PropertySettings; import java.util.List; import java.util.function.Predicate; diff --git a/src/main/java/org/spongepowered/api/event/world/chunk/ChunkEvent.java b/src/main/java/org/spongepowered/api/event/world/chunk/ChunkEvent.java index 5c26ae49b7..2251db3a11 100644 --- a/src/main/java/org/spongepowered/api/event/world/chunk/ChunkEvent.java +++ b/src/main/java/org/spongepowered/api/event/world/chunk/ChunkEvent.java @@ -27,13 +27,13 @@ import org.spongepowered.api.ResourceKey; import org.spongepowered.api.event.Cancellable; import org.spongepowered.api.event.Event; -import org.spongepowered.eventgen.annotations.NoFactoryMethod; import org.spongepowered.api.world.World; import org.spongepowered.api.world.chunk.BlockChunk; import org.spongepowered.api.world.chunk.Chunk; import org.spongepowered.api.world.chunk.EntityChunk; import org.spongepowered.api.world.chunk.WorldChunk; import org.spongepowered.api.world.server.ServerWorld; +import org.spongepowered.eventgen.annotations.NoFactoryMethod; import org.spongepowered.math.vector.Vector3i; public interface ChunkEvent extends Event { diff --git a/src/main/java/org/spongepowered/api/item/recipe/crafting/RecipeResult.java b/src/main/java/org/spongepowered/api/item/recipe/crafting/RecipeResult.java index 489eadcbf0..9b681b2d36 100644 --- a/src/main/java/org/spongepowered/api/item/recipe/crafting/RecipeResult.java +++ b/src/main/java/org/spongepowered/api/item/recipe/crafting/RecipeResult.java @@ -45,7 +45,7 @@ public final class RecipeResult { */ @Deprecated(forRemoval = true) public RecipeResult(ItemStackSnapshot result, List remainingItems) { - this((ItemStackLike) result, (List) remainingItems); + this(result, (List) remainingItems); } /** diff --git a/src/main/java/org/spongepowered/api/world/WorldTypeTemplate.java b/src/main/java/org/spongepowered/api/world/WorldTypeTemplate.java index dbf335ea1b..ed35998388 100644 --- a/src/main/java/org/spongepowered/api/world/WorldTypeTemplate.java +++ b/src/main/java/org/spongepowered/api/world/WorldTypeTemplate.java @@ -70,10 +70,12 @@ interface Builder extends DataPackEntryBuilder pack); } diff --git a/src/main/java/org/spongepowered/api/world/schematic/Schematic.java b/src/main/java/org/spongepowered/api/world/schematic/Schematic.java index 5ce9b7d028..6843f01628 100644 --- a/src/main/java/org/spongepowered/api/world/schematic/Schematic.java +++ b/src/main/java/org/spongepowered/api/world/schematic/Schematic.java @@ -67,6 +67,7 @@ static Builder builder() { * * @return The block palette */ + @Override Palette blockPalette(); /**