A little bit refactor
This commit is contained in:
parent
bf171754c7
commit
056a23beb9
1 changed files with 2 additions and 8 deletions
|
@ -54,9 +54,7 @@ public class TagHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Tag.Builder apply(Tag.Builder builder, Set<ResourceLocation> ids) {
|
public static Tag.Builder apply(Tag.Builder builder, Set<ResourceLocation> ids) {
|
||||||
ids.forEach((value) -> {
|
ids.forEach(value -> builder.addElement(value, "Better End Code"));
|
||||||
builder.addElement(value, "Better End Code");
|
|
||||||
});
|
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,11 +67,7 @@ public class TagHelper {
|
||||||
}
|
}
|
||||||
if (endTags != null) {
|
if (endTags != null) {
|
||||||
endTags.forEach((id, ids) -> {
|
endTags.forEach((id, ids) -> {
|
||||||
if (tagsMap.containsKey(id)) {
|
apply(tagsMap.computeIfAbsent(id, key -> Tag.Builder.tag()), ids);
|
||||||
apply(tagsMap.get(id), ids);
|
|
||||||
} else {
|
|
||||||
tagsMap.put(id, apply(Tag.Builder.tag(), ids));
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue