Skip to content

Commit b3b3603

Browse files
committed
add waxed concrete powder to creative tab
1 parent 51eed4e commit b3b3603

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ pluginManagement {
77
}
88

99
plugins {
10-
id("com.possible-triangle.packwiz") version ("0.3.0")
10+
id("com.possible-triangle.packwiz") version ("1.0.43")
1111
}

src/main/java/galena/oreganized/OTabs.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import static galena.oreganized.ModCompat.NETHERS_DELIGHT_ID;
55
import static galena.oreganized.ModCompat.SHIELD_EXPANSION_ID;
66

7+
import galena.oreganized.index.DyeColors;
78
import galena.oreganized.index.OBlocks;
89
import galena.oreganized.index.OItems;
910
import java.util.Map;
@@ -75,13 +76,18 @@ public static void buildCreativeModeTabContents(BuildCreativeModeTabContentsEven
7576
if (tab == CreativeModeTabs.COLORED_BLOCKS) {
7677
OBlocks.CRYSTAL_GLASS.entrySet()
7778
.stream()
78-
.sorted(Map.Entry.comparingByKey())
79+
.sorted(Map.Entry.comparingByKey(DyeColors.comparator()))
7980
.forEach(entry -> putBefore(entries, Items.GLASS_PANE, entry.getValue()));
8081

8182
OBlocks.CRYSTAL_GLASS_PANES.entrySet()
8283
.stream()
83-
.sorted(Map.Entry.comparingByKey())
84+
.sorted(Map.Entry.comparingByKey(DyeColors.comparator()))
8485
.forEach(entry -> putBefore(entries, Items.SHULKER_BOX, entry.getValue()));
86+
87+
OBlocks.WAXED_CONCRETE_POWDER.entrySet()
88+
.stream()
89+
.sorted(Map.Entry.comparingByKey(DyeColors.comparator()))
90+
.forEach(entry -> putBefore(entries, Items.WHITE_GLAZED_TERRACOTTA, entry.getValue()));
8591
}
8692

8793
if (tab == CreativeModeTabs.NATURAL_BLOCKS) {

src/main/java/galena/oreganized/data/OBlockTags.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import static galena.oreganized.index.OTags.Blocks.STORAGE_BLOCKS_SILVER;
2323

2424
import galena.oreganized.Oreganized;
25+
import galena.oreganized.index.DyeColors;
2526
import galena.oreganized.index.OBlocks;
2627
import java.util.Map;
2728
import java.util.concurrent.CompletableFuture;
@@ -57,7 +58,7 @@ public OBlockTags(PackOutput output, CompletableFuture<HolderLookup.Provider> fu
5758
private void tag(TagKey<Block> key, Map<DyeColor, ? extends Supplier<? extends Block>> values) {
5859
var tag = tag(key);
5960
values.entrySet().stream()
60-
.sorted(Map.Entry.comparingByKey())
61+
.sorted(Map.Entry.comparingByKey(DyeColors.comparator()))
6162
.map(it -> it.getValue().get())
6263
.map(BuiltInRegistries.BLOCK::getKey)
6364
.forEach(tag::addOptional);

src/main/java/galena/oreganized/index/DyeColors.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package galena.oreganized.index;
22

3+
import java.util.Comparator;
34
import java.util.Objects;
45
import java.util.function.Function;
56
import java.util.stream.Stream;
@@ -60,4 +61,8 @@ public static Stream<DyeColor> supported() {
6061
).flatMap(Function.identity());
6162
}
6263

64+
public static Comparator<DyeColor> comparator() {
65+
return Comparator.comparing(DyeColor::getId);
66+
}
67+
6368
}

0 commit comments

Comments
 (0)