Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

School Logos as Banner Patterns #1597

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/generated/resources/assets/ars_nouveau/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -1332,6 +1332,13 @@
"block.ars_nouveau.archwood_slab": "Archwood Slab",
"block.ars_nouveau.archwood_stairs": "Archwood Stairs",
"block.ars_nouveau.archwood_trapdoor": "Archwood Trapdoor",
"block.ars_nouveau.banner.abjuration": "Abjuration School",
"block.ars_nouveau.banner.air": "Air School",
"block.ars_nouveau.banner.conjuration": "Conjuration School",
"block.ars_nouveau.banner.earth": "Earth School",
"block.ars_nouveau.banner.fire": "Fire School",
"block.ars_nouveau.banner.manipulation": "Manipulation School",
"block.ars_nouveau.banner.water": "Water School",
"block.ars_nouveau.basic_spell_turret": "Basic Spell Turret",
"block.ars_nouveau.bastion_pod": "Bastion Fruit",
"block.ars_nouveau.blue_archwood_leaves": "Cascading Archwood Leaves",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_journal": {
"conditions": {
"items": [
{
"items": "ars_nouveau:worn_notebook"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "ars_nouveau:ars_stencil"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_journal"
]
],
"rewards": {
"recipes": [
"ars_nouveau:ars_stencil"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"asset_id": "ars_nouveau:abjuration",
"translation_key": "block.ars_nouveau.banner.ars_nouveau.abjuration"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"asset_id": "ars_nouveau:air",
"translation_key": "block.ars_nouveau.banner.ars_nouveau.air"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"asset_id": "ars_nouveau:conjuration",
"translation_key": "block.ars_nouveau.banner.ars_nouveau.conjuration"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"asset_id": "ars_nouveau:earth",
"translation_key": "block.ars_nouveau.banner.ars_nouveau.earth"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"asset_id": "ars_nouveau:fire",
"translation_key": "block.ars_nouveau.banner.ars_nouveau.fire"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"asset_id": "ars_nouveau:manipulation",
"translation_key": "block.ars_nouveau.banner.ars_nouveau.manipulation"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"asset_id": "ars_nouveau:spirals",
"translation_key": "block.ars_nouveau.banner.ars_nouveau.spirals"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"asset_id": "ars_nouveau:water",
"translation_key": "block.ars_nouveau.banner.ars_nouveau.water"
}
16 changes: 16 additions & 0 deletions src/generated/resources/data/ars_nouveau/recipe/ars_stencil.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shapeless",
"category": "misc",
"ingredients": [
{
"item": "ars_nouveau:abjuration_essence"
},
{
"item": "minecraft:paper"
}
],
"result": {
"count": 1,
"id": "ars_nouveau:ars_stencil"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"values": [
{
"id": "ars_nouveau:fire",
"required": false
},
{
"id": "ars_nouveau:water",
"required": false
},
{
"id": "ars_nouveau:earth",
"required": false
},
{
"id": "ars_nouveau:air",
"required": false
},
{
"id": "ars_nouveau:conjuration",
"required": false
},
{
"id": "ars_nouveau:manipulation",
"required": false
},
{
"id": "ars_nouveau:abjuration",
"required": false
},
{
"id": "ars_nouveau:spirals",
"required": false
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package com.hollingsworth.arsnouveau.common.datagen;

import com.hollingsworth.arsnouveau.ArsNouveau;
import com.hollingsworth.arsnouveau.setup.registry.BannerRegistry;
import net.minecraft.core.HolderLookup;
import net.minecraft.core.registries.Registries;
import net.minecraft.data.PackOutput;
import net.minecraft.data.tags.BannerPatternTagsProvider;
import net.minecraft.tags.TagKey;
import net.minecraft.world.level.block.entity.BannerPattern;
import net.neoforged.neoforge.common.data.ExistingFileHelper;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.concurrent.CompletableFuture;

import static com.hollingsworth.arsnouveau.ArsNouveau.prefix;

public class BannerTagsProvider extends BannerPatternTagsProvider {
public BannerTagsProvider(PackOutput output, CompletableFuture<HolderLookup.Provider> provider, @Nullable ExistingFileHelper existingFileHelper) {
super(output, provider, ArsNouveau.MODID, existingFileHelper);
}

public static TagKey<BannerPattern> bannerTag = TagKey.create(Registries.BANNER_PATTERN, prefix("pattern_item/ars_stencil"));

@Override
protected void addTags(HolderLookup.@NotNull Provider provider) {

tag(bannerTag)
.addOptional(BannerRegistry.FIRE.location())
.addOptional(BannerRegistry.WATER.location())
.addOptional(BannerRegistry.EARTH.location())
.addOptional(BannerRegistry.AIR.location())
.addOptional(BannerRegistry.CONJURATION.location())
.addOptional(BannerRegistry.MANIPULATION.location())
.addOptional(BannerRegistry.ABJURATION.location())
.addOptional(BannerRegistry.SPIRALS.location());

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,34 +40,34 @@ protected void addTranslations() {
Glyph glyph = supplier.get();
AbstractSpellPart spellPart = glyph.spellPart;
ResourceLocation registryName = glyph.spellPart.getRegistryName();
if(registryName.getNamespace().equals(ArsNouveau.MODID)) {
if (registryName.getNamespace().equals(ArsNouveau.MODID)) {
add("ars_nouveau.glyph_desc." + registryName.getPath(), spellPart.getBookDescription());
add("ars_nouveau.glyph_name." + registryName.getPath(), spellPart.getName());

Map<AbstractAugment, String> augmentDescriptions = new HashMap<>();
spellPart.addAugmentDescriptions(augmentDescriptions);

for(AbstractAugment augment : augmentDescriptions.keySet()){
for (AbstractAugment augment : augmentDescriptions.keySet()) {
add("ars_nouveau.augment_desc." + registryName.getPath() + "_" + augment.getRegistryName().getPath(), augmentDescriptions.get(augment));
}
}
}
for (FamiliarScript i : FamiliarRegistry.getFamiliarScriptMap().values()) {
if (i.familiar.getRegistryName().getNamespace().equals(ArsNouveau.MODID)){
if (i.familiar.getRegistryName().getNamespace().equals(ArsNouveau.MODID)) {
add("ars_nouveau.familiar_desc." + i.familiar.getRegistryName().getPath(), i.familiar.getBookDescription());
add("ars_nouveau.familiar_name." + i.familiar.getRegistryName().getPath(), i.familiar.getBookName());
add("item.ars_nouveau." + i.familiar.getRegistryName().getPath(), i.familiar.getBookName());
}
}
for (RitualTablet i : RitualRegistry.getRitualItemMap().values()) {
if(i.ritual.getRegistryName().getNamespace().equals(ArsNouveau.MODID)) {
if (i.ritual.getRegistryName().getNamespace().equals(ArsNouveau.MODID)) {
add("ars_nouveau.ritual_desc." + i.ritual.getRegistryName().getPath(), i.ritual.getLangDescription());
add("item.ars_nouveau." + i.ritual.getRegistryName().getPath(), i.ritual.getLangName());
}
}

for (PerkItem i : PerkRegistry.getPerkItemMap().values()) {
if(i.perk.getRegistryName().getNamespace().equals(ArsNouveau.MODID) && !i.perk.getRegistryName().getPath().equals("blank_thread")) {
if (i.perk.getRegistryName().getNamespace().equals(ArsNouveau.MODID) && !i.perk.getRegistryName().getPath().equals("blank_thread")) {
add("ars_nouveau.perk_desc." + i.perk.getRegistryName().getPath(), i.perk.getLangDescription());
add("item.ars_nouveau." + i.perk.getRegistryName().getPath(), i.perk.getLangName());
}
Expand Down Expand Up @@ -988,13 +988,13 @@ protected void addTranslations() {
add("item.minecraft.tipped_arrow.effect.shielding_potion", "Arrow of Shielding");
add("item.minecraft.tipped_arrow.effect.shielding_potion_long", "Arrow of Shielding");
add("effect.ars_nouveau.recovery", "Recovery");
add("effect.ars_nouveau.recovery.desc","Increases healing received from all sources.");
add("effect.ars_nouveau.recovery.desc", "Increases healing received from all sources.");
add("effect.ars_nouveau.blasting", "Blasting");
add("effect.ars_nouveau.blasting.desc","Causes the target to explode when the duration ends.");
add("effect.ars_nouveau.blasting.desc", "Causes the target to explode when the duration ends.");
add("effect.ars_nouveau.freezing", "Freezing");
add("effect.ars_nouveau.freezing.desc","Freezes the target over time.");
add("effect.ars_nouveau.freezing.desc", "Freezes the target over time.");
add("effect.ars_nouveau.shielding", "Shielding");
add("effect.ars_nouveau.shielding.desc","Reduces the amount of damage taken.");
add("effect.ars_nouveau.shielding.desc", "Reduces the amount of damage taken.");
add("item.ars_nouveau.wixie_hat", "Wixie Hat");
add("tooltip.ars_nouveau.wixie_hat", "Give to a Starbuncle to make them transport potions.");
add("ars_nouveau.starbuncle.default_behavior", "Starbuncle will now transport items!");
Expand Down Expand Up @@ -1259,7 +1259,7 @@ protected void addTranslations() {
add("ars_nouveau.page3.storage", "Linked inventories that are named will create a tab in the Storage Lectern, allowing you to view and manipulate all inventories that share that name. Unlike normal chests, Repositories will preserve their name when dropped. The Name Effect can also name inventories placed in the world.");
add("ars_nouveau.page2.item_detector", "If a Filter Scroll is given to the Display Case, it will count all items that match the filter.");
add("config.jade.plugin_ars_nouveau.mob_jar", "Mob Jar");
add("mob_jar.villager","Can be traded with in a jar, periodically resetting its trades.");
add("mob_jar.villager", "Can be traded with in a jar, periodically resetting its trades.");
add("mob_jar.piglin", "Can be traded with by throwing gold ingots at the jar.");
add("mob_jar.ender_dragon", "Use a bottle to obtain Dragon's Breath.");
add("mob_jar.sheep", "Can be sheared. Will eat Grass beneath the jar if available.");
Expand Down Expand Up @@ -1319,45 +1319,45 @@ protected void addTranslations() {
add("effect.ars_nouveau.soaked", "Soaked");
add("effect.ars_nouveau.soaked.desc", "Wets the target, protecting from fire and triggering effects as if under the rain.");
add("block.ars_nouveau.sourceberry_sack", "Sourceberry Sack");
add("ars_nouveau.empty","Empty");
add("ars_nouveau.empty", "Empty");
add("ars_nouveau.melder.output_not_unique", "Output potion is not a unique mix.");
add("ars_nouveau.melder.output_duplicate_effect", "Cannot mix potions with the same effect but different levels.");
add("ars_nouveau.page1.archwood_grate", "Liquids placed on top of them will be transported below, waterlogging the below block if possible. Interacting with the grate will also act as if you are interacting with the block below it, allowing you to bucket liquids below. Additionally, items and projectiles will pass through it. Can be placed in any direction.");
for(String s : LibBlockNames.DECORATIVE_SOURCESTONE){
for (String s : LibBlockNames.DECORATIVE_SOURCESTONE) {
String key = "block.ars_nouveau." + s;
String val = data.get(key);
add(key + "_slab", val + " Slab");
add(key + "_stairs", val + " Stairs");
}
add("block.ars_nouveau.sourcestone_grate","Sourcestone Grate");
add("block.ars_nouveau.gold_grate","Gold Grate");
add("block.ars_nouveau.archwood_grate","Archwood Grate");
add("block.ars_nouveau.smooth_sourcestone_grate","Smooth Sourcestone Grate");
add("block.ars_nouveau.sourcestone_grate", "Sourcestone Grate");
add("block.ars_nouveau.gold_grate", "Gold Grate");
add("block.ars_nouveau.archwood_grate", "Archwood Grate");
add("block.ars_nouveau.smooth_sourcestone_grate", "Smooth Sourcestone Grate");
add("block.ars_nouveau.source_lamp", "Source Gem Lamp");
add("ars_nouveau.page1.source_lamp", "Behaves like a copper bulb, but the light and comparator values can be adjusted by casting Light with dampen.");
add("ars_nouveau.patchouli.missing", "Patchouli missing: opening online wiki");
add("ars_nouveau.dependency.install", "Open mod page");
add("tooltip.starbuncle_shard2", "Made with love.");
add("tooltip.whirlisprig_shard2","A natural portrait.");
add("tooltip.drygmy_shard2","A tribute to what once was.");
add("tooltip.whirlisprig_shard2", "A natural portrait.");
add("tooltip.drygmy_shard2", "A tribute to what once was.");
add("tooltip.wixie_shard2", "Knowledge for freedom.");
add("block.ars_nouveau.alakarkinos_hat", "Alakarkinos Hat");
add("entity.ars_nouveau.bubble", "Bubble");
add("entity.ars_nouveau.alakarkinos", "Alakarkinos");
add("item.ars_nouveau.alakarkinos_charm", "Alakarkinos Charm");
add("item.ars_nouveau.alakarkinos_token", "Alakarkinos Token");
add("ars_nouveau.page1.alakarkinos_charm","Alakarkinos can sift sand and gravel to find items found in archaeology sites. They can be found on beaches and will give you a token if they receive a Pottery Sherd of any kind.");
add("ars_nouveau.page2.alakarkinos_charm","Loves to dance to nearby jukeboxes.");
add("ars_nouveau.page3.alakarkinos_charm","Alakarkinos can be summoned anywhere by using a charm on a block. To set its home, use the Dominion Wand to bind Alakarkinos to a chest or inventory.");
add("ars_nouveau.page4.alakarkinos_charm","Alakarkinos will seek out gravel or sand that is placed within 3 blocks horizontal and one block vertical around its bound inventory. In order to convert blocks into items, Source must be provided near its chest. After some time and a few magic tricks, Alakarkinos will destroy the sand or gravel and insert items into the inventory.");
add("ars_nouveau.page1.alakarkinos_charm", "Alakarkinos can sift sand and gravel to find items found in archaeology sites. They can be found on beaches and will give you a token if they receive a Pottery Sherd of any kind.");
add("ars_nouveau.page2.alakarkinos_charm", "Loves to dance to nearby jukeboxes.");
add("ars_nouveau.page3.alakarkinos_charm", "Alakarkinos can be summoned anywhere by using a charm on a block. To set its home, use the Dominion Wand to bind Alakarkinos to a chest or inventory.");
add("ars_nouveau.page4.alakarkinos_charm", "Alakarkinos will seek out gravel or sand that is placed within 3 blocks horizontal and one block vertical around its bound inventory. In order to convert blocks into items, Source must be provided near its chest. After some time and a few magic tricks, Alakarkinos will destroy the sand or gravel and insert items into the inventory.");
add("ars_nouveau.alakarkinos.set_home", "Home set. Place source and gravel or sand within 3 blocks.");
add("ars_nouveau.sifting", "Sifting");
add("tooltip.alakarkinos_shard1", "Found by giving an Alakarkinos a Sherd.");
add("tooltip.alakarkinos_shard2", "What's that behind your ear?");
addCategory("getting_started", "Getting Started");
addCategory("crafting","Crafting and Automation");
addCategory("glyph_index","Glyph Index");
addCategory("ritual_index","Ritual Index");
addCategory("crafting", "Crafting and Automation");
addCategory("glyph_index", "Glyph Index");
addCategory("ritual_index", "Ritual Index");
addCategory("source", "Source");
addCategory("creature_compendium", "Creature Compendium");
addCategory("items_equipment", "Items and Equipment");
Expand Down Expand Up @@ -1391,9 +1391,19 @@ protected void addTranslations() {
add("ars_nouveau.slots_armor", "Thread Slots and Tiers");
add("ars_nouveau.thread_tier", "Tier %s thread slot");
add("ars_nouveau.search_desc", "Search for any entry, item, or concepts such as Glyph, Familiar, Ritual, Spell School, etc.");


add("block.ars_nouveau.banner.fire", "Fire School");
add("block.ars_nouveau.banner.water", "Water School");
add("block.ars_nouveau.banner.air", "Air School");
add("block.ars_nouveau.banner.earth", "Earth School");
add("block.ars_nouveau.banner.manipulation", "Manipulation School");
add("block.ars_nouveau.banner.abjuration", "Abjuration School");
add("block.ars_nouveau.banner.conjuration", "Conjuration School");

}

public void addCategory(String key, String value){
public void addCategory(String key, String value) {
add("ars_nouveau.section." + key, value);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public static void datagen(GatherDataEvent event) {
event.getGenerator().addProvider(event.includeServer(), new CrushRecipeProvider(event.getGenerator()));
event.getGenerator().addProvider(event.includeServer(), new ItemTagProvider(output, provider, fileHelper));
event.getGenerator().addProvider(event.includeServer(), new EntityTagProvider(output, provider, fileHelper));
event.getGenerator().addProvider(event.includeServer(), new BannerTagsProvider(output, provider, fileHelper));
event.getGenerator().addProvider(event.includeServer(), new PlacedFeatureTagProvider(output, provider, fileHelper));
event.getGenerator().addProvider(event.includeServer(), new PotionEffectTagProvider(output, provider, fileHelper));
event.getGenerator().addProvider(event.includeServer(), new DyeRecipeDatagen(event.getGenerator()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.neoforged.neoforge.common.Tags;
import org.jetbrains.annotations.NotNull;

import java.util.concurrent.CompletableFuture;

Expand All @@ -38,7 +39,7 @@ public RecipeDatagen(PackOutput pOutput, CompletableFuture<HolderLookup.Provider
}

@Override
protected void buildRecipes(RecipeOutput pRecipeOutput) {
protected void buildRecipes(@NotNull RecipeOutput pRecipeOutput) {
{
this.consumer = pRecipeOutput;
Block SOURCESTONE = BlockRegistry.getBlock(LibBlockNames.SOURCESTONE);
Expand Down Expand Up @@ -782,6 +783,8 @@ protected void buildRecipes(RecipeOutput pRecipeOutput) {
clearBuilder(ItemsRegistry.WHIRLISPRIG_CHARM).save(consumer, ArsNouveau.prefix("clear_whirlisprig_charm"));
clearBuilder(ItemsRegistry.AMETHYST_GOLEM_CHARM).save(consumer, ArsNouveau.prefix("clear_amethyst_golem_charm"));
clearBuilder(ItemsRegistry.ALAKARKINOS_CHARM).save(consumer, ArsNouveau.prefix("clear_alakarkinos_charm"));

shapelessBuilder(ItemsRegistry.ARS_STENCIL.get()).requires(ItemsRegistry.ABJURATION_ESSENCE.get()).requires(Items.PAPER).save(consumer);
}
}

Expand Down
Loading