Add FlatteningMap and EntityFlatteningMap#1635
Open
Eclipse-Sol wants to merge 4 commits intomasterfrom
Open
Conversation
mitchej123
reviewed
Apr 8, 2026
| } | ||
| } | ||
| } | ||
| if (isModernPack) break; |
Collaborator
There was a problem hiding this comment.
you could use a labeled break to avoid this
mitchej123
reviewed
Apr 8, 2026
| for (BlockEntry entry : entries) { | ||
| if ("minecraft".equals(entry.getId().getNamespace())) { | ||
| String name = entry.getId().getName(); | ||
| if ("grass_block".equals(name) || "short_grass".equals(name)) { |
Collaborator
There was a problem hiding this comment.
nit: prefer constants to inline strings
Collaborator
Author
There was a problem hiding this comment.
This will be taken out when #1626 is merged, that should have a better detection module to rely on.
mitchej123
reviewed
Apr 8, 2026
| result.add(new BlockEntry(entryA.getId(), metasA)); | ||
| } else { | ||
| // Both have specific metas -> intersect | ||
| Set<Integer> intersection = new HashSet<>(metasA); |
Collaborator
There was a problem hiding this comment.
Prefer fastutils... even in areas that aren't hotspots Integer boxing drives me nuts
mitchej123
reviewed
Apr 8, 2026
| * Only blocks present in both lists survive. Empty meta set = wildcard (all metas). | ||
| */ | ||
| private static List<BlockEntry> intersectBlockEntries(List<BlockEntry> a, List<BlockEntry> b) { | ||
| List<BlockEntry> result = new ArrayList<>(); |
Collaborator
There was a problem hiding this comment.
nit: what's the size of things coming here? worth presizing the array?
…k-map # Conflicts: # src/main/java/net/coderbot/iris/shaderpack/IdMap.java
Collaborator
Author
|
@mitchej123 this one is ready for review now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a 1:1 (for the most part) link between modern blocks and our legacy meta blocks values. Includes entities as well.