Skip to content

Commit cbaab91

Browse files
authored
Merge pull request #5772 from IThundxr/mc1.18/track-advancement-fix
feat: Make "A New Gauge" Advancement check for AllItemTags#TRACKS
2 parents 4294d74 + 7800328 commit cbaab91

File tree

6 files changed

+24
-16
lines changed

6 files changed

+24
-16
lines changed

src/generated/resources/.cache/cache

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3237,7 +3237,7 @@ c02335d1e84dffdc0c50e8ba2a27ce84366a5f6d data/create/advancements/steam_whistle.
32373237
0cb2a6357d3bcabb9dc2c87863a77cf53e8dcef1 data/create/advancements/stressometer_maxed.json
32383238
566d3804e962be45c80c8debb2eb2761b2ded905 data/create/advancements/sturdy_sheet.json
32393239
1c431334d71f7e25b9bedc525c642c8cb5271b9f data/create/advancements/super_glue.json
3240-
58fd8b7440508a8128d2860eb70a2c5b7a2531f9 data/create/advancements/track_0.json
3240+
7c274fba06fb2bf357f817cf47d92ca63f3f8837 data/create/advancements/track_0.json
32413241
7388901df65f05074c2a2ad8156cbd76a069cdc6 data/create/advancements/track_crafting_factory.json
32423242
c6c3a803ff7738a36ac0956eda593f9774e567b5 data/create/advancements/track_signal.json
32433243
7f4cb81f3ddf26f47055b369b3f3af82f1894fcb data/create/advancements/train.json
@@ -5376,6 +5376,7 @@ ba2e448d208997c8327df19fac39748184d49465 data/create/tags/items/stone_types/ochr
53765376
14710201b8b392a414feddff420594fb7194b194 data/create/tags/items/stone_types/tuff.json
53775377
634faefc734062b869002bd38aa4e5a2b06d8b9a data/create/tags/items/stone_types/veridium.json
53785378
d063e12c9ef75f39518c6d129ea35d833464d547 data/create/tags/items/toolboxes.json
5379+
ad8fa04f7bbbafd70d0ce158af78a35e899301e2 data/create/tags/items/tracks.json
53795380
2f4044c2989b9a8aa394c88617d67a6a310e6b1b data/create/tags/items/upright_on_belt.json
53805381
50936b211d94167a35ec78c89954082a336b6269 data/create/tags/items/valve_handles.json
53815382
f8d83f446d0a2071dca4481251339c4249b2fd3f data/create/tags/items/vanilla_stripped_logs.json

src/generated/resources/data/create/advancements/track_0.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222
"conditions": {
2323
"items": [
2424
{
25-
"items": [
26-
"create:track"
27-
]
25+
"tag": "create:tracks"
2826
}
2927
]
3028
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"replace": false,
3+
"values": [
4+
"create:track"
5+
]
6+
}

src/main/java/com/simibubi/create/AllBlocks.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,6 +1534,7 @@ public class AllBlocks {
15341534
.tag(AllBlockTags.GIRDABLE_TRACKS.tag)
15351535
.lang("Train Track")
15361536
.item(TrackBlockItem::new)
1537+
.tag(AllItemTags.TRACKS.tag)
15371538
.model((c, p) -> p.generated(c, Create.asResource("item/" + c.getName())))
15381539
.build()
15391540
.register();

src/main/java/com/simibubi/create/AllTags.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static TagKey<Fluid> forgeFluidTag(String path) {
5353
}
5454

5555
public enum NameSpace {
56-
56+
5757
MOD(Create.ID, false, true),
5858
FORGE("forge"),
5959
TIC("tconstruct"),
@@ -77,7 +77,7 @@ public enum NameSpace {
7777
}
7878

7979
public enum AllBlockTags {
80-
80+
8181
BRITTLE,
8282
CASING,
8383
CONTRAPTION_INVENTORY_DENY,
@@ -154,11 +154,11 @@ public boolean matches(BlockState state) {
154154
}
155155

156156
private static void init() {}
157-
157+
158158
}
159159

160160
public enum AllItemTags {
161-
161+
162162
BLAZE_BURNER_FUEL_REGULAR(MOD, "blaze_burner_fuel/regular"),
163163
BLAZE_BURNER_FUEL_SPECIAL(MOD, "blaze_burner_fuel/special"),
164164
CASING,
@@ -173,6 +173,7 @@ public enum AllItemTags {
173173
SEATS,
174174
SLEEPERS,
175175
TOOLBOXES,
176+
TRACKS,
176177
UPRIGHT_ON_BELT,
177178
VALVE_HANDLES,
178179
VANILLA_STRIPPED_LOGS,
@@ -225,11 +226,11 @@ public boolean matches(ItemStack stack) {
225226
}
226227

227228
private static void init() {}
228-
229+
229230
}
230231

231232
public enum AllFluidTags {
232-
233+
233234
BOTTOMLESS_ALLOW(MOD, "bottomless/allow"),
234235
BOTTOMLESS_DENY(MOD, "bottomless/deny"),
235236
FAN_PROCESSING_CATALYSTS_BLASTING(MOD, "fan_processing_catalysts/blasting"),
@@ -280,9 +281,9 @@ public boolean matches(FluidState state) {
280281
}
281282

282283
private static void init() {}
283-
284+
284285
}
285-
286+
286287
public enum AllEntityTags {
287288

288289
BLAZE_BURNER_CAPTURABLE,
@@ -328,9 +329,9 @@ public boolean matches(Entity entity) {
328329
}
329330

330331
private static void init() {}
331-
332+
332333
}
333-
334+
334335
public enum AllRecipeSerializerTags {
335336

336337
AUTOMATION_IGNORE,

src/main/java/com/simibubi/create/foundation/advancement/AllAdvancements.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import com.simibubi.create.AllBlocks;
2424
import com.simibubi.create.AllFluids;
2525
import com.simibubi.create.AllItems;
26+
import com.simibubi.create.AllTags.AllItemTags;
2627
import com.simibubi.create.foundation.advancement.CreateAdvancement.Builder;
2728

2829
import net.minecraft.advancements.Advancement;
@@ -328,7 +329,7 @@ public class AllAdvancements implements DataProvider {
328329
.description("Create Chocolate Glazed Berries, a Honeyed Apple, and a Sweet Roll all from the same Spout")
329330
.after(STEAM_ENGINE_MAXED)
330331
.special(EXPERT)),
331-
332+
332333
DIVING_SUIT_LAVA = create("diving_suit_lava", b -> b.icon(AllItems.NETHERITE_DIVING_HELMET)
333334
.title("Swimming with the Striders")
334335
.description("Attempt to take a dive in lava with your netherite diving gear")
@@ -543,7 +544,7 @@ public class AllAdvancements implements DataProvider {
543544
TRAIN_TRACK = create("track_0", b -> b.icon(AllBlocks.TRACK)
544545
.title("A New Gauge")
545546
.description("Obtain some Train Tracks")
546-
.whenIconCollected()
547+
.whenItemCollected(AllItemTags.TRACKS.tag)
547548
.after(STURDY_SHEET)),
548549

549550
TRAIN_WHISTLE = create("train_whistle", b -> b.icon(AllBlocks.STEAM_WHISTLE)

0 commit comments

Comments
 (0)