feat: Make "A New Gauge" Advancement check for AllItemTags#TRACKS

This commit is contained in:
IThundxr 2023-11-19 14:44:35 -05:00
parent 2cf7d171df
commit a6079ff9af
No known key found for this signature in database
GPG key ID: E291EC97BAF935E6
7 changed files with 28 additions and 16 deletions

View file

@ -3237,7 +3237,7 @@ c02335d1e84dffdc0c50e8ba2a27ce84366a5f6d data/create/advancements/steam_whistle.
0cb2a6357d3bcabb9dc2c87863a77cf53e8dcef1 data/create/advancements/stressometer_maxed.json
566d3804e962be45c80c8debb2eb2761b2ded905 data/create/advancements/sturdy_sheet.json
1c431334d71f7e25b9bedc525c642c8cb5271b9f data/create/advancements/super_glue.json
58fd8b7440508a8128d2860eb70a2c5b7a2531f9 data/create/advancements/track_0.json
7c274fba06fb2bf357f817cf47d92ca63f3f8837 data/create/advancements/track_0.json
7388901df65f05074c2a2ad8156cbd76a069cdc6 data/create/advancements/track_crafting_factory.json
c6c3a803ff7738a36ac0956eda593f9774e567b5 data/create/advancements/track_signal.json
7f4cb81f3ddf26f47055b369b3f3af82f1894fcb data/create/advancements/train.json
@ -5376,6 +5376,7 @@ ba2e448d208997c8327df19fac39748184d49465 data/create/tags/items/stone_types/ochr
14710201b8b392a414feddff420594fb7194b194 data/create/tags/items/stone_types/tuff.json
634faefc734062b869002bd38aa4e5a2b06d8b9a data/create/tags/items/stone_types/veridium.json
d063e12c9ef75f39518c6d129ea35d833464d547 data/create/tags/items/toolboxes.json
ad8fa04f7bbbafd70d0ce158af78a35e899301e2 data/create/tags/items/tracks.json
2f4044c2989b9a8aa394c88617d67a6a310e6b1b data/create/tags/items/upright_on_belt.json
50936b211d94167a35ec78c89954082a336b6269 data/create/tags/items/valve_handles.json
f8d83f446d0a2071dca4481251339c4249b2fd3f data/create/tags/items/vanilla_stripped_logs.json

View file

@ -22,9 +22,7 @@
"conditions": {
"items": [
{
"items": [
"create:track"
]
"tag": "create:tracks"
}
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"create:track"
]
}

View file

@ -1534,6 +1534,7 @@ public class AllBlocks {
.tag(AllBlockTags.GIRDABLE_TRACKS.tag)
.lang("Train Track")
.item(TrackBlockItem::new)
.tag(AllItemTags.TRACKS.tag)
.model((c, p) -> p.generated(c, Create.asResource("item/" + c.getName())))
.build()
.register();

View file

@ -53,7 +53,7 @@ public class AllTags {
}
public enum NameSpace {
MOD(Create.ID, false, true),
FORGE("forge"),
TIC("tconstruct"),
@ -77,7 +77,7 @@ public class AllTags {
}
public enum AllBlockTags {
BRITTLE,
CASING,
CONTRAPTION_INVENTORY_DENY,
@ -154,11 +154,11 @@ public class AllTags {
}
private static void init() {}
}
public enum AllItemTags {
BLAZE_BURNER_FUEL_REGULAR(MOD, "blaze_burner_fuel/regular"),
BLAZE_BURNER_FUEL_SPECIAL(MOD, "blaze_burner_fuel/special"),
CASING,
@ -173,6 +173,7 @@ public class AllTags {
SEATS,
SLEEPERS,
TOOLBOXES,
TRACKS,
UPRIGHT_ON_BELT,
VALVE_HANDLES,
VANILLA_STRIPPED_LOGS,
@ -225,11 +226,11 @@ public class AllTags {
}
private static void init() {}
}
public enum AllFluidTags {
BOTTOMLESS_ALLOW(MOD, "bottomless/allow"),
BOTTOMLESS_DENY(MOD, "bottomless/deny"),
FAN_PROCESSING_CATALYSTS_BLASTING(MOD, "fan_processing_catalysts/blasting"),
@ -280,9 +281,9 @@ public class AllTags {
}
private static void init() {}
}
public enum AllEntityTags {
BLAZE_BURNER_CAPTURABLE,
@ -328,9 +329,9 @@ public class AllTags {
}
private static void init() {}
}
public enum AllRecipeSerializerTags {
AUTOMATION_IGNORE,

View file

@ -23,6 +23,7 @@ import com.mojang.logging.LogUtils;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllFluids;
import com.simibubi.create.AllItems;
import com.simibubi.create.AllTags.AllItemTags;
import com.simibubi.create.foundation.advancement.CreateAdvancement.Builder;
import net.minecraft.advancements.Advancement;
@ -328,7 +329,7 @@ public class AllAdvancements implements DataProvider {
.description("Create Chocolate Glazed Berries, a Honeyed Apple, and a Sweet Roll all from the same Spout")
.after(STEAM_ENGINE_MAXED)
.special(EXPERT)),
DIVING_SUIT_LAVA = create("diving_suit_lava", b -> b.icon(AllItems.NETHERITE_DIVING_HELMET)
.title("Swimming with the Striders")
.description("Attempt to take a dive in lava with your netherite diving gear")
@ -543,7 +544,7 @@ public class AllAdvancements implements DataProvider {
TRAIN_TRACK = create("track_0", b -> b.icon(AllBlocks.TRACK)
.title("A New Gauge")
.description("Obtain some Train Tracks")
.whenIconCollected()
.whenItemCollected(AllItemTags.TRACKS.tag)
.after(STURDY_SHEET)),
TRAIN_WHISTLE = create("train_whistle", b -> b.icon(AllBlocks.STEAM_WHISTLE)

View file

@ -11,14 +11,18 @@ import com.tterrag.registrate.util.entry.ItemProviderEntry;
import net.minecraft.advancements.Advancement;
import net.minecraft.advancements.CriterionTriggerInstance;
import net.minecraft.advancements.FrameType;
import net.minecraft.advancements.critereon.BlockPredicate;
import net.minecraft.advancements.critereon.EnchantmentPredicate;
import net.minecraft.advancements.critereon.InventoryChangeTrigger;
import net.minecraft.advancements.critereon.ItemPredicate;
import net.minecraft.advancements.critereon.MinMaxBounds;
import net.minecraft.advancements.critereon.NbtPredicate;
import net.minecraft.advancements.critereon.PlacedBlockTrigger;
import net.minecraft.advancements.critereon.StatePropertiesPredicate;
import net.minecraft.core.Registry;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.tags.ItemTags;
import net.minecraft.tags.TagKey;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item;