diff --git a/deprecated/fabric-command-api-v1/src/main/resources/fabric.mod.json b/deprecated/fabric-command-api-v1/src/main/resources/fabric.mod.json index 1abc3af83..c200b0b80 100644 --- a/deprecated/fabric-command-api-v1/src/main/resources/fabric.mod.json +++ b/deprecated/fabric-command-api-v1/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.10.5", + "fabricloader": ">=0.15.1", "fabric-api-base": "*", "fabric-command-api-v2": "*" }, diff --git a/deprecated/fabric-commands-v0/src/main/resources/fabric.mod.json b/deprecated/fabric-commands-v0/src/main/resources/fabric.mod.json index 4e7ad0c22..5545d6658 100644 --- a/deprecated/fabric-commands-v0/src/main/resources/fabric.mod.json +++ b/deprecated/fabric-commands-v0/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.4.0", + "fabricloader": ">=0.15.1", "fabric-api-base": "*", "fabric-command-api-v2": "*" }, diff --git a/deprecated/fabric-containers-v0/src/main/resources/fabric-containers-v0.accurate.mixins.json b/deprecated/fabric-containers-v0/src/main/resources/fabric-containers-v0.accurate.mixins.json index 3515def9a..3a6099a21 100644 --- a/deprecated/fabric-containers-v0/src/main/resources/fabric-containers-v0.accurate.mixins.json +++ b/deprecated/fabric-containers-v0/src/main/resources/fabric-containers-v0.accurate.mixins.json @@ -1,7 +1,7 @@ { "required": false, "package": "net.fabricmc.fabric.mixin.container", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "ServerPlayerEntityMixin" ], diff --git a/deprecated/fabric-containers-v0/src/main/resources/fabric-containers-v0.mixins.json b/deprecated/fabric-containers-v0/src/main/resources/fabric-containers-v0.mixins.json index 8fa0d48ca..5786e355b 100644 --- a/deprecated/fabric-containers-v0/src/main/resources/fabric-containers-v0.mixins.json +++ b/deprecated/fabric-containers-v0/src/main/resources/fabric-containers-v0.mixins.json @@ -1,7 +1,7 @@ { "required": false, "package": "net.fabricmc.fabric.mixin.container", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "ServerPlayerEntityAccessor" ], diff --git a/deprecated/fabric-containers-v0/src/main/resources/fabric.mod.json b/deprecated/fabric-containers-v0/src/main/resources/fabric.mod.json index 5866b8ac7..3470cd7e4 100644 --- a/deprecated/fabric-containers-v0/src/main/resources/fabric.mod.json +++ b/deprecated/fabric-containers-v0/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.4.0", + "fabricloader": ">=0.15.1", "fabric-api-base": "*", "fabric-networking-api-v1": "*" }, diff --git a/deprecated/fabric-events-lifecycle-v0/src/main/resources/fabric.mod.json b/deprecated/fabric-events-lifecycle-v0/src/main/resources/fabric.mod.json index 3ee070ee7..961908044 100644 --- a/deprecated/fabric-events-lifecycle-v0/src/main/resources/fabric.mod.json +++ b/deprecated/fabric-events-lifecycle-v0/src/main/resources/fabric.mod.json @@ -24,7 +24,7 @@ ] }, "depends": { - "fabricloader": ">=0.4.0", + "fabricloader": ">=0.15.1", "fabric-api-base": "*", "fabric-item-api-v1": "*", "fabric-lifecycle-events-v1": "*" diff --git a/deprecated/fabric-keybindings-v0/src/client/resources/fabric.mod.json b/deprecated/fabric-keybindings-v0/src/client/resources/fabric.mod.json index c35c67374..5a762a586 100644 --- a/deprecated/fabric-keybindings-v0/src/client/resources/fabric.mod.json +++ b/deprecated/fabric-keybindings-v0/src/client/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.4.0", + "fabricloader": ">=0.15.1", "fabric-key-binding-api-v1": "*" }, "description": "Keybinding registry API.", diff --git a/deprecated/fabric-models-v0/src/client/resources/fabric.mod.json b/deprecated/fabric-models-v0/src/client/resources/fabric.mod.json index ced3a503e..6621fa5a9 100644 --- a/deprecated/fabric-models-v0/src/client/resources/fabric.mod.json +++ b/deprecated/fabric-models-v0/src/client/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.4.0", + "fabricloader": ">=0.15.1", "fabric-api-base": "*", "fabric-model-loading-api-v1": "*" }, diff --git a/deprecated/fabric-renderer-registries-v1/src/client/resources/fabric.mod.json b/deprecated/fabric-renderer-registries-v1/src/client/resources/fabric.mod.json index 4fafae95c..f68a42437 100644 --- a/deprecated/fabric-renderer-registries-v1/src/client/resources/fabric.mod.json +++ b/deprecated/fabric-renderer-registries-v1/src/client/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.4.0", + "fabricloader": ">=0.15.1", "minecraft": ">=1.15-alpha.19.39.a", "fabric-api-base": "*", "fabric-rendering-v1": "*" diff --git a/deprecated/fabric-rendering-data-attachment-v1/src/main/resources/fabric.mod.json b/deprecated/fabric-rendering-data-attachment-v1/src/main/resources/fabric.mod.json index bcd623857..585a12d09 100644 --- a/deprecated/fabric-rendering-data-attachment-v1/src/main/resources/fabric.mod.json +++ b/deprecated/fabric-rendering-data-attachment-v1/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.4.0", + "fabricloader": ">=0.15.1", "fabric-block-view-api-v2": "*" }, "description": "Thread-safe hooks for block entity data use during terrain rendering.", diff --git a/deprecated/fabric-rendering-v0/src/client/resources/fabric.mod.json b/deprecated/fabric-rendering-v0/src/client/resources/fabric.mod.json index 257a2ca19..87bf009fc 100644 --- a/deprecated/fabric-rendering-v0/src/client/resources/fabric.mod.json +++ b/deprecated/fabric-rendering-v0/src/client/resources/fabric.mod.json @@ -21,7 +21,7 @@ ] }, "depends": { - "fabricloader": ">=0.4.0", + "fabricloader": ">=0.15.1", "minecraft": ">=1.15-alpha.19.39.a", "fabric-api-base": "*", "fabric-rendering-v1": "*" diff --git a/fabric-api-base/src/main/resources/fabric.mod.json b/fabric-api-base/src/main/resources/fabric.mod.json index 7fda5d59f..25b831f6a 100644 --- a/fabric-api-base/src/main/resources/fabric.mod.json +++ b/fabric-api-base/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.4.0" + "fabricloader": ">=0.15.1" }, "description": "Contains the essentials for Fabric API modules.", "custom": { diff --git a/fabric-api-lookup-api-v1/src/main/resources/fabric-api-lookup-api-v1.mixins.json b/fabric-api-lookup-api-v1/src/main/resources/fabric-api-lookup-api-v1.mixins.json index a0af3ad08..327b248b1 100644 --- a/fabric-api-lookup-api-v1/src/main/resources/fabric-api-lookup-api-v1.mixins.json +++ b/fabric-api-lookup-api-v1/src/main/resources/fabric-api-lookup-api-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.lookup", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "BlockEntityTypeAccessor", "ServerWorldMixin" diff --git a/fabric-api-lookup-api-v1/src/main/resources/fabric.mod.json b/fabric-api-lookup-api-v1/src/main/resources/fabric.mod.json index b73a524f1..d4064754e 100644 --- a/fabric-api-lookup-api-v1/src/main/resources/fabric.mod.json +++ b/fabric-api-lookup-api-v1/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.9.2", + "fabricloader": ">=0.15.1", "fabric-api-base": "*", "fabric-lifecycle-events-v1": "*" }, diff --git a/fabric-biome-api-v1/src/main/resources/fabric-biome-api-v1.mixins.json b/fabric-biome-api-v1/src/main/resources/fabric-biome-api-v1.mixins.json index d5c5ba7fe..e45d15408 100644 --- a/fabric-biome-api-v1/src/main/resources/fabric-biome-api-v1.mixins.json +++ b/fabric-biome-api-v1/src/main/resources/fabric-biome-api-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.biome", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "BiomeSourceMixin", "ChunkNoiseSamplerMixin", diff --git a/fabric-biome-api-v1/src/main/resources/fabric.mod.json b/fabric-biome-api-v1/src/main/resources/fabric.mod.json index d73bb3729..4a9046157 100644 --- a/fabric-biome-api-v1/src/main/resources/fabric.mod.json +++ b/fabric-biome-api-v1/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.9.2", + "fabricloader": ">=0.15.1", "minecraft": ">=1.16.2" }, "description": "Hooks for adding biomes to the default world generator.", diff --git a/fabric-block-api-v1/src/main/resources/fabric.mod.json b/fabric-block-api-v1/src/main/resources/fabric.mod.json index 140166cb3..a6d18f70d 100644 --- a/fabric-block-api-v1/src/main/resources/fabric.mod.json +++ b/fabric-block-api-v1/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.14.9" + "fabricloader": ">=0.15.1" }, "entrypoints": { }, diff --git a/fabric-block-view-api-v2/src/main/resources/fabric.mod.json b/fabric-block-view-api-v2/src/main/resources/fabric.mod.json index 63d06cb7c..4d27a79da 100644 --- a/fabric-block-view-api-v2/src/main/resources/fabric.mod.json +++ b/fabric-block-view-api-v2/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.14.21" + "fabricloader": ">=0.15.1" }, "description": "Hooks for block views", "mixins": [ diff --git a/fabric-blockrenderlayer-v1/src/client/resources/fabric-blockrenderlayer-v1.mixins.json b/fabric-blockrenderlayer-v1/src/client/resources/fabric-blockrenderlayer-v1.mixins.json index e8d3e2647..eec9c63b2 100644 --- a/fabric-blockrenderlayer-v1/src/client/resources/fabric-blockrenderlayer-v1.mixins.json +++ b/fabric-blockrenderlayer-v1/src/client/resources/fabric-blockrenderlayer-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.blockrenderlayer", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "client": [ "RenderLayersMixin" ], diff --git a/fabric-blockrenderlayer-v1/src/client/resources/fabric.mod.json b/fabric-blockrenderlayer-v1/src/client/resources/fabric.mod.json index 12ec985b7..4955ac1a3 100644 --- a/fabric-blockrenderlayer-v1/src/client/resources/fabric.mod.json +++ b/fabric-blockrenderlayer-v1/src/client/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.6.2", + "fabricloader": ">=0.15.1", "minecraft": ">=1.15-alpha.19.38.b", "fabric-api-base": "*" }, diff --git a/fabric-client-tags-api-v1/src/client/resources/fabric.mod.json b/fabric-client-tags-api-v1/src/client/resources/fabric.mod.json index 504cd5b81..f573a4494 100644 --- a/fabric-client-tags-api-v1/src/client/resources/fabric.mod.json +++ b/fabric-client-tags-api-v1/src/client/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.14.6" + "fabricloader": ">=0.15.1" }, "description": "Adds the ability to load tags from the local mods.", "custom": { diff --git a/fabric-command-api-v2/src/client/resources/fabric-command-api-v2.client.mixins.json b/fabric-command-api-v2/src/client/resources/fabric-command-api-v2.client.mixins.json index 2eef11336..441344089 100644 --- a/fabric-command-api-v2/src/client/resources/fabric-command-api-v2.client.mixins.json +++ b/fabric-command-api-v2/src/client/resources/fabric-command-api-v2.client.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.command.client", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "client": [ "ClientCommandSourceMixin", "ClientPlayNetworkHandlerMixin" diff --git a/fabric-command-api-v2/src/main/resources/fabric-command-api-v2.mixins.json b/fabric-command-api-v2/src/main/resources/fabric-command-api-v2.mixins.json index 0117a3d14..bb264c0ce 100644 --- a/fabric-command-api-v2/src/main/resources/fabric-command-api-v2.mixins.json +++ b/fabric-command-api-v2/src/main/resources/fabric-command-api-v2.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.command", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "ArgumentTypesAccessor", "CommandManagerMixin", diff --git a/fabric-command-api-v2/src/main/resources/fabric.mod.json b/fabric-command-api-v2/src/main/resources/fabric.mod.json index 45e4ee7f9..274041e67 100644 --- a/fabric-command-api-v2/src/main/resources/fabric.mod.json +++ b/fabric-command-api-v2/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.10.5", + "fabricloader": ">=0.15.1", "fabric-api-base": "*", "minecraft": ">1.19-alpha.22.11.a" }, diff --git a/fabric-content-registries-v0/src/main/resources/fabric-content-registries-v0.mixins.json b/fabric-content-registries-v0/src/main/resources/fabric-content-registries-v0.mixins.json index 65fc58d41..14122682a 100644 --- a/fabric-content-registries-v0/src/main/resources/fabric-content-registries-v0.mixins.json +++ b/fabric-content-registries-v0/src/main/resources/fabric-content-registries-v0.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.content.registry", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "AxeItemAccessor", "FarmerWorkTaskAccessor", diff --git a/fabric-content-registries-v0/src/main/resources/fabric.mod.json b/fabric-content-registries-v0/src/main/resources/fabric.mod.json index 4d3f55ecd..f61dffd5a 100644 --- a/fabric-content-registries-v0/src/main/resources/fabric.mod.json +++ b/fabric-content-registries-v0/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.12.0", + "fabricloader": ">=0.15.1", "fabric-api-base": "*", "fabric-lifecycle-events-v1": "*", "fabric-resource-loader-v0": "*" diff --git a/fabric-convention-tags-v1/src/datagen/resources/fabric.mod.json b/fabric-convention-tags-v1/src/datagen/resources/fabric.mod.json index 613990364..17b95ff7c 100644 --- a/fabric-convention-tags-v1/src/datagen/resources/fabric.mod.json +++ b/fabric-convention-tags-v1/src/datagen/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.4.0", + "fabricloader": ">=0.15.1", "minecraft": ">=1.18.2" }, "description": "Contains common tags used by mods for vanilla things.", diff --git a/fabric-convention-tags-v1/src/main/resources/fabric.mod.json b/fabric-convention-tags-v1/src/main/resources/fabric.mod.json index 9fd425d38..71703332a 100644 --- a/fabric-convention-tags-v1/src/main/resources/fabric.mod.json +++ b/fabric-convention-tags-v1/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.4.0", + "fabricloader": ">=0.15.1", "minecraft": ">=1.18.2" }, "description": "Contains common tags used by mods for vanilla things.", diff --git a/fabric-crash-report-info-v1/src/main/resources/fabric-crash-report-info-v1.mixins.json b/fabric-crash-report-info-v1/src/main/resources/fabric-crash-report-info-v1.mixins.json index 850517f4d..d29bd2c05 100644 --- a/fabric-crash-report-info-v1/src/main/resources/fabric-crash-report-info-v1.mixins.json +++ b/fabric-crash-report-info-v1/src/main/resources/fabric-crash-report-info-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.crash.report.info", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "SystemDetailsMixin" ], diff --git a/fabric-crash-report-info-v1/src/main/resources/fabric.mod.json b/fabric-crash-report-info-v1/src/main/resources/fabric.mod.json index e63510a6d..a68cbd7a0 100644 --- a/fabric-crash-report-info-v1/src/main/resources/fabric.mod.json +++ b/fabric-crash-report-info-v1/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.13.0" + "fabricloader": ">=0.15.1" }, "description": "Adds Fabric-related debug info to crash reports.", "mixins": [ diff --git a/fabric-data-generation-api-v1/src/client/resources/fabric-data-generation-api-v1.client.mixins.json b/fabric-data-generation-api-v1/src/client/resources/fabric-data-generation-api-v1.client.mixins.json index e43f22c7f..8e1924f58 100644 --- a/fabric-data-generation-api-v1/src/client/resources/fabric-data-generation-api-v1.client.mixins.json +++ b/fabric-data-generation-api-v1/src/client/resources/fabric-data-generation-api-v1.client.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.datagen.client", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "client": [ "MinecraftClientMixin" ], diff --git a/fabric-data-generation-api-v1/src/main/resources/fabric-data-generation-api-v1.mixins.json b/fabric-data-generation-api-v1/src/main/resources/fabric-data-generation-api-v1.mixins.json index 156a3c9dc..76fd2a15b 100644 --- a/fabric-data-generation-api-v1/src/main/resources/fabric-data-generation-api-v1.mixins.json +++ b/fabric-data-generation-api-v1/src/main/resources/fabric-data-generation-api-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.datagen", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "loot.BlockLootTableGeneratorMixin", "DataProviderMixin", diff --git a/fabric-data-generation-api-v1/src/main/resources/fabric.mod.json b/fabric-data-generation-api-v1/src/main/resources/fabric.mod.json index c8cf3e1c9..b147289ee 100644 --- a/fabric-data-generation-api-v1/src/main/resources/fabric.mod.json +++ b/fabric-data-generation-api-v1/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.14.10" + "fabricloader": ">=0.15.1" }, "description": "Allows for automatic data generation.", "mixins": [ diff --git a/fabric-dimensions-v1/src/main/resources/fabric-dimensions-v1.mixins.json b/fabric-dimensions-v1/src/main/resources/fabric-dimensions-v1.mixins.json index 74f20a425..d8d121008 100644 --- a/fabric-dimensions-v1/src/main/resources/fabric-dimensions-v1.mixins.json +++ b/fabric-dimensions-v1/src/main/resources/fabric-dimensions-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.dimension", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "EntityMixin", "RegistryCodecsMixin", diff --git a/fabric-dimensions-v1/src/main/resources/fabric.mod.json b/fabric-dimensions-v1/src/main/resources/fabric.mod.json index 27e7d0b54..a8aad498b 100644 --- a/fabric-dimensions-v1/src/main/resources/fabric.mod.json +++ b/fabric-dimensions-v1/src/main/resources/fabric.mod.json @@ -15,7 +15,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.12.0", + "fabricloader": ">=0.15.1", "minecraft": ">=1.16-rc.3", "fabric-api-base": "*" }, diff --git a/fabric-entity-events-v1/src/client/resources/fabric-entity-events-v1.client.mixins.json b/fabric-entity-events-v1/src/client/resources/fabric-entity-events-v1.client.mixins.json index 1a757bafb..c4866c6e9 100644 --- a/fabric-entity-events-v1/src/client/resources/fabric-entity-events-v1.client.mixins.json +++ b/fabric-entity-events-v1/src/client/resources/fabric-entity-events-v1.client.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.client.entity.event", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "client": [ "elytra.ClientPlayerEntityMixin" ], diff --git a/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/mixin/entity/event/LivingEntityMixin.java b/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/mixin/entity/event/LivingEntityMixin.java index 58ba8dfec..71cfae28a 100644 --- a/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/mixin/entity/event/LivingEntityMixin.java +++ b/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/mixin/entity/event/LivingEntityMixin.java @@ -18,6 +18,9 @@ package net.fabricmc.fabric.mixin.entity.event; import java.util.Optional; +import com.llamalad7.mixinextras.injector.wrapoperation.Operation; +import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; +import com.llamalad7.mixinextras.sugar.Local; import org.jetbrains.annotations.Nullable; import org.spongepowered.asm.mixin.Dynamic; import org.spongepowered.asm.mixin.Mixin; @@ -28,7 +31,6 @@ import org.spongepowered.asm.mixin.injection.ModifyVariable; import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import org.spongepowered.asm.mixin.injection.callback.LocalCapture; import net.minecraft.block.BedBlock; import net.minecraft.block.BlockState; @@ -57,11 +59,11 @@ abstract class LivingEntityMixin { @Shadow public abstract Optional<BlockPos> getSleepingPosition(); - @Inject(method = "onDeath", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;onKilledOther(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;)Z", shift = At.Shift.AFTER), locals = LocalCapture.CAPTURE_FAILEXCEPTION) - private void onEntityKilledOther(DamageSource source, CallbackInfo ci, Entity attacker) { - // FIXME: Cannot use shadowed fields from supermixins - needs a fix so people can use fabric api in a dev environment even though this is fine in this repo and prod. - // A temporary fix is to just cast the mixin to LivingEntity and access the world field with a few ugly casts. - ServerEntityCombatEvents.AFTER_KILLED_OTHER_ENTITY.invoker().afterKilledOtherEntity((ServerWorld) ((LivingEntity) (Object) this).getWorld(), attacker, (LivingEntity) (Object) this); + @WrapOperation(method = "onDeath", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;onKilledOther(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;)Z")) + private boolean onEntityKilledOther(Entity entity, ServerWorld serverWorld, @Nullable LivingEntity attacker, Operation<Boolean> original) { + boolean result = original.call(entity, serverWorld, attacker); + ServerEntityCombatEvents.AFTER_KILLED_OTHER_ENTITY.invoker().afterKilledOtherEntity(serverWorld, entity, attacker); + return result; } @Inject(method = "onDeath", at = @At(value = "INVOKE", target = "net/minecraft/world/World.sendEntityStatus(Lnet/minecraft/entity/Entity;B)V")) @@ -107,8 +109,8 @@ abstract class LivingEntityMixin { } } - @Inject(method = "getSleepingDirection", at = @At("RETURN"), cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD) - private void onGetSleepingDirection(CallbackInfoReturnable<Direction> info, @Nullable BlockPos sleepingPos) { + @Inject(method = "getSleepingDirection", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/BedBlock;getDirection(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Direction;"), cancellable = true) + private void onGetSleepingDirection(CallbackInfoReturnable<Direction> info, @Local @Nullable BlockPos sleepingPos) { if (sleepingPos != null) { info.setReturnValue(EntitySleepEvents.MODIFY_SLEEPING_DIRECTION.invoker().modifySleepDirection((LivingEntity) (Object) this, sleepingPos, info.getReturnValue())); } diff --git a/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/mixin/entity/event/ServerPlayerEntityMixin.java b/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/mixin/entity/event/ServerPlayerEntityMixin.java index 4d8939dce..aa2662bcd 100644 --- a/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/mixin/entity/event/ServerPlayerEntityMixin.java +++ b/fabric-entity-events-v1/src/main/java/net/fabricmc/fabric/mixin/entity/event/ServerPlayerEntityMixin.java @@ -54,7 +54,7 @@ import net.fabricmc.fabric.api.entity.event.v1.ServerPlayerEvents; @Mixin(ServerPlayerEntity.class) abstract class ServerPlayerEntityMixin extends LivingEntityMixin { @Shadow - public abstract ServerWorld method_51469(); + public abstract ServerWorld getServerWorld(); /** * Minecraft by default does not call Entity#onKilledOther for a ServerPlayerEntity being killed. @@ -67,8 +67,8 @@ abstract class ServerPlayerEntityMixin extends LivingEntityMixin { // If the damage source that killed the player was an entity, then fire the event. if (attacker != null) { - attacker.onKilledOther(this.method_51469(), (ServerPlayerEntity) (Object) this); - ServerEntityCombatEvents.AFTER_KILLED_OTHER_ENTITY.invoker().afterKilledOtherEntity(this.method_51469(), attacker, (ServerPlayerEntity) (Object) this); + attacker.onKilledOther(this.getServerWorld(), (ServerPlayerEntity) (Object) this); + ServerEntityCombatEvents.AFTER_KILLED_OTHER_ENTITY.invoker().afterKilledOtherEntity(this.getServerWorld(), attacker, (ServerPlayerEntity) (Object) this); } } @@ -83,7 +83,7 @@ abstract class ServerPlayerEntityMixin extends LivingEntityMixin { */ @Inject(method = "worldChanged(Lnet/minecraft/server/world/ServerWorld;)V", at = @At("TAIL")) private void afterWorldChanged(ServerWorld origin, CallbackInfo ci) { - ServerEntityWorldChangeEvents.AFTER_PLAYER_CHANGE_WORLD.invoker().afterChangeWorld((ServerPlayerEntity) (Object) this, origin, this.method_51469()); + ServerEntityWorldChangeEvents.AFTER_PLAYER_CHANGE_WORLD.invoker().afterChangeWorld((ServerPlayerEntity) (Object) this, origin, this.getServerWorld()); } @Inject(method = "copyFrom", at = @At("TAIL")) diff --git a/fabric-entity-events-v1/src/main/resources/fabric-entity-events-v1.mixins.json b/fabric-entity-events-v1/src/main/resources/fabric-entity-events-v1.mixins.json index 18604a6e4..7b2c8c7f0 100644 --- a/fabric-entity-events-v1/src/main/resources/fabric-entity-events-v1.mixins.json +++ b/fabric-entity-events-v1/src/main/resources/fabric-entity-events-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.entity.event", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "elytra.LivingEntityMixin", "elytra.PlayerEntityMixin", diff --git a/fabric-entity-events-v1/src/main/resources/fabric.mod.json b/fabric-entity-events-v1/src/main/resources/fabric.mod.json index 04967cb28..890a477c7 100644 --- a/fabric-entity-events-v1/src/main/resources/fabric.mod.json +++ b/fabric-entity-events-v1/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.8.2" + "fabricloader": ">=0.15.1" }, "description": "Events to hook into entities.", "mixins": [ diff --git a/fabric-entity-events-v1/src/testmod/java/net/fabricmc/fabric/test/entity/event/EntityEventTests.java b/fabric-entity-events-v1/src/testmod/java/net/fabricmc/fabric/test/entity/event/EntityEventTests.java index 539a4e0e1..f3fb7cc6c 100644 --- a/fabric-entity-events-v1/src/testmod/java/net/fabricmc/fabric/test/entity/event/EntityEventTests.java +++ b/fabric-entity-events-v1/src/testmod/java/net/fabricmc/fabric/test/entity/event/EntityEventTests.java @@ -60,7 +60,7 @@ public final class EntityEventTests implements ModInitializer { Registry.register(Registries.ITEM, new Identifier("fabric-entity-events-v1-testmod", "diamond_elytra"), DIAMOND_ELYTRA); ServerEntityCombatEvents.AFTER_KILLED_OTHER_ENTITY.register((world, entity, killed) -> { - LOGGER.info("Entity Killed: {}", killed); + LOGGER.info("Entity {} Killed: {}", entity, killed); }); ServerEntityWorldChangeEvents.AFTER_PLAYER_CHANGE_WORLD.register((player, origin, destination) -> { diff --git a/fabric-events-interaction-v0/src/client/resources/fabric-events-interaction-v0.client.mixins.json b/fabric-events-interaction-v0/src/client/resources/fabric-events-interaction-v0.client.mixins.json index ad601a1fc..8df589f49 100644 --- a/fabric-events-interaction-v0/src/client/resources/fabric-events-interaction-v0.client.mixins.json +++ b/fabric-events-interaction-v0/src/client/resources/fabric-events-interaction-v0.client.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.event.interaction.client", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "client": [ "ClientPlayerInteractionManagerMixin", "KeyBindingAccessor", diff --git a/fabric-events-interaction-v0/src/main/resources/fabric-events-interaction-v0.mixins.json b/fabric-events-interaction-v0/src/main/resources/fabric-events-interaction-v0.mixins.json index 9156d082b..c4c196277 100644 --- a/fabric-events-interaction-v0/src/main/resources/fabric-events-interaction-v0.mixins.json +++ b/fabric-events-interaction-v0/src/main/resources/fabric-events-interaction-v0.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.event.interaction", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "PlayerAdvancementTrackerMixin", "ServerPlayerEntityMixin", diff --git a/fabric-events-interaction-v0/src/main/resources/fabric.mod.json b/fabric-events-interaction-v0/src/main/resources/fabric.mod.json index bc3444fe5..1bd1ea783 100644 --- a/fabric-events-interaction-v0/src/main/resources/fabric.mod.json +++ b/fabric-events-interaction-v0/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.4.0", + "fabricloader": ">=0.15.1", "fabric-api-base": "*", "minecraft": ">=1.15-alpha.19.37.a" }, diff --git a/fabric-game-rule-api-v1/src/client/resources/fabric-game-rule-api-v1.client.mixins.json b/fabric-game-rule-api-v1/src/client/resources/fabric-game-rule-api-v1.client.mixins.json index 14343a9fa..6b8151c74 100644 --- a/fabric-game-rule-api-v1/src/client/resources/fabric-game-rule-api-v1.client.mixins.json +++ b/fabric-game-rule-api-v1/src/client/resources/fabric-game-rule-api-v1.client.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.gamerule.client", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "client": [ "EditGameRulesScreenAccessor", "EditGameRulesScreenRuleListWidgetMixin", diff --git a/fabric-game-rule-api-v1/src/main/resources/fabric-game-rule-api-v1.mixins.json b/fabric-game-rule-api-v1/src/main/resources/fabric-game-rule-api-v1.mixins.json index 0388bbddd..246772bb2 100644 --- a/fabric-game-rule-api-v1/src/main/resources/fabric-game-rule-api-v1.mixins.json +++ b/fabric-game-rule-api-v1/src/main/resources/fabric-game-rule-api-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.gamerule", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "GameRulesBooleanRuleAccessor", "GameRuleCommandAccessor", diff --git a/fabric-game-rule-api-v1/src/main/resources/fabric.mod.json b/fabric-game-rule-api-v1/src/main/resources/fabric.mod.json index af0a65b71..7b5f10bca 100644 --- a/fabric-game-rule-api-v1/src/main/resources/fabric.mod.json +++ b/fabric-game-rule-api-v1/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.8.2" + "fabricloader": ">=0.15.1" }, "description": "Allows registration of custom game rules.", "mixins": [ diff --git a/fabric-gametest-api-v1/src/main/java/net/fabricmc/fabric/mixin/gametest/server/MainMixin.java b/fabric-gametest-api-v1/src/main/java/net/fabricmc/fabric/mixin/gametest/server/MainMixin.java index 7aeee3395..d94c78f65 100644 --- a/fabric-gametest-api-v1/src/main/java/net/fabricmc/fabric/mixin/gametest/server/MainMixin.java +++ b/fabric-gametest-api-v1/src/main/java/net/fabricmc/fabric/mixin/gametest/server/MainMixin.java @@ -16,39 +16,29 @@ package net.fabricmc.fabric.mixin.gametest.server; -import java.io.File; -import java.nio.file.Path; - -import com.mojang.serialization.Dynamic; -import joptsimple.OptionParser; -import joptsimple.OptionSet; -import joptsimple.OptionSpec; +import com.llamalad7.mixinextras.injector.ModifyExpressionValue; +import com.llamalad7.mixinextras.sugar.Local; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.LocalCapture; import net.minecraft.resource.ResourcePackManager; import net.minecraft.server.Main; -import net.minecraft.server.dedicated.EulaReader; -import net.minecraft.server.dedicated.ServerPropertiesLoader; -import net.minecraft.util.ApiServices; import net.minecraft.world.level.storage.LevelStorage; import net.fabricmc.fabric.impl.gametest.FabricGameTestHelper; @Mixin(Main.class) public class MainMixin { - @Redirect(method = "main", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/dedicated/EulaReader;isEulaAgreedTo()Z")) - private static boolean isEulaAgreedTo(EulaReader reader) { - return FabricGameTestHelper.ENABLED || reader.isEulaAgreedTo(); + @ModifyExpressionValue(method = "main", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/dedicated/EulaReader;isEulaAgreedTo()Z")) + private static boolean isEulaAgreedTo(boolean isEulaAgreedTo) { + return FabricGameTestHelper.ENABLED || isEulaAgreedTo; } // Inject after resourcePackManager is stored - @Inject(method = "main", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD, at = @At(value = "INVOKE", shift = At.Shift.BY, by = 2, target = "Lnet/minecraft/resource/VanillaDataPackProvider;createManager(Lnet/minecraft/world/level/storage/LevelStorage$Session;)Lnet/minecraft/resource/ResourcePackManager;")) - private static void main(String[] args, CallbackInfo info, OptionParser optionParser, OptionSpec optionSpec, OptionSpec optionSpec2, OptionSpec optionSpec3, OptionSpec optionSpec4, OptionSpec optionSpec5, OptionSpec optionSpec6, OptionSpec optionSpec7, OptionSpec optionSpec8, OptionSpec optionSpec9, OptionSpec optionSpec10, OptionSpec optionSpec11, OptionSpec optionSpec12, OptionSpec optionSpec13, OptionSpec optionSpec14, OptionSpec optionSpec15, OptionSet optionSet, Path path2, ServerPropertiesLoader serverPropertiesLoader, Path path3, EulaReader eulaReader, File file, ApiServices apiServices, String string, LevelStorage levelStorage, LevelStorage.Session session, Dynamic dynamic, Dynamic dynamic2, boolean bl, ResourcePackManager resourcePackManager) { + @Inject(method = "main", cancellable = true, at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/resource/VanillaDataPackProvider;createManager(Lnet/minecraft/world/level/storage/LevelStorage$Session;)Lnet/minecraft/resource/ResourcePackManager;")) + private static void main(String[] args, CallbackInfo info, @Local LevelStorage.Session session, @Local ResourcePackManager resourcePackManager) { if (FabricGameTestHelper.ENABLED) { FabricGameTestHelper.runHeadlessServer(session, resourcePackManager); info.cancel(); // Do not progress in starting the normal dedicated server diff --git a/fabric-gametest-api-v1/src/main/resources/fabric-gametest-api-v1.mixins.json b/fabric-gametest-api-v1/src/main/resources/fabric-gametest-api-v1.mixins.json index 9878ffc7d..8a47efc1d 100644 --- a/fabric-gametest-api-v1/src/main/resources/fabric-gametest-api-v1.mixins.json +++ b/fabric-gametest-api-v1/src/main/resources/fabric-gametest-api-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.gametest", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "ArgumentTypesMixin", "CommandManagerMixin", diff --git a/fabric-gametest-api-v1/src/main/resources/fabric.mod.json b/fabric-gametest-api-v1/src/main/resources/fabric.mod.json index 23e47fa51..1825079a3 100644 --- a/fabric-gametest-api-v1/src/main/resources/fabric.mod.json +++ b/fabric-gametest-api-v1/src/main/resources/fabric.mod.json @@ -21,6 +21,7 @@ ] }, "depends": { + "fabricloader": ">=0.15.1", "fabric-resource-loader-v0": "*" }, "description": "Allows registration of custom game tests.", diff --git a/fabric-item-api-v1/src/client/resources/fabric-item-api-v1.client.mixins.json b/fabric-item-api-v1/src/client/resources/fabric-item-api-v1.client.mixins.json index daa913dc5..9e93814bd 100644 --- a/fabric-item-api-v1/src/client/resources/fabric-item-api-v1.client.mixins.json +++ b/fabric-item-api-v1/src/client/resources/fabric-item-api-v1.client.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.item.client", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "client": [ "ClientPlayerInteractionManagerMixin", "HeldItemRendererMixin", diff --git a/fabric-item-api-v1/src/main/resources/fabric-item-api-v1.mixins.json b/fabric-item-api-v1/src/main/resources/fabric-item-api-v1.mixins.json index 8993bf8b2..ef5c4b4b4 100644 --- a/fabric-item-api-v1/src/main/resources/fabric-item-api-v1.mixins.json +++ b/fabric-item-api-v1/src/main/resources/fabric-item-api-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.item", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "AbstractFurnaceBlockEntityMixin", "ArmorItemMixin", diff --git a/fabric-item-api-v1/src/main/resources/fabric.mod.json b/fabric-item-api-v1/src/main/resources/fabric.mod.json index ad6689fd5..477c83c4a 100644 --- a/fabric-item-api-v1/src/main/resources/fabric.mod.json +++ b/fabric-item-api-v1/src/main/resources/fabric.mod.json @@ -23,7 +23,7 @@ } ], "depends": { - "fabricloader": ">=0.4.0", + "fabricloader": ">=0.15.1", "fabric-api-base": "*" }, "description": "Hooks for items", diff --git a/fabric-item-api-v1/src/testmod/resources/fabric-item-api-tests-v1.mixins.json b/fabric-item-api-v1/src/testmod/resources/fabric-item-api-tests-v1.mixins.json index 6a2e72344..55336f14b 100644 --- a/fabric-item-api-v1/src/testmod/resources/fabric-item-api-tests-v1.mixins.json +++ b/fabric-item-api-v1/src/testmod/resources/fabric-item-api-tests-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.test.item.mixin", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "BrewingRecipeRegistryAccessor" ], diff --git a/fabric-item-group-api-v1/src/main/resources/fabric.mod.json b/fabric-item-group-api-v1/src/main/resources/fabric.mod.json index 429c8b58c..9d00b2fc3 100644 --- a/fabric-item-group-api-v1/src/main/resources/fabric.mod.json +++ b/fabric-item-group-api-v1/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.14.9", + "fabricloader": ">=0.15.1", "fabric-api-base": "*", "fabric-resource-loader-v0": "*" }, diff --git a/fabric-key-binding-api-v1/src/client/resources/fabric-key-binding-api-v1.mixins.json b/fabric-key-binding-api-v1/src/client/resources/fabric-key-binding-api-v1.mixins.json index 185173079..84ca7ff9f 100644 --- a/fabric-key-binding-api-v1/src/client/resources/fabric-key-binding-api-v1.mixins.json +++ b/fabric-key-binding-api-v1/src/client/resources/fabric-key-binding-api-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.client.keybinding", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "client": [ "KeyBindingAccessor", "GameOptionsMixin" diff --git a/fabric-key-binding-api-v1/src/client/resources/fabric.mod.json b/fabric-key-binding-api-v1/src/client/resources/fabric.mod.json index db552fc70..aa26206a8 100644 --- a/fabric-key-binding-api-v1/src/client/resources/fabric.mod.json +++ b/fabric-key-binding-api-v1/src/client/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.4.0" + "fabricloader": ">=0.15.1" }, "description": "Key Binding registry API.", "mixins": [ diff --git a/fabric-lifecycle-events-v1/src/client/resources/fabric-lifecycle-events-v1.client.mixins.json b/fabric-lifecycle-events-v1/src/client/resources/fabric-lifecycle-events-v1.client.mixins.json index 60bdec8e0..d0ef8fb9a 100644 --- a/fabric-lifecycle-events-v1/src/client/resources/fabric-lifecycle-events-v1.client.mixins.json +++ b/fabric-lifecycle-events-v1/src/client/resources/fabric-lifecycle-events-v1.client.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.event.lifecycle.client", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "client": [ "ClientChunkManagerMixin", "ClientPlayNetworkHandlerMixin", diff --git a/fabric-lifecycle-events-v1/src/main/resources/fabric-lifecycle-events-v1.mixins.json b/fabric-lifecycle-events-v1/src/main/resources/fabric-lifecycle-events-v1.mixins.json index 9815ddb09..b65d45ff9 100644 --- a/fabric-lifecycle-events-v1/src/main/resources/fabric-lifecycle-events-v1.mixins.json +++ b/fabric-lifecycle-events-v1/src/main/resources/fabric-lifecycle-events-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.event.lifecycle", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "DataPackContentsMixin", "LivingEntityMixin", diff --git a/fabric-lifecycle-events-v1/src/main/resources/fabric.mod.json b/fabric-lifecycle-events-v1/src/main/resources/fabric.mod.json index 10d153520..ab2c1c9a6 100644 --- a/fabric-lifecycle-events-v1/src/main/resources/fabric.mod.json +++ b/fabric-lifecycle-events-v1/src/main/resources/fabric.mod.json @@ -31,7 +31,7 @@ } ], "depends": { - "fabricloader": ">=0.4.0", + "fabricloader": ">=0.15.1", "fabric-api-base": "*" }, "description": "Events for the game's lifecycle.", diff --git a/fabric-loot-api-v2/src/main/resources/fabric-loot-api-v2.mixins.json b/fabric-loot-api-v2/src/main/resources/fabric-loot-api-v2.mixins.json index c70ccf809..5d78a9028 100644 --- a/fabric-loot-api-v2/src/main/resources/fabric-loot-api-v2.mixins.json +++ b/fabric-loot-api-v2/src/main/resources/fabric-loot-api-v2.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.loot", - "compatibilityLevel": "JAVA_8", + "compatibilityLevel": "JAVA_17", "mixins": [ "LootManagerMixin", "LootPoolAccessor", diff --git a/fabric-loot-api-v2/src/main/resources/fabric.mod.json b/fabric-loot-api-v2/src/main/resources/fabric.mod.json index 6d73a269f..4de1a63d6 100644 --- a/fabric-loot-api-v2/src/main/resources/fabric.mod.json +++ b/fabric-loot-api-v2/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.4.0", + "fabricloader": ">=0.15.1", "fabric-api-base": "*", "fabric-resource-loader-v0": "*" }, diff --git a/fabric-message-api-v1/src/main/resources/fabric-message-api-v1.mixins.json b/fabric-message-api-v1/src/main/resources/fabric-message-api-v1.mixins.json index de1a852c8..ee23a39ad 100644 --- a/fabric-message-api-v1/src/main/resources/fabric-message-api-v1.mixins.json +++ b/fabric-message-api-v1/src/main/resources/fabric-message-api-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.message", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "MinecraftServerMixin", "PlayerManagerMixin" diff --git a/fabric-message-api-v1/src/main/resources/fabric.mod.json b/fabric-message-api-v1/src/main/resources/fabric.mod.json index 546a20b66..2d704b77d 100644 --- a/fabric-message-api-v1/src/main/resources/fabric.mod.json +++ b/fabric-message-api-v1/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.10.5", + "fabricloader": ">=0.15.1", "fabric-api-base": "*" }, "description": "Adds message-related hooks.", diff --git a/fabric-mining-level-api-v1/src/main/resources/fabric-mining-level-api-v1.mixins.json b/fabric-mining-level-api-v1/src/main/resources/fabric-mining-level-api-v1.mixins.json index 37629d090..98b92be8e 100644 --- a/fabric-mining-level-api-v1/src/main/resources/fabric-mining-level-api-v1.mixins.json +++ b/fabric-mining-level-api-v1/src/main/resources/fabric-mining-level-api-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.mininglevel", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "MiningToolItemMixin", "ShearsItemMixin", diff --git a/fabric-mining-level-api-v1/src/main/resources/fabric.mod.json b/fabric-mining-level-api-v1/src/main/resources/fabric.mod.json index 304ea7117..fa6ab9100 100644 --- a/fabric-mining-level-api-v1/src/main/resources/fabric.mod.json +++ b/fabric-mining-level-api-v1/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.4.0", + "fabricloader": ">=0.15.1", "fabric-api-base": "*", "fabric-lifecycle-events-v1": "*", "fabric-resource-loader-v0": "*" diff --git a/fabric-model-loading-api-v1/src/client/resources/fabric.mod.json b/fabric-model-loading-api-v1/src/client/resources/fabric.mod.json index be0a98beb..34ed0d739 100644 --- a/fabric-model-loading-api-v1/src/client/resources/fabric.mod.json +++ b/fabric-model-loading-api-v1/src/client/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.14.21", + "fabricloader": ">=0.15.1", "fabric-api-base": "*" }, "breaks": { diff --git a/fabric-networking-api-v1/src/client/resources/fabric-networking-api-v1.client.mixins.json b/fabric-networking-api-v1/src/client/resources/fabric-networking-api-v1.client.mixins.json index 1eaecde87..114fd6087 100644 --- a/fabric-networking-api-v1/src/client/resources/fabric-networking-api-v1.client.mixins.json +++ b/fabric-networking-api-v1/src/client/resources/fabric-networking-api-v1.client.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.networking.client", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "client": [ "accessor.ClientCommonNetworkHandlerAccessor", "accessor.ClientConfigurationNetworkHandlerAccessor", diff --git a/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/mixin/networking/ClientConnectionMixin.java b/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/mixin/networking/ClientConnectionMixin.java index 5c974d80f..f5feb9d39 100644 --- a/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/mixin/networking/ClientConnectionMixin.java +++ b/fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/mixin/networking/ClientConnectionMixin.java @@ -30,7 +30,6 @@ import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.ModifyVariable; import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.LocalCapture; @@ -103,13 +102,11 @@ abstract class ClientConnectionMixin implements ChannelInfoHolder { } } - @ModifyVariable(method = "handleDisconnection", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/listener/PacketListener;onDisconnected(Lnet/minecraft/text/Text;)V")) - private PacketListener disconnectAddon(PacketListener packetListener) { + @Inject(method = "handleDisconnection", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/listener/PacketListener;onDisconnected(Lnet/minecraft/text/Text;)V")) + private void disconnectAddon(CallbackInfo ci) { if (packetListener instanceof NetworkHandlerExtensions extension) { extension.getAddon().handleDisconnect(); } - - return packetListener; } @Inject(method = "sendInternal", at = @At(value = "INVOKE", target = "Lio/netty/channel/ChannelFuture;addListener(Lio/netty/util/concurrent/GenericFutureListener;)Lio/netty/channel/ChannelFuture;", remap = false), locals = LocalCapture.CAPTURE_FAILHARD, cancellable = true) diff --git a/fabric-networking-api-v1/src/main/resources/fabric-networking-api-v1.mixins.json b/fabric-networking-api-v1/src/main/resources/fabric-networking-api-v1.mixins.json index 95d1a6836..163f5999b 100644 --- a/fabric-networking-api-v1/src/main/resources/fabric-networking-api-v1.mixins.json +++ b/fabric-networking-api-v1/src/main/resources/fabric-networking-api-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.networking", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "ClientConnectionMixin", "CommandManagerMixin", diff --git a/fabric-networking-api-v1/src/main/resources/fabric.mod.json b/fabric-networking-api-v1/src/main/resources/fabric.mod.json index abebc330c..e4a626529 100644 --- a/fabric-networking-api-v1/src/main/resources/fabric.mod.json +++ b/fabric-networking-api-v1/src/main/resources/fabric.mod.json @@ -25,7 +25,7 @@ }, "accessWidener": "fabric-networking-api-v1.accesswidener", "depends": { - "fabricloader": ">=0.4.0", + "fabricloader": ">=0.15.1", "fabric-api-base": "*" }, "description": "Low-level, vanilla protocol oriented networking hooks.", diff --git a/fabric-object-builder-api-v1/src/client/resources/fabric-object-builder-v1.client.mixins.json b/fabric-object-builder-api-v1/src/client/resources/fabric-object-builder-v1.client.mixins.json index 58f51649a..14d6a5f1a 100644 --- a/fabric-object-builder-api-v1/src/client/resources/fabric-object-builder-v1.client.mixins.json +++ b/fabric-object-builder-api-v1/src/client/resources/fabric-object-builder-v1.client.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.object.builder.client", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "client": [ "EntityModelLayersMixin", "HangingSignEditScreenMixin", diff --git a/fabric-object-builder-api-v1/src/main/resources/fabric-object-builder-v1.mixins.json b/fabric-object-builder-api-v1/src/main/resources/fabric-object-builder-v1.mixins.json index 08896b7bf..a5c4f877c 100644 --- a/fabric-object-builder-api-v1/src/main/resources/fabric-object-builder-v1.mixins.json +++ b/fabric-object-builder-api-v1/src/main/resources/fabric-object-builder-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.object.builder", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "AbstractBlockAccessor", "AbstractBlockSettingsAccessor", diff --git a/fabric-object-builder-api-v1/src/main/resources/fabric.mod.json b/fabric-object-builder-api-v1/src/main/resources/fabric.mod.json index 29a34daac..7878e6d8a 100644 --- a/fabric-object-builder-api-v1/src/main/resources/fabric.mod.json +++ b/fabric-object-builder-api-v1/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.8.2", + "fabricloader": ">=0.15.1", "fabric-api-base": "*" }, "description": "Builders for objects vanilla has locked down.", diff --git a/fabric-particles-v1/src/client/resources/fabric-particles-v1.client.mixins.json b/fabric-particles-v1/src/client/resources/fabric-particles-v1.client.mixins.json index deeb077a5..24b0acf88 100644 --- a/fabric-particles-v1/src/client/resources/fabric-particles-v1.client.mixins.json +++ b/fabric-particles-v1/src/client/resources/fabric-particles-v1.client.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.client.particle", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "client": [ "BlockDustParticleMixin", "ParticleManagerMixin", diff --git a/fabric-particles-v1/src/main/resources/fabric.mod.json b/fabric-particles-v1/src/main/resources/fabric.mod.json index 9a9aeb7b4..168267de8 100644 --- a/fabric-particles-v1/src/main/resources/fabric.mod.json +++ b/fabric-particles-v1/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.14.21" + "fabricloader": ">=0.15.1" }, "description": "Hooks for registering custom particles.", "mixins": [ diff --git a/fabric-recipe-api-v1/src/main/resources/fabric.mod.json b/fabric-recipe-api-v1/src/main/resources/fabric.mod.json index dfc2e91b4..088a0c877 100644 --- a/fabric-recipe-api-v1/src/main/resources/fabric.mod.json +++ b/fabric-recipe-api-v1/src/main/resources/fabric.mod.json @@ -20,7 +20,7 @@ ], "accessWidener": "fabric-recipe-api-v1.accesswidener", "depends": { - "fabricloader": ">=0.14.10", + "fabricloader": ">=0.15.1", "fabric-networking-api-v1": "*" }, "entrypoints": { diff --git a/fabric-registry-sync-v0/src/client/resources/fabric-registry-sync-v0.client.mixins.json b/fabric-registry-sync-v0/src/client/resources/fabric-registry-sync-v0.client.mixins.json index c6159ed9d..19ec8d4db 100644 --- a/fabric-registry-sync-v0/src/client/resources/fabric-registry-sync-v0.client.mixins.json +++ b/fabric-registry-sync-v0/src/client/resources/fabric-registry-sync-v0.client.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.registry.sync.client", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "client": [ "BlockColorsMixin", "ItemColorsMixin", diff --git a/fabric-registry-sync-v0/src/main/resources/fabric-registry-sync-v0.mixins.json b/fabric-registry-sync-v0/src/main/resources/fabric-registry-sync-v0.mixins.json index a8aebd825..474cb44dc 100644 --- a/fabric-registry-sync-v0/src/main/resources/fabric-registry-sync-v0.mixins.json +++ b/fabric-registry-sync-v0/src/main/resources/fabric-registry-sync-v0.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.registry.sync", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "BootstrapMixin", "ChunkSerializerMixin", diff --git a/fabric-registry-sync-v0/src/main/resources/fabric.mod.json b/fabric-registry-sync-v0/src/main/resources/fabric.mod.json index a910f1058..3aebe84e3 100644 --- a/fabric-registry-sync-v0/src/main/resources/fabric.mod.json +++ b/fabric-registry-sync-v0/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.13.2", + "fabricloader": ">=0.15.1", "fabric-api-base": "*", "fabric-networking-api-v1": "*" }, diff --git a/fabric-renderer-api-v1/src/client/resources/fabric-renderer-api-v1.debughud.mixins.json b/fabric-renderer-api-v1/src/client/resources/fabric-renderer-api-v1.debughud.mixins.json index a24c0b995..038461e75 100644 --- a/fabric-renderer-api-v1/src/client/resources/fabric-renderer-api-v1.debughud.mixins.json +++ b/fabric-renderer-api-v1/src/client/resources/fabric-renderer-api-v1.debughud.mixins.json @@ -1,7 +1,7 @@ { "required": false, "package": "net.fabricmc.fabric.mixin.renderer.client.debughud", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "client": [ "DebugHudMixin" ], diff --git a/fabric-renderer-api-v1/src/client/resources/fabric-renderer-api-v1.mixins.json b/fabric-renderer-api-v1/src/client/resources/fabric-renderer-api-v1.mixins.json index f12cca509..0ca1be4e1 100644 --- a/fabric-renderer-api-v1/src/client/resources/fabric-renderer-api-v1.mixins.json +++ b/fabric-renderer-api-v1/src/client/resources/fabric-renderer-api-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.renderer", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "client": [ "client.BakedModelMixin", "client.MultipartBakedModelMixin", diff --git a/fabric-renderer-api-v1/src/client/resources/fabric.mod.json b/fabric-renderer-api-v1/src/client/resources/fabric.mod.json index 6e152cdd3..f8db7460e 100644 --- a/fabric-renderer-api-v1/src/client/resources/fabric.mod.json +++ b/fabric-renderer-api-v1/src/client/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.6.2", + "fabricloader": ">=0.15.1", "minecraft": ">=1.15-alpha.19.39.a", "fabric-api-base": "*" }, diff --git a/fabric-renderer-indigo/src/client/resources/fabric-renderer-indigo.mixins.json b/fabric-renderer-indigo/src/client/resources/fabric-renderer-indigo.mixins.json index f15cbeb36..901ba7310 100644 --- a/fabric-renderer-indigo/src/client/resources/fabric-renderer-indigo.mixins.json +++ b/fabric-renderer-indigo/src/client/resources/fabric-renderer-indigo.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.client.indigo.renderer", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "plugin": "net.fabricmc.fabric.impl.client.indigo.IndigoMixinConfigPlugin", "mixins": [ ], diff --git a/fabric-renderer-indigo/src/client/resources/fabric.mod.json b/fabric-renderer-indigo/src/client/resources/fabric.mod.json index 808c30752..1ed064ac5 100644 --- a/fabric-renderer-indigo/src/client/resources/fabric.mod.json +++ b/fabric-renderer-indigo/src/client/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.6.2", + "fabricloader": ">=0.15.1", "minecraft": ">=1.15-alpha.19.39.a", "fabric-api-base": "*", "fabric-renderer-api-v1": "*" diff --git a/fabric-rendering-fluids-v1/src/client/resources/fabric-rendering-fluids-v1.mixins.json b/fabric-rendering-fluids-v1/src/client/resources/fabric-rendering-fluids-v1.mixins.json index fcb8c0baf..c5ec419ca 100644 --- a/fabric-rendering-fluids-v1/src/client/resources/fabric-rendering-fluids-v1.mixins.json +++ b/fabric-rendering-fluids-v1/src/client/resources/fabric-rendering-fluids-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.client.rendering.fluid", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "client": [ "FluidRendererMixin" ], diff --git a/fabric-rendering-fluids-v1/src/main/resources/fabric.mod.json b/fabric-rendering-fluids-v1/src/main/resources/fabric.mod.json index 79e1ce513..06798a4a7 100644 --- a/fabric-rendering-fluids-v1/src/main/resources/fabric.mod.json +++ b/fabric-rendering-fluids-v1/src/main/resources/fabric.mod.json @@ -15,7 +15,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.4.0", + "fabricloader": ">=0.15.1", "fabric-api-base": "*" }, "description": "Hooks for registering fluid renders.", diff --git a/fabric-rendering-v1/src/client/resources/fabric-rendering-v1.mixins.json b/fabric-rendering-v1/src/client/resources/fabric-rendering-v1.mixins.json index 0951fa261..3ef02acce 100644 --- a/fabric-rendering-v1/src/client/resources/fabric-rendering-v1.mixins.json +++ b/fabric-rendering-v1/src/client/resources/fabric-rendering-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.client.rendering", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "client": [ "ArmorFeatureRendererMixin", "BlockColorsMixin", diff --git a/fabric-rendering-v1/src/client/resources/fabric.mod.json b/fabric-rendering-v1/src/client/resources/fabric.mod.json index a17c8cd5c..b0b955876 100644 --- a/fabric-rendering-v1/src/client/resources/fabric.mod.json +++ b/fabric-rendering-v1/src/client/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.4.0", + "fabricloader": ">=0.15.1", "fabric-api-base": "*" }, "description": "Hooks and registries for rendering-related things.", diff --git a/fabric-resource-conditions-api-v1/src/main/resources/fabric-resource-conditions-api-v1.mixins.json b/fabric-resource-conditions-api-v1/src/main/resources/fabric-resource-conditions-api-v1.mixins.json index 853a3694a..15ba927a6 100644 --- a/fabric-resource-conditions-api-v1/src/main/resources/fabric-resource-conditions-api-v1.mixins.json +++ b/fabric-resource-conditions-api-v1/src/main/resources/fabric-resource-conditions-api-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.resource.conditions", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "DataPackContentsMixin", "DataProviderMixin", diff --git a/fabric-resource-conditions-api-v1/src/main/resources/fabric.mod.json b/fabric-resource-conditions-api-v1/src/main/resources/fabric.mod.json index 17da02e35..1828757af 100644 --- a/fabric-resource-conditions-api-v1/src/main/resources/fabric.mod.json +++ b/fabric-resource-conditions-api-v1/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.9.2" + "fabricloader": ">=0.15.1" }, "description": "Allows conditionally loading resources.", "mixins": [ diff --git a/fabric-resource-loader-v0/src/client/resources/fabric-resource-loader-v0.client.mixins.json b/fabric-resource-loader-v0/src/client/resources/fabric-resource-loader-v0.client.mixins.json index 73cb1281f..8230da513 100644 --- a/fabric-resource-loader-v0/src/client/resources/fabric-resource-loader-v0.client.mixins.json +++ b/fabric-resource-loader-v0/src/client/resources/fabric-resource-loader-v0.client.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.resource.loader.client", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "client": [ "VanillaResourcePackProviderMixin", "DefaultClientResourcePackProviderMixin", diff --git a/fabric-resource-loader-v0/src/main/resources/fabric-resource-loader-v0.mixins.json b/fabric-resource-loader-v0/src/main/resources/fabric-resource-loader-v0.mixins.json index bfd04ab95..a33a2ec0c 100644 --- a/fabric-resource-loader-v0/src/main/resources/fabric-resource-loader-v0.mixins.json +++ b/fabric-resource-loader-v0/src/main/resources/fabric-resource-loader-v0.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.resource.loader", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "KeyedResourceReloadListenerMixin", "LifecycledResourceManagerImplMixin", diff --git a/fabric-resource-loader-v0/src/main/resources/fabric.mod.json b/fabric-resource-loader-v0/src/main/resources/fabric.mod.json index 15b84594c..b2987ac3c 100644 --- a/fabric-resource-loader-v0/src/main/resources/fabric.mod.json +++ b/fabric-resource-loader-v0/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.13.0" + "fabricloader": ">=0.15.1" }, "description": "Asset and data resource loading.", "mixins": [ diff --git a/fabric-screen-api-v1/src/client/java/net/fabricmc/fabric/mixin/screen/GameRendererMixin.java b/fabric-screen-api-v1/src/client/java/net/fabricmc/fabric/mixin/screen/GameRendererMixin.java index e791e906b..d97f274f0 100644 --- a/fabric-screen-api-v1/src/client/java/net/fabricmc/fabric/mixin/screen/GameRendererMixin.java +++ b/fabric-screen-api-v1/src/client/java/net/fabricmc/fabric/mixin/screen/GameRendererMixin.java @@ -16,45 +16,23 @@ package net.fabricmc.fabric.mixin.screen; -import org.spongepowered.asm.mixin.Final; +import com.llamalad7.mixinextras.injector.wrapoperation.Operation; +import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.LocalCapture; -import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.render.GameRenderer; -import net.minecraft.client.util.math.MatrixStack; import net.fabricmc.fabric.api.client.screen.v1.ScreenEvents; @Mixin(GameRenderer.class) abstract class GameRendererMixin { - @Shadow - @Final - private MinecraftClient client; - - @Unique - private Screen renderingScreen; - - @Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;renderWithTooltip(Lnet/minecraft/client/gui/DrawContext;IIF)V"), locals = LocalCapture.CAPTURE_FAILHARD) - private void onBeforeRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo ci, boolean b1, int mouseX, int mouseY, MatrixStack matrixStack, DrawContext drawContext) { - // Store the screen in a variable in case someone tries to change the screen during this before render event. - // If someone changes the screen, the after render event will likely have class cast exceptions or an NPE. - this.renderingScreen = this.client.currentScreen; - ScreenEvents.beforeRender(this.renderingScreen).invoker().beforeRender(this.renderingScreen, drawContext, mouseX, mouseY, tickDelta); - } - - // This injection should end up in the try block so exceptions are caught - @Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;renderWithTooltip(Lnet/minecraft/client/gui/DrawContext;IIF)V", shift = At.Shift.AFTER), locals = LocalCapture.CAPTURE_FAILHARD) - private void onAfterRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo ci, boolean b1, int mouseX, int mouseY, MatrixStack matrixStack, DrawContext drawContext) { - ScreenEvents.afterRender(this.renderingScreen).invoker().afterRender(this.renderingScreen, drawContext, mouseX, mouseY, tickDelta); - // Finally set the currently rendering screen to null - this.renderingScreen = null; + @WrapOperation(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;renderWithTooltip(Lnet/minecraft/client/gui/DrawContext;IIF)V")) + private void onRenderScreen(Screen currentScreen, DrawContext drawContext, int mouseX, int mouseY, float tickDelta, Operation<Void> operation) { + ScreenEvents.beforeRender(currentScreen).invoker().beforeRender(currentScreen, drawContext, mouseX, mouseY, tickDelta); + operation.call(currentScreen, drawContext, mouseX, mouseY, tickDelta); + ScreenEvents.afterRender(currentScreen).invoker().afterRender(currentScreen, drawContext, mouseX, mouseY, tickDelta); } } diff --git a/fabric-screen-api-v1/src/client/resources/fabric-screen-api-v1.mixins.json b/fabric-screen-api-v1/src/client/resources/fabric-screen-api-v1.mixins.json index d139a47b5..d6170266a 100644 --- a/fabric-screen-api-v1/src/client/resources/fabric-screen-api-v1.mixins.json +++ b/fabric-screen-api-v1/src/client/resources/fabric-screen-api-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.screen", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "client": [ "GameRendererMixin", "MinecraftClientMixin", diff --git a/fabric-screen-api-v1/src/client/resources/fabric.mod.json b/fabric-screen-api-v1/src/client/resources/fabric.mod.json index c22ea4cfd..6da375688 100644 --- a/fabric-screen-api-v1/src/client/resources/fabric.mod.json +++ b/fabric-screen-api-v1/src/client/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.8.2", + "fabricloader": ">=0.15.1", "fabric-api-base": "*" }, "description": "Adds screen related hooks.", diff --git a/fabric-screen-handler-api-v1/src/main/resources/fabric-screen-handler-api-v1.mixins.json b/fabric-screen-handler-api-v1/src/main/resources/fabric-screen-handler-api-v1.mixins.json index 4237100a1..15ddbba8f 100644 --- a/fabric-screen-handler-api-v1/src/main/resources/fabric-screen-handler-api-v1.mixins.json +++ b/fabric-screen-handler-api-v1/src/main/resources/fabric-screen-handler-api-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.screenhandler", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "NamedScreenHandlerFactoryMixin", "ServerPlayerEntityMixin" diff --git a/fabric-screen-handler-api-v1/src/main/resources/fabric.mod.json b/fabric-screen-handler-api-v1/src/main/resources/fabric.mod.json index 8769011a9..2db2d66c8 100644 --- a/fabric-screen-handler-api-v1/src/main/resources/fabric.mod.json +++ b/fabric-screen-handler-api-v1/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.8.0", + "fabricloader": ">=0.15.1", "fabric-api-base": "*", "fabric-networking-api-v1": "*" }, diff --git a/fabric-sound-api-v1/src/client/resources/fabric.mod.json b/fabric-sound-api-v1/src/client/resources/fabric.mod.json index a189ac318..948d6add7 100644 --- a/fabric-sound-api-v1/src/client/resources/fabric.mod.json +++ b/fabric-sound-api-v1/src/client/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.14.9", + "fabricloader": ">=0.15.1", "minecraft": ">=1.19.2" }, "description": "Hooks for modifying Minecraft's sound system.", diff --git a/fabric-transfer-api-v1/src/main/resources/fabric-transfer-api-v1.mixins.json b/fabric-transfer-api-v1/src/main/resources/fabric-transfer-api-v1.mixins.json index 868571fd9..626673dab 100644 --- a/fabric-transfer-api-v1/src/main/resources/fabric-transfer-api-v1.mixins.json +++ b/fabric-transfer-api-v1/src/main/resources/fabric-transfer-api-v1.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.mixin.transfer", - "compatibilityLevel": "JAVA_16", + "compatibilityLevel": "JAVA_17", "mixins": [ "AbstractFurnaceBlockEntityMixin", "BucketItemAccessor", diff --git a/fabric-transfer-api-v1/src/main/resources/fabric.mod.json b/fabric-transfer-api-v1/src/main/resources/fabric.mod.json index 198b8f6ec..49f39c1b3 100644 --- a/fabric-transfer-api-v1/src/main/resources/fabric.mod.json +++ b/fabric-transfer-api-v1/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.9.2", + "fabricloader": ">=0.15.1", "fabric-api-lookup-api-v1": "*", "fabric-rendering-fluids-v1": "*" }, diff --git a/fabric-transfer-api-v1/src/testmod/resources/fabric-transfer-api-v1-testmod.mixins.json b/fabric-transfer-api-v1/src/testmod/resources/fabric-transfer-api-v1-testmod.mixins.json index 16d7e7997..838420653 100644 --- a/fabric-transfer-api-v1/src/testmod/resources/fabric-transfer-api-v1-testmod.mixins.json +++ b/fabric-transfer-api-v1/src/testmod/resources/fabric-transfer-api-v1-testmod.mixins.json @@ -1,7 +1,7 @@ { "required": true, "package": "net.fabricmc.fabric.test.transfer.mixin", - "compatibilityLevel": "JAVA_8", + "compatibilityLevel": "JAVA_17", "mixins": [ "AbstractFurnaceBlockEntityAccessor" ] diff --git a/fabric-transitive-access-wideners-v1/src/main/resources/fabric.mod.json b/fabric-transitive-access-wideners-v1/src/main/resources/fabric.mod.json index 30d3667b9..a9f94cca1 100644 --- a/fabric-transitive-access-wideners-v1/src/main/resources/fabric.mod.json +++ b/fabric-transitive-access-wideners-v1/src/main/resources/fabric.mod.json @@ -16,7 +16,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.12.12" + "fabricloader": ">=0.15.1" }, "description": "Contains transitive access wideners that provide access to otherwise inaccessible Minecraft code.", "accessWidener": "fabric-transitive-access-wideners-v1.accesswidener", diff --git a/gradle.properties b/gradle.properties index fe991cdeb..f4c2c8519 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ fabric.loom.multiProjectOptimisation=true version=0.91.1 minecraft_version=1.20.4 yarn_version=+build.1 -loader_version=0.14.23 +loader_version=0.15.1 installer_version=0.11.1 prerelease=false diff --git a/gradle/module-validation.gradle b/gradle/module-validation.gradle index 8a7d714c4..4a1012e16 100644 --- a/gradle/module-validation.gradle +++ b/gradle/module-validation.gradle @@ -73,5 +73,13 @@ class ValidateModuleTask extends DefaultTask { default: throw new GradleException("Module ${project} has an invalid module lifecycle ${json.custom.get('fabric-api:module-lifecycle')}") } + + if (json.depends == null) { + throw new GradleException("Module ${project} does not have a depends value!") + } + + if (json.depends.fabricloader != ">=${project.loader_version}") { + throw new GradleException("Module ${project} does not have a valid fabricloader value! Got \"${json.depends.fabricloader}\" but expected \">=${project.loader_version}\"") + } } } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 53e3d51f0..08b636895 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -19,7 +19,7 @@ "FabricMC" ], "depends": { - "fabricloader": ">=0.14.23", + "fabricloader": ">=0.15.1", "java": ">=17", "minecraft": ">=1.20.3- <1.20.5-" },