If you try to change the rarity of any item that is an irons_spells_js:spellbook you get a crash on startup. Not sure if this is something that can be implemented or not, but it would be kinda nice for the sake of custom spellbooks. (Not every spellbook is made equally therefore they can't all be uncommon lol) Or if there is a different method of changing rarity of spellbooks that would be great.
#No rarity modification with ISS Spellbooks
130 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
The mod has rarity options in the server config.
I think the op is trying to change the minecraft rarity of the item which is hardcoded by the mod.
Not the spell rarity
yea the Item Rarity not spell rarities
the rarity that displays when it is on the ground or in inventory
it is a custom spellbook added with SpellJS but you cannot use the normal item.rarity to change the items rarity
I don't think that rarity is in the spellbook registry at all, so you can't modify it because its assigned in a different way
I think that the rarity is directly assigned to "spellbooks" rather than the items themselves
It's @coarse light 's mod, so i guess that's who needs to answer. Or @verbal solstice
i honestly don't know what to do here
it must be the way that ISS assigns certain things to items, like scrolls are also uncommon items by default when you make a new one, you can change the rarity of Swords and staves and armor, so i'm not sure
I understand why scrolls work that way, but spellbooks is weird
oh i see what you're doing
i don't recommend using item modification events for this
can you try just adding .rarity('blah') to the spell book builder?
yea 1 sec
This is what i meant when i asked #1250277201606086746 message . Sorry i wasnt clear.
[➤](#1250277201606086746 message) You can't set it in the item builder at startup?
different error
StartupEvents.registry("item", event => {
// Other item methods also work on these builders. It is recommended to give the spell books the proper Curios item tag for them to work properly.
// (that being "curios:spellbook")
//This just creates a basic spell book with nothing special to it. It is given 3 spell slots as defined.
event.create("astral_spellbook", "irons_spells_js:spellbook")
.setMaxSpellSlots(10)
.addDefaultAttribute("kubejs:astral_spell_power", "Astral Spell Power", 0.15, "multiply_total")
.addDefaultAttribute("irons_spellbooks:max_mana", "Max Mana", 150, "addition")
.rarity('EPIC')
it does specifically say other item methods work
they should

@verbal solstice can you take a look at this for me? kinda occupied rn
older different thing but wahhh
in dev, that issue is fixed
if you need a temporary build of the mod then i can send it here
ah I just misunderstood I thought it got released already thats ok
yeah, we're trying to iron out (pun intended) some issues, including this one, and then the update should be out soon
awesome, seems im guinea pigging the mod along
seeing people use the mod gives me motivation to work on it more
okay so i think i see the issue
well I'll be using it until I've got a whole school + some other mod crossover for my modpack
oh?
we're using BuilderBase<SpellBook> and not ItemBuilder, so that may be causing issues
i'm gonna have to convert it to ItemBuilder
your mod will be perfect one day, it'll have to be because I'm gonna use all of it 
Paste version of startup.log from @wild verge
woah what the hell
oh
did you actually download the mod?
i don't see the plugins being loaded at all
at the top of those logs it should show that our plugin is there
I did but for some reason instead of replacing the existing one it just deleted both lmao
lmao
ok lets try this again with the mod this time
so it did break 2 things, and it mightve fixed the rarity bug? (but caused a new one)
Paste version of latest.log from @wild verge
and then code for both errors?
yeah
oh wait
i know the issue with the first one
i changed the way setUniqueInfo works
StartupEvents.registry('item', event => {
event.create('sun_core').displayName('Sun Core')
})
ItemEvents.modification(event => {
event.modify('kubejs:sun_core', item => {
item.maxStackSize = 64
item.fireResistant = true
item.rarity = 'MYTHIC'
})
})
StartupEvents.registry('item', event => {
event.create('star_fragment').displayName('Star Fragment')
})
ItemEvents.modification(event => {
event.modify('kubejs:star_fragment', item => {
item.maxStackSize = 64
item.fireResistant = true
item.rarity = 'EPIC'
})
})
ItemEvents.modification(event => {
event.modify('kubejs:the_sun_the_moon_the_stars.', item => {
item.maxStackSize = 1
item.fireResistant = true
item.maxDamage = 4056
item.rarity = 'MYTHIC'
})
event.modify('kubejs:constellation', item => {
item.rarity = 'MYTHIC'
item.maxDamage = 3236
})
})
ItemEvents.modification(event => {
event.modify('kubejs:moon_staff', item => {
item.rarity = 'celestial'
})
})
ItemEvents.modification(event => {
event.modify('minecraft:nether_star', item => {
item.rarity = 'legendary'
})
})
and then this is code that has MYTHIC rarity in it, which is from aquamirae
it would be
.setUniqueInfo((level, caster) => {
return [Component.of(`Level Test: ${level}`), Component.of(`Caster Test: ${caster}`)]
})
for the unique info now
the second error shows that you are inputting a non-existent rarity
which is strange because all of this code was working prior
nope, mythic is from aquamirae, here is an example of one of the items in game with the rarity
knowing aquamirae, that is probably not actually registered as a rarity, but instead just some hardcoded stuff
wait
no like this is an item I made assigned with the rarity
ItemEvents.modification(event => {
event.modify('kubejs:sun_core', item => {
item.maxStackSize = 64
item.fireResistant = true
item.rarity = 'MYTHIC'
})
})
huh
that's odd
can you try inputting a different rarity and see if that changes anything?
testing with the uniqueInfo and different rarity
my game and my discord crashed lmao sending logs
Paste version of latest.log from @wild verge
oh wait might know the reason, I think there was already an instance opened and it overloaded my RAM
ugh getting the rarity crash again, I forgot about my rarity array script...
isnt there a way to easily disable something?
what do you need to disable?
I just dragged the scripts out of the folder, the picture above is an example script I've been using to assign rarities to items easier, and it has alot of mythics items lmao
In 1.19.2 you can use various headers at the top of a script to change its load conditions.
For example:
//ignored: true
console.log("I am never printed")
//packmode: default
console.log('I will only print when packmode in kubejs/config/common.properties is set to default')
//requires: minecraft
//requires: create
console.log('I will only print when mods with ids of minecraft AND create are loaded')
You can stack these too, like so
//priority: 10
//packmode: hard
//requires: create
//requires: tconstruct
console.log('I am complicated!')
and the celestisynth rarity is no longer working either...
ok game booted, no errors, this script didnt change the rarity however
event.create("astral_spellbook", "irons_spells_js:spellbook")
.setMaxSpellSlots(10)
.addDefaultAttribute("kubejs:astral_spell_power", "Astral Spell Power", 0.15, "multiply_total")
.addDefaultAttribute("irons_spellbooks:max_mana", "Max Mana", 150, "addition")
.rarity('EPIC')
and the previously mentioned rarities for some reason no longer existing in the list despite working in game still
and obviously this worked as intended
that's really odd
testing it in devenv rn
No startup errors or anything either
yeah that's why i'm confused
i think i know what's happening here...
i think every spellbook is hardcoded to be uncommon
lemme see something
no wait huh
public static final RegistryObject<Item> WIMPY_SPELL_BOOK = ITEMS.register("wimpy_spell_book", () -> new SpellBook(0, SpellRarity.LEGENDARY, new Item.Properties().stacksTo(1).rarity(Rarity.UNCOMMON)));
this is what i'm seeing in iron's spells
so they can have different rarities, but something is breaking it
Is it possible that this just overrides the script somehow?
Is it doing the rarity before the mod does it?
no, it's that the item properties set in the builder are used nowhere
Oh yea that'll do it
okay now i'm even more confused
the only type of spell book that lets you set item properties is the normal spell book
The normal one? Like the wimpy one above?
Oh so does that mean that the wimpy spell book is literally used as a reference for more than just model and texture?
but right now i need to go, so i'll check this tomorrow
Alright sounds good
i'm more talking about the class, SpellBook
@coarse light I remember I didn't include rarity change because Iron hardcoded rarity, at least on one of the versions we were using at the time
or was it the spell rarity? hmmm
We're talking about item rarity
yeah
Oh wait I misread
also be careful with ItemBuilder, you need to override some that does not apply
Hm
and need to check if models are like normal item and not some cursed path like the school and scrolls stuff
model/texture path*
Yeah I think this is more of an Iron issue and not our issue, I'll have to talk to him about it
