Skip to content

Commit

Permalink
Merge branch '1.21.2' into CustomIngredient_toDisplay
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 committed Oct 10, 2024
2 parents ae7d73d + 344e053 commit 5eabe0b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -34,21 +34,21 @@
public abstract class SimpleFabricLootTableProvider implements FabricLootTableProvider {
protected final FabricDataOutput output;
private final CompletableFuture<RegistryWrapper.WrapperLookup> registryLookup;
protected final LootContextType lootContextType;
protected final ContextType contextType;

public SimpleFabricLootTableProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registryLookup, LootContextType lootContextType) {
public SimpleFabricLootTableProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> 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";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -51,7 +51,7 @@ public final class FabricLootTableProviderImpl {
public static CompletableFuture<?> run(
DataWriter writer,
FabricLootTableProvider provider,
LootContextType lootContextType,
ContextType contextType,
FabricDataOutput fabricDataOutput,
CompletableFuture<RegistryWrapper.WrapperLookup> registryLookup) {
HashMap<Identifier, LootTable> builders = Maps.newHashMap();
Expand All @@ -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());
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ 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
Expand Down

0 comments on commit 5eabe0b

Please sign in to comment.