Fix : Loot API breaks random_sequence ()

This commit is contained in:
Technici4n 2023-05-11 10:17:33 +02:00 committed by GitHub
parent 03ef495b7f
commit c53558c7e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions
fabric-loot-api-v2/src/main/java/net/fabricmc/fabric

View file

@ -106,6 +106,7 @@ public interface FabricLootTableBuilder {
builder.type(table.getType());
builder.pools(List.of(accessor.fabric_getPools()));
builder.apply(List.of(accessor.fabric_getFunctions()));
builder.method_51883(accessor.fabric_getRandomSequenceId());
return builder;
}

View file

@ -22,6 +22,7 @@ import org.spongepowered.asm.mixin.gen.Accessor;
import net.minecraft.loot.LootPool;
import net.minecraft.loot.LootTable;
import net.minecraft.loot.function.LootFunction;
import net.minecraft.util.Identifier;
/**
* Accesses loot table fields for {@link net.fabricmc.fabric.api.loot.v2.FabricLootTableBuilder#copyOf(LootTable)}.
@ -34,4 +35,7 @@ public interface LootTableAccessor {
@Accessor("functions")
LootFunction[] fabric_getFunctions();
@Accessor("field_44892")
Identifier fabric_getRandomSequenceId();
}