Skip to content

Commit

Permalink
Update Fabric API
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaming32 committed Dec 16, 2024
1 parent 8016bb7 commit a063365
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.mojang.serialization.JsonOps;
import io.github.gaming32.bingo.Bingo;
import io.github.gaming32.bingo.data.BingoRegistries;
import io.github.gaming32.bingo.util.ResourceLocations;
import net.minecraft.core.HolderLookup;
import net.minecraft.resources.FileToIdConverter;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.packs.resources.ResourceManager;
import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener;
Expand All @@ -26,9 +25,7 @@ public class GoalManager extends SimpleJsonResourceReloadListener<BingoGoal> {
private static Map<Integer, List<GoalHolder>> goalsByDifficulty = Map.of();

public GoalManager(HolderLookup.Provider registries) {
// FIXME: Switch to (HolderLookup.Provider, Codec, ResourceKey) overload and remove the AW once
// https://github.com/FabricMC/fabric/pull/4180 is merged
super(registries.createSerializationContext(JsonOps.INSTANCE), BingoGoal.CODEC, FileToIdConverter.json("bingo/goal"));
super(registries, BingoGoal.CODEC, BingoRegistries.GOAL);
}

public static Set<ResourceLocation> getGoalIds() {
Expand Down
2 changes: 0 additions & 2 deletions common/src/main/resources/bingo.accessWidener
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ accessible method net/minecraft/client/gui/GuiGraphics renderTooltipInternal (Ln
accessible method net/minecraft/commands/arguments/ResourceKeyArgument getRegistryKey (Lcom/mojang/brigadier/context/CommandContext;Ljava/lang/String;Lnet/minecraft/resources/ResourceKey;Lcom/mojang/brigadier/exceptions/DynamicCommandExceptionType;)Lnet/minecraft/resources/ResourceKey;
accessible method net/minecraft/commands/arguments/ResourceKeyArgument resolveKey (Lcom/mojang/brigadier/context/CommandContext;Ljava/lang/String;Lnet/minecraft/resources/ResourceKey;Lcom/mojang/brigadier/exceptions/DynamicCommandExceptionType;)Lnet/minecraft/core/Holder$Reference;

extendable method net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener <init> (Lcom/mojang/serialization/DynamicOps;Lcom/mojang/serialization/Codec;Lnet/minecraft/resources/FileToIdConverter;)V

accessible method net/minecraft/world/level/storage/loot/parameters/LootContextParamSets register (Ljava/lang/String;Ljava/util/function/Consumer;)Lnet/minecraft/util/context/ContextKeySet;

accessible field net/minecraft/world/inventory/GrindstoneMenu repairSlots Lnet/minecraft/world/Container;
Expand Down
2 changes: 1 addition & 1 deletion fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
],
"depends": {
"fabricloader": ">=0.16.9",
"fabric-api": ">=0.111.0",
"fabric-api": ">=0.112.1",
"minecraft": ">=1.21.4 <1.21.5"
},
"custom": {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ mod_version=1.1.12
maven_group=io.github.gaming32

fabric_loader_version=0.16.9
fabric_api_version=0.111.0+1.21.4
fabric_api_version=0.112.1+1.21.4

neoforge_version=21.4.1-beta

0 comments on commit a063365

Please sign in to comment.