mirror of
https://github.com/AlmostReliable/almostunified.git
synced 2024-11-14 19:25:13 -05:00
fix stone strata fall back variant
This commit is contained in:
parent
107e01d5fc
commit
0c0e9a47b2
2 changed files with 14 additions and 1 deletions
|
@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog],
|
||||
and this project adheres to [Semantic Versioning].
|
||||
|
||||
## [0.3.8] - 2023-04-06
|
||||
|
||||
### Fixed
|
||||
- stone strata fallback variant for clean stone
|
||||
|
||||
## [0.3.7] - 2023-04-02
|
||||
|
||||
Initial 1.19.4 release!
|
||||
|
|
|
@ -50,7 +50,8 @@ public class StoneStrataHandler {
|
|||
* Use {@link #isStoneStrataTag(UnifyTag)} to fill this requirement.
|
||||
*
|
||||
* @param item The item to get the stone strata from.
|
||||
* @return The stone strata of the item. Returning empty string means clean-stone strata.
|
||||
* @return The stone strata of the item. Clean stone strata returns an empty string for later sorting as a
|
||||
* fallback variant.
|
||||
*/
|
||||
public String getStoneStrata(ResourceLocation item) {
|
||||
String strata = stoneStrataTagMap
|
||||
|
@ -64,12 +65,19 @@ public class StoneStrataHandler {
|
|||
return i == -1 ? null : s.substring(i + 1);
|
||||
})
|
||||
.orElse(null);
|
||||
|
||||
if (strata != null) {
|
||||
if (strata.equals("stone")) {
|
||||
return "";
|
||||
}
|
||||
return strata;
|
||||
}
|
||||
|
||||
for (String stone : stoneStrata) {
|
||||
if (item.getPath().contains(stone + "_")) {
|
||||
if (stone.equals("stone")) {
|
||||
return "";
|
||||
}
|
||||
return stone;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue