Skip to content

Commit

Permalink
fix ResourcePackInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Brokkonaut committed May 25, 2024
1 parent 6f30e20 commit e4ba70c
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/main/java/net/devtech/arrp/impl/RuntimeResourcePackImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ public class RuntimeResourcePackImpl implements RuntimeResourcePack, ResourcePac

public final int packVersion;
private final Identifier id;
private final ResourcePackInfo info;
private final Lock waiting = new ReentrantLock();
private final Map<Identifier, Supplier<byte[]>> data = new ConcurrentHashMap<>();
private final Map<Identifier, Supplier<byte[]>> assets = new ConcurrentHashMap<>();
Expand All @@ -142,6 +143,7 @@ public RuntimeResourcePackImpl(Identifier id) {
public RuntimeResourcePackImpl(Identifier id, int version) {
this.packVersion = version;
this.id = id;
this.info = new ResourcePackInfo(this.id.getNamespace() + ";" + this.id.getPath(), Text.of("Runtime Resource Pack " + this.id), ResourcePackSource.NONE, Optional.empty());
}

@Override
Expand Down Expand Up @@ -486,17 +488,7 @@ public <T> T parseMetadata(ResourceMetadataReader<T> metaReader) {

@Override
public ResourcePackInfo getInfo() {
return new ResourcePackInfo("Runtime Resource Pack" + this.id, Text.of(this.id), new ResourcePackSource() {
@Override
public Text decorate(Text var1) {
return var1;
}

@Override
public boolean canBeEnabledLater() {
return false;
}
}, Optional.empty());
return info;
}

@Override
Expand Down

0 comments on commit e4ba70c

Please # to comment.