Skip to content

Commit

Permalink
Port
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePandaOliver committed Jan 24, 2025
1 parent 51c9ae6 commit b1eaf9a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public final <R> void bind(boolean throwOnMissingRegistry) {

Registry<R> registry = (Registry<R>) getRegistry();
if (registry != null) {
this.holder = registry.get((ResourceKey<R>) this.key).orElse(null);
this.holder = registry.getHolder((ResourceKey<R>) this.key).orElse(null);
} else if (throwOnMissingRegistry) {
throw new IllegalStateException("Registry not present for " + this + ": " + this.key.registry());
}
Expand All @@ -62,7 +62,7 @@ public ResourceKey<? extends Registry<?>> getRegistryKey() {
}

public Registry<?> getRegistry() {
return BuiltInRegistries.REGISTRY.getValue(getKey().registry());
return BuiltInRegistries.REGISTRY.get(getKey().registry());
}

public ResourceLocation getId() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import net.minecraft.server.packs.PackType;
import net.minecraft.server.packs.resources.PreparableReloadListener;
import net.minecraft.server.packs.resources.ResourceManager;
import net.minecraft.util.profiling.ProfilerFiller;

import java.util.Collection;
import java.util.List;
Expand Down Expand Up @@ -57,8 +58,9 @@ public ResourceLocation getFabricId() {
}

@Override
public CompletableFuture<Void> reload(PreparationBarrier preparationBarrier, ResourceManager resourceManager, Executor executor, Executor executor2) {
return listener.reload(preparationBarrier, resourceManager, executor, executor2);
public CompletableFuture<Void> reload(PreparationBarrier preparationBarrier, ResourceManager resourceManager, ProfilerFiller preparationsProfiler, ProfilerFiller reloadProfiler,
Executor executor, Executor executor2) {
return listener.reload(preparationBarrier, resourceManager, preparationsProfiler, reloadProfiler, executor, executor2);
}

@Override
Expand Down

0 comments on commit b1eaf9a

Please sign in to comment.