From 20d0995ccd098a5d3ec2624404b7ee12c09797e1 Mon Sep 17 00:00:00 2001 From: Waterpicker Date: Wed, 7 Jun 2023 22:17:00 -0500 Subject: [PATCH] Fix for MixinLevelProeprties breaking. --- .../cca/mixin/level/common/MixinLevelProperties.java | 7 +++++-- gradle.properties | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cardinal-components-level/src/main/java/dev/onyxstudios/cca/mixin/level/common/MixinLevelProperties.java b/cardinal-components-level/src/main/java/dev/onyxstudios/cca/mixin/level/common/MixinLevelProperties.java index 12acf2a9..c8c1cb0b 100644 --- a/cardinal-components-level/src/main/java/dev/onyxstudios/cca/mixin/level/common/MixinLevelProperties.java +++ b/cardinal-components-level/src/main/java/dev/onyxstudios/cca/mixin/level/common/MixinLevelProperties.java @@ -33,11 +33,13 @@ import dev.onyxstudios.cca.internal.level.ComponentsLevelNetworking; import dev.onyxstudios.cca.internal.level.StaticLevelComponentPlugin; import net.fabricmc.fabric.api.networking.v1.PacketByteBufs; +import net.minecraft.entity.boss.dragon.EnderDragonFight; import net.minecraft.nbt.NbtCompound; import net.minecraft.nbt.NbtElement; import net.minecraft.network.PacketByteBuf; import net.minecraft.network.packet.s2c.play.CustomPayloadS2CPacket; import net.minecraft.registry.DynamicRegistryManager; +import net.minecraft.server.MinecraftServer; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.world.border.WorldBorder; import net.minecraft.world.gen.GeneratorOptions; @@ -52,6 +54,7 @@ import org.spongepowered.asm.mixin.injection.Inject; 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 javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -63,8 +66,8 @@ public abstract class MixinLevelProperties implements ServerWorldProperties, Com @Unique private ComponentContainer components; - @Inject(method = "(Lcom/mojang/datafixers/DataFixer;ILnet/minecraft/nbt/NbtCompound;ZIIIFJJIIIZIZZZLnet/minecraft/world/border/WorldBorder$Properties;IILjava/util/UUID;Ljava/util/Set;Ljava/util/Set;Lnet/minecraft/world/timer/Timer;Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/world/level/LevelInfo;Lnet/minecraft/world/gen/GeneratorOptions;Lnet/minecraft/world/level/LevelProperties$SpecialProperty;Lcom/mojang/serialization/Lifecycle;)V", at = @At("RETURN")) - private void initComponents(DataFixer dataFixer, int dataVersion, NbtCompound playerData, boolean modded, int spawnX, int spawnY, int spawnZ, float spawnAngle, long time, long timeOfDay, int version, int clearWeatherTime, int rainTime, boolean raining, int thunderTime, boolean thundering, boolean initialized, boolean difficultyLocked, WorldBorder.Properties worldBorder, int wanderingTraderSpawnDelay, int wanderingTraderSpawnChance, UUID wanderingTraderId, Set serverBrands, Set removedFeatures, Timer scheduledEvents, NbtCompound customBossEvents, NbtCompound dragonFight, LevelInfo levelInfo, GeneratorOptions generatorOptions, LevelProperties.SpecialProperty specialProperty, Lifecycle lifecycle, CallbackInfo ci) { + @Inject(method = "Lnet/minecraft/world/level/LevelProperties;(Lcom/mojang/datafixers/DataFixer;ILnet/minecraft/nbt/NbtCompound;ZIIIFJJIIIZIZZZLnet/minecraft/world/border/WorldBorder$Properties;IILjava/util/UUID;Ljava/util/Set;Ljava/util/Set;Lnet/minecraft/world/timer/Timer;Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/entity/boss/dragon/EnderDragonFight$Data;Lnet/minecraft/world/level/LevelInfo;Lnet/minecraft/world/gen/GeneratorOptions;Lnet/minecraft/world/level/LevelProperties$SpecialProperty;Lcom/mojang/serialization/Lifecycle;)V", at = @At("RETURN")) + private void initComponents(DataFixer dataFixer, int dataVersion, NbtCompound playerData, boolean modded, int spawnX, int spawnY, int spawnZ, float spawnAngle, long time, long timeOfDay, int version, int clearWeatherTime, int rainTime, boolean raining, int thunderTime, boolean thundering, boolean initialized, boolean difficultyLocked, WorldBorder.Properties worldBorder, int wanderingTraderSpawnDelay, int wanderingTraderSpawnChance, UUID wanderingTraderId, Set serverBrands, Set removedFeatures, Timer scheduledEvents, NbtCompound customBossEvents, EnderDragonFight.Data dragonFight, LevelInfo levelInfo, GeneratorOptions generatorOptions, LevelProperties.SpecialProperty specialProperty, Lifecycle lifecycle, CallbackInfo ci) { this.components = StaticLevelComponentPlugin.createContainer(this); } diff --git a/gradle.properties b/gradle.properties index 748d4b01..f105a711 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs = -Xmx3G #see https://fabricmc.net/develop/ -minecraft_version=1.20-pre4 +minecraft_version=1.20 yarn_mappings=1 loader_version=0.14.19 #Fabric api @@ -14,8 +14,8 @@ elmendorf_version=0.11.0 mod_version = 5.2.0 curseforge_id = 318449 modrinth_id = K01OU20C -curseforge_versions = 1.20-Snapshot -modrinth_versions = 1.20-pre4 +curseforge_versions = 1.20 +modrinth_versions = 1.20 changelog_url = https://github.com/OnyxStudios/Cardinal-Components-API/blob release_type = release display_name = Cardinal-Components-API