#General & Development Help
1 messages · Page 4 of 1
Curse Maven is using the files uploaded to curseforge, it's not ideal but it works if it's not pushed to a proper repo
I physically cringe when I have to use it, but sometimes there's no other choice
what's the big deal?
Curse breaking the API and my build breaking because curse was bored
it's probably because it's an alpha
maybe?
But it doesn't even have a branch on the github
what does the generated folder do btw?
Is that an auto-generated thing?
it's assets/data generated from code
Ah gotcha
Minecraft has lots of json configuration that's automatically generated via the runData Gradle task
Textures, language mapping, recipes,...
if you do runData, it will generate some example stuff
so it's safe to delete it and do runData to re-generate things with the new project name?
yep
Yep
I think I changed all instances of the example project name
runData should also delete all the stale stuff under generated
If you're using intelliJ and not familiar with the keybinds: CTRL+SHIFT+R is global find & replace
empty folders might remain
yay it builds!
Let's just slap the datapack stuff in first
build and then see if it runs
and see if it still has the new materials
holy shit it just works™️ let's go
well kind of, the lang files are not loading in
The rest of the datapack is loading in though
The materials are there without a hitch
I assume you can only add assets from your own modpack?
so i gotta move all of the en_us.json data from tetra\lang to ars_armiger\lang?
yeah
i'm not sure how the assets priority work, but usually they replace eachother
unlike the datapacks
so you need to keep them in a different file
Can confirm
Tetra side working flawlessly baby
just gotta add the hooks
time to figure out how subscribing to forge events work lmao
moved the pin to the main msg
So basically here (which i think this is when the mod is being instanced?) I register my event handler class?
How do i determine what event i'm listening to?
is it based on the name of the method?
Or is it by the arguments the event takes?
The event that is registered is the parameter in the function
so setup takes an FMLStartupEvent (or whatever is called), so that function will be called when the event fires
client stuff is pretty nasty, better not register like that
safest way is to use the subscriber on top of the class and specify value = client
or use the sided supplier
thats the way forge example mod loads it iirc
its fine as long as you dont class load client files via that method in your mod file
also to get intellisence stuff
do i manually add all of my mod dependencies to external libraries?
cause i'm not getting like
no?
suggestions for code completion or anything
like one would in say, VSC or VS
Not sure if there's something else i should be doing
I do get basic java completion tho
There's a minecraft development plugin
yeah. the plugin is for intellij
technically you should get decent completion already though. Worst case, you'll have to restart IntelliJ and if that doesn't work, quickly press shift twice, like a double click, type invalidate and restart and hope to god that the reindexing improves things
I don't think i ever needed to touch dependencies tabs in IJ
Did you run genIntelliJRuns ?
in what sense? as gradle action?
yep
gradle tab on the right
Good that that worked. Re-indexing can take ages
The top level class needs an annotation or registered
since I see its unused there
so this?
yep that looks right to me
and it'll automatically know that it's listening on the AttackEntityEvent?
yep, annotation magic
If you download the minecraft development plugin you also get an icon next to a valid event
time to get that plugin asap
its critical for mixins too
lets you auto generate references to methods or lines
question: does an Entity also apply to a block?
EntityHitResult only has GetEntity() regardless of whether it hit a block or an entity
does doing GetEntity() on it cause it to return the block it hit?
I'm not well versed as to what does and doesn't count as an entity in minecraft lmao
Ah I see, HitResult has GetLocation() which i think I would use to target a block instead?
it returns a Vector3
Block entities are unrelated to entities as far as code goes
The only thing they share is the name and the fact they use nbt
But yea like Jarva said it's a whole different type of hit result you'll need. You can check if there's a block entity for the block from the world using the position
Model for my Artificer's Workstation, so happy with it
oh huh
the resolver's method for casting on a block just takes in the BlockHitResult
that makes my life easier
that's pretty!
I wish I knew how to make models man
Man me too, I commissioned this
I want to create my Caster's Gauntlet that lets you charge up spells to add Amplify on it by holding the charge
but am artistically inept
Yeah, I couldn't have done this on my own
ooo that does look fancy
Knowing good artists is a giant boon to mod development.
It really is, I'm keeping contact with this guy
That table turned out really nice!
LazyOptional<IManaCap> manaCap = CapabilityRegistry.getMana((Player) source);
if (manaCap.isPresent()) {
IManaCap mana = manaCap.resolve().get();
int maxMana = mana.getMaxMana();
double recover = Math.floor(maxMana/(sourceLeech/100));
mana.addMana(recover);
}
is this safe?
Idk if this is safe
I don't see anything unsafe
The capabilities have double wrap, but most of the time it's not necessary to check both
Then again, i may not need it since my mod loads after Tetra
I know that with KubeJS i had to do post-init because i would otherwise error out trying to load the Tetra classes that hold all of the status bars
You want to be sure it doesn't clash in any way, FMLCommonSetupEvent
With event.enqueueWork(() ->
{ code to exec} )
It will make sure the code runs at the end of the post-init
so something like this
@SubscribeEvent
public static void onFMLCommonSetupEvent(@NotNull FMLCommonSetupEvent event){
event.enqueueWork(() -> {TetraIntegrations.RegisterNewBars();});
}```
this is out of an absurd amount of caution
I'm literally just calling static classes
but with KubeJS, i could actually end up calling these static classes/methods before they even existed
so I'm being 1000% safe just in case 
You should be very safe in that event anyway
The enqueue is to avoid concurrency problems
Idk how Tetra handle it, but better to enqueue something that can end in a shared map
what's the easiest way to get an item's ID?
like the modname:itemname string?
is it getDescriptionId()?
actually
I don't need to do that
easier question, how do i check a Tag on an ItemStack?
ItemsStack.has/getTag or getOrCreateTag
Don't use getOrCreate if you are checking a generic item, otherwise it will create tags on it and cause random unstackable items
But if you are sure that the itemstack is your specific item and it always need to have a tag then it's nice to use
so like this
if(item.getTag().contains("ars_nouveau:caster"))```
?
or should i split it into
if(item.hasTag())
(item.getTag().contains())
to be extra safe?
hasTag -> contains is safer
so option 2?
Now the last thing I have to do is implement the ability to inscribe the tetra weapons
Why you testing for that tag?
To check whether to display the spell at the end of the tooltip
Since i'm not using things like mixins to give tetra weapons a new implementation
It's a lot simpler to just slap the NBT tags needed for it to cast
Ah right
Which is just giving it the ars_nouveau:caster tag with the data pulled right out of the spellbook
it's very efficient
I just need to like
Figure out how to translate this KubeJS event into a forge one
in KubeJS they have a nice pre-packaged BlockEvents.rightClicked which has the block, the item and player all popualted
i need to figure out what is its forge equivalent
I need a slight bit of help real quick
What is the Scribe's Table considered?
a BlockEntity? or something else?
ok that's all scripts implemented as proper events
The one i'm the most worried about is the block right-click event
but let's see how it goes
does archwood get registered as its own tag?
Like ars_nouveau:archwood?
i want to add a 3rd material in the form of arch-wood
logs definitely, don't quote me on planks though
Oh right the planks!
I can just register the planks since all of them converge there
that'd work. But there's definitely an archwood tag, give me a moment
Should be 'logs:archwood' if I'm not wrong
the events work

well all but one event
the one where it adds the bars to the UI
gotta look into that
Oh also
Is there any real standard for using Source or Mana as a term?
yes, those are two different things lol
Previews of the new effects
I am currently struggling to add an improvement that can apply to all weapons melee weapons 

oh it seems that my tooltip code is not actually adding the tooltip lines
does anyone know off the top of their heads how adding data to the tooltip goes?
Tooltips are added usually in item methods but forge adds a tooltip event you can attach a tooltip to any item
the reactive caster uses that tooltip event iirc
oh wait
I was doing my event right
I just forgot to add the @Mod.EventBusSubscriber at the top of the class

literally the thing on the pinned message
amazing
lol
tfw I was assigning the casting data not to the item on the table
but to the fucking book in the hands
LOL
you know, the item donating the casting data
now featuring pretty text with ✨ colors ✨
the events for casting work so well now aaaaah
it's refreshing when shit works for once
Remember when I said I could get the entire working today?
Well
I met my part of the bargain
the mod works
all functions work as intended
I just put the last finishing touches on the tetra lang strings
lol you think code working exists outside of fairy tales
it only looks like it works until you need it to
Just need to get an icon for the mod, get some screenshots and add an spanish translation since i'm bilingual
now i just gotta figure out how to add a patchouli page
Check the resources folder: resources/data/ars_nouveau/patchouli_books/worn_notebook/en_us/entries it's reasonably simple, just need to add your own book that's got a different name than worn_notebook, tell it that it extends the worn notebook and you're good to go.
Every other addon should have something similar, be it torn notes, wizards scratchpad or similar
You need to make one file in the static resources folder and then you can use the datagen to make the actual pages
question, how does one link to a file in another mod?
I want to have the entry have the icon for the holosphere
which is under assets/tetra/textures/module/holo/frame/default.png
You'd use the tetra namespace
Uh, I'm not sure you can use a resourceloc directly to a texture
I'll have to check patchouli
I think it may link to the item and pull the texture from there?
If it's the same texture as the item,then it is easy, yeah
Use the withIcon in the builder and pass the holosphere
I'm not sure how to pull the item's data though
It's not like
individually declared in tetra's item registry
they just have the an Item registry property
do you have a recipe that references the item? That reference should be all you need
I think Tetra handles all of its recipes via datapack stuff
those are either also runData-generated in the generated folder or in the resources folder, unless they do a seperate repository for it
A bit hard to help without 1.19 sources public
which I wouldn't expect, you want to have 1 jar that contains everything which points to runData -> generated in my opinion 🤔
ahhhh, damn, I forgot
why wouldn't you make your mod sources public 

🏴☠️
I am basically using a decompiler to look at 1.19's code
it's
janky
but it works
i know the item is registered under "holo" in the item register
I think I can just like
Get all entries, and do a anyMatch()?
or a find
There must be a simple way
whatever java's equivalent to a Find() operator is
ah shit, if I don't use a tile entity, can I not use builtin/entity for my item model?
this is basically all i have in the item registry to work off
is there a way to render the model for a two-wide block that uses the door blockstate system?
Can't you just lookup the item in the registry using the resource location?
From ForgeRegistries.ITEMS
ForgeRegistries.ITEMS.getValue(new ResourceLocation("tetra", "holo"));
should do it
I was literally going to ask if this worked
ItemLike item = ForgeRegistries.ITEMS.getValue(new ResourceLocation("tetra","holo"));```
Thank you intellisence lmao
i'm getting issue with my runData
but i think it's because i changed some of the stuff in the build.gradle file
for the mods segment
do i use the name of the mod in the mods.toml?
which is ars_armiger?
or do i use the internal, java code name which is arsarmiger?
Which segment
this one right here
For both Args and Mods i need to know which one i should use lmao
You need to use the same modid everywhere
Mods.toml, Mod main file, resources folders
I see
I just didn't want to have an underscore in my namespace
it feels very wrong
Well let's pray intellij has good refactoring tools
Since you can't camelcase this is the only way to distinguish
You can simply have no underscore anyway
Just pick one
ReplaceInFiles will do the rest
the log says it failed
but it ended up making a file anyways?
{
"category": "ars_nouveau:equipment",
"icon": "tetra:holo",
"name": "ars_armiger.page.tetra_weapons",
"pages": [
{
"type": "patchouli:text",
"text": "ars_armiger.page1.tetra_weapons"
},
{
"type": "patchouli:text",
"text": "ars_armiger.page2.tetra_weapons"
},
{
"type": "patchouli:text",
"text": "ars_armiger.page3.tetra_weapons"
}
]
}```
so i just put this on my data folder basically?
well, under the right path that is
It should be generated in the right place already
we're making progress 
The error was probably just the process that ended
Because for some reason intellij mark it as an error type of end
So i just put this here then?
I find it confusing because Ars Elemental doesn't have these entry files
Because they remain inside the generated folders
Gradle will merge the two folders when building the jar
that's a lot more handy

not sure why i can't set the subtitle tho
I did define that string so
then again all other entries have a missing subtitle
even ars nouveau's
I don't think that's something to translate?
I assumed it was just normal
But maybe it's an error in the datagen builder, who knows
It seems i can't just add the holosphere as an item to display in patchouli
because it needs some NBT data before it can like
actually display anything
anyone know how to do that?
Like, display an item with some NBT data added in on patchouli?
cause it otherwise looks like this lmao
You need an item stack and then getOrCreateTag
Hmmm
Can you show how it's added to Patchouli?
//check the superclass for examples
ItemLike pStabilizer = ForgeRegistries.ITEMS.getValue(new ResourceLocation("tetra","planar_stabilizer"));
ItemLike holo = ForgeRegistries.ITEMS.getValue(new ResourceLocation("tetra","holo"));
ItemLike sword = ForgeRegistries.ITEMS.getValue(new ResourceLocation("ars_nouveau","enchanters_sword"));
ItemLike gemstone = ForgeRegistries.ITEMS.getValue(new ResourceLocation("ars_nouveau","source_gem_block"));
var builder = new PatchouliBuilder(EQUIPMENT,"ars_armiger.page.tetra_weapons")
.withIcon(pStabilizer)
.withPage(new SpotlightPage(holo).withText("ars_armiger.page.tetra_weapons.page1.body"))
.withPage(new SpotlightPage(gemstone).withTitle("ars_armiger.page.tetra_weapons.page2.title").withText("ars_armiger.page.tetra_weapons.page2.body"))
.withPage(new SpotlightPage(sword).withTitle("ars_armiger.page.tetra_weapons.page3.title").withText("ars_armiger.page.tetra_weapons.page3.body"))
.withTextPage("ars_armiger.page.tetra_weapons.page4.body");
Oh it does it based on an item string anyway
I think you can attach nbt, I know you can at least attach enchantment s
replace holo with "tetra:holo{nbthere}"
You don't need an ItemLike, you can just pass the ResourceLocation string
and looking at Tetra's recipe registry
{"item":"tetra:holo","nbt":{"id":"9503de92-046c-4d61-8afe-8c0d71c6afae","holo/core":"holo/core","holo/core_material":"core/dim","holo/frame":"holo/frame","holo/frame_material":"frame/ancient"}```
I think this has what i need?
Passing it as resourcelocation will likely throw exception
not as a resourcelocation, but as the string
That is just for datagen, you can also add the file directly to src hand typed
If needed
'tetra:holo{"id":"9503de92-046c-4d61-8afe-8c0d71c6afae","holo/core":"holo/core","holo/core_material":"core/dim","holo/frame":"holo/frame","holo/frame_material":"frame/ancient"}'
that's what you want
a string of that
According to Patchouli docs it should
In multiple places in the book, you'll see values that can be filled with "ItemStack
loading a world to see rn
If the builder is not happy, just use the withProperty
It allows to define key and value
I added it to manage flags
yep that did it!
But it's basically for anything that is not handled by the other methods
This should be sufficient explanation right?
I should check if the book is written in first person or second person
it seems to be a mixture of both
now that i know how to declare NBT i may change the second set of pages to have an actual modular weapon
with the augment put in it
Anyone know how to do the thing with patchouli where you cycle between items?
I want to see if I can have the Source-Leech entry show Gem block, Archwood Logs and magebloom fibers
like cycle between them
Idk if that's possible with an item display
Can projectiles hold NBT tags?
I think they can, right?
I need to add a simple boolean flag to thrown modular items to let the code know they already casted once
since right now they can double-cast by hitting an entity then bouncing into the ground lmao
You would need a custom display template, and a processor
so i can't just do this?
if(proj.getTags().contains("spellstruck")) return;
proj.addTag("spellstruck");
they were still talking about patchouli
for the item cycling in patchouli
Oh right right
I ended up just choosing to put another modular weapon there
that actually has all of the parts included
I think that's a better example
I assume i need to do
proj.getPersistentData().contains("spellstruck")```
instead?
should work
You can also be clever and store the entity ID instead, and let the spell hit multiple targets
cant arrows hit more than one target if it bounces off something?
I know off shields it can, I guess normal arrows stick into their target
Hmmm
I dont know how those tetra projectiles work so not sure if its possible
They are just projectiles
so they can have any data projectiles can
I just want to avoid double-casting when hitting a surface
Because sometimes you can end up hitting 2 blocks at once for example
or hit an entity and have your weapon bounce off and hit the ground
which is not idea if you want to use your throwable for something cool like swapping places
or casting a huge powerful AOE spell on the spot it lands
So i think limiting it to casting once is fine
Can hit two blocks at once?
It doesn’t stop moving and get stuck in a block? Make sure you are only checking the server side
I'm only checking server side
it basically happens when you collide with a block that is altered afterwards
ex: hit ice with ignite
Ahhh and it keeps falling
Yeah
Makes sense
Or tomahawks from Art of Forging breaking wood blocks it flies through
Do you support piercing though?
in what sense? like hitting multiple targets with the throwable?
Yeah piercing lets spells and projectiles keep going until they hit so many unique targets
Hmmm
yeah i see GetPIerceLevel() which returns a byte
I assume a number value for how many entities it can pierce?
Though AN projectiles remove themselves after the spell is done resolving
That won’t give you a spells pierce level, just the arrows enchanted level
You’d need to add both up if you let people scribe piercing projectiles
Well the way the Spellstrike spell works is that it casts the spell with Touch on the target struck
so pierce wouldn't even apply here
at least on the spell side
Ah okay then yeah don’t worry about it
But if the arrow can pierce you still want to let the spell resolve on the next target
on the projetile side, I can see it being nice if your tetra trident can hit multiple targets and cast its spell on each one
How does piercing work data wise?
like does GetPierceLevel() just return a byte counting how many entities it can go through?
afaik yes
it doesnt apply to blocks because vanilla projectiles stop moving until the block moves
so you could have a flag for when a spell resolves on a block
and then just let the spell resolve multiple times on entities until the pierce level is hit
ok so does getPierceLevel()'s return go down with each pierce? Or is it static and i have to figure out how many entities it can pierce yet
hmmm
depends on the implementation, its probably just a number and the projectile stores the ID list
the tetra class would tell you
yeah the projectile stores a list
at least on the forge side
does anyone know how things Translatable components work when passing data to them?
I want Source Leech to display a tooltip saying "Restores x% Mana on hit"
I see that Component.translatable() can have arguments passed to it
does it just follow regular java text formatting rules?
Ok so translatables do allow arguments but you have to do it differently than regular strings
I had to dig up forge 4.0.0 documentation lmao
basically you do {0} on the lang string to tell it "Put variable here kthanks"
Do you mean arguments like the death messages?
Well, something like %s should work too
i tried %s and it didn't work
Tablets and glyphs use it
General Java question
if I use List.add() and set the index to a number that is 1 higher than the highest index
so basically if I do List.add(5, thing) on a list with 5 elements
does it append to the end?
or does it throw an exception?
Anyone know this off the top of their heads?
I don't know if I need to do this garbage or not:
if(i+1 >= Parts.size()){
Parts.add(AugmentAmplify.INSTANCE);
}
else {
Parts.add(i+1, AugmentAmplify.INSTANCE);
}```
Crashes iirc
ok so i do have to do the garbage
Just do .add to add it to the end
that's what i'm doing yeah
I'm itterating through all parts and amping them for a thing
but if it's the last part on the spell
well
yeah
it'd explode if i do i + 1 lmao
Trying to implement my own version of a focus is hard :')
Or rather it's jank
When are the augments added?
I think in the same event doing the casting Vyklade said
So no amp multiplier there, iirc
What i may do is that i may just like
dial down on amp stuff
Rather than tempt fate and lock a player into a situation where their spells are always invalid (aka Spellstrike 3 + Elemental Attunement)
Maybe i'll turn one of these effects into just a casting discount
maybe Spellstrike 3 adds 1 amplify but it costs nothing
while Spellstrike 2 adds 1 amplify but it still has full cost
What the heck whyyy
So:
Spellstrike 1: Added Touch + No amps
Spellstrike 2: Added Touch + Amp at the end (No discount)
Spellstrike 3: Added Touch + Free Amp at the
Elemental Attunement 1: +1 Amp to matching Spell +1 Dampen to nonmatching
Elemental Attunement 2: +1 Amp no downside
Why not just let them keep the amount over the max
That's what the bow does
Please please please
It would be so much cooler and make more sense
Why do this whole thing
I really don't get it
are you sure?
Why are you so opposed to letting people just have extra amps
?
There's no call to adding AugmentAmplify anywhere in here
Spell arrows
oh right
I think there's an amplify one
let me check those
And it stacks on TOP of augments at the end of a glyph was my understanding
When in doubt test in game
Let's check in-game rq then
I'm not at a PC with the game or I would've done that an hour ago lol
also don't get me wrong I have nothing against extra amps, I simply want to make sure I don't gridlock the player because I can't avoid the validator lmao
Have you actually tested that lol
Because my staffs DEFINITELY work for me
And they add more amps breaking the limit
So
🤷
well my swords do get a limiter
Just gotta figure out how to like
make it not
Enchanter's Sword also has a limit
huh and yet the arrows don't
So it's something specific to the spell arrows
The .silent or whatever thing I said a while ago
that's odd because looking at the code
all silent does just not print the error
look:
It'll still not cast
let me compile and try again
with isSilent
Worth giving a shot anyway
yeah withSilent() just makes the error not show up
rather than let you cast anyways
Huh
let me see how you did your staves
maybe it's in the type of caster?
Maybe I have to declare a specific kind of spellcaster type?
Maybe? IDK if I even pushed lol
i'm using the raw SpellCaster instance
yeah there are like 4 SpellCaster item types
ReactiveCaster, TurretCaster, ReductionCaster and SpellCaster
I can help more when I get back to my desktop computer
hey i need advice from java pros rn
For some reason my elemental focus effects is just
not triggering???
public static void Amplify(Spell Spell, SpellSchool school, boolean trueAttune){
for(int i = 0; i < Spell.recipe.size(); i++){
AbstractSpellPart part = Spell.recipe.get(0);
if(!(part instanceof AbstractEffect)) continue;
if(SpellSchools.ELEMENTAL.isPartOfSchool(part)){
if (school.isPartOfSchool(part)){
Spell.add(AugmentAmplify.INSTANCE,1,i);
Spell.addDiscount(AugmentAmplify.INSTANCE.getCastingCost());
}
else {
if (trueAttune) continue;
Spell.add(AugmentDampen.INSTANCE,1,i);
Spell.addDiscount(AugmentDampen.INSTANCE.getCastingCost());
}
}
}
}```
From what I read, as long as i don't re-assign Spell i don't have to return a new Spell instance
you are still creating tehse via events right
yeah
I'm using the tooltip code to verify it
SpellCaster caster = new BasicReductionCaster(item,(spell -> { spell.addDiscount(MethodTouch.INSTANCE.getCastingCost()); return spell;}));
Spell spell = caster.getSpell();
// If spellstriekr 2 -> Add Amplify; This one works
// If Elemental -> Run Amplify(); This one does not work
tooltip.add(Component.literal(spell.getDisplayString()));```
the focus should be added from the casters inventory, is the player the caster?
The focus is slotted into the weapon itself, the idea is that it buffs that element's spells but dampens the others
just like the real deal
but localized to your modular weapon
the checks themselves are just
if (Air > 0)
TetraEventHandler.Amplify(spell,SpellSchools.ELEMENTAL_AIR, air >= 2);```
And I know that Air is being populated
So the issue has to be somewhere in Amplify()?
use the debugger
click the number to add a break point and run the game in debug mode, its the little bug next to the run
when the game hits that path it will freeze and you can add more break points, step through, and see values in the method
hmmm it's throwing an error when launching the debugger
Unsupported major.minor version 60.0
Binch how you are literally building

alternatively add print statements
the debug mode makes modding much easier though because you can also hot swap code without rebooting the entire game every change
oh got it
pretty critical for any larger project without wanting to throw your monitor out
I just had to change the java version being used
from 15 to 17
i hate how java handles versions man
I never figured out how debugging works, and I turned out "fine"
(insert sounds of screaming as everything in the mod crashes the game and I don't know why)
yeah the issue is on the SpellSchools.ELEMENTAL.isPartOfSchool(part) never returning true
Let me see why
Now that i have the debugger it should be miles easier
let's fuken go
it works babey
Also I discovered that doing .add() with an index equal to the List's size (so index 5 on a list with 5 elements) does not throw an exception!
It actually adds it at the end
So my code is very short now
I just append amp/dampen at index + 1 and it just works
but Vyklade wants index of the glyph
not index of the end of the spell
there's effects inside the spell lol
My code goes glyph by glyph and if it's a matching elemental one it adds amplify after
So index + 1
I was worried that if the last glyph is elemental it'd throw an index out if bound if try to add at index + 1
But java just treats index = size as adding to the end
Which is nice
Ah gotcha
umm, how do ritual constructors work on 1.19?
I need help figuring out a bug making things crash
seems to me the constructor got called a BUNCH of times, initialized a value every one of those times, and then crashed cause the value was null
I sorta figured the ritual would be constructed once and keep the value it initialized lol
WTF
its initialized every time a ritual is started and when the world reloads
... I started one ritual...
WTF is this
are you KIDDING me
getRitual creates a new instance
damn it
now I need to use reflection to steal the ritual map
... or keep track of my own weird map
that's probably easier at this point
my own ritual map lol
map of all configured rituals
IDK where to keep the configs cause I didn't want to have to redo the config code for every ritual
so I'm making a map for that now
I used to keep it on the default ritual but that crashes stuff it seems
honestly now I'm not sure why the issue isn't a stack overflow
🤔
alr fixed it!
ok so
I want to add a recipe that can change the scribed spell on an item just by crafting it with spell parchment
but, how can I actually set the spell?
IDK how to do that from outside the scribe's table, it seems to want to use a player for IDK what
Well you can basically use .setSpell() on the item
You first need to create a new SpellCaster(ItemStack) and use caster.setSpell(spell) on it
That's how I do it for Ars Armiger
Note: if you're changing a reactive caster you need to do new ReactiveCaster(ItemStack) instead!
I'm not, but, why are you using new like that lol
Because you're creating a new instance
That's if you're working with an item that inherets from ICasterTool
though the reactive caster does have to be manually cause it's adden on top of
oh yea ok, you're not?
^
Tetra weapons don't Inheret ICasterTool
And I'm not using mixing for them
Too involved
fair
My Method basically works on any item
so, er, does setSpell work if the player is null?
Maybe?
lol, when do you set the spell
the problem I'm trying to solve is it's during crafting
all I have are the input items
which are a bullet and a scroll
that's... about it
You can create a var scroll = new SpellCaster(scrollItemStack) and then do Spell s = scroll.getSpell()
yea ok thanks
I wonder
Can you make a caster tool with more than one slot?
Idk if the spell wheel is modular and allows a variable amount of spells
You can but I wouldn’t attempt to recreate it on a tetra item
I'm tempted to make the Ars Armiger caster gauntlet have an upgrade path that adds more slots
It’s pretty baked into the interface
unless this is your own item class you are talking about
I'm making an item that would implent ICasterTool and ModularItem
So it'd be a tetra item but it also had all of the bells and whistles from a real caster tool
This is a new torn
Item*
Rather than me retrofitting casting onto a treta item
In that case it shouldn't be too hard
Just peek at the spellbook for a lot of the extra stuff
I just gotta learn how to do models in MC
I'm artistically innept you see
But I want the gauntlet to be a simple glove model
Similar to Thaum 1.12 one?
Are there any good tools for making minecraft models?
Ideally one where I can also do texture work
blockbench
Gotcha
Im debating what the modular gauntlet will be like
Both visually and mechanically
I'm thinking that it'll have like 4 modules:
Major:
× Body: accepts skin materials, it determines the color and texture of the glove
× Inlay: accepts metals and gems. a ring embedded into the glove
Minor:
× Foci: Accepts a focus or socket
lol I just had an idea
a gold gauntlet, fits in the hand curio slot, can fit 6 ars nouveau foci
Lmao
The caster's glove had a special gimmick
It does no damage on its own
Punching with it casts Touch -> Harm instead
The material of your Inlay adds amplify to this
LOL that's a fun idea
except how would you change the spell
and could you break the limit?
The glove can go past the usual limits
nice
The idea is that your Inlay determines strength (how many amplifies)
The foci determines Attunement (changes it to other glyphs)
Possibly
Because idk if there are enough elemental glyphs by default
I got my bullet scribing recipe to mostly work, but it still consumes the parchment 😦
WTF no no that either
magic lipstick?
it's a spell cartridge for immersive enginerring revolver
and it dupes spell parchments and IDK why
I think it consuming the spell parchment is fine?
Hmmm
I specifically made this recipe to fix that, so you can make them in bulk
and it's this close to working right
That's a bit tricky since i don't think minecraft allows for recipes like that
could be wrong tho
it does if I coded it right
I'm almost there, I'm just setting the remaining items in the grid wrong
which is a thing you can override when adding custom recipe types to the crafting table
how big is the minecraft hand usually?
like I need to know what my dimensions are when working in Blockbench
unless they have a tool to just show a model for scale
about... 🖐️ yay wide
(bad joke, the hand is 1 hand wide)
yaaaay! the bullet crafting works!
Make sure your model is set on block/item
Because they're a tab that let you see the preview
In the gui, in the player hand, etc.
errm, how do I upload a file on the curseforge beta?
you cant
BRUH
you have to wait like 10 mins to be able to access the normal site
Because web dev is hard yo.
(If you're an idiot...)
And servers are expensive, gotta skimp on hardware so we can pay the modders more. Ha.
I think the gauntlet looking fine
texture is in B/W because it gets tinted by Tetra based on the material
History is the answer
yea, I found the link
thanks
my button OnPress isn't firing and I'm this close to a meltdown
I have literally no idea why, it extends from GuiImageButton and passes a lambda in for the onPress to super and I can see it there in the breakpoints
but my onPress callback never triggers
and it's probably some render layer issue now that I'm thinking about it
I think I just figured it out
I used this.addRenderableOnly instead of this.addRenderableWidget
it worked, I'm dumb af
I still gotta figure out how to render my spell gauntlet
Explain more and you might get hints?
How to explort the model and use it in mc?
How to do special rendering stuff?
Nah. In this case it's definitely Minecraft UI code being utter dogshit
it's not the first time
has driven me to insanity
Probably not the last time either
this one, i made the model and have its .json and textures here
I basically need to do 2 things:
Get the itemstack so i can have the item's NBT data
then tint the sprites based on that data
the issue is that i'm also working with like
Tetra data rules
and apparently this dude managed to tie the model itself into the modular data???
which is amazing but also really hard to follow
since the code is basically scattered across 7+ files lmao
Well, you can look at how the wand get the tint maybe?
No, actually it might be easier to keep it vanillish
Using different tint indexes
And then the client event to apply the right tint based on data for each index
They store the tint as a freaking byte
but I have reverse engineered their code for it
this just feels wrong lmao
My concern is that each item returns an array of models which concerns me
I assume 0 will always be the base layer but I can't be sure and i have to wait 7-10 business days to get a response from the tetra dev lmao
I need a good example of how you normally render an 3d model as an item
Tints are how mojang creates dynamic colorable items as 2d sprites
for 3d items you need a renderer most likely
a BlockEntityWithoutLevelRenderer?
Basically, yes
It might be easier if you make it as a geckolib item
Since you can then base off Ars renderers
You would but it wouldn't be a big cost as it's bundled with ArsNouveau already
yeah dont need to add it, already packaged for you
Sometimes I really hate working with the Java stdlib, like why does everything I map or loop over have to be a stream, and then why is there no index available on streams
Cause it's either indexed or Stream. Streams are infinite by design and indexing infinity is a bad time 😁
Although map might have an index argument? Not sure tbh
I mean having a running total of the stream elements should be fine because streams should be lazy processing
Google Guava has Streams.mapWithIndex
but it's just frustrating
I have good news and bad news about Ars Artifice
bad news is that every time I make a mistake the client crashes to desktop
good news is that it's very easy to tell when there's an error
That it sadly is. I'm sure some super smart JVM engineer has a reason for it though. Probably
I'm too used to writing Rust, these runtime errors will be the death of me
Oh no. A Rustafari Rustacean. Quick, run, before he starts handing out Rust manuals like the bible! 😉
That's adorable and I feel like the conversion is working. Damn you and your cute crustacean-ness
is there a geckolib documentation somewhere i can reference?

https://github.com/bernie-g/geckolib/wiki/Getting-Started
Is the getting started for geckolib v3. Which is ANs Geckolib version afaik
Are Rustaceans required to only listen to crab rave while coding?
We can also listen to Shrimp Rave
Okay, I have spell validators working now
All I have to do is implement my event glyphs and the curios
Oh right, I just realised I need to implement the item renderer
No idea how I'm going to deal with that
Vyklade might be able to help now after taking a deep dive into the docs?
My issue comes from the fact that my Artificer's Workbench isn't a tile entity, otherwise I'd just the entity block renderer
So I either have a texture for it, or figure something else out
should just be item display settings regardless of how the block is placed in the world iirc
Method is done through artificer's workbench, and spell is done through scribe's table
ohhhh right vanilla renders 2d sprites for non tile blocks
We gotta do the custom UI because the Cyclic glyph isn't available in the Spellbook
so doors are 2d
Yeah I wish I could get a model render there
tricky, not sure how you will do that without a TESR
models are very much tied to a block
Yeah I'm not sure
I guess render a geckolib model which is just the workbench
should work fine, just export it as an item
which to geckolib are the same .geo format anyway
so look at the sword or wand renderers
I could just provide a model file of both halves that is just used for the item, in the same way that blocks are rendered
not sure if it would work for a 2-wide block
or I could literally just render the block into a png and use a static texture file
not sure about that fancy item model stuff
id take the easy way and load your model into blockbench and export as a .geo with the item display settings
what do we think about the texture, do we copy over the legs from the scribe's and alteration tables
also @radiant depot someone in enigmatica discord say starbuckets cant take from cauldrons
that dark grey doesnt exist in the mod so if its a table from archwood I would change it
aand the gold tint too
Yeah I need to update the gold, I'm thinking the legs suit more to have iron reinforced legs
Need to figure out a recipe to represent that though









could work
but iron blocks instead of ingots, and gold nuggets instead of ingots
and ofc archwood slabs
Indeed, they need to use the turret with pickup for that
Or a mod that make cauldrons become block entities with a tank
And even the turret only take lava from cauldrons, not water
Part because the cauldrons are hardcoded weird stuff and part because there's the urn
can i add/remove access to certain glyphs based on some arbitrary data?
i want to write a few origins addon stuff for my pack
one is limiting spells based on origin
You could with a custom spell validator
what do those do
you could disable the ability to cast or add a glyph to a spell
they give warnings in the book when making spells or casting
it will grey them out with a warning
see the StandardSpellValidator class for the examples
though its not very addon friendly at the moment, you will need some mixins or reflection to add your own
alternatively you can deny spell casting using the SpellCast event, but you won't get any info in the book
@mossy hollow :
public ArcaneApplicator() {
super(defaultProperties().noOcclusion());
this.registerDefaultState(this.stateDefinition.any().setValue(BlockStateProperties.WATERLOGGED, false).setValue(TRIGGERED, Boolean.FALSE));
}
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
builder.add(BlockStateProperties.WATERLOGGED);
builder.add(BlockStateProperties.TRIGGERED);
builder.add(BlockStateProperties.FACING);
}
@Nonnull
@Override
public BlockState getStateForPlacement(BlockPlaceContext context) {
FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos());
return this.defaultBlockState()
.setValue(BlockStateProperties.WATERLOGGED, fluidState.getType() == Fluids.WATER)
.setValue(FACING, context.getHorizontalDirection().getOpposite());
}
gotta register it, have it as a createBlockStateDefinition, provide defaults and if it is about facing handle it in getStateForPlacement, too
Ah I think I missed the create block state definition, ty
I do that too. Every damn time until I remember it being a thing and cursing myself for forgetting and Minecraft for being so damn imperative and annoying
How can I check if a class has a method? For example Mob has the method mobInteract but it's protected, but children of that class often have it public, but I don't want to check every child
I'd usually instanceof Mob, but that doesn't work because it's protected, I need to check if it has the method publicly
try a reflection
Why not instanceof the class?
maybe better than a mixin/AT in this case
You want the override call?
there's a lot of various children classes, so instanceof would be a lot
you should add https://www.curseforge.com/minecraft/mc-mods/superior-shields to #addon-index since it technically adds a shield which is meant for ars noveau
isn't that compat as opposed to a full addon though?
Is there a way I can render a label using widgets instead of directly using minecraft.font.draw?
@rugged urchin Apologies for the ping but do you happen to have templates for glyphs of each type? Like Method/Form, Effect, etc.?
the example addon does
ah perfect
Is there anyway to modify the cost of a spell with a caster or other type?
I think there's a spell cost event? Not sure if I remember that right though
Doesn't seem like it unfortunately, only way is through curios currently
and that's just flat discounts
Ah you can add a discount to a spell in a caster
Alright, I have two artifice methods currently, I probably want to make one more before I do an initial release
can you tell what this is?
someone plummeting
doesn't make sense as a book method so I'm guessing it's a trigger for the ring?
probably either when falling tick or on hit the ground tick
Yeah, it's a falling tick trigger, after falling a configurable distance
is there an easy way to add a player-specific bonus to specific glyphs?
e.g +1 damage to harm
the SpellDamageEvent.Pre lets you adjust the damage
you can check which effect it is currently on by checking the SpellContext in the event
hm
Hey you guys think it's worth updating mods to 1.18.2 then 1.19.2, or should I just skip straight to the newest?
I mean, are there more people on 1.18, or 1.19?
If only curse had more detailed stats
From what i know, 1.19 mainly have direwolf and atm
And very likely some other bigger pack in the brewing
While 1.18 have the more established packs
Well I guess I can make a quick stop on 1.18 before heading off to 1.19
Sheesh, 1.20 is closing in fast
Yeah, we might need to poll requested Api changes soon
Current needed changes are mostly clean up of overloaded deprecated methods.
I am not sure if this is necessarily the right place to ask this, but I am trying to make a datapack for the Origins mod with a power that modifies the damage of Ars Nouveau spells. Is there any one attribute like minecraft:generic.attack_damage for Ars Nouveau spell damage? Or a list of the attributes somewhere, even?
if your version have attributes, they will appear as suggestions of the /attribute command
1.16 have none, 1.18 only mana max and regen, 1.19 a bit more
Running 1.19.2, I didn't even consider doing that, kinda new to messing with this stuff. Thank you.
How does one make a dynamic recipe? Where the output changes based on the NBT of the input item
Can I do that with the imbuement chamber recipes?
I want to edit the output item based on the pedestal item NBT
yeah but that consumes items 😦
The apparatus lets other addons register their recipe type, I don’t think the imbuement does but it could
Time to make a PR 😄
@rugged urchin @gray sluice do you what the hell is happening here?
i can't really figure out where mc finds the background for the leaves in "fast" settings
Есть русские?
помощь нужна сильно не понимаю что делать
с магическим зеркалом
We're all english speaking sadly.
Can you try again?
I really don't understand what to do with a
magic mirror how to impose glyphs on objects.
#faq
Put the mirror on the scribe's table and shift rightclick with the spell you want to inscribe.
Only Effect & Augment glyphs though, no purple forms like
or
, the mirror gives you a free 
cheers thanks
it was transparent pixels fault, aseprite was not recognizing the color data hidden in them.
so now it should blend better
or at least have less eyesore from far away
neat addon idea potentially
Epic socks! I like.
I haven't checked 1.19.2, but in 1.18.2, runes are not visible from below.
Was that ever changed?
no
it's probably because they can have some z-fighting when the texture is flat and textured on both sides
Could make for some interesting tunnel traps. Visible rune on the ground, and when they try to jump over, they trigger the one above. This could make for some funny vids... Lol
You can't see them from below?
Feel like Bailey might have the wrong render mode on it
u
umh, could also be that
ok no, it's not that
unless you need to change it to translucent
cutout didn't change anything
I think we usually test all of the modes because we can never remember what each one actually does
might be translucent
Wait a minute can I set the render mode from BB??
well, if they updated
now the rendertype is in the model json for forge
not hardcoded
There was an update this week but i didn't look at it super close
Just saw that GIF recording should finally be fixed which would be so nice
I solved my item model issue, I just bundled an extra model for the conjoined block model
Are there any methods to change the spells of a entity to nothing?
probably not what I need
What exactly are you trying to do?
Alright
I was wondering a thing for 1.20
Omega started the propagator naming since it was the first. But is there a better naming for it? Is "Propagate X" misleading or not?
I was thinking it could be cool to rename it, something like Continuum
but idk
I think Propogate makes more sense then Continuum and it's easier to join into a word
Like X Continuum sounds okay-ish
but not as clear imo
As long as people understand what it does, since it's a common question how propagate work
Yeah but I don't think Continuum clears that up
