From 488720f0718165c9458210a3198326835fd4496b Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Thu, 10 Oct 2024 15:29:13 +0100 Subject: [PATCH 1/2] 1.21.2-pre2 Just mappings --- .../v1/provider/SimpleFabricLootTableProvider.java | 12 ++++++------ .../datagen/loot/FabricLootTableProviderImpl.java | 6 +++--- .../impl/registry/sync/FabricRegistryInit.java | 2 +- gradle.properties | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/fabric-data-generation-api-v1/src/main/java/net/fabricmc/fabric/api/datagen/v1/provider/SimpleFabricLootTableProvider.java b/fabric-data-generation-api-v1/src/main/java/net/fabricmc/fabric/api/datagen/v1/provider/SimpleFabricLootTableProvider.java index 443bd8277f..7d3da5474c 100644 --- a/fabric-data-generation-api-v1/src/main/java/net/fabricmc/fabric/api/datagen/v1/provider/SimpleFabricLootTableProvider.java +++ b/fabric-data-generation-api-v1/src/main/java/net/fabricmc/fabric/api/datagen/v1/provider/SimpleFabricLootTableProvider.java @@ -20,9 +20,9 @@ import java.util.concurrent.CompletableFuture; import net.minecraft.data.DataWriter; -import net.minecraft.loot.context.LootContextType; import net.minecraft.loot.context.LootContextTypes; import net.minecraft.registry.RegistryWrapper; +import net.minecraft.util.context.ContextType; import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator; import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; @@ -34,21 +34,21 @@ public abstract class SimpleFabricLootTableProvider implements FabricLootTableProvider { protected final FabricDataOutput output; private final CompletableFuture registryLookup; - protected final LootContextType lootContextType; + protected final ContextType contextType; - public SimpleFabricLootTableProvider(FabricDataOutput output, CompletableFuture registryLookup, LootContextType lootContextType) { + public SimpleFabricLootTableProvider(FabricDataOutput output, CompletableFuture registryLookup, ContextType contextType) { this.output = output; this.registryLookup = registryLookup; - this.lootContextType = lootContextType; + this.contextType = contextType; } @Override public CompletableFuture run(DataWriter writer) { - return FabricLootTableProviderImpl.run(writer, this, lootContextType, output, registryLookup); + return FabricLootTableProviderImpl.run(writer, this, contextType, output, registryLookup); } @Override public String getName() { - return Objects.requireNonNull(LootContextTypes.MAP.inverse().get(lootContextType), "Could not get id for loot context type") + " Loot Table"; + return Objects.requireNonNull(LootContextTypes.MAP.inverse().get(contextType), "Could not get id for loot context type") + " Loot Table"; } } diff --git a/fabric-data-generation-api-v1/src/main/java/net/fabricmc/fabric/impl/datagen/loot/FabricLootTableProviderImpl.java b/fabric-data-generation-api-v1/src/main/java/net/fabricmc/fabric/impl/datagen/loot/FabricLootTableProviderImpl.java index 12bbec2bf9..5f1f3eaf74 100644 --- a/fabric-data-generation-api-v1/src/main/java/net/fabricmc/fabric/impl/datagen/loot/FabricLootTableProviderImpl.java +++ b/fabric-data-generation-api-v1/src/main/java/net/fabricmc/fabric/impl/datagen/loot/FabricLootTableProviderImpl.java @@ -31,11 +31,11 @@ import net.minecraft.data.DataProvider; import net.minecraft.data.DataWriter; import net.minecraft.loot.LootTable; -import net.minecraft.loot.context.LootContextType; import net.minecraft.registry.RegistryKeys; import net.minecraft.registry.RegistryOps; import net.minecraft.registry.RegistryWrapper; import net.minecraft.util.Identifier; +import net.minecraft.util.context.ContextType; import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; import net.fabricmc.fabric.api.datagen.v1.provider.FabricBlockLootTableProvider; @@ -51,7 +51,7 @@ public final class FabricLootTableProviderImpl { public static CompletableFuture run( DataWriter writer, FabricLootTableProvider provider, - LootContextType lootContextType, + ContextType contextType, FabricDataOutput fabricDataOutput, CompletableFuture registryLookup) { HashMap builders = Maps.newHashMap(); @@ -62,7 +62,7 @@ public static CompletableFuture run( ResourceCondition[] conditions = FabricDataGenHelper.consumeConditions(builder); conditionMap.put(registryKey.getValue(), conditions); - if (builders.put(registryKey.getValue(), builder.type(lootContextType).build()) != null) { + if (builders.put(registryKey.getValue(), builder.type(contextType).build()) != null) { throw new IllegalStateException("Duplicate loot table " + registryKey.getValue()); } }); diff --git a/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/impl/registry/sync/FabricRegistryInit.java b/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/impl/registry/sync/FabricRegistryInit.java index e1d4cb99e0..5056025a13 100644 --- a/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/impl/registry/sync/FabricRegistryInit.java +++ b/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/impl/registry/sync/FabricRegistryInit.java @@ -217,7 +217,7 @@ public void onInitialize() { .addAttribute(RegistryAttribute.SYNCED); // Synced via PacketCodecs.registryValue - RegistryAttributeHolder.get(Registries.field_54927) + RegistryAttributeHolder.get(Registries.RECIPE_BOOK_CATEGORY) .addAttribute(RegistryAttribute.SYNCED); } } diff --git a/gradle.properties b/gradle.properties index a58e0d91d4..1a61b72f76 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ org.gradle.parallel=true fabric.loom.multiProjectOptimisation=true version=0.105.3 -minecraft_version=1.21.2-pre1 +minecraft_version=1.21.2-pre2 yarn_version=+build.1 loader_version=0.16.4 installer_version=1.0.1 From 344e05376fba9e75b0b8e2976d5740f44f941f01 Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Thu, 10 Oct 2024 15:37:07 +0100 Subject: [PATCH 2/2] Update with pre2 access wideners --- .../main/resources/fabric-data-generation-api-v1.accesswidener | 1 + .../resources/fabric-transitive-access-wideners-v1.accesswidener | 1 + 2 files changed, 2 insertions(+) diff --git a/fabric-data-generation-api-v1/src/main/resources/fabric-data-generation-api-v1.accesswidener b/fabric-data-generation-api-v1/src/main/resources/fabric-data-generation-api-v1.accesswidener index 8e0567d92f..a10eff5866 100644 --- a/fabric-data-generation-api-v1/src/main/resources/fabric-data-generation-api-v1.accesswidener +++ b/fabric-data-generation-api-v1/src/main/resources/fabric-data-generation-api-v1.accesswidener @@ -291,6 +291,7 @@ transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableG transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator mushroomBlockDrops (Lnet/minecraft/block/Block;Lnet/minecraft/item/ItemConvertible;)Lnet/minecraft/loot/LootTable$Builder; transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator shortPlantDrops (Lnet/minecraft/block/Block;)Lnet/minecraft/loot/LootTable$Builder; transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator dropsWithShears (Lnet/minecraft/item/ItemConvertible;)Lnet/minecraft/loot/LootTable$Builder; +transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator method_65053 (Lnet/minecraft/item/ItemConvertible;)Lnet/minecraft/loot/LootTable$Builder; transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator multifaceGrowthDrops (Lnet/minecraft/block/Block;Lnet/minecraft/loot/condition/LootCondition$Builder;)Lnet/minecraft/loot/LootTable$Builder; transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator paleMossCarpetDrops (Lnet/minecraft/block/Block;)Lnet/minecraft/loot/LootTable$Builder; transitive-accessible method net/minecraft/data/server/loottable/BlockLootTableGenerator leavesDrops (Lnet/minecraft/block/Block;Lnet/minecraft/block/Block;[F)Lnet/minecraft/loot/LootTable$Builder; diff --git a/fabric-transitive-access-wideners-v1/src/main/resources/fabric-transitive-access-wideners-v1.accesswidener b/fabric-transitive-access-wideners-v1/src/main/resources/fabric-transitive-access-wideners-v1.accesswidener index 49da2dbf9b..63867166d5 100644 --- a/fabric-transitive-access-wideners-v1/src/main/resources/fabric-transitive-access-wideners-v1.accesswidener +++ b/fabric-transitive-access-wideners-v1/src/main/resources/fabric-transitive-access-wideners-v1.accesswidener @@ -266,6 +266,7 @@ transitive-accessible field net/minecraft/client/render/RenderPhase CUTOUT_PROGR transitive-accessible field net/minecraft/client/render/RenderPhase TRANSLUCENT_PROGRAM Lnet/minecraft/client/render/RenderPhase$ShaderProgram; transitive-accessible field net/minecraft/client/render/RenderPhase TRANSLUCENT_MOVING_BLOCK_PROGRAM Lnet/minecraft/client/render/RenderPhase$ShaderProgram; transitive-accessible field net/minecraft/client/render/RenderPhase ARMOR_CUTOUT_NO_CULL_PROGRAM Lnet/minecraft/client/render/RenderPhase$ShaderProgram; +transitive-accessible field net/minecraft/client/render/RenderPhase field_54961 Lnet/minecraft/client/render/RenderPhase$ShaderProgram; transitive-accessible field net/minecraft/client/render/RenderPhase ENTITY_SOLID_PROGRAM Lnet/minecraft/client/render/RenderPhase$ShaderProgram; transitive-accessible field net/minecraft/client/render/RenderPhase ENTITY_CUTOUT_PROGRAM Lnet/minecraft/client/render/RenderPhase$ShaderProgram; transitive-accessible field net/minecraft/client/render/RenderPhase ENTITY_CUTOUT_NONULL_PROGRAM Lnet/minecraft/client/render/RenderPhase$ShaderProgram;