Skip to content

Commit

Permalink
Merge branch 'architectury-1.18.2' into architectury-1.19.2
Browse files Browse the repository at this point in the history
# Conflicts:
#	common/src/main/java/com/unlikepaladin/pfm/client/PathPackRPWrapper.java
  • Loading branch information
UnlikePaladin committed Nov 12, 2023
2 parents 5beee7f + 4c9dc86 commit c8fbd79
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import java.util.function.Predicate;
import java.util.function.Supplier;
Expand Down Expand Up @@ -44,7 +46,7 @@ public InputStream open(ResourceType type, Identifier id) throws IOException {
public Collection<Identifier> findResources(ResourceType type, String namespace, String prefix, Predicate<Identifier> allowedPathPredicate) {
if (PFMRuntimeResources.ready)
return delegate.get().findResources(type, namespace, prefix, allowedPathPredicate);
return null;
return new ArrayList<>();
}

@Override
Expand All @@ -56,7 +58,9 @@ public boolean contains(ResourceType type, Identifier id) {

@Override
public Set<String> getNamespaces(ResourceType type) {
return delegate.get().getNamespaces(type);
if (PFMRuntimeResources.ready)
return delegate.get().getNamespaces(type);
return new HashSet<>();
}

@Nullable
Expand All @@ -65,6 +69,8 @@ public <T> T parseMetadata(ResourceMetadataReader<T> metaReader) throws IOExcept
if (metaReader.getKey().equals("pack")) {
return (T) packResourceMetadata;
}
if (PFMRuntimeResources.ready)
return delegate.get().parseMetadata(metaReader);
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@Mixin(value = DataCache.CachedData.class)
public class PFMDataCache$CachedDataMixin {
@Inject(method = "write", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", remap = false),cancellable = true, remap = true)
public void silenceCacheWarning(Path root, Path dataProviderPath, String description, CallbackInfo ci) {
public void stopCacheWarning(Path root, Path dataProviderPath, String description, CallbackInfo ci) {
if (PFMRuntimeResources.isAnyGeneratorRunning())
ci.cancel();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class PFMMixinClientPacketListener {
private MinecraftClient client;

@Inject(method = "onGameJoin", at = @At("TAIL"))
private void pfm$showUpdateMessage(GameJoinS2CPacket par1, CallbackInfo ci) {
private void pfm$showModUpdateMessage(GameJoinS2CPacket par1, CallbackInfo ci) {
if (this.client.player == null) {
return;
}
Expand Down

0 comments on commit c8fbd79

Please sign in to comment.