Skip to content

Commit

Permalink
Fixed tags exporting in weird folders
Browse files Browse the repository at this point in the history
  • Loading branch information
LatvianModder committed Jul 24, 2024
1 parent 90b9a02 commit 5ad4442
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public interface TagLoaderKJS<T> {
kjs$resources.kjs$getServerScriptManager().getRegistries().cacheTags(reg, map);

if (DataExport.export != null) {
var loc = "tags/" + objStorage + "/";
var loc = "tags/" + objStorage.key.location() + "/";

for (var entry : map.entrySet()) {
var list = new ArrayList<String>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ public Map<String, ItemStack> itemStackParseCache() {
public <T> void cacheTags(Registry<T> registry, Map<ResourceLocation, List<TagLoader.EntryWithSource>> map) {
var key1 = (ResourceKey) registry.key();

if (key1 == null) {
return;
}

if (key1 == Registries.ITEM) {
cachedItemTags = Cast.to(new CachedItemTagLookup((Registry) registry, map));
cachedRegistryTags.put(key1, Pair.of(registry, cachedItemTags));
Expand Down

0 comments on commit 5ad4442

Please sign in to comment.