Open kingofrunes opened 7 years ago
While we are on the subject of the Growth Spell, I'll add this related error. Got this when I tried randomly casting it in a mineshaft I was in.
java.lang.ClassCastException: net.minecraft.block.state.BlockStateContainer$StateImplementation cannot be cast to net.minecraft.block.BlockMushroom at am2.spell.component.Grow.applyEffectBlock(Grow.java:79) at am2.utils.SpellUtils.applyStageToGround(SpellUtils.java:758) at am2.spell.shape.AoE.applyStageHorizontal(AoE.java:137) at am2.spell.shape.AoE.beginStackStage(AoE.java:75) at am2.utils.SpellUtils.applyStackStage(SpellUtils.java:481) at am2.entity.EntitySpellEffect.zoneUpdate(EntitySpellEffect.java:241) at am2.entity.EntitySpellEffect.func_70071h(EntitySpellEffect.java:138) at net.minecraft.world.World.func_72866_a(World.java:1964) at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:839) at net.minecraft.world.World.func_72870_g(World.java:1934) at net.minecraft.world.World.func_72939_s(World.java:1750) at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:620) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:709) at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:387) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:613) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471) at java.lang.Thread.run(Unknown Source)
The mushroom issue is related to attempts to grow the mushroom into a huge mushroom, possibly due to space issues.
Edited Hang on, completely misphrased that. The crash occurs when attempting to grow a huge mushroom, but is unrelated to having space to grow.
Btw I took a closer look at this by experimenting with the code a bit. I believe there's 2 things that's causing this.
1) The logic for checking if the block above is air or tall grass seems to not be working properly 2) The Tarma root block logic is always returning false for it's super method canBlockStay even on stuff it can grow on like stone and cobblestone
Addressing those two things seems to work for solving it in the tests I did with it. Of course you could setup special logic for it all together similar to what you did with the wakeblooms. I hope that at least helps point you in the direction of investigation
i'll look into it, thanks for telling me!
I was able to reproduce it (Most current release as of this comment), but only after repeated castings. Seems like a problem with the actual Grow event. Either from the plant's themselves, or a specific event that the spell creates. My environment is not setup to re-launch multiple times in a row stably, but I would suggest testing if this is the case with modded saplings, cactus, sugarcane, and even Botania planted petals.
The necessary repeats in casting likely occur as a result of there being only a 10% chance to grow mushrooms. @Orinion's fix solves it anyway, at least as far as I can tell from testing.
Hmm... I appear to have 1.5.0-6 which I thought was the most updated. If it's not, how can I access the most updated (new to GitHub)? Otherwise, the current release is still doing it.
The lastest version by Growlith is 1.5.0-15 which you can find here: https://github.com/Growlith1223/ArsMagica2/releases However i also made a build 10 days ago which you can find here: https://github.com/Orinion/ArsMagica2/releases
Awseome, thank you. This will likely be merged into Growlith's branch correct?
They already have been merged, but Growlithe hasn't made a release yet.
fixed thanks to Orinion, however i'll be leaving this open for anymore input on this crash regarding mushrooms in case it happens again.
Ars Magica 2 1.5.0-15 Forge 12.18.3.2185 I'm having issues growing the Tarma root with the Growth Spell.
Spell is Zone AoE, Duration x 3, Growth.
It works fine for wakeblooms, aum, cerublossom, and desert nova. Those all produced results with a single use of that. However, I haven't been able to produce any Tarma roots despite it being completely dark and being surrounded by stone.
Here are some screenshots of the tests I took to show you the layout and positioning I was using