#General & Development Help

1 messages · Page 15 of 1

gleaming fox
#

Hello my fellow sigmas
this one had a question about the cast method:
is the LivingEntity shooter param the player caster?
i want to invert the target of the spell and the caster

is it better to modify the EntityHitResult instead of changing the method arguments directly, or am i misunderstanding how this works?

mossy hollow
#

Swap Target

gleaming fox
#

but context manip seems really silly and fun to play around with so ill add a few of my own twisted ideas

#

hehe thanks for the info

mossy hollow
#

You can check how they did it for inspiration

gleaming fox
#

true

#

since A+ is already coming to 1.21 at around the same time as AT i don't think ill do it

#

maybe i should add sub-spells / macros?

#

that seems like fun

#

maybe something like functions

#

or is that planned by someone else?

mossy hollow
#

Only thing similar i believe would be the Ars Zero stuff or contingencies

mossy hollow
#

Contingencies are from NEG i think

gleaming fox
#

i think adding a glyph to simualate an item use from inventory would be quite nifty

#

what sounds better than being able to right click a spellbook from another spellbook

#

that sounds like a totally sane idea with no risks of server-ending failure points

#

mhm yep ill mess around with this

#

anyhow thanks for the help jarva

hasty nacelle
#

HAHA it works now

#

for some reason it said it didnt but after closing and reopening my code works now

#

finnally I can use my peak of programming

#

the H machine

#

ok bit over

crude leaf
#

file path near top left shows your name and last initial

hasty nacelle
#

I dont really care

crude leaf
#

fair enough

hasty nacelle
#

i have been wildly open to general things about me and the fact that my name Is Connor M is one of them

#

anyways I know collections now

#

fun

arctic bronze
#

Yo, what does alex's "Sauce" do?

radiant depot
#

Bunch of stuff that should reduce common code between add-ons.
I moved there the main interfaces of elemental, recipe and jei integration, liquid source.

Holds most of the attributes I use, ranging from elemental power / resistance to more general mana discount and a simple spell crit mechanic.
Holds the whole enthrall mechanic and the custom Mob Effect Instances that can carry extra data.

#

Liquid source is hidden unless enabled, spell crit and enthrall are disabled unless enabled

arctic bronze
tender karma
#

Besides Ars Additions, are there any other add-ons that add new Rituals that I might be able to look at for reference?

hasty nacelle
#

elemental
ars plus i suppose
hm yea there arent many others

mossy hollow
#

I mean you can just look at the base ones

tender karma
#

I'm looking to use Warping as a reference/basis for the actual ritual but I'm still figuring out how to actually add the tablet to the game and make it work. Ideally, I want to figure that out first before I dive into programming the effect proper.

arctic bronze
#

Is there an example of a curios in 1.20 that renders on the player?

tender karma
#

OKAY! After bashing my head in for the last couple of hours not understanding how I was supposed to do the dimension change thing, I finally got it my first test working!!

To-Do List:

  • Try to find the Nether Portal code to figure out a logic so that the player can be teleported somewhere safe.
  • Make proper textures.
  • Make Attuning its own recipe, and make it so that the Ritual also reads a recipe like Ars Additions' Locate Structure, rather than have it be hard coded inside the Ritual class. <-- I probably should've done this from the get-go, but I'm learning Java as I go, so, uh... Sorry to Java devs for my abomination of a code, I guess.
  • Tidy up the code and get it up to standard.
radiant depot
#

Elemental does render something for the foci

#

But it's only particles, not a model

#

Be aware that botania might be overcomplicated

#

Starbunclemania have player cosmetic curios but likely only 1.21 and I'm basically rendering the item itself

#

Botania should be rendering something more like an entity layer

hasty nacelle
#

OH MANA AND ARTIFICE

#

Most of them have rendering curios

radiant depot
#

They're not open source iirc

arctic bronze
unreal summit
# tender karma OKAY! After bashing my head in for the last couple of hours not understanding ho...

You’ll probably want to figure out how to make conditional recipes based on what other mods are in the pack so it will show dimensional tuning options based on what other dimensions are available.

You might want to look at the Expeditions questline to see what mods you want to include compatibility for as I have the majority of 1.21.1 mods that add dimensions in the pack.

(Ones that I am aware I am missing are Bronze n Viking, Confluence: Otherworld Dimension Pack, and Mr. Beast Dimension)

tender karma
# unreal summit You’ll probably want to figure out how to make conditional recipes based on what...

As it is right now, I made three separate Tuning Forks, one for each vanilla dimension and they're all crafted via Imbuing. Plane Shift ritual grabs the target dimension from their component data.

Looking into unifying the three items and using custom recipes to instead modify component data on one Attuned Fork item so that I don't have to add a bajillion different forks. Hopefully I can make it so people can add custom .json recipes with the dimension id and the pedestal items, maybe?? Not sure if that's possible, I'm still struggling to get it to work as is.

unreal summit
#

That’s an option - and much easier to do - but it would be cooler if you could just add compatibility upfront for as many mods as possible.

tender karma
tender karma
#

Erhh, okay, I'm a little stumped here.

Looking at the Kaupenjoe tutorial, when he's creating a custom Data Component Type, he creates it via a ModDataComponents class, but looking at the NeoForged Documentation and Ars Additions Data Component Types (I think they are, at least? See WarpIndexData, etc.), I see mentions of a Record, instead, and I think the overall structure is very different.

How do I know which method I should use?

neat mango
#

the "type" of class doesnt matter. it can be a record or a regular class. it up to you how you want to use it

#

records have automatic field getters and dont allow subclassing which makes them perfect for modelling data and used as for DataComponents

#

but you dont HAVE to use. regular classes/objects work just fine and it wont affect the outcome whatsoever

#

my suggestion would be to use records since its the easiest to use

#

I forgot to mention this. records are more like syntax sugar for classes. they just wire things in the background automatically and they dont have special sauce or something

tender karma
#

Okie! I think I understand, maybe. Thanks for the help! I'll try with Records.

tender karma
#

Hi... Another novice question.

I think I'm at the final step of creating my custom recipe type. I think I'm just missing the serializer at the end, which to my understanding is where the code translates the JSON recipes. I'm trying to make the AttuneForkRecipe type read an ID, target dimension, and a list of items that go on pedestals around the imbuement chamber.

I have this for the MapCodec inside the Serializer:

                        ResourceLocation.CODEC.fieldOf("id").forGetter(AttuneForkRecipe::id),
                        Codec.list(Ingredient.CODEC).fieldOf("pedestal_items").forGetter(AttuneForkRecipe::pedestalItems),
                        Level.RESOURCE_KEY_CODEC.fieldOf("dimension").forGetter(AttuneForkRecipe::dimension)
).apply(instance, AttuneForkRecipe::new));```

And I know I have to sort of mirror it in the StreamCodec, which I tried to do here:

public static final StreamCodec<RegistryFriendlyByteBuf, AttuneForkRecipe> STREAM_CODEC = StreamCodec.composite(
ResourceLocation.STREAM_CODEC, AttuneForkRecipe::id,
Ingredient.CONTENTS_STREAM_CODEC.apply(ByteBufCodecs.collection(ArrayList::new)), AttuneForkRecipe::pedestalItems,
ByteBufCodecs.registry(Registries.DIMENSION), AttuneForkRecipe::dimension,
AttuneForkRecipe::new
);```

But it's throwing me this one long error that I think has to do with the STREAM_CODEC for the list of pedestal items. Am I doing that right? Where did I mess up? Apologies for the inconvenience catcry

tender karma
#

'composite(net.minecraft.network.codec.StreamCodec<? super B,T1>, java.util.function.Function<C,T1>, net.minecraft.network.codec.StreamCodec<? super B,T2>, java.util.function.Function<C,T2>, net.minecraft.network.codec.StreamCodec<? super B,T3>, java.util.function.Function<C,T3>, com.mojang.datafixers.util.Function3<T1,T2,T3,C>)' in 'net.minecraft.network.codec.StreamCodec' cannot be applied to '(net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,net.minecraft.resources.ResourceLocation>, <method reference>, net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,java.util.ArrayList<net.minecraft.world.item.crafting.Ingredient>>, <method reference>, net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,net.minecraft.world.level.Level>, <method reference>, <method reference>)'

neat mango
#

is this correct type?
Ingredient.CONTENTS_STREAM_CODEC.apply(ByteBufCodecs.collection(ArrayList::new)), AttuneForkRecipe::pedestalItems,

#

what i mean is, whats the type of pedestalItems?

tender karma
#

I set it as List<Ingredient> at the top of the record...

neat mango
#

that doesnt look correct then

#

it should be something like SizedIngredient.STREAM_CODEC.apply(ByteBufCodecs.list())

#

find something similar to that for Ingredient

tender karma
#

I'd also looked into the Enchanting Recipes to see how it's done in base Ars, and it used this

                EnchantingApparatusRecipe::pedestalItems,```

but ANCodecs.INGREDIENT_LIST_STREAM didn't work for me either.
gleaming fox
#

hello there
is there a clean way to define a List<List<? extends String>> as a config object or should i just use a Json file?

radiant depot
#

there are datamaps if you want

#

A data map contains data-driven, reloadable objects that can be attached to a registered object. This system allows for more easily data-driving game behavior, as they provide functionality such as syncing or conflict resolution, leading to a better and more configurable user experience. You can think of [tags] as registry object ➜ boolean map...

gleaming fox
#

alright ill check it out thanks

radiant depot
#

otherwise you'd tecnically have to use the list config and treat the internal strlist as a list to parse with a separator probably?

#

unsure honestly

#

but if you want to go with datamaps you can datagen them

severe crystal
#

does anyone have a good resource on modding on 1.21

#

beginner here so idk if i should binge a tutorial playlist or what

shadow helm
#

Not sure how up to date the pins are, I'm afraid

radiant depot
#

the playlist is for an older version but the same youtuber has updated playlists

#

he's also doing another java playlist because of hytale

#

1.21 neoforge playlist should be complete by now

gleaming fox
#

chatbots are really good for asking questions about the code but don't expect them to give useable classes

#

use snippets if needed but it's best to use them as a learning tool instead of a codegen tool

rocky grail
#

i disagree about llms and cant speak for kaupenjoe, but open source mods are indeed a good place to learn

#

make sure you respect the licenses though

#

(which llms dont)

gleaming fox
#

not generate code from it

rocky grail
#

id still disagree with that usage

#

i dont trust llms for anything

gleaming fox
#

to each their own ig

rocky grail
#

i do believe ive given them more than a fair shot

#

i have been an early adopter and have also experimented with newer models

#

they all suck

#

universally

#

right now im eagerly waiting for the ai bubble to collapse

gleaming fox
#

finally we'll have sane GPU/ram prices

#

i know it'll collapse soon like the internet bubble did

rocky grail
#

cant wait to snatch up secondhand ram from failed businesses

gleaming fox
#

ill finally be able to run a minecraft server with alex's mobs

#

without it lagging

crude leaf
#

AI is propping up the us economy

hasty nacelle
hasty nacelle
#

How would I change Java versions in inteli? An update happened and broke all my code
And ANs code

gleaming fox
hasty nacelle
#

Tysm

arctic bronze
#

How do I share a project to github as a new branch of my existing project?

neat mango
#

wdym? do you want to push a new branch of your existing project repository ?

arctic bronze
neat mango
#

oh okay. is all your current work in a different branch ? also do you use the git cli or some app?

arctic bronze
#

Two seperate projects on intellij. I usually use the Github browser and one project (1.20) is currectly linked

neat mango
#

thats fine

#

you can just initialize git in that folder and point it the correct repo url and just push

neat mango
#

make sure your branch names are correct else you will nuke your existing work

arctic bronze
neat mango
#

(you need to force push to overwrite contents so should be fine. just pay attention)

neat mango
#

your command looks a bit weird

#

just git push -u origin branch-name is enough

arctic bronze
#

I wasn't doing it through the console

neat mango
#

you might need to delete this branch first

#

on github

arctic bronze
#

oki

#

it worked but only pushed "changed" files

#

is there a way to commit everything?

neat mango
#

wdym changed

#

oh no

arctic bronze
#

I got it figured out

neat mango
#

okay

arctic bronze
#

thanks Chonky!

hasty nacelle
#

I am almost done with kappenjoe's tutorials
Soon I get to go to the actual modding ones

#

Then I conquer the world with increasingly peak add-ons

tender karma
#

Hi!

From my limited understanding of the Planarium/PlanariumTile in the GitHub source, the Planarium block itself doesn't store the dimension key of the jar dimension that it takes you to, does it? Is there any way to read it? More specifically, I'm trying to make it so that I can read the dimension key by right clicking the block with a specific item and save it to that item's data.

I tried looking around the Planarium/PlanariumTile but I didn't really see how or where the key is created and stored.

zealous saffron
#

The dim is from a hash of the name of the planarium. You'd just need the same method used there id imagine

#

I'm not the code guy though

#

But it's all based on the name of the jar

tender karma
#

Thanks a lot for the assist again! whirlisprig_heart

rocky grail
#

woah its not even a hash

#

its a random uuid

#

thats a strange decision but i guess it works

gleaming fox
#

hello there
is there a field/getter method which corresponds to the "final" mana regen quantity (as in after it has passed through all event listeners etc) ?
i'd also like to know how many times per second mana regen "ticks"

edit: found both the answers on the git sources

hasty nacelle
#

Lol

severe crystal
#

Would it be possible to make a glyph through mc creator

#

?

#

Or an enchanter’s tool for that matter

#

Im thinking of making an enchanters tool that has a list of spells that shoot in a random order

unreal summit
#

Possible? Maybe, but you’d have to do so much custom code that it wouldn’t be worth trying to use MCreator anyway

crude leaf
#

mcreator bad and all that

neat mango
hasty nacelle
#

wait
i can understand what its saying
im matrixing the shit out of it

neat mango
#

beware, the world will not be the same anymore. you will never be able to the game after. modding hell is very real

unreal summit
#

Which is why I like to “complete” a mod instead of continually adding new features to it. That way I can finish a project and move on instead of existing in perpetual limbo.

neat mango
#

there is no such thing as complete /jk

unreal summit
#

That’s why theres quotation marks😜

#

Ars Artillery is the only one of my mods that is truly complete, as I put everything into that that I intended to from the start.

Ars Fauna still has a couple big bugs that I can’t figure out, but that aren’t gamebreaking so I haven’t devoted that much energy to. I also was not able to implement the Mimibuncle - and I have several more concepts for additional buncles, some of which are modeled and some of which are not.

Elemancy is the only one I am actively working on, because I want to implement the heavy/light variants of the armors once Alex is done with the Elemental tier stuff.

unreal summit
#

Speaking of. Alex, is the code in Elemental for the light/heavy stuff set up such that I can hook in with the dual element schools like you did for the medium stuff?

radiant depot
#

kinda?

#

you should probably make your piece of code because of the super-effective map needing game design choices when it comes to dual element

#

the attributes used are in Sauce and should be fetchable via a School->Attribute map

#

but like, while the elementalist would simply have no weakness (or all weakness?) and all spellpowers

#

no idea how you would handle conflicting Res+ and Res- ones, you'd have to decide

hallow owl
#

Anyway MCreator does create java under the hood, just with a bunch of bloat

unreal summit
radiant depot
#

Well the difficulty level is kinda just "copy existing code and do basic tweaks"

unreal summit
#

Once I finish all the models I’ll try to pick apart the code and see if I can make sense of it.

hasty nacelle
#

i recommend check out kappenjoe for the basics
he just released a 2026 version of his main tutorial

unreal summit
#

Starting on coding in the light/heavy stuff for Elemancy. It's been so long since I've actually delved into code that my brain hurts now...😂

tender karma
#

I blissfully created Ingressum without ever touching Mixins or DataGen, but I figure they're pretty fundamental to modding more in-depth stuff.

Are there any resources more experienced modders could suggest to learn the two properly? I know Kaupenjoe's tutorials briefly touch upon DataGen but I'm unsure about Mixins.

radiant depot
#

Eh, Datagen is mostly to not go crazy when you have to make a lot of json for data or simple item models and allows for more dynamic changes

#

Mixin is basically adding your own code in between the original code, as long as you know the annotations and how to use them (mixin should have docs somewhere since Fabric uses them a lot more), the most of the knowledge is being able to read the codebase

neat mango
#

dont mixin unless its absolutely necessary. stick to apis, events and what not. its far safer, easier and better for inter mod compat

tender karma
#

I see. I'll err on the side of caution with mixins 🫡 .

gleaming fox
#

hello
is there a way to change the spell resolver of a spell that is being cast?
is there an event for when the spell resolver (s) decide that the spell has enough mana/doesn't have enough mana for the cast to continue?

if no to both would it be alright if i made a PR to introduce events related to how the spell resolver "acts" based on the conditions that may cause a spell to fail (invalid syntax, too many augments, not enough mana etc)?

neat mango
#

is there a guide for patchouli to new guidebook migration ?

radiant depot
#

I don't think there is, no

#

You may look at Elemental

hallow owl
#

speaking about that, do you split addon docs into separate existing entries, or do you make a new category for your mod? i'm working on docs now for Ars Technica, for Ars Zero I made my own category, I'm a bit torn between it.

e.g. for Ars Zero there are some specific concepts like spell phases that don't fit into other categories. but for Ars Technica I could probably put everything to where it belongs; information about the Arcane Wrench could go into Magical Equipment.

#

on one hand some players might be looking for an overview of a specific mod they just added, on the other hand for a lot of players that use modpacks, all the addons together is just 'ars nouveau stuff'

hallow owl
#

ok i think for technica i'll just do like elemental, not having its own base category. for ars zero i'll keep it as is for now.

radiant depot
#

i never split because the patchouli was kinda limited in terms of max amount of categories iirc

#

the new docs probably don't have this issue

hallow owl
#

i actually think for ars zero it is also not needed to split.
that being said i think a cool/simple feature would be tagging support for entries, so you could tag all Elemental/Technica/etc pages, and have a way for the user to see all entries from an addon, to get a better overview

neat mango
#

I tried to look into datagen its kinda bizzare. its still has a patchouli data provider and data added is only visible in the patchouli book not the actual book

neat mango
#

oh? so no json files

radiant depot
#

The patchouli data is there only for the wiki

neat mango
#

can you point me where you add entries then? I was looking at datagen and resources/assets

radiant depot
#

And if you wonder how addon builder manages to get info, there should be something like a command in-game that dumps the docs into jsons but we don't have to run it

radiant depot
#

One for adding, one for modifying

neat mango
#

Cool I will look for something like that

radiant depot
tender karma
#

Any reason why a potion/status effect won't show via Jade/WAILA on an entity?

#

Testing custom glyphs that don't show up via Jade/WAILA when I cast on other mobs, even though they just add vanilla potion effects. Base glyphs show up without issue though. Unsure if I'm missing something somewhere.

mossy hollow
tender karma
#

Yeah, it shows on my inventory when cast on self. I made it so particles don't show, but I'm not sure if that also affects Jade displaying the effect. I tried punching a Warden that I gave Res V and its health didn't go down at all, so it seems to be applying the effect properly, just not displaying that it does have it.

#

EDIT: Yeah, it was the particles. When disabled, Jade doesn't display the effect. TIL.

median sphinx
#

so what causes the weird lighting on the planarium anyways

nova jungle
#

I'm looking to double check what'd be the best approach to detect a successful spell cast event from Ars in KubeJS, in my bug report to FTB to fix something about their detection that has some issues - they use this to give players Puffish skills XP to their magic tree, based on Ars casts and the casted spell's mana costs

Currently, their detected event is com.hollingsworth.arsnouveau.api.event.SpellCastEvent and xp is given on that event - this has an issue where a cancelled/invalid spell cast still triggers this event so you could abuse it by say aiming a targeted spell into the sky and spam cast it (where no actual cast would happen, no mana is consumed, but the event would keep firing)

#

So they added a check that's:

if(event.spell.isCanceled()) return;

but that kept returning errors because that seems to be the wrong class (TypeError: Cannot find function isCanceled in object com.hollingsworth.arsnouveau.api.spell.Spell@...), I had a look and saw at https://github.com/baileyholl/Ars-Nouveau/blob/main/src/main/java/com/hollingsworth/arsnouveau/api/event/SpellCastEvent.java that Spell (spell) doesn't contain the isCanceled property, it's in SpellContext (context), so I tried changing that detection to:

if(event.context.isCanceled()) return;

There were no more errors executing this so the context object seems to at least be right, but this never returned true on any cast whether successful or not - which lead me to believe that perhaps on the very tick a SpellCastEvent happens, this isCanceled is not set to true yet because the detection of the spell actually not working (e.g. aiming targeted spell at sky) didn't occur yet? I'm not sure if I'm correct with that assumption, but it never returned a true for isCanceled - the check only occurs once right when SpellCastEvent fires

#

So I'm basically looking for input on whether my suggested workaround for them makes sense, which is to shift the detected kubejs event to com.hollingsworth.arsnouveau.api.event.SpellResolveEvent$Post
and in which case the XP to be attributed goes from event.entity to event.shooter (since SpellResolveEvent => Post uses shooter as variable for the entity casting if I see that correctly), and then just ignore the whole check whether the cast succeeded, since if we're looking at the Post part of a SpellResolveEvent, that means the cast by definition has succeeded/went through here right?

#

That's what I added to my issue about it to them (https://github.com/FTBTeam/FTB-Modpack-Issues/issues/11630) but I wanted to make sure I got the intention with this correct and that this doesn't have unforeseen consequences (from a quick check it does seem to correctly attribute XP with proper casts and none when spam casting invalid casts like targeted spells at the sky) or if there's a better way to do this

radiant depot
#

Use SpellCostCalcEvent.Post ?

#

It's fired in expendMana

#

so it should ensure that amount is what's gonna be subtracted, after all discounts are applied too

#

@nova jungle

nova jungle
#

O that's interesting! So that'd help with for example making something expensive super cheap (or free if that's possible) and spamming that

#

Though not sure what they'd think about that because on the other hand that'd feel punishing where making spells cheaper => less XP

#

But so at least that'd also similarly to SpellResolveEvent.Post circumvent needing to check whether the spell got cancelled or not, since by definition you're looking at the results of it going through
Either way the cost calculation accuracy seemed to be lower priority, was just more about a proper detection of a cast going through in the first instance (without including cancelled/invalid casts)

Currently the XP quantity gained is calculated with event.spell.getCost() which I guess is the raw undiscounted/full cost, which I think does make sense to use as a crude gauge of "this is a more complex spell to cast because it costs more mana so you get more XP"
Otherwise it can be a bit weird that a simple spell might give more XP than a more complex spell that just happens to have more mana discounts included and thus costs less to cast

radiant depot
#

normally the last check before discount is SpellCastEvent.isCanceled()

#

then the spell attempts to fire via form

#

depending on how the form behave, it might not charge for the mana cost

#

projectile always cost, touch doesn't if the target is invalid

nova jungle
#

Oh so that's why checking with isCanceled was incorrect on their part, because if the form doesn't allow it to cast and thus cast never happens, this is past that check so isCanceled would return false despite the cast never actually happening

radiant depot
#

there could be SpellResolveEvent.Post but i'm not sure how that behaves with spells that have complex behaviors

nova jungle
#

Yea that's what I currently got to and was looking for feedback on

#

whether it has any other consequences I'm missing or if there's a better way to check

radiant depot
#

i believe it could fire multiple times with stuff like delay-reset-linger etc. that create subcontextes

nova jungle
#

was looking for some kind of check that comes late enough in the pipeline where you can guaranteed say "ok you tried to cast this, and something actually happened"

#

oh right

radiant depot
#

you can potentially "reverse" the discount by adding it back i guess?

nova jungle
#

So perhaps SpellCostCalcEvent.Post might be better suited as that's where mana costs happen which should just be the point of "player casted here" without worrying about what the spell does afterwards

#

The discount really doesn't matter

#

It's really just about detecting "has the player properly casted here"

radiant depot
#

that event should be guaranteed to fire only once and indicates that mana is going to be spent, (unless it's zero-ed i guess but at least it tried)

#

no idea how that interacts with @hallow owl 's staff tbh

nova jungle
#

e.g. if I look at a block and cast break on it and it actually casts, mana cost happens, spell flies out (if projectile for example), count it as a successful cast for the event

but if it's say a targeted spell and I look in the sky and spam click cast, it shouldn't count (that still of course triggers SpellCastEvent alone so that's not good to check with, and isCanceled is still false here)

#

okay yea that makes sense

radiant depot
#

you can spam projectiles at the sky that eventually won't do nothing but you still reward only if it expended mana

nova jungle
#

just want to prevent something like the resolve event where if something keeps repeating or doing some kind of after effects that it'd just repeatedly keep triggering it as if you casted a ton of times

radiant depot
#

there's no good way to say "the whole spell did something"

nova jungle
#

I didn't mean to imply like what the spell did

#

as in, if you use a break spell but it's not strong enough to break the target block but you still tried and mana cost happened etc, that still counts as a cast for this, it doesn't need to be complex

#

it's just right now you can abuse it by setting a targeted spell that needs you to look at say a block/entity, and just look at the sky, click a billion times with absolutely nothing happening no mana costs nothing, and you get a ton of XP because each counted as a cast with SpellCastEvent

radiant depot
#

the Post of the Calc event should be your best bet, it's fired only right before the mana is subtracted from the player

nova jungle
#

yep that really sounded great and prevents any unforeseen consequences/complexities with what the spell actually does afterwards when it does its thing

radiant depot
#

the whole cost should still be available since the context is a field in the event

nova jungle
#

and simply focuses on the very initial player doing cast, the cast is going through, mana cost happens, let's count it

#

yea was just looking at that, there's still context there so that's good

#

so got the caster livingentity to attribute it to the player casting and such too

#

Thank you for the great input I think that's exactly what I was looking for and the type of consequence I was not thinking of when using SpellResolveEvent

candid mesa
#

So the guide for editing drygmy farms using lootjs and kubejs is out of date and I need some help making an up to date script with the appropriate syntax that doesn't error out. I tried to update the syntax, but I'm still getting errors.

Script:
// KubeJS / LootJS (latest Loot Modifiers Event API style)

const DRYGMY_UUID = "7400926d-1007-4e53-880f-b43e67f2bf29";

function onlyDrygmy(modifier) {
// Only apply when the attacker is the Drygmy with this UUID
return modifier.matchAttackerCustom(attacker => attacker.uuid.toString() === DRYGMY_UUID);
}

LootJS.modifiers(event => {
// Replaces: event.addTypeModifier("entity")
// Latest API uses table modifiers + LootType
onlyDrygmy(event.addTableModifier(LootType.ENTITY))
.removeLoot("irons_spellbooks:scroll");
});

// Drygmy blacklist tags (same idea; just combined into one call)
ServerEvents.tags("entity_type", event => {
event.add("ars_nouveau:drygmy_blacklist", [
"irons_spellbooks:dead_king",
"irons_spellbooks:archevoker",
"artifacts:mimic",
/occultism:.+/,
/cataclysm:.+/,
]);
});

radiant depot
hallow owl
#

Is it not possible to copy-paste a group with their nested groups AND copy-paste the animations too in Blockbench?

#

Oh oh it is, you just need to use 'Duplicate' and not Cmd+C & Cmd+V ✅

unreal summit
rocky grail
#

might be static initialization order biting you

#

@unreal summit for visibility

radiant depot
#

Is it somehow possible that by having declaration and assignment separated there's a sort of classload def of the array while its variables ares not yet inits?

#

sounds pretty fucked up if true, i hope not

#

mostly because that array was there even with the medium only

#

the only diff i see is that medium is inlined while the other two are split

unreal summit
#

I can try moving those lines - I was just copying the format directly from the Elemental stuff

unreal summit
#

Okay, that got the client loading, now all the armor tooltips are messed up…😩

unreal summit
#

What do i need to fix?

radiant depot
#

probably need to fill the map in schoolToDefenseAttribute?

#

umh, nah

#

you should probably make it a loop over the subschools of your composite schools

#

let me write the snippet for the medium as example

unreal summit
#

Ummm…I know what the WORD loop means…

No idea what that looks like in code…

#

The weird thing is that the heavy and light Elemancer tooltips are working fine, but NONE of the others do, including medium Elemancer

radiant depot
#

cause there's an attribute defined for the elemental generic

#

but not one for each mixed

unreal summit
#

But why would the medium Elemancer not work

radiant depot
#

so you have to add both the elements

#

umh, unsure

#

i'll have to split the msg because it's too long apparently

#
    @Override
    public @NotNull ItemAttributeModifiers getDefaultAttributeModifiers(@NotNull ItemStack stack) {
        ItemAttributeModifiers itemAttributeModifiers = super.getDefaultAttributeModifiers(stack);

        if (element == SpellSchools.ELEMENTAL)
            return itemAttributeModifiers.withModifierAdded(AttributeEventHandler.schoolToDefenseAttribute.get(weaknessMap.getOrDefault(this.element, SpellSchools.ELEMENTAL)), new AttributeModifier(ArsElemental.prefix("elemental_weakness_armor_" + this.type.getName()), -12.5, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.bySlot(this.type.getSlot()))
                    .withModifierAdded(AttributeEventHandler.schoolToDefenseAttribute.get(this.element), new AttributeModifier(ArsElemental.prefix("elemental_defense_armor_" + this.type.getName()), 25, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.bySlot(this.type.getSlot()))
                    .withModifierAdded(AttributeEventHandler.schoolToPowerAttribute.get(this.element), new AttributeModifier(ArsElemental.prefix("elemental_power_armor_" + this.type.getName()), 1, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.bySlot(this.type.getSlot()));

#

        for (var school : this.element.getSubSchools()) {
            if (school == SpellSchools.ELEMENTAL) continue;
            itemAttributeModifiers = itemAttributeModifiers.withModifierAdded(AttributeEventHandler.schoolToDefenseAttribute.get(weaknessMap.getOrDefault(school, SpellSchools.ELEMENTAL)), new AttributeModifier(ArsElemental.prefix("elemental_weakness_armor_" + this.type.getName()), -12.5, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.bySlot(this.type.getSlot()))
                    .withModifierAdded(AttributeEventHandler.schoolToDefenseAttribute.get(school), new AttributeModifier(ArsElemental.prefix("elemental_defense_armor_" + this.type.getName()), 25, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.bySlot(this.type.getSlot()))
                    .withModifierAdded(AttributeEventHandler.schoolToPowerAttribute.get(school), new AttributeModifier(ArsElemental.prefix("elemental_power_armor_" + this.type.getName()), 1, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.bySlot(this.type.getSlot()));
        }

        return itemAttributeModifiers;
    }
#

try using this @unreal summit

unreal summit
#

which file does this go in?

radiant depot
#

this one is made for the medium one specifically

unreal summit
#

so the LightArmorE, MediumArmorE, and HeavyARmorE files?

radiant depot
#

more like see how it goes then adjust for the right attribute to be applied to the light and heavy variant

#

try on the MediumArmorE, yeah

unreal summit
#

are medium armors supposed to give resistances/penalties now?

radiant depot
#

the base ones yes

unreal summit
#

okay, then its working

radiant depot
#

adjust the attributes given basing on how you wanna handle it

#

not sure how those are gonna interact internally with "opposing elements"

#

does it say -12.5 + 25 or +12.5 ?

unreal summit
#

it's giving both the bonus and penalty as seperate lines

radiant depot
#

ugly

#

you could keep the two lines of power and resistance in the loop

#

and define one single school as the actual opposite weakness outside the loop i guess?

#

the early check on if it's the elementalist probably shouldn't have a weakness either

unreal summit
#

well take vapor for instance: +fire and water -water and air

#

would it be easier to PR something directly into sauce for each of the composite schools?

radiant depot
#

i don't think there's need to PR, they are maps you can add to

#

ah, i made the weakness/resistance map immutable

#

my bad

#

but those are in elemental, you can have your own in elemancy

#

the school to attribute maps are open, they simply don't support multiple attributes for one school aside the <power, resistance> pair

unreal summit
#

I'm also puzzled why the medium is handling the stats differently by splitting each element out

radiant depot
#

uh, why the check is failing

#

the if (element == SpellSchools.ELEMENTAL)

unreal summit
#

the heavy and light aren't doing the loop thing, that's just cut and paste from Elemental

#

the medium i added the edits from above

radiant depot
#

ah, it's because you duped the Elemental school

#

remove that from ArsNouveauRegistry

#

use SpellSchools.ELEMENTAL to register the Set

#

the school is already defined in base ars

unreal summit
#

i think i was using the base school for some things, and the duped version for others

#

that fixed it

#

so i just need to use that same snippet from above in LightArmorE and HeavyArmorE, but adjust the magnitudes of the values?

radiant depot
#

in short yeah, adjust them as you like

#

there are resistance and spell power for each main school

#

in base elemental,
light ver has more spellpower but less resistance to its own school and a "weakness" school
heavy ver has less spellpower but higher resistance to its own school and no weakness but an extra resistance to the school it's super-effective against

unreal summit
#

it's gonna look ugly for now with multiple bonuses/penalties stacking, but at least its working

radiant depot
#

i'd personally cut the weakness out of the loop and define them against only one school

#

using the resistance/weakness map you have in armorSet

#

it's just a bit complicated to assign them

unreal summit
#

that does give them a bit of a power boost

#

to do that i would just take out these lines?
.withModifierAdded(AttributeEventHandler.schoolToDefenseAttribute.get(weaknessMap.getOrDefault(this.element, SpellSchools.ELEMENTAL)), new AttributeModifier(ArsElemental.prefix("elemental_weakness_armor_" + this.type.getName()), -12.5, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.bySlot(this.type.getSlot()))

radiant depot
#

to remove the weakness entirely yeah

#

which is for example something to do to the elmentalist case

unreal summit
#

I think for now, i'm only going to remove the weakness from the quad-element gear. i dont want to completely remove the penalty from the armors, especially the light stuff

#

and there is some logic to the idea that mixing elements with an opposing element could cause some interference

radiant depot
#

there is surely a way to calculate the right amount of resistance in one go without adding it both as positive and negative

#

the only problem afterall is the tooltip not merging them

#

you'd just have to structure the code in a more...complex? way

#

i added the maps just for simplicity with single schools

unreal summit
#

i can barely structure the code in the first place...no way i can make it MORE complex 😂

#

at l;east i can make SENSE of the code for the most part once i see it in front of me

#

okay...from what i can tell it is now fully functional, i just need to fix some naming on files for textures and recipes

#

tedious work, but EASY work

#

and partially my own fault for just appending _light or _heavy on everything without noticing that wasnt the actual naming convention

radiant depot
#

ah anyway i was hallucinating and the continue inside the loop isn't really needed

unreal summit
#

Other than removing the weakness on the Elemancer/Omniguard/Tiamat gear I think I’ll leave it as is. Makes it more obvious that you are getting the penalty from the opposing element

radiant depot
#

the snippet is simply merging the values before applying the bonus

#

so the tooltip doesn't show two values

unreal summit
#

Right, but then it’s “why am I getting +25 to one element but only +12.5 to the other”

#

Because you are mixing Fire and Water and getting a -12.5 penalty

#

Hmmm. Now to figure out the rendering for the light and heavy armors…

unreal summit
#

Where in the code does it tell the renderer which geo model to use for the armor?

radiant depot
#

getGeoRenderer or smth

#

It's an override in the item

#

There's probably a default that uses getModel

#

Which returns the model that was given in the item constructor

#

Looking at Ars Nouveau armor should be enough

unreal summit
#

I can’t even figure out how the medium stuff is linked to the correct model in the existing stuff

unreal summit
#

Ah ha

radiant depot
#

That's the model you're passing, since it's in the superclass it's used by all 3 variants

unreal summit
#

Is there a way I can make that line determine which model to use, or do I need to generate all new classes?

radiant depot
#

Make a the sub-armor use a constructor that passes the model to the super instead of hardcoding it to the superclass?

tender karma
#

I don't know if this is technically the right channel but...

#

Say, I wanted an entity to wear the Arcanist's Hat as part of their model

#

Is there a way I could import the Arcanist's Hat into the entity model in Blockbench from the .json model and .png textures? Or am I stuck recreating by hand?

#

Or is there another way I could make said custom entity wear the hat by default?

unreal summit
#

If anyone knows how to make this work where it will use the right geo model based on armor type, it's the only piece missing to make the next version of Elemancy work fully.
#1019655534900678737 message

unreal summit
#

Anyone know how to link an animation to an armor set if I have the animation made already?

tender karma
#

In the GeckoLib trenches currently, and here's what I have for the Enchanter's animations.

    public void registerControllers(AnimatableManager.ControllerRegistrar controller) {
        controller.add(new AnimationController<>(this, "controller", 0, this::predicate));
    }

    private PlayState predicate(AnimationState<EnchanterEntity> event) {
        if(event.isMoving()) {
            event.getController().setAnimation(WALK);
        }
        event.getController().setAnimation(IDLE);
        return PlayState.CONTINUE;
    }

The intent is give the Enchanter an Idle and a Walking animation (for now). So far, the Enchanter is showing the Idle animation, but even as he walks, he just sticks to the Idle animation and doesn't seem to ever change into the Walking animation. I should note that I've already tried with separate controllers for Walking and Idle, and now merged them into a single controller. In my head the code makes sense, but I'm probably missing something. Any tips?

tender karma
#

Got it. smugxie Looked at the GeckoLib wiki and ended up with this, based off of their example

        controllers.add(new AnimationController<>(this, "Walking", 0,
                state -> state.isMoving()
                        ? state.setAndContinue(WALK)
                        : state.setAndContinue(IDLE)));
    }

Still don't know why my initial attempt wasn't working, but oh well.

radiant depot
#

From what I see, your first attempt was setting the walk but then it was setting idle again

tender karma
#

Looking again, I see what you mean now.. although I swear I tried it with an if-else statement too, but that didn't work either... Hm.

modern crest
#

Oh damn I should have asked this earlier: Since Ars Nouveau assets are All Rights Reserved, is there a way to get permission to use screenshots that show Ars Nouveau assets for addons on curseforge?

#

I currently use the attached images as icons/screenshots, I didn't think about it since there's so many screenshots on curseforge, but I wasn't aware of the All Rights Reserved bit in the license. "Addon authors are encouraged to reuse Ars Nouveau assets and to reach out in the discord" - I guess here I am reaching out for explicit permission.

pallid rapids
#

as I recall, the All Rights Reserved thing was specifically to prevent people from attempting to port Ars themselves

shadow helm
#

Or to rip textures for their own mods

unreal summit
#

Basically, don’t use Ars assets for something that isn’t part of the Ars ecosystem.

pallid rapids
#

I think the thing that triggered the ARR was someone saying they were going to port Ars to fabric on our behalf, and so Bailey locked it down

unreal summit
#

I don’t think they’ve ever objected to anyone using them for making Ars addons, though.

I WAS requested to pay Goo a small licensing fee when I wanted to use the textures for my book.

neat mango
#

I didnt even know it was ARR when i ripped off the spellbook assets

radiant depot
#

It was probably made ARR after you did

tender karma
#

I totally missed the fact that the textures/models were ARR 😬, I just saw the GNU License

neat mango
#

its probably fine. Bailey wont be enforcing it unless someone misuses the assets

zealous zenith
#

addons are free to use it, its mainly to prevent entire forks or modloader ports

modern crest
#

great, thank you!

rocky grail
#

reminder that we have to listen to goo

neat mango
#

probably should be pinned here

shadow helm
#

Done

#

Also hoping that Goo never needs to DMCA anyone from Bailey's grave.

unreal summit
#

Unless it’s like the year 2106😜

shadow helm
unreal summit
#

So I was asking in the geckolib discord about rendering translucent and animated armors for Elemancy and was told that I just need to

  • Make my texture translucent✅
  • set the armor rendertype to entityTranslucent

But I’m calling on the renderer using code from Elemental, so I don’t know if I can even do that.

For animations I was told I just need to “add animations”, but I don’t know how to add that to the renderer - or again, if I even CAN since I’m using existing code.

#

Any insights?

zealous zenith
#

I think you can replace entire renderers using one of their events

#

if so you could just copy the elemental classes, make your tweaks and then should be fine. Why are you using alexs classes though?

unreal summit
#

My armors are basically just extensions of the Elemental armors with more than one school

zealous zenith
#

do they have to be those classes though for functional reasons though?

unreal summit
#

I do not know coding well enough to know the answer to that question.

#

And I’m hesitant to risk breaking functionality just to get three translucent sets and three sets with small animations

unreal summit
#

Isn’t that calling AnimatedMagicArmor from base though?

unreal summit
#

I tried pasting in that override snippet, but couldn’t find a way to set the parameters to make it resolve.

neat mango
unreal summit
# neat mango wdym?

Tried every permutation I could think of to @override the rendertype but without seeing an example first I have no idea how to set up the parameters.

You forget, I don’t actually know Java.

#

I wish there were more tutorial sites for Minecraft modding that just gave example code snippets for how to do things

neat mango
#

Let the IDE autocomplete it for you. it should also let you import things automatically

#

replace R with AnimatedMagicArmor

#

try it if that works out or you can @ me tomorrow, I will try to do it

radiant depot
#

Is the Elemancy Armor Renderer used at all?

#

Elemancy Armor extends the Ars armor, not the Elemental Armor

#

I had to put an override in the Elemental Armor to use my own renderer instead of just passing the model to the base renderer

unreal summit
#

I know that iElemancy extends iElemental, but it does look like the Renderer just extends base Ars armor

unreal summit
tender karma
#

EDIT: Sigh. Scratch that, I'm dumb and forgot a line. Still need help with DataGen'd glyph/tablet item models though.

#

I'm also not sure on how people are DataGen'ing the glyph and ritual tablet models. I couldn't find anything on Additions or Elemental, so I've kept those handmade, but I'd also like to migrate them to DataGen, if possible.

radiant depot
#

I think ars Datagen those?

#

You would have to use the very basic generatedItem method on the ritual tablet item

#

Which can be retrieved from the Ritual registry map

tender karma
#

Everything seems to work now, except for the actual tablet textures... Which is weird, because the generated model file is exactly identical to the one I handmade earlier.

#

I deleted all model files and the glyphs all show fine. It's just the tablet that shows without a texture.

unreal summit
#

Trying to work on Elemancy and it suddenly says this when I try to run the client

#

What’s going on?

mossy hollow
#

Can you show those lines from your build.gradle file?

unreal summit
mossy hollow
#

I think Jared's maven may be having issues

#

It seems to 404 when I navigate to it

#

Maybe someone else can confirm when they wake up

unreal summit
#

So I may just need to wait for them to fix the maven? (I don’t really understand what a maven is anyway.)

mossy hollow
#

I think so

#

Maven is for Java dependencies what curseforge is to mods.

Just a place where mods or libraries can be uploaded to then be used in other mod projects.

unreal summit
#

Is there a way to build a .jar while the mavens are down?

radiant depot
#

You could try setting it to offline mod, it's a button in the Gradle tab

#

Only works as long as the versions of the libraries were already downloaded

#

But also, Jared is already restoring the backup so it might be already up?

#

Faulty drive was the issue

unreal summit
#

It’s not up yet, but if he’s working on it now it should be up by the time I get home from church.

#

I’m pretty sure I fixed the problems on this end that were causing some of the recipes to not show, but will need to test later.

radiant depot
#

#453981717909471243 message

#

unsure about the time conversion

delicate badge
#

updated with timestamps

tender karma
#

What are ways I could integrate another add-on's items into mine without making them a hard dependency? Item tags and recipes only?

radiant depot
#

Depends on what means integrate

tender karma
#

Trying to make an optional item listing including Ars Additions' codex items for the Enchanter to trade if Additions is loaded. However, so far I've only seen data load conditions which only work with JSON files (to my knowledge) and potentially using item tags rather than calling the item itself.

radiant depot
#

Tags would be safer

#

Otherwise you can have a soft dependency

#

You check if the mod is loaded then [in another class accessed only in the true branch] use the Additions classes

tender karma
#

Not sure I follow the last part about the true branch, sorry.

#

I add Additions as an optional dependency —> I make a new class where I check the mod is loaded —> I call upon that new class in the class where I'm handling the item listings.

Is that what you mean?

rocky grail
#

easiest way to test that it works is to replace implementation with compileOnly and verify that it still runs

tender karma
#

Hadn't implemented any dependencies on Additions yet, so I went straight for compileOnly. It works!

#

Will do a quick test without the jar in the mods folder to see if it doesn't break.

radiant depot
#

If it worked in compile only mode then it should be fine

#

Basically if you were to use isLoaded and directly use the Addition classes, it would have tried to always load them

rocky grail
#

4 nether stars seems like a steep price considering i dont think any t3 glyph is more expensive than 1 star lol

tender karma
#

Fair! I'm just testing right now lol

radiant depot
#

If you have the calls in a separate class, only accessed if the isLoaded is true then it doesn't risk class loading stuff that isn't there

tender karma
#

Even after removing Additions and trading with the same goober, it's all working fine. It just didn't show the codex trades w/o Additions which is expected.

#

Only side-effect after loading with the mod back in is that all the goobers "lost" that trade. Maybe an issue to be fixed, but since I added the eating mechanism where they refresh their trades, that's not a big deal.

#

Thanks for the help!

wheat tapir
#

👋 hello! anyone have any experience with a new item not appearing in recipe UIs? i'm working on an add-on which adds enchanting apparatus recipes for music discs, plus a curio item that is a jukebox for playing them. everything is working as expected, except i have been unable to get the recipe for the curio item to appear anywhere except the spellbook. both JEI and the creative mode inventory search show the music disc recipes (enchanting apparatus), but not the curio item recipe (also enchanting apparuts). the curio item itself is craftable. source code: https://codeberg.org/f1337/ars-musique

radiant depot
#

Which bit exactly is missing?

#

Curio item not appearing in Jei but its recipe does?

#

Like, from U on the disc

wheat tapir
#

The curio item, and its recipe, do not appear in JEI, nor in the creative mode inventory search. But I can craft and use it. (aside: thank you! i love Ars Elemental. i learned a heapload from yours and Bailey's work).

wheat tapir
radiant depot
#

Likely just needs to be added to a creative tab

#

Either create a new one or add it to the Ars one for now

wheat tapir
wheat tapir
#

hello again! now that my add-on is working as intended, what do you recommend i do, in order to share it around here? i'm interested in getting feedback from folks in general, and esp w/r/t ideas like: specific effect(s) from specific song. i'm not able to post in #addon-showcase.

shadow helm
wheat tapir
rocky grail
#

according to the description: that looks way powerful

wheat tapir
# rocky grail according to the description: that looks way powerful

yeah it's probably a bit too much. my initial idea was each song applies a unique effect. but then, what if folks hate a particular song? so i'm starting to think about spells: add some music player glyphs, and you'd attach effects that way, and they'd cost mana. something like that. i'm 100% open to feedback. i love music, love ars, and marrying the two seemed like a fun idea.

rocky grail
#

honestly i thought itd be an instrument rather than a disc player lol

wheat tapir
rocky grail
#

ars discs are easy via the shady villager

#

in any case i do think an actual instrument would be fun

wheat tapir
wheat tapir
wheat tapir
#

oof but the ui issues w/r/t note and rest lengths...i gotta ruminate on that one in the background.

gleaming fox
#

hello there
i am wondering how i can get if a damage instance is a critical, and if yes, what the damage source is
is there some event for this?
i tried looking at CriticalHitEvent but it doesn't have a damage source field

radiant depot
#

in vanilla it's always only from a playerattack

gleaming fox
radiant depot
#

no idea what happens with for example Apotheosis

#

if you need, i can add an event for the spell crit in sauce i guess?

gleaming fox
#

maybe a custom DamageSource implementation?

radiant depot
#

at most, mixin into spell damage source to add the flag

#

there's already that custom one, to propagate luck augment correctly

wheat tapir
shadow helm
#

Nope. Just us admins being lazy in inducting you into the club of the SAD people.

hasty nacelle
#

They are trying to find the regents for the great ritual

wheat tapir
#

i'm an anxious-buncle, but not an impatient one. thank you for the info, i'll chill. 😂

hasty nacelle
#

You have been yellowfied

wheat tapir
#

thank you!!

hasty nacelle
#

Not me but yea

#

Soon it'll be my turn

rocky grail
#

@wheat tapir do create a post in #1019655289873641555 for your new addon!

hasty nacelle
#

was JUST about to say that

#

you should have access to that

wheat tapir
#

will do, thank you!

wheat tapir
#

I've been meaning to ask: Do any of y'all use WSL2 on Windows, and if so, does your gradle-launched MC spin out of control when you move your mouse? 😂

wheat tapir
#

so how do y'all recommend handling configuration for mod users and modpack creators? as in, what pattern do you use, or even better, throw an example link or RTFM at me? edit: i found the neoforge docs. given the pattern i see in ars nouveau and ars elemental, i'm guessing that's the preferred way?

neat mango
wheat tapir
neat mango
#

since most of things in minecraft dev happens through IDE and just gradle, linux and windows dev experience doesnt really differ much

rain agate
#

Hey I was wondering if this is the right channel to ask permissions for making an addon for Ars & reuse assets?

neat mango
#

yeah should be fine. you dont need to ask for permission. as long as you comply with the license and copyrights, you should be good

zealous zenith
#

addons are allowed to reuse assets, forks are not, so you are good

rain agate
#

Oh sweet! Thank you, wasn't too sure. Was curious however, i can't seem to find anything online and if there isnt an answer its okay, but does the Shady Wizard have a name?

radiant depot
#

If it's just a matter of flags and values, there's the configs that are more user friendly

#

For slightly more complex stuff, ranging from recipes to mappings there's datapack stuff that modpack makers are supposed to learn (and that many users don't wanna)

#

For example, if you wanted to allow custom disc -> effect mappings you could either use a recipe or a datamap (latter is more recent and cleaner)

#

There's the option of making a parser and putting that into the classic config as I did for Starbunclemania fluid conversions...but that's kinda legacy

wheat tapir
#

awesome, thank you for the info!

wheat tapir
wheat tapir
radiant depot
#

You should check on the Minecraft wiki what are the capabilities of datapacks

#

But basically any json file in the data folder can be overridden by them

#

Code-wise you just need to make the parsing part (if it's not an existing recipe type, like the crafting table or enchanting app. etc.)

wheat tapir
#

awesome, thank you. i am a bit familiar with datapacks. but i wasn't sure if the existing datagen work i've done is enough to support standard JSON overrides. it sounds like it is.

gleaming fox
#

hello there
may i ask how TF does one query a particle's texture from the particle atlas?

i have this code as of now and i need to get some particles but it's not working

please do ping me when you reply

@Override
    public void renderImage(Font font, int x, int y, GuiGraphics guiGraphics) {
        int width = getWidth(font); int height = getHeight();String key = text.getString();
        List<TooltipParticle> particles = PARTICLE_CACHE.computeIfAbsent(key, k -> new ArrayList<>());
        guiGraphics.enableScissor(x - 8, y - 18, x + width + 8, y + height + 10);

        if (particles.size() < 200 && random.nextFloat() < 0.15f) {
            particles.add(new TooltipParticle(x + random.nextInt(width), y + 8, random.nextInt(3), random));
        }

        TextColor styleColor = text.getStyle().getColor();
        int colorInt = styleColor != null ? styleColor.getValue() : 0xFFAA00;
        float r = ((colorInt >> 16) & 0xFF) / 255f;
        float g = ((colorInt >> 8) & 0xFF) / 255f;
        float b = (colorInt & 0xFF) / 255f;

        TextureAtlas atlas = Minecraft.getInstance()
                .particleEngine.textureAtlas; //access modifier makes this possible

        RenderSystem.setShaderTexture(0, TextureAtlas.LOCATION_PARTICLES);
        RenderSystem.enableBlend();

        //...
            TextureAtlasSprite sprite = atlas.getSprite(spriteId);

            if (p.type == 2) RenderSystem.setShaderColor(r * 0.2f, g * 0.2f, b * 0.2f, alpha * 0.4f);
            else {
                float dim = 1.0f - (lifePct * 0.4f);
                RenderSystem.setShaderColor(r * dim, g * dim, b * dim, alpha * 0.9f);
            }
            guiGraphics.blit((int)p.x, (int)p.y, 0, p.size, p.size, sprite);
        }
        RenderSystem.setShaderColor(1, 1, 1, 1);
        guiGraphics.disableScissor();
    }
radiant depot
#

what's the missing part here?

#

need the spriteId from a registered particle?

gleaming fox
# radiant depot what's the missing part here?

alright the issue is
im making a custom tooltip component and im trying to display particles inside the image part
i got the logic working but i cannot for the life of me figure out how to get the correct TextureAtlasSprite

here is the missing part

    private static final ResourceLocation FIRE_ID = ResourceLocation.withDefaultNamespace("fire_0");
    private static final ResourceLocation LAVA_ID = ResourceLocation.withDefaultNamespace("lava");
...

            ResourceLocation spriteId = switch (p.type) {
                case 0 -> FIRE_ID;
                case 1 -> LAVA_ID;
                default -> ResourceLocation.withDefaultNamespace("big_smoke_" + Math.min((int)(lifePct * 10), 9));
            };
radiant depot
#

could be because particles are spritesets?

#

i'll try again to reuse the sanguine tooltip to check

#

btw you should be able to use Minecraft.getInstance().getTextureAtlas(TextureAtlas.LOCATION_PARTICLES); without the need of an AT

gleaming fox
#

here is the class

#
private static class TooltipParticle {
        float x, y, vx, vy, age, maxAge;
        int type;
        float noiseSeed;
        int size;

        TooltipParticle(float x, float y, int type, RandomSource rand) {
            this.x = x; this.y = y; this.type = type;
            this.vx = (rand.nextFloat() - 0.5f) * 0.12f;
            this.vy = -0.05f - rand.nextFloat() * 0.08f;
            this.maxAge = 40 + rand.nextInt(40);
            this.noiseSeed = rand.nextFloat() * 100f;
            this.size = 4 + rand.nextInt(5);
        }

        void tick() {
            x += (float) (vx + (Math.sin(age * 0.1 + noiseSeed) * 0.04));
            y += vy;
            age++;
        }
    }
radiant depot
#

might it be that you're confusing the "size" parameter of blit?

#

when you blit, you basically take a crop of the image based on an offset of 0,0 and a size

gleaming fox
#

huh?

#

so should the offset not be 0?

radiant depot
#

re-reading the signature maybe using the AtlasSprite is different

#

since it already handles the u/v part

#

#1480035731018879212 message

#

we were going over this kind of stuff yesterday

gleaming fox
#

but from what i see when i boot the game the issue is that the texture isn't being found/loaded
the actual rendering logic is working as intended

radiant depot
#

yeah the code seems alright

#

need to see it live

#

also isn't that the wrong texture path?

#

should be something like particles/fire_0 at the very least

gleaming fox
#

this is how it looks as of now

radiant depot
#

that's directly retrieving from particle holders?

gleaming fox
radiant depot
#

no i mean with which resourcelocation

gleaming fox
#

might be due to a missing S

radiant depot
gleaming fox
#

let me see if ading it works

radiant depot
#

i don't see fire_0 particle btw

#

try like particle/soul_0

gleaming fox
#

i tried using :

    private final ResourceLocation FIRE_ID = ResourceLocation.withDefaultNamespace("particles/flame");
    private static final ResourceLocation LAVA_ID = ResourceLocation.withDefaultNamespace("particle/soul_0");

but it still didn't render

#

alright ill be back in a bit i have to go eat

radiant depot
#

ok sorry i'm checking with debugger now and there was no need of particles/

#

you would have discovered the problem with a breakpoint on the getSprite

#

yep works

#

and also animated in testing by cycling trough the spriteset manually, lol

#

you were simply using the wrong RL

gleaming fox
#

ill try this wgen i get back to tge classroom

gleaming fox
#

@radiant depot i got it to work on my end too!
tyvm for the help

radiant depot
#

How could i reliably poll users about feeback on elemental armor set bonus proposals i wonder

#

and yeah, i'm excluding my discord from the equation

gleaming fox
radiant depot
#

i've seen enough packs being a chat spam on login

#

current draft splits element set bonus and armor type bonus into two

#

keeps the current reduction tied to the school of the armor pieces, adds a secondary effect on damage received depending on the count/type of pieces

radiant depot
#

Current draft, perk slots rework not included but accounted:

Bonuses only apply after being hit with a damage tagged with the armor's element

-- Light bonus (Spell Crit)

  • Active at ≥2 pieces
  • Stronger at 4 pieces (II)
  • To be balanced on how much it is for potion level

-- Medium bonus (Mana Discount)

  • Active at ≥2 pieces
  • Stronger at 4 pieces (II)
  • To be balanced on how much it is for potion level

-- Mana conversion (damage → mana)

  • Requires bonusReduction >= 4 or heavy_pieces >= 2
  • Only triggers for full medium sets or mixes including at least 2 heavy pieces
  • Classic set bonus

-- Overflow healing

  • Requires heavy_pieces >= 4 so only full heavy sets
  • If the recovered mana exceeds, gets converted into heal (pre-damage) max 10 points of healing

-- Bonus reduction

  • At the moment, it's +1 for each piece regardless of type. Means a 40% reduction on the matching element.
  • Special damage cases would add a +5 to bonusReduction aka fire with fire armor or starve with earth.
  • With the rework, it would range from 20% to 60%. Special case would add a 40% and would allow to trigger mana conv. effects on light armor.
  • Mana recovered scales off bonusReduction.
radiant depot
#

Thread slots:

  • Light unchanged from Sorcerer (4 lv3, 6 lv2, 2 lv1)
  • Medium unchanged from "classic" (4 lv3, 4 lv2, 4 lv1)
  • Heavy doesn't get more lv3 thread slots but upgrades one row of level 1 to level 2 slots (4 lv1, 6 lv2, 2 lv3 from 8 lv1, 2 lv2, 2 lv3)
#

@rocky grail math games for your theorical optimization hobby

hasty nacelle
#

Hobby or addiction?

radiant depot
#

does it really matter?

hasty nacelle
#

Fr

radiant depot
#

i never fight or try to optimize too hard so while i'm trying to apply a MH-Wilds like armor set bonus i can't reliably foresee how it ends up in practice

#

singleplayer testing isn't enough

radiant depot
wheat tapir
#

damn alex heavy t4 armor even better now? thx!

rocky grail
#

honestly not that much info for me to comment on

#

overflow healing sounds quite powerful though

#

i feel like armor-wise the actual stats are a bigger deal

#

armor, toughness, mana regen, mana capacity, spell power, etc

wheat tapir
#

i'm excited to play test the damage to mana conversion w/ my heavy air set

hasty nacelle
wheat tapir
#

ex: my kids and me play a sort of MC tower defense server at home w/ Ars+Elementals that is also running Pure Suffering, Improved Mobs, Raided, Mutant Monsters, and a few other things. it's wild fun, multiple players maxed out in Elementals gear, and so there is no such thing as "too much power" on that particular server.

hasty nacelle
#

so 10 points of health?
hb either 50% of health as mana health
or 10 + 35%

radiant depot
# rocky grail overflow healing sounds quite powerful though

How?
You have to get hit by something of the matching element and it has to be high base damage to really be meaningful. Also only heals if the manabar is already almost full, it's not even a flat reduction since it's not setting absorption hearts or healing post-damage

hasty nacelle
#

ohhh matching element only

radiant depot
#

It's just evolution of the current set bonus of the elemental armors

hasty nacelle
#

an alt version?

radiant depot
#

The other two set bonus might be way more strong, that's why I wrote that the amount of discount/crit given have to be tuned

wheat tapir
#

ah i misunderstood when chiming in. my bad.

radiant depot
#

It's a different take on the concept of the armor absorbing its element

hasty nacelle
#

Indeed

radiant depot
#

Instead of just reducing damage, it either converts it into crit,discount or mana

hasty nacelle
#

Discount? Interesting

radiant depot
#

But since converting into mana was already in medium and doesn't help if you have strong Regen or don't cast, the overflow into health seemed viable

#

The discount is hard to balance so probably gonna be low

pallid rapids
#

hmmm, so what I'm wondering with these changes is, what will happen to a fire mage with all heavy armor who stands in lava?

#

side note, would it be possible to include a set bonus for an all fire set to move faster in lava?

radiant depot
#

That's more likely to fit into the fire bangle

hasty nacelle
#

We need faster speeds in lava indeed

radiant depot
#

It's likely going to outheal the lava damage while at full mana

hallow owl
#

Necro-bump (pun not intended), just wanted to ask out of curiosity, are you still working on a necromancy focused addon? 😄

wheat tapir
#

hey Qther, et al: I noticed that your neoforge.mods.toml uses more variables from gradle.properties than I did. So I copied the approach you used, and it appears that gradlew runServer doesn't do the variable substitution. was there some configuration required to allow neoforge.mods.toml to read additional variables from gradle.properties? i didn't find an answer in the neoforge docs.

radiant depot
#

did you refresh the gradle configuration?

#

just usual routine of "it should have worked without doing it"

wheat tapir
radiant depot
#

in ide there should usually be the elephant icon with the rotate

wheat tapir
#

Alex - the background image that you use for Curio & Caster bags in Elementals...is that fair game for reuse?

#

^ specifically i'm asking if using like this is allowed? i'm adding a disc inventory to the Bard's Bandeau.

rocky grail
#

insertion can just be a button when your mainhand item is a disc

radiant depot
#

I mean it's pretty basic, just a Chest-like UI with the spiral on top as decoration

wheat tapir
#

i can hand roll something. it will likely not look like it "fits" the Ars aesthetic as well.

radiant depot
#

with those ruled out, it's a very slow regen at the cost of durability i guess?

#

every time you take the half heart of damage you heal one heart, more or less

#

the two bugs were:

  • Damage into mana was being applied for any damage instance, even the ones that gets ignored by iframes
  • Earth focus healing boost was being applied globally
pallid rapids
#

so a heavy armor fire mage might want a level 3 thread of repairing

hasty nacelle
#

I think you would want that anyways
Especially if durability is turned back on for them all

radiant depot
#

maybe it would be worth on the long run, unsure since you will only have two of them (lv3 slots)

pallid rapids
#

and I'm glad my errant thoughts can help sniff out bugs

#

damage to mana ignoring iframes could get problematic quickly

#

make a spell that just refills your own mana bar

#

though I wonder about that happening regardless in some instances?

radiant depot
#

i mean, that's a mechanic that has been out since idk

#

three years?

#

nobody had it exploited

#

so it went unfixed

pallid rapids
#

I guess most times you are immune to your own spell effects

radiant depot
#

as soon as it got hooked to converting excess into healing i noticed there was something off

pallid rapids
#

but I am just imagining like, an air mage hitting themselves with cut cut cut cut cut cut cut cut cut

radiant depot
#

full instaheal as soon as i touched lava

#

Tea kinda coded the armor as masochist crazy mages

pallid rapids
#

lol yup

radiant depot
#

at this point the -guard set is basically Gimpy

pallid rapids
#

the "hurt me, please" set

radiant depot
#

no idea if the current absorption ratio should be increased, it's something like 1/25

#

lava deals 4 damage

#

with 4 netherguard pieces, you recover 4 * 6 mana. (with pyromancer, 4*4 mana)

#

if that's all excess, it turns into 1 health point

#

then all the reductions apply and you get damaged by probably something < 1

#

4 * 0.6 - armor reduction

#

i was testing without protection, so i guess it can basically go near 0

devout bay
#

Could anyone point me in the right direction with this resource pack? im trying to add custom models for the staffs in the ars zero addon but it just keeps loading the debug model. I know the model is working bc it loads giving the custom model data to a wooden axe

shadow helm
#

Are you doing normal models for the staff or Geckolib models?

devout bay
shadow helm
#

That's probably your problem then if the staff is like most other enchanter's items it's a geckolib model

devout bay
#

m okay from my file browsing of the mod i think youre correct so id want to make it as a geckolib item too?

shadow helm
#

Not too, but yes you need do do it via geckolib

devout bay
#

ah okie

tender karma
#

If I want to make an undispellable effect, is it enough to just add it to the dispel deny tag? Even after deny_dispel.json has been correctly generated/datagenned, I can still dispel the effect I added to the tag.

unreal summit
radiant depot
#

are the tags alright?

#

both the tag themselves and their contents

#

is vaguely similar to what happens when a tag is empty

#

umh, maybe more like the recipe json is malformed

unreal summit
#

It was working in version 1.12.4 before I adjusted things to fix the stat values on the armor. Now the tooltip crashes when you hit Shift on the item

#

And the medium stuff works fine, only the light/heavy stuff is broken.

wheat tapir
#

do have the JSON for the fire pants recipe handy to paste or link?

#

my hunch is a missing comma or something hard to see like that

unreal summit
#

Fire pants are from Ars Elemental

wheat tapir
#

my mistake: elemenacy cinder pants appears to be what it is choking on

#

Parsing error loading recipe ars_elemancy:cinder_pants_1

unreal summit
wheat tapir
#

yeah that looks good. so not a simple parsing bug. dang.

unreal summit
#

The recipes work in game, the error is specifically when you hit Shift on the tooltip to view the set bonuses

wheat tapir
#

wondering aloud: why is tooltip display re-parsing JSON?

unreal summit
#

🤷‍♂️

wheat tapir
#

right? the JSON parsing should have been done and gone?

#

my thought is solely to trap where the bug is triggered. then figure out why.

unreal summit
#

Okay, I take it back. The recipes are NOT working in the latest build

wheat tapir
#

i am happy to buzz off if this isn't helpful. and happy to continue if it is. 🙂

unreal summit
#

I don’t know what I broke between 1.12.4 and 1.13

wheat tapir
wheat tapir
#

ouch no github tags. do you happen to know the revision hashes from those versions? maybe in your git log?

unreal summit
#

So the recipes show in EMI, but they don’t work…

wheat tapir
#

i know that for Musique, i had to work with Holder<MobEffect> everywhere, and not the straight up MobEffect.

unreal summit
#

I’m just mirroring what Alex does in Elemental. I don’t know how MOST of this stuff works

wheat tapir
#

ah ok. there is likely something beyond my ken going on with what Alex is doing. i don't have nearly the depth he or Bailey have with Neoforge and the MC behaviors.

unreal summit
#

Going to lunch, will have to tackle this later

wheat tapir
#

is it possible that the elemancer->elemental rename has some dangling references to "elemancer" that are triggering all of this? there are at minimum, dangling references in language files to "elemancer_light".

#

oh ignore that, i think the real culprit is here:

java.lang.IllegalStateException: Cannot register new entries to DeferredRegister after RegisterEvent has been fired.
    at TRANSFORMER/[email protected]/net.neoforged.neoforge.registries.DeferredRegister.register(DeferredRegister.java:227)
    at TRANSFORMER/[email protected]/net.neoforged.neoforge.registries.DeferredRegister$Items.register(DeferredRegister.java:502)
    at TRANSFORMER/[email protected]/net.neoforged.neoforge.registries.DeferredRegister$Items.register(DeferredRegister.java:515)
    at TRANSFORMER/[email protected]/net.neoforged.neoforge.registries.DeferredRegister$Items.register(DeferredRegister.java:486)
    at TRANSFORMER/[email protected]/lyrellion.ars_elemancy.common.items.armor.ArmorSet$Light.<init>(ArmorSet.java:44)
    at TRANSFORMER/[email protected]/lyrellion.ars_elemancy.common.items.armor.ElemancyArmor.getArmorSetFromElement(ElemancyArmor.java:132)
    at TRANSFORMER/[email protected]/lyrellion.ars_elemancy.common.items.armor.ElemancyArmor.addInformationAfterShift(ElemancyArmor.java:185)
    at TRANSFORMER/[email protected]/lyrellion.ars_elemancy.common.items.armor.ElemancyArmor.lambda$appendHoverText$0(ElemancyArmor.java:107)
#

Deferred registration is being attempted on the render thread, while trying to display a tooltip, long after registration has completed.

unreal summit
#

I don’t know why it’s doing that on the light/heavy but not the medium

radiant depot
#

Wtf

#

Didn't you remove the necromancy branch

#

How does it even attempt reg

unreal summit
#

I can’t even get the recipes to function on medium gear now. They show in EMI, but none of them are working with the enchanting apparatus

unreal summit
#

Okay, weird. The recipes work if you build up from scratch, but not if I just grab elemental gear from the creative menu.

radiant depot
#

Ah well that could make sense

#

From the creative tab they are tier 1 under the hood

#

If you're using the recipe type that checks the tier, it would fail

unreal summit
#

Still doesn’t solve the tooltip issue though. sigh

#

Can’t figure out why it works on the medium, but not the others

radiant depot
#

Breakpoint and see

#

Running in debug mode, the bug icon

#

Code execution stops at the 🛑 and let's you examine the variables

unreal summit
#

How do you run in debug mode?

radiant depot
#

The bug icon instead of the play icon

unreal summit
#

Oh. I’ve been running from in IntelliJS when testing using RunClient

radiant depot
#

I might be hallucinating the bug icon

#

But anyway it's next to the play (run) button

#

It's still using the runClient

#

Just the other button

unreal summit
#

Oh. I see it at the top. I was using the drop down

zealous zenith
# tender karma If I want to make an undispellable effect, is it enough to just add it to the di...

did you figure this out? Not seeing an obvious bug in the dispel effect:

            Optional<HolderSet.Named<MobEffect>> blacklist = world.registryAccess().registryOrThrow(Registries.MOB_EFFECT).getTag(PotionEffectTags.DISPEL_DENY);
            Optional<HolderSet.Named<MobEffect>> whitelist = world.registryAccess().registryOrThrow(Registries.MOB_EFFECT).getTag(PotionEffectTags.DISPEL_ALLOW);
            for (MobEffectInstance e : array) {
                if (e.getCures().contains(EffectCures.MILK)) {
                    if (blacklist.isPresent() && blacklist.get().stream().anyMatch(effect -> effect.value() == e.getEffect()))
                        continue;
                    entity.removeEffect(e.getEffect());
                } else if (whitelist.isPresent() && whitelist.get().stream().anyMatch(effect -> effect.value() == e.getEffect())) {
                    entity.removeEffect(e.getEffect());
                }
            }
#

the blacklist only applies if milk is listed as a cure for an effect, otherwise it has to be on the whitelist. Did you add it to the whitelist on accident?

#

there is also a dispel event fired, if your mod handles those

tender karma
zealous zenith
#

you shouldnt have to list milk as a cure, it should ignore effects that dont have that listed. You could try putting a breakpoint in here and stepping through it

#

I wonder if something is removing it via the dispel event later

rocky grail
#

blacklist is only checked if milk is in cures

#

if milk is not in cures then whitelist is checked

#

blacklist should probably be lifted out and be the first condition

#

or whitelist as the first condition

#

probably whitelist > blacklist > milk

#

the current logic works fine for vanilla because everything is curable with milk

#

even the omens

unreal summit
#

Alex, any idea as to which file might be the one that is calling the tooltip? I still cannot figure out why the light/heavy are working differently than the medium

#

Maybe if I can figure out how the code differs between them I can decipher it

tender karma
zealous zenith
#

if you dont want milk to cure it you shouldnt list it as a cure, im just saying that if it ISNT listed the dispel code should do nothing, and work as you intend

#

so id rule out via debugger whether your effect is either missing from the tag, or if this is being cured via the event

rocky grail
#

the blacklist check is literally nested in the milk check from the code you posted

#

if the milk check fails, the blacklist is never checked

zealous zenith
#

yes, but if milk isnt listed which it likely isnt, the effect still shouldnt be removed

rocky grail
#

ah right because itd have to be whitelisted

zealous zenith
#

the only cases that dispel should remove the effect is

  1. milk is a cure and it is not blacklisted
  2. it is whitelisted
rocky grail
#

eh yeah use a debugger

zealous zenith
#

all other cases it fires the dispel event and does nothing

tender karma
#

Ok! I'll do the debugger thing tonight and see what's causing the issue 🫡

rocky grail
#

fair warning: events go on a world tour if you need to track them via debugger

#

theres a reason theyre slow as sin

zealous zenith
radiant depot
#

Why are you switching like that

zealous zenith
#

is your mod also set to load after all of the mods you reference, like ars elemental?

radiant depot
#

The case have to be the school names

zealous zenith
#

some (annoying) mods will call the tooltip code during item registration

radiant depot
#

Ofc it's going on that default branch

zealous zenith
#

oh

#

lol yeah dont have a default

radiant depot
#

The default should be the elemental, but not with a new otherwise it will trigger registration if there's no match

unreal summit
#

So take the “new” out of those lines?

radiant depot
#

First thing is removing the new line, cause it's what it's crashing

unreal summit
radiant depot
#

Then you make the case "elemental" the default

unreal summit
#

I was trying to mirror the way it’s formatted in elemental

radiant depot
#

Then you should be using "fire" instead of "l_fire" because you're using a school name and the tier is the other argument you already checked

#

I removed the new from elemental too after seeing it from you that it would have crashed with unexpected schools

#

The switch block is just an "optimized series of if"

unreal summit
#

Okay. After work I’ll go look at the latest Elemental code and see how it’s formatted and see if that fixes it.

And look for any more Elemancer vs elemental references that are still messed up.

zealous zenith
#

Im asking earnestly and not to belittle, do you know how that code operates or did you yoink it from elemental and change some strings? it would be easier to explain why and how it works rather than leaving you left with the mystery

unreal summit
#

I have done my coding by looking at things that I know work and reverse engineering to accommodate the new stuff I am adding

zealous zenith
#

you know a lot more than you think you do if you made it this far in the jank hellhole of modded MC, I assure you lol

unreal summit
#

The last time I did programming and knew what I was doing was when Turbo Pascal was “cutting edge”

radiant depot
#
public static ArmorSet getArmorSetFromElement(SpellSchool school, String tier) {
        return switch (tier) {
            case "light" -> switch (school.getId()) {
                case "tempest" -> ModItems.TEMPEST_ARMOR_L;
                case "silt" -> ModItems.SILT_ARMOR_L;
                case "mire" -> ModItems.MIRE_ARMOR_L;
                case "vapor" -> ModItems.VAPOR_ARMOR_L;
                case "lava" -> ModItems.LAVA_ARMOR_L;
                case "cinder" -> ModItems.CINDER_ARMOR_L;
                cdefault  -> ModItems.ELEMANCER_ARMOR_L;
            };
            case "heavy" -> switch (school.getId()) {
                case "tempest" -> ModItems.TEMPEST_ARMOR_H;
                case "silt" -> ModItems.SILT_ARMOR_H;
                case "mire" -> ModItems.MIRE_ARMOR_H;
                case "vapor" -> ModItems.VAPOR_ARMOR_H;
                case "lava" -> ModItems.LAVA_ARMOR_H;
                case "cinder" -> ModItems.CINDER_ARMOR_H;
                default -> ModItems.ELEMANCER_ARMOR_H;
            };
            default -> switch (school.getId()) {
                case "tempest" -> ModItems.TEMPEST_ARMOR;
                case "silt" -> ModItems.SILT_ARMOR;
                case "mire" -> ModItems.MIRE_ARMOR;
                case "vapor" -> ModItems.VAPOR_ARMOR;
                case "lava" -> ModItems.LAVA_ARMOR;
                case "cinder" -> ModItems.CINDER_ARMOR;
                default -> ModItems.ELEMANCER_ARMOR;
            };
        };
    }
#

this is what i meant

#

mimics

    public static ArmorSet getArmorSetFromElement(SpellSchool school, String tier) {
        return switch (tier) {
            case "light" -> switch (school.getId()) {
                case "fire" -> ModItems.FIRE_ARMOR_L;
                case "water" -> ModItems.WATER_ARMOR_L;
                case "earth" -> ModItems.EARTH_ARMOR_L;
                default -> ModItems.AIR_ARMOR_L;
            };
            case "heavy" -> switch (school.getId()) {
                case "fire" -> ModItems.FIRE_ARMOR_H;
                case "water" -> ModItems.WATER_ARMOR_H;
                case "earth" -> ModItems.EARTH_ARMOR_H;
                default -> ModItems.AIR_ARMOR_H;
            };
            default -> switch (school.getId()) {
                case "fire" -> ModItems.FIRE_ARMOR;
                case "water" -> ModItems.WATER_ARMOR;
                case "earth" -> ModItems.EARTH_ARMOR;
                default -> ModItems.AIR_ARMOR;
            };
        };
    }
unreal summit
#

Okay, that makes sense

#

My thing is that I can figure out the logic of code when I see it, I just don’t know how to format it initially.

zealous zenith
#

The reason you were getting a crash is because your code in ArmorSet.java is registering new items in the deferred registry when the constructor is called:

    public static class Light extends ArmorSet {
        public Light(String name, SpellSchool element) {
            this.name = name;
            this.head = ITEMS.register(name + "_hood", () -> new LightArmorE(ArmorItem.Type.HELMET, element, ArmorProp()));
            this.chest = ITEMS.register(name + "_tunic", () -> new LightArmorE(ArmorItem.Type.CHESTPLATE, element, ArmorProp()));
            this.legs = ITEMS.register(name + "_pants", () -> new LightArmorE(ArmorItem.Type.LEGGINGS, element, ArmorProp()));
            this.feet = ITEMS.register(name + "_shoes", () -> new LightArmorE(ArmorItem.Type.BOOTS, element, ArmorProp()));
        }

        public String getTranslationKey() {
            return super.getTranslationKey() + "_light";
        }

    }

So your code that was checking in that switch was falling back to the constructor, which invoked new item registration, when you likely intended to either return nothing or to return a default/static value as alex has done.

The reason to the reason as to why your code was invalid is that

  1. item registration during game time is invalid, it HAS to be done during mod setup.
  2. it was likely a bug that you did not intend anyway, as you wanted to return another static reference, not a new object
#

and the crash you were getting at was hinting at this, as it mentions duplicate or invalid item registration and also points to these lines

unreal summit
#

Any idea why the medium armors were NOT doing that?

zealous zenith
#

no idea, im guessing one of your strings is wrong though

unreal summit
#

maybe the “elemental” vs “elemancer” mixup?

zealous zenith
#

go through all of the strings in those switch cases and make sure they match how you registered them. Even better, take this as a lesson in using string constants and replace them so you know for certain you have not made a typo

radiant depot
#

it's because you were matching schools names correctly in the medium branch

pallid rapids
#

constants my beloved

radiant depot
#

but for some reason you changed the light and heavy ones

unreal summit
#

Thank you guys for explaining in detail for me. I’ll try to fix it tonight, but I feel like I understand better what the code is doing now.

zealous zenith
#

also just ask or do some googling on syntax if you dont understand it, like switch cases, its easier to teach you something than it is to debug a copy pasta

hasty nacelle
#

Kapenjoe just made another coding tutorial series to account for the latest changes

#

absolute paragon of tutorials

pallid rapids
#

the hardest lesson to learn is, ask someone if you're unsure of something

#

I'm still trying to learn it

tender karma
unreal summit
zealous zenith
#

Its more that you are asking people that have done it for years and who do it professionally, so its easy to assume you know more than you do because we know a lot

#

so you have to be explicit, otherwise it would be rude to explain waht a switch statement is normally lol

unreal summit
#

Not just talking about you guys. Yall have been super helpful. But like when I asked on geckolib discord I was told that I was expected to understand Java before they would help.

#

And like I said, I get it. They don’t have the time to teach me.

hasty nacelle
#

expect learning to be hard
not that the knowledge would be hard to come by

zealous zenith
#

the geckolib discord is notoriously rude so that is unsurprising

#

my first interaction with the modded community when I was wee high schooler was getting flamed by lexmanos over arrays

#

which is not how we should treat new modders

unreal summit
#

Well luckily for me, my first interaction was with the Ars community 😁

hasty nacelle
#

fr

unreal summit
zealous zenith
#

yeah I left that discord long ago, less than helpful and just insulting most of the time

unreal summit
#

Until I’m able to figure things out I’ve just got static models on the quad element gear.

And the translucent textures on the fire/water gear just show as opaque.

wheat tapir
#

animating in MC is something i want to learn. i have professional experience using tweening and openGL, but not in Java. i would be happy to learn together, if that's of interest to you.

hasty nacelle
#

samesies
I still cant wrap my head around where to put files for textures and stuff

unreal summit
crude leaf
#

did work tho

#

at least for an entity

radiant depot
unreal summit
#

Unfortunately, they don’t have a guide for animating armors that I could find.

radiant depot
#

Wasn't the armor example animated

#

In their example repo

wheat tapir
#

is there a way to get an Item, ItemStack, or ItemLike from a ResourceLocation? i'm trying to datagen enchanting apparatus recipes for music discs from several other mods. i'd rather not have to link every one of those mods in neoforge.mods.toml for the sole purpose of accessing their Item registries for datagen.

#

nm i literally found what i was looking for after asking 🤦

gleaming fox
#

yeah use Registries.ITEM and go over each item

#

or somethign similar

wheat tapir
gleaming fox
#

i don't 100% remember how to do it

wheat tapir
#

all good, your feedback is helpful. lets me know i'm looking in roughly the right area. thank you!

gleaming fox
#

should be this

wheat tapir
#

ok so BuiltInRegistries.ITEM.get(resourceLocation).asItem() works if the ResourceLocation is valid. but when the target mod isn't linked to mine, it chokes. i may resort to registering dummy items, for datagen only.

radiant depot
#

Datagen code should only be loaded when the run data is used

#

You should be safe with having the code of the other mods there without any meta-files of the release

unreal summit
#

Thank you Alex and Bailey. I was able to make the needed changes and fix the crashing.

hallow owl
#

I'm so lost. I've worked a lot with .png's/textures before but this boggles my mind. It shows up like this in VSCode and Minecraft. See the dark areas?

#

But if I open it up in photopea... even if I do a fill with tolerance 1 - contiguous and anti-alias both off... then

#

So where the heck is the darkness coming from?!

radiant depot
#

I am missing the question

#

It almost sounds like you're looking at the void checkerboard

#

Is the problem that in-game it looks black in the zero alpha spots?

#

If it's a block texture, set render type to cutout

hallow owl
radiant depot
#

For vscode, black theme vs white theme I guess?

hallow owl
#

yeah, could have caught it that way 😛

wheat tapir
# wheat tapir ok so `BuiltInRegistries.ITEM.get(resourceLocation).asItem()` works if the Resou...
#

^ I am happy to make a PR to Ars Nouveau, if that's desirable. I am also happy keeping my crazed ideas in my own repo. 😛

#

Red Wolf recipes. I have the Red Wolf mod enabled.

#

No Abyssal Descent recipes displayed. I do not have the Abyssal Descent mod enabled.

radiant depot
#

I mean it just needs to wrap the json it would create into a Neoforge condition

wheat tapir
#

right. and it also needs to add the JSON for reagents and results whose items/tags may not actually exist yet. the Optional codec was helpful there.

#

and yes, the code i wrote is essentially a builder interface for a JSON-serializer. via the codecs.

wheat tapir
radiant depot
#

I am still confused on why there's an extra layer

#

The mods.toml is just for the dev to enforce and inform the end user of certain dependencies

wheat tapir
#

I do not want to list 100+ mods in mods.toml, just to be able to use their item registries for datagen.

#

I don't even want to visit that many CF pages to download jars. Let alone lookup their maven repositories.

#

And I had a datapack with everything I needed handy. If I could transform it sanely.

radiant depot
#

You don't have to list in the mods.toml unless the user need to know

wheat tapir
#

withReagent() requires an ItemStack

#

as does withPedestalItem()

radiant depot
#

If it's to avoid to have the jar in build at all, it makes sense

wheat tapir
#

file under "mechanized laziness"

dusk slate
#

sup guys, iam making a very good modpack that will contains ars, iam looking for one person experienced with ars to help too, help with FTB QUEST progression and ideas to progression, iam also developer so i will make mods to have compatiblity with others magic mods, interested? dm me

unreal summit
#

The FTB Questlines for Ars Expeditions are available on GitHub and cover Ars and all of its addons.

You would need to remove the quests for any addons that are not included in your pack, and adjust the quest lines accordingly

radiant depot
#

@wheat tapir have you looked into compressing your sound files?

#

cause i only now noticed your jar is bigger than ars, which shadows lucerne

#

sounds are usually the fat part of all mods that have them, just pointing out that some manage to shrink them a little bit

wheat tapir
#

i can definitely do that. those are CD-quality rips to .ogg. i'll run a script against them today, after i fix that server classloading crash.

radiant depot
#

there's also one thing about mono-stereo in mc

#

i can't remember well

#

but one of the two format makes the sound play for everyone instead of localized

wheat tapir
#

oh yeah that too

radiant depot
#

ex. wither sound or ender dragon sound that can be heard from other dimensions

wheat tapir
#

the bandeau already only plays for the wearer, even with vanilla songs. but dropping it to mono will reduce size a lot.

#

as will going from 44kHz to something like 22kHz sample rate. the former is CD quality, the latter is old school radio station quality.

#

i'll fiddle

wheat tapir
radiant depot
wheat tapir
#

yeah i skipped a server test when i refactored the isLoaded() bits around optional mods. it ended up causing the Etched compatibility class to attempt to load stuff it should not load on the server.

#

i got caught up in "whew cleaner code!" and didn't double-check that the refactor worked on dedicated server env.

wheat tapir
#

server crash fixed, retested the dedicated server startup several times, looks good. and i reduced the music file sizes by 80%. total package size down from 35.5MB to 7.4MB.

radiant depot
#

wow that's a lot

wheat tapir
#

yeah 44k stereo -> 22k mono, using libopus which has a lot better compression than libvorbis:
ffmpeg -i dawn.ogg -c:a libopus -b:a 22k -ar 24000 -ac 1 new-dawn.ogg

wheat tapir
craggy ice
#

Hi! I'm trying to backport my addon to forge 1.20.1, but when I try to run it from intellij, I get the following error:
Caused by: org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException: @Shadow method m_20184_ in ars_nouveau.mixins.json:rewind.RewindEntityMixin was not located in the target class net.minecraft.world.entity.Entity. Using refmap ars_nouveau.refmap.json
I think it might be connected to mappings, but not sure how to resolve it

craggy ice
radiant depot
#

#1019655534900678737 message

#

Regarding the permission

#

Regarding the error idk, did you take the build.gradle from the example addon?

craggy ice
#

I used the one intellij gave me for forge, and pasted in the dependencies

#

I guess i should take a look at that

#

I've been getting errors for literally everything, even after commenting out everything and removing ars, it still complained for the mixin... I might be going crazy here lol

radiant depot
#

The 1.20 gradle is surely more ragebaiting for some reason

#

I remember it needed something to make other mods mixin work for example

#

I've made everything from the same working template at this point so I haven't seen it in years

rocky grail
#

moddevgradle is so much better than whatever the hell forgegradle was doing

unreal summit
#

So how much reworking do I have to do for Elemancy with the new features in Elemental?😜

radiant depot
#

only the tooltip and maybe the perkslots?

#

i expect everything else to work out of the box

unreal summit
#

Awesome

#

My tooltips pretty much say “combines the abilities of the individual elements into one” so shouldn’t be that much to update then.

craggy ice
#

So I tried the gradle files from the example addon, the only thing i changed was the version of ForgeGradle from 5.1 to 6, and now I'm getting this error:
Module fmlloader reads another module named fmlloader
tried googling it but didnt find anything useful

radiant depot
#

use the regen runs

#

like createRunsForIntelliJ or smth

#

there is a gradle task like that

#

and use the new runs instead of the deprecated ones

#

when forge version changes it gets confused on which one to use because the old ones might be kept around in forgegradle

craggy ice
#

forge hates me...

craggy ice
#

solved it 👍

tame spade
#

How hard would it be to make an add-on that adds modules for Mekanism's mekasuit that increase max mana and mana regen?
I have no prior knowledge of Minecraft modding (or coding in general) but it's something I desperately want to exist.

shadow helm
#

How hard would it be to build a table with no prior knowledge of woodworking?

craggy ice
#

These are just attributes, so depends on mekanism

tame spade
tame spade
shadow helm
#

That's what I was getting at, yes.
Hard to put an exact number on the difficulty, but "not easy" is certainly going to be correct.

#

Having compat with 2 mods increases complexity, not knowing coding multiplies that and Minecraft having it's own idiosyncracies makes it worse.
The good part, at least for an endeavour like this, is that most MC mods are hosted publicly on Github, so LLMs had decent training data and can actually be helpful.

Bit of an ethics problem, maybe, but from a technical standpoint, a huge help. Still a lot easier to use if you know what you're doing.

tame spade
#

Alright.
I might ask around on the mekanism server (if there is one) to see how their modules are coded and then I can probably go from there. Slap the mana attributes on and hopefully that should work. (?)

unreal summit
#

It definitely helps if you are the type of person who can look at a block of code and make logical sense of it

tame spade
#

I'm not familiar with Minecraft code but in my brain I'm like "well I gotta start somewhere"

unreal summit
#

I had zero experience coding prior to releasing my Ars add-ons

tame spade
#

That's reassuring to me.

shadow helm
#
  1. Start with one target version and stick to it
    Biggest rule in modding: don’t mix versions.

Pick one version (example: 1.20.1), then use:

matching Forge MDK
tutorials for that exact version
matching mappings/docs
2) Learn basic Java first (short crash course)
Before Forge, spend ~1–2 weeks on:

variables/types
if/else
loops
methods
classes/objects
constructors
reading stack traces/errors
You don’t need to be advanced, just comfortable with syntax.

  1. Install your tools
    You’ll want:

JDK (usually 17 for 1.20.1; check Forge docs for your version)
IntelliJ IDEA Community (or Eclipse, but IntelliJ is smoother for most)
Forge MDK (from official Forge site)
Minecraft Java Edition
Optional but useful:

Git for version control
Blockbench if you later do custom models/entities
4) Set up a Forge mod workspace
High-level flow:

Download Forge MDK zip
Extract to a clean project folder
Open project in IntelliJ
Run Gradle setup tasks (IntelliJ usually handles this on import)
Generate run configs (runClient)
Launch once to confirm dev environment works
If this step works, you’re 60% of the battle done.

  1. First mod progression (best order)
    Build in tiny wins:

Change mod id/name and confirm mod loads
Add one item
Add one block
Add item/block models + textures
Add crafting recipe JSON
Add creative tab entry
Add simple custom behavior (e.g., right-click effect)
Only add one new concept at a time.

  1. Forge concepts you’ll meet early
    Main mod class (@Mod)
    DeferredRegister (registering items/blocks safely)
    RegistryObject
    Event bus (mod event bus vs forge event bus)
    Resources (assets/...) for textures/lang/models
    Data JSON (data/...) for recipes/loot/tags
    These sound scary now, but they click quickly once you do one item + one block.

  2. Best learning strategy
    Use this cycle:

Follow one up-to-date Forge tutorial for your exact version
Get it working unchanged first
Make one tiny change
Run game
Read logs if it crashes
Repeat
Avoid copying random snippets from different MC/Forge versions.

  1. Debugging habits (super important)
    Test after every small edit
    Keep backup commits (Git)
    Read latest.log and crash reports carefully
    If error mentions missing model/texture/path, check file names and lowercase paths
    Don’t rename package/modid casually mid-project
  2. 30-day Forge beginner roadmap
    Week 1: Java basics + Forge environment setup
    Week 2: item + texture + language entry
    Week 3: block + recipe + loot table
    Week 4: mini themed mod (3–5 items, 1–2 blocks, one custom mechanic)
    That’s enough to go from zero to “I made a real Forge mod.”
    Is what AI recommends. I mostly agree, it's missing the part of "the hell is git" though.
    Lucky for you, I got something there:
    https://learngitbranching.js.org
tame spade
#

Thank you!

shadow helm
#

Happy to help. As it said, try to focus on the basics first, spend a weekend with Java and getting a feel for git ("make a commit when things work so you can easily reset when it doesn't anymore") is pretty much all you need to begin.
Then you can move on from there.
The pins in here should have an example addon you can use to get started 🙂

unreal summit
#

What I find useful is finding something that already does the thing that you’re wanting to do and see how they do it in code. So if you’re wanting to add a module for Mekanism look at the code for existing modules for Mek armor.

tame spade
#

That's my plan.

unreal summit
#

The fact that many Minecraft mods have their source visible through GitHub makes it possible to find a lot of examples to learn from.

wheat tapir
#

is there an account, or token, or something else needed to publish to blamejared maven? or do i just ./gradle publish and 🙏

#

i haven't tried yet, i don't want to make a mess

wheat tapir
#

or is curse maven the way to go?

radiant depot
#

Cursemaven is just a mirror to curseforge in practice

#

Blamejared is self hosted by Jared, so yeah you would need an account etc.

wheat tapir
#

ah ok. ty!

crude leaf
#

using geckolib 4 neoforge 1.21.1
How would i make a certain bone i made only show up when i equip a certain piece of my armor set without binding it to that body part?

radiant depot
#

In the armor model, set the bone to show when that condition is true maybe?

craggy ice
#

bone.setHidden(true);

radiant depot
#

Unsure if the way that armors work is that they dynamically hide the slots you aren't wearing

craggy ice
#

if it doesnt hide by default, you can loop through the player's armor slots (player.getArmorSlots()) to check if the piece is equipped

wheat tapir
#

does anyone have an opinion re: IntelliJ IDEA open-source version vs an Ultimate Subscription? i don't really have money to burn.

craggy ice
#

community version works perfectly for me, no idea what features the paid one could add

tender karma
#

Same here. I haven't really squeezed every last feature out of IntelliJ, but Community version handles everything I've needed so far.

unreal summit
#

I use the free version

hasty nacelle
#

Free version

neat mango
#

the only thing you gain is a built in profiler (which is not that common to use in modded cases)

wheat tapir
#

awesome, thank you all, very much appreciated! ❤️‍🔥

craggy ice
#

How do y'all get the dev title btw?

neat mango
#

make and publish ars addons

craggy ice
#

Done, what's next

neat mango
#

i think you just give proof and then one of the <@&769245035312054303> just give you the role

#

(I probably shouldnt have @ed the entire role. maybe just xacris or sarenor)

magic fable
#

It's actually the tier above that would handle this. Admin itself doesn't let me add roles.

craggy ice
#

Is there like a dedicated channel or command to do that, or do i just ping someone in general?

#

Eh, imma just go back to write code...

zealous zenith
#

can you link your addon?

craggy ice
#

Oh, hi!

#

This is the one

#

Also working on a different one, but that's more like just for fun

#

Thanks!

arctic bronze
#

Is there a new to get enchantment levels from an itemstack in 1.21 neoforge? Trying to update my code and the new "getEnchantmentLevel" appears to use a living entity. This is kind of annoying since this was for my "weapon projectile" which is an Abstract Arrow with an ItemSupplier. Old Code:

        {
            f += (float) modifier.amount();
        }```
```if (target instanceof LivingEntity) {
            f += EnchantmentHelper.getDamageBonus(this.getItem(), ((LivingEntity)target).getMobType());
            f1 += (float)this.getItem().getEnchantmentLevel(Enchantments.KNOCKBACK);
        }```
"f" is just a float that tracks all the damage bonuses
neat mango
#

Is there a new to get enchantment levels from an itemstack in 1.21 neoforge?
its just a data component is it not ?

rocky grail