#General & Development Help
1 messages · Page 15 of 1
ArsPlus has this glyph
Swap Target
oh thne no need to re-invent the wheel since it's coming to 1.21
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
You can check how they did it for inspiration
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?
Only thing similar i believe would be the Ars Zero stuff or contingencies
intersting
oh ik
Contingencies are from NEG i think
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
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
always remember to be careful online
file path near top left shows your name and last initial
I dont really care
fair enough
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
Yo, what does alex's "Sauce" do?
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
Thanks Alex, was just looking at elemental as an example for a 1.21 addon (hope you don’t mind)
Besides Ars Additions, are there any other add-ons that add new Rituals that I might be able to look at for reference?
elemental
ars plus i suppose
hm yea there arent many others
I mean you can just look at the base ones
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.
You just have to register the ritual
Contribute to Jarva/Ars-Additions development by creating an account on GitHub.
Is there an example of a curios in 1.20 that renders on the player?
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.
Is Botania on 1.20?
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
They're not open source iirc
I’ll take a look ty ty
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)
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.
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.
It's possible
Once I get the recipes working, I'll look into compatibility because that still eludes me
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?
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
Okie! I think I understand, maybe. Thanks for the help! I'll try with Records.
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 
send the error
'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>)'
is this correct type?
Ingredient.CONTENTS_STREAM_CODEC.apply(ByteBufCodecs.collection(ArrayList::new)), AttuneForkRecipe::pedestalItems,
what i mean is, whats the type of pedestalItems?
I set it as List<Ingredient> at the top of the record...
that doesnt look correct then
it should be something like SizedIngredient.STREAM_CODEC.apply(ByteBufCodecs.list())
find something similar to that for Ingredient
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.
Ok! Will look into it.
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?
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...
alright ill check it out thanks
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
does anyone have a good resource on modding on 1.21
beginner here so idk if i should binge a tutorial playlist or what
Not sure how up to date the pins are, I'm afraid
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
kaupenjoe, addon githubs for code examples and claude/deepseek to ask questions about the code
ah also neoforge documentation
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
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)
i said ask the llm questions about the code
not generate code from it
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
same
finally we'll have sane GPU/ram prices
i know it'll collapse soon like the internet bubble did
cant wait to snatch up secondhand ram from failed businesses
servers as well
ill finally be able to run a minecraft server with alex's mobs
without it lagging
ram is gonna be the only cheap thing
AI is propping up the us economy

How would I change Java versions in inteli? An update happened and broke all my code
And ANs code
project structure (should be ctrl + alt + shift + s) -> SDK -> [java 21 (for neoforge 1.21), Language Level 21]
Tysm
How do I share a project to github as a new branch of my existing project?
wdym? do you want to push a new branch of your existing project repository ?
Like, I want to upload my 1.21 project within the same repository
oh okay. is all your current work in a different branch ? also do you use the git cli or some app?
Two seperate projects on intellij. I usually use the Github browser and one project (1.20) is currectly linked
thats fine
you can just initialize git in that folder and point it the correct repo url and just push
oh okay. ty ty
make sure your branch names are correct else you will nuke your existing work
I have a bunch of backups. It's okay
(you need to force push to overwrite contents so should be fine. just pay attention)

I wasn't doing it through the console
you might need to delete this branch first
on github
oki
it worked but only pushed "changed" files
is there a way to commit everything?
I got it figured out
okay
thanks Chonky!
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
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.
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
You should be able to retrieve the key from the tile
tile.key
Repository for the Ars Nouveau minecraft mod. https://www.curseforge.com/minecraft/mc-mods/ars-nouveau - baileyholl/Ars-Nouveau
o7! That worked a treat! I'd tried tile.key before, but I hadn't realized I wasn't calling the PlanariumTile properly. Gave it another go and got it working now!
Thanks a lot for the assist again! 
woah its not even a hash
its a random uuid
thats a strange decision but i guess it works
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
Lol
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
Possible? Maybe, but you’d have to do so much custom code that it wouldn’t be worth trying to use MCreator anyway
👎👎👎
mcreator bad and all that
making glyphs is not really hard. you just need 1 java file for behavior and register it correctly.
no idea how much mccreator will even help you for that given this is a custom behavior and api
if you read this, its basically entirely declarative. the entire behaviour is just a single method. almost behaviour also goes through helpers, so you dont have to do anything
wait
i can understand what its saying
im matrixing the shit out of it
beware, the world will not be the same anymore. you will never be able to the game after. modding hell is very real
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.
there is no such thing as complete /jk
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.
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?
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
I would recommend avoiding MCreator as much as possible. Java looks a bit daunting but you can get the hang of it quite easily, and you can get the help of us here or your favorite LLM, there's never been a better time to get into it.
also that sounds like a fun idea
Anyway MCreator does create java under the hood, just with a bunch of bloat
My plan was to do the same thing as with the medium gear. That might mean some powers effectively canceling each other out, depending on the combination.
Anything more complicated than copying the existing code and doing minor tweaks would be beyond my skill level.
Well the difficulty level is kinda just "copy existing code and do basic tweaks"
Once I finish all the models I’ll try to pick apart the code and see if I can make sense of it.
i recommend check out kappenjoe for the basics
he just released a 2026 version of his main tutorial
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...😂
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.
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
dont mixin unless its absolutely necessary. stick to apis, events and what not. its far safer, easier and better for inter mod compat
I see. I'll err on the side of caution with mixins 🫡 .
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)?
is there a guide for patchouli to new guidebook migration ?
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'
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.
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
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
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
It's purely code based
oh? so no json files
The patchouli data is there only for the wiki
can you point me where you add entries then? I was looking at datagen and resources/assets
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
There are two events
One for adding, one for modifying
Cool I will look for something like that
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.
Have you made the effect hidden when you apply it? When cast on self does it show in inventory?
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.
so what causes the weird lighting on the planarium anyways
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
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
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
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
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
there could be SpellResolveEvent.Post but i'm not sure how that behaves with spells that have complex behaviors
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
i believe it could fire multiple times with stuff like delay-reset-linger etc. that create subcontextes
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
you can potentially "reverse" the discount by adding it back i guess?
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"
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
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
you can spam projectiles at the sky that eventually won't do nothing but you still reward only if it expended mana
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
there's no good way to say "the whole spell did something"
yep that'd also be correct
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
the Post of the Calc event should be your best bet, it's fired only right before the mana is subtracted from the player
yep that really sounded great and prevents any unforeseen consequences/complexities with what the spell actually does afterwards when it does its thing
the whole cost should still be available since the context is a field in the event
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
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:.+/,
]);
});
https://github.com/Alexthw46/SauceLib/blob/1.21/src/main/java/com/alexthw/sauce/util/ContingencyEffectInstance.java
Should have managed to move the skeleton of contingencies into sauce, switching from an enum to this small interface to keep the two callbacks (unsure if there are any to add) from the effect itself
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 ✅
This is the log from intellijs:
https://mclo.gs/1hqMl5V
364 lines | 60 errors
might be static initialization order biting you
try moving these 3 lines into the method below (and removing public static) from them https://github.com/Lyrellion/Ars-Elemancy/blob/850dc8b372fce02eb1a34fe26c4c97b68a20212d/src/main/java/lyrellion/ars_elemancy/ArsNouveauRegistry.java#L73
@unreal summit for visibility
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
I can try moving those lines - I was just copying the format directly from the Elemental stuff
Okay, that got the client loading, now all the armor tooltips are messed up…😩
The tooltips for all of my armors, including the old medium armors, are getting this error
https://mclo.gs/MuiJ0FD
75 lines | 1 error
What do i need to fix?
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
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
cause there's an attribute defined for the elemental generic
but not one for each mixed
But why would the medium Elemancer not work
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
which file does this go in?
this one is made for the medium one specifically
so the LightArmorE, MediumArmorE, and HeavyARmorE files?
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
are medium armors supposed to give resistances/penalties now?
the base ones yes
okay, then its working
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 ?
it's giving both the bonus and penalty as seperate lines
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
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?
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
I'm also puzzled why the medium is handling the stats differently by splitting each element out
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
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
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?
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
it's gonna look ugly for now with multiple bonuses/penalties stacking, but at least its working
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
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()))
to remove the weakness entirely yeah
which is for example something to do to the elmentalist case
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
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
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
could always try something verbose like this:
https://pastebin.com/KrRV18zw
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
ah anyway i was hallucinating and the continue inside the loop isn't really needed
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
the snippet is simply merging the values before applying the bonus
so the tooltip doesn't show two values
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…
Where in the code does it tell the renderer which geo model to use for the armor?
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
I can’t even figure out how the medium stuff is linked to the correct model in the existing stuff
In this line
Ah ha
That's the model you're passing, since it's in the superclass it's used by all 3 variants
Is there a way I can make that line determine which model to use, or do I need to generate all new classes?
Make a the sub-armor use a constructor that passes the model to the super instead of hardcoding it to the superclass?
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?
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
Anyone know how to link an animation to an armor set if I have the animation made already?
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?
Got it.
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.
From what I see, your first attempt was setting the walk but then it was setting idle again
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.
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.
as I recall, the All Rights Reserved thing was specifically to prevent people from attempting to port Ars themselves
Or to rip textures for their own mods
Basically, don’t use Ars assets for something that isn’t part of the Ars ecosystem.
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
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.
I didnt even know it was ARR when i ripped off the spellbook assets
It was probably made ARR after you did
I totally missed the fact that the textures/models were ARR 😬, I just saw the GNU License
its probably fine. Bailey wont be enforcing it unless someone misuses the assets
addons are free to use it, its mainly to prevent entire forks or modloader ports
great, thank you!
probably should be pinned here
Done
Also hoping that Goo never needs to DMCA anyone from Bailey's grave.
Unless it’s like the year 2106😜
Even then I hope he gets to do it from the comfort of his home.
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?
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?
My armors are basically just extensions of the Elemental armors with more than one school
do they have to be those classes though for functional reasons though?
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
isnt this your renderer?
in which case you can just add parameters to this class
it should pretty much overriding this method getRenderType
https://github.com/bernie-g/geckolib/blob/7aa769c6d37ea884c986a2b7d00fdcf3442fd918/common/src/main/java/com/geckolib/renderer/GeoArmorRenderer.java#L168
Isn’t that calling AnimatedMagicArmor from base though?
I tried pasting in that override snippet, but couldn’t find a way to set the parameters to make it resolve.
not exactly. thats your renderer. it handles all things rendering about your armor.
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
you just need to copy all of this and repalce the underlined part with something related to entity/armor translucent
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
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
I know that iElemancy extends iElemental, but it does look like the Renderer just extends base Ars armor
I tried that, but the IDE wants me to “create a local variable ‘RenderTypes’”?
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.
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
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.
Trying to work on Elemancy and it suddenly says this when I try to run the client
What’s going on?
Your gradle project is unable to find the dependencies for Patchouli and Sauce lib.
Can you show those lines from your build.gradle file?
I haven’t made any changes to that file recently.
https://github.com/Lyrellion/Ars-Elemancy/blob/main/build.gradle
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
So I may just need to wait for them to fix the maven? (I don’t really understand what a maven is anyway.)
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.
Is there a way to build a .jar while the mavens are down?
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
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.
Mountain time, it is currently 09:56 AM for me
I probably should have used discord timestamp feature, maybe I go back and edit it
updated with timestamps
What are ways I could integrate another add-on's items into mine without making them a hard dependency? Item tags and recipes only?
Depends on what means integrate
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.
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
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?
you can check if its loaded in your existing class but a separate class needs to do any actual interfacing
easiest way to test that it works is to replace implementation with compileOnly and verify that it still runs
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.
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
4 nether stars seems like a steep price considering i dont think any t3 glyph is more expensive than 1 star lol
Fair! I'm just testing right now lol
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
Got it! I did just that and it's worked a charm.
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!
👋 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
Screenshots of working bits:
Which bit exactly is missing?
Curio item not appearing in Jei but its recipe does?
Like, from U on the disc
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).
fist pic: creative item search and jei missing the curio recipe. second pic: the successfully crafted cuiro, in its slot. i was unable to obtain it via creative UI, but was able to craft it. i am unclear whether JEI has replaced the built-in creative item search. if that's the case, then this is likely a JEI-only problem? update: i disabled JEI, the creative item UI does not show the curio.
Likely just needs to be added to a creative tab
Either create a new one or add it to the Ars one for now
https://github.com/Alexthw46/SauceLib/blob/1.21/src%2Fmain%2Fjava%2Fcom%2Falexthw%2Fsauce%2FSauce.java#L92
This is the simplest one
awesome, thank you! i'm looking at the following right now: 🙇
https://github.com/Alexthw46/Ars-Elemental/blob/1.21/src/main/java/alexthw/ars_elemental/registry/ModRegistry.java
https://github.com/baileyholl/Ars-Nouveau/blob/main/src/main/java/com/hollingsworth/arsnouveau/setup/registry/CreativeTabRegistry.java
https://docs.neoforged.net/docs/items/#existing-creative-tabs
oh nice, thank you again!
for future searchers: that was it! i have been struggling with this for days. you are my hero of the village today!
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.
Did you upload it to curseforge?
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.
honestly i thought itd be an instrument rather than a disc player lol
i legit hate grinding RNG for discs, esp lena's discs, and the ars discs.
ars discs are easy via the
villager
in any case i do think an actual instrument would be fun
absolutely, and my brain is already thinking about it. i'm into both music and software. a magical instrument sounds fun.
heh i'm already in the noteblock api. i think making just about any instrument is possible. i already learned how to make soundevents follow the player, via sophisticated backpacks github.
oof but the ui issues w/r/t note and rest lengths...i gotta ruminate on that one in the background.
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
in vanilla it's always only from a playerattack
alright ty
no idea what happens with for example Apotheosis
if you need, i can add an event for the spell crit in sauce i guess?
oh that'd be greatly appreciated
maybe a custom DamageSource implementation?
at most, mixin into spell damage source to add the flag
there's already that custom one, to propagate luck augment correctly
this is likely a noobie question, please forgive me if i'm doing this wrong: my mod is up on curseforge, and i'd like to share it with folks in this discord for some feedback. is the #addon-showcase channel for that purpose, and if so how do i get permission to post there? or is there another channel I should use? did i miss a step in joining the discord, is that why i'm confused?
Nope. Just us admins being lazy in inducting you into the club of the SAD people.
They are trying to find the regents for the great ritual
i'm an anxious-buncle, but not an impatient one. thank you for the info, i'll chill. 😂
You have been yellowfied
thank you!!
@wheat tapir do create a post in #1019655289873641555 for your new addon!
will do, thank you!
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? 😂
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?
why do you use wsl for java/minecraft?
i use wsl for coding. i prefer linux development tools. i've used macs for years via work, and all the bsd/linux clis and shortcuts are burned into my memory. i play Minecraft via Windows using GDLauncher.
since most of things in minecraft dev happens through IDE and just gradle, linux and windows dev experience doesnt really differ much
Hey I was wondering if this is the right channel to ask permissions for making an addon for Ars & reuse assets?
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
addons are allowed to reuse assets, forks are not, so you are good
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?
Depends on what configuration?
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
awesome, thank you for the info!
i definitely want to allow custom discs, and to override the built-in disc recipes. does the built-in recipe/datapack behavior allow pack makers to write their own JSON without any add'l work on my end?
definitely this too, but those mappings are not yet connected to datagen of any kind. it's on my mind though.
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.)
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.
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();
}
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));
};
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
umh, what's p?
it's type is Tooltipparticle (custom made)
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++;
}
}
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
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
oh that could be helpful
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
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
i did try to modify that
let me see if this work now that i use another way to get the sprite manager
this is how it looks as of now
that's directly retrieving from particle holders?
from querying the textureAtlas field in the particleEngine
no i mean with which resourcelocation
particle/fire_0
might be due to a missing S
looks like this one doesn't contain the particle atlas btw
let me see if ading it works
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
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
@gleaming fox
you were simply using the wrong RL
oh alright tysm
ill try this wgen i get back to tge classroom
@radiant depot i got it to work on my end too!
tyvm for the help
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
maybe put out a version of AE which asks them for help in the poll via a chat message on login?
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
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.
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
Hobby or addiction?
does it really matter?
Fr
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
@zealous saffron @pallid rapids silent ping for small feedback gameplay wise. It's meant to allow a bit of mix-match
damn alex heavy t4 armor even better now? thx!
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
i'm excited to play test the damage to mana conversion w/ my heavy air set
hear me out
its percentage based so it can still be relevent in higher power packs
^ that
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.
so 10 points of health?
hb either 50% of health as mana health
or 10 + 35%
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
ohhh matching element only
It's just evolution of the current set bonus of the elemental armors
an alt version?
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
ah i misunderstood when chiming in. my bad.
It's a different take on the concept of the armor absorbing its element
Indeed
Instead of just reducing damage, it either converts it into crit,discount or mana
Discount? Interesting
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
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?
That's more likely to fit into the fire bangle
We need faster speeds in lava indeed
Need to check, in theory it's gonna be a 60% reduction of the damage you would take, then 6x the damage into mana.
Which should be only slightly different from current behavior
It's likely going to outheal the lava damage while at full mana
Necro-bump (pun not intended), just wanted to ask out of curiosity, are you still working on a necromancy focused addon? 😄
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.
did you refresh the gradle configuration?
just usual routine of "it should have worked without doing it"
i did not. i will look up how to do that. thank you!
in ide there should usually be the elephant icon with the 
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.
if you feel like it i think a scrolling ui with song name and effects would be a much nicer ux but then you have to figure out how to do reordering
insertion can just be a button when your mainhand item is a disc
I mean it's pretty basic, just a Chest-like UI with the spiral on top as decoration
i can hand roll something. it will likely not look like it "fits" the Ars aesthetic as well.
ok so, that thing lead me to discover 2 bugs
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
so a heavy armor fire mage might want a level 3 thread of repairing
I think you would want that anyways
Especially if durability is turned back on for them all
maybe it would be worth on the long run, unsure since you will only have two of them (lv3 slots)
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?
i mean, that's a mechanic that has been out since idk
three years?
nobody had it exploited
so it went unfixed
I guess most times you are immune to your own spell effects
as soon as it got hooked to converting excess into healing i noticed there was something off
but I am just imagining like, an air mage hitting themselves with

full instaheal as soon as i touched lava
Tea kinda coded the armor as masochist crazy mages
lol yup
at this point the -guard set is basically Gimpy
the "hurt me, please" set
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
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
Are you doing normal models for the staff or Geckolib models?
normal json models
That's probably your problem then if the staff is like most other enchanter's items it's a geckolib model
m okay from my file browsing of the mod i think youre correct so id want to make it as a geckolib item too?
Not too, but yes you need do do it via geckolib
ah okie
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.
Can someone tell me what is going on here starting at line 163?
https://mclo.gs/ZlHZhKF
6193 lines | 107 errors
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
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.
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
Fire pants are from Ars Elemental
my mistake: elemenacy cinder pants appears to be what it is choking on
Parsing error loading recipe ars_elemancy:cinder_pants_1
An expansion for Ars Elemental, adding dual- and quad- element gear. - Lyrellion/Ars-Elemancy
yeah that looks good. so not a simple parsing bug. dang.
The recipes work in game, the error is specifically when you hit Shift on the tooltip to view the set bonuses
wondering aloud: why is tooltip display re-parsing JSON?
🤷♂️
right? the JSON parsing should have been done and gone?
test i might run: remove the lambda from this line, return a hard-coded string. does it still crash on shift tooltip? https://github.com/Lyrellion/Ars-Elemancy/blob/9944e77061c15ac0270102eb225c41523a503e08/src/main/java/lyrellion/ars_elemancy/common/items/armor/ElemancyArmor.java#L107
my thought is solely to trap where the bug is triggered. then figure out why.
Okay, I take it back. The recipes are NOT working in the latest build
i am happy to buzz off if this isn't helpful. and happy to continue if it is. 🙂
I don’t know what I broke between 1.12.4 and 1.13
what doesn't make sense to me, is that the stacktrace is trying to tell us it is parsing JSON when it runs that tooltip. and that's wacky.
are both versions on github? i can grab a comparison URL for us to review.
ouch no github tags. do you happen to know the revision hashes from those versions? maybe in your git log?
So the recipes show in EMI, but they don’t work…
hmm, all the Holders being factored for armors out raises my eyebrow. but i am NOT an expert on how Holders work: https://github.com/Lyrellion/Ars-Elemancy/commit/2a9bb9cc62fc79a445cefb6e651e9e2c51f4114d
i know that for Musique, i had to work with Holder<MobEffect> everywhere, and not the straight up MobEffect.
I’m just mirroring what Alex does in Elemental. I don’t know how MOST of this stuff works
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.
Going to lunch, will have to tackle this later
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.
I don’t know why it’s doing that on the light/heavy but not the medium
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
Okay, weird. The recipes work if you build up from scratch, but not if I just grab elemental gear from the creative menu.
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
Still doesn’t solve the tooltip issue though. sigh
Can’t figure out why it works on the medium, but not the others
Breakpoint and see
Running in debug mode, the bug icon
Code execution stops at the 🛑 and let's you examine the variables
How do you run in debug mode?
The bug icon instead of the play icon
Oh. I’ve been running from in IntelliJS when testing using RunClient
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
Oh. I see it at the top. I was using the drop down
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
I might've missed listing milk as a cure for the effect—if that's something I have to do manually. I only did the basic registration as a MobEffect and that's it. Then I added it to the dispel deny tag via datagen, but during testing I could still dispel the effect.
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
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
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
I'll go through my code again later tonight. Will try listing milk as a cure explicitly for the effect, see if that fixes it. Didn't even try removing the effect via milk buckets before, actually, I figured that was just a given for any MobEffect.
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
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
yes, but if milk isnt listed which it likely isnt, the effect still shouldnt be removed
ah right because itd have to be whitelisted
the only cases that dispel should remove the effect is
- milk is a cure and it is not blacklisted
- it is whitelisted
eh yeah use a debugger
all other cases it fires the dispel event and does nothing
Ok! I'll do the debugger thing tonight and see what's causing the issue 🫡
fair warning: events go on a world tour if you need to track them via debugger
theres a reason theyre slow as sin
I dont have all the context on what exactly your problem was other than something being registerred at the wrong time? I did notice in this link you have light_elemanCER and medium_elementAL, was that intended?
Probably not?
Why are you switching like that
is your mod also set to load after all of the mods you reference, like ars elemental?
The case have to be the school names
some (annoying) mods will call the tooltip code during item registration
Ofc it's going on that default branch
The default should be the elemental, but not with a new otherwise it will trigger registration if there's no match
So take the “new” out of those lines?
First thing is removing the new line, cause it's what it's crashing
Because I’ve gotten confused more than a few times between the two words.
Then you make the case "elemental" the default
I was trying to mirror the way it’s formatted in elemental
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"
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.
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
I do not understand the majority of how code operates.
I have done my coding by looking at things that I know work and reverse engineering to accommodate the new stuff I am adding
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
The last time I did programming and knew what I was doing was when Turbo Pascal was “cutting edge”
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;
};
};
}
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.
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
- item registration during game time is invalid, it HAS to be done during mod setup.
- 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
Any idea why the medium armors were NOT doing that?
no idea, im guessing one of your strings is wrong though
maybe the “elemental” vs “elemancer” mixup?
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
it's because you were matching schools names correctly in the medium branch
constants my beloved
but for some reason you changed the light and heavy ones
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.
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
Kapenjoe just made another coding tutorial series to account for the latest changes
absolute paragon of tutorials
the hardest lesson to learn is, ask someone if you're unsure of something
I'm still trying to learn it
Yeah, even beyond NeoForge tutorials, his series on Java coding in general seems pretty in-depth and up to date.
I’ve found that a lot of the time people don’t want to take the time to explain in detail when I ask. And that is understandable, as they have lives and are not getting paid to explain to some old fart how to code.😁
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
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.
expect learning to be hard
not that the knowledge would be hard to come by
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
Well luckily for me, my first interaction was with the Ars community 😁
fr
I basically was asking them how to add animation to armor and was told “learn Blockbench”.
I already had the model and the animation from Blockbench
yeah I left that discord long ago, less than helpful and just insulting most of the time
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.
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.
samesies
I still cant wrap my head around where to put files for textures and stuff
I know how to make the animations in Blockbench. I have NO idea how to write the code to put them all together
ive done it before (once)
did work tho
at least for an entity
Old mobs are animated by basically moving model parts with cos/sin functions. Newer mobs have a key frame system, so you basically do the animations in blockbench with a lot of tools, we use Geckolib but vanilla key frames should be usable for some things too. To run the animations made you just have to follow the guide on Geckolib GitHub tbh
Unfortunately, they don’t have a guide for animating armors that I could find.
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 🤦
i think you can use the registry and stream over each registered item and find one where the holder's registered name is equal to the loc
yeah use Registries.ITEM and go over each item
or somethign similar
i think this is what i need to be working with: https://docs.neoforged.net/docs/1.21.1/concepts/registries#data-generation-for-datapack-registries
Registration is the process of taking the objects of a mod (such as items, blocks, entities, etc.) and making them known to the game. Registering things is important, as without registration the game will simply not know about these objects, which will cause unexplainable behaviors and crashes.
i don't 100% remember how to do it
all good, your feedback is helpful. lets me know i'm looking in roughly the right area. thank you!
BuiltInRegistries.ITEM.get(ResourceLocation loc)
should be this
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.
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
Thank you Alex and Bailey. I was able to make the needed changes and fix the crashing.
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?!
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
Ohhh yeahhhh I'm stupid, it was exactly that. It was me looking at a checkerboard + the block not being cutout, so I thought it was a related issue. I am dumb. Thanks Alex.
For vscode, black theme vs white theme I guess?
yeah, could have caught it that way 😛
I figured out how to generate optional-mod-support for Enchanting Apparatus recipes without having to link to the optional mod. Most of the work was wrapping CODECs.
The relevant code:
- https://codeberg.org/f1337/ars-musique/src/branch/main/src/main/java/dev/f1337/ars_musique/datagen/OptionalApparatusRecipeBuilder.java
- https://codeberg.org/f1337/ars-musique/src/branch/main/src/main/java/dev/f1337/ars_musique/datagen/OptionalEnchantingApparatusRecipe.java
- https://codeberg.org/f1337/ars-musique/src/branch/main/src/main/java/dev/f1337/ars_musique/datagen/compatibility
The commit with related glue code:
The results:
^ 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.
I mean it just needs to wrap the json it would create into a Neoforge condition
I did it like this
https://github.com/Alexthw46/Ars-Elemental/blob/1.21/src%2Fmain%2Fjava%2Falexthw%2Fars_elemental%2Fdatagen%2FAEGlyphProvider.java#L98
Add-on to Ars Nouveau, based on elemental stuff. Contribute to Alexthw46/Ars-Elemental development by creating an account on GitHub.
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.
^ I just finished using a gradle script and the aforementioned code to add Enchanting Apparatus recipes for music discs from 116 mods. Zero changes to neoforge.mods.toml. The gradle script I wrote actually generated all but 7 of the datagen Java classes here: https://codeberg.org/f1337/ars-musique/src/branch/main/src/main/java/dev/f1337/ars_musique/datagen/compatibility
it's hack-tastic, but here's the gradle task i wrote: https://codeberg.org/f1337/ars-musique/src/branch/main/build.gradle#L216
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
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.
You don't have to list in the mods.toml unless the user need to know
If it's to avoid to have the jar in build at all, it makes sense
file under "mechanized laziness"
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
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
Thanks goat
@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
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.
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
oh yeah that too
ex. wither sound or ender dragon sound that can be heard from other dimensions
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
i was so excited about getting some of my music out, i honestly didn't think about the size.
Just mentioning this because it doesn't seem tested on server 😛
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.
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.
wow that's a lot
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
^ follow-up, don't do that. Minecraft apparently doesn't work with libopus. I re-encoded everything again, and documented the process: https://codeberg.org/f1337/ars-musique/src/branch/main/ffmpeg.md. The files are still way smaller than the original encoding, but libopus reduced everything by 10-20% more. 🤷
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
oh no, I just realized i need to get permission to use the assets... do i take it down?
https://www.curseforge.com/minecraft/mc-mods/ender-source-jars
#1019655534900678737 message
Regarding the permission
Regarding the error idk, did you take the build.gradle from the example addon?
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
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
moddevgradle is so much better than whatever the hell forgegradle was doing
So how much reworking do I have to do for Elemancy with the new features in Elemental?😜
only the tooltip and maybe the perkslots?
i expect everything else to work out of the box
Awesome
My tooltips pretty much say “combines the abilities of the individual elements into one” so shouldn’t be that much to update then.
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
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
alright, back to this error
forge hates me...
solved it 👍
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.
How hard would it be to build a table with no prior knowledge of woodworking?
These are just attributes, so depends on mekanism
Pretty difficult I assume.
Good to know.
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.
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. (?)
It definitely helps if you are the type of person who can look at a block of code and make logical sense of it
I'm not familiar with Minecraft code but in my brain I'm like "well I gotta start somewhere"
I had zero experience coding prior to releasing my Ars add-ons
That's reassuring to me.
- 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.
- 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.
- 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.
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.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.
- 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- 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
Thank you!
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 🙂
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.
That's my plan.
The fact that many Minecraft mods have their source visible through GitHub makes it possible to find a lot of examples to learn from.
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
or is curse maven the way to go?
Cursemaven is just a mirror to curseforge in practice
Blamejared is self hosted by Jared, so yeah you would need an account etc.
ah ok. ty!
if anyone is looking for a basic reference implementation for how to add in-game (Spellbook) documentation to your add-on, here you go: https://github.com/Lyrellion/Ars-Elemancy/pull/37
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?
In the armor model, set the bone to show when that condition is true maybe?
bone.setHidden(true);
Unsure if the way that armors work is that they dynamically hide the slots you aren't wearing
if it doesnt hide by default, you can loop through the player's armor slots (player.getArmorSlots()) to check if the piece is equipped
does anyone have an opinion re: IntelliJ IDEA open-source version vs an Ultimate Subscription? i don't really have money to burn.
community version works perfectly for me, no idea what features the paid one could add
Same here. I haven't really squeezed every last feature out of IntelliJ, but Community version handles everything I've needed so far.
I use the free version
Free version
start with the community version and only upgrade if you need (which is a very rare case)
the only thing you gain is a built in profiler (which is not that common to use in modded cases)
awesome, thank you all, very much appreciated! ❤️🔥
How do y'all get the dev title btw?
make and publish ars addons
Done, what's next
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)
It's actually the tier above that would handle this. Admin itself doesn't let me add roles.
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...
can you link your addon?
Oh, hi!
This is the one
Also working on a different one, but that's more like just for fun
Thanks!
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
Is there a new to get enchantment levels from an itemstack in 1.21 neoforge?
its just a data component is it not ?
the profiler is really really awesome but i assume other profilers can do the job too