Skip to content

Conversation

@JCoMcL
Copy link

@JCoMcL JCoMcL commented Nov 1, 2024

I was getting a ticking entity when firing the slingshot into the water. Stacktrace is as follows:

java.util.NoSuchElementException
	at java.base/java.util.LinkedList$ListItr.next(LinkedList.java:901)
	at java.base/java.util.Collections.max(Collections.java:698)
	at knot//net.minecraft.class_1297.handler$hkl000$particular$waterParticles(class_1297.java:25637)
	at knot//net.minecraft.class_1297.method_5746(class_1297.java:1427)
	at knot//net.minecraft.class_1297.method_5713(class_1297.java:1370)
	at knot//net.minecraft.class_1297.method_5876(class_1297.java:1359)
	at knot//net.minecraft.class_1297.method_5670(class_1297.java:503)
	at knot//net.mehvahdjukaar.moonlight.api.entity.ImprovedProjectileEntity.method_5773(ImprovedProjectileEntity.java:101)
	at knot//net.mehvahdjukaar.supplementaries.common.entities.SlingshotProjectileEntity.method_5773(SlingshotProjectileEntity.java:264)
	at knot//net.minecraft.class_638.method_18646(class_638.java:272)
	at knot//net.minecraft.class_1937.method_18472(class_1937.java:480)
	at knot//net.minecraft.class_638.method_32124(class_638.java:255)
	at knot//net.minecraft.class_5574.method_31791(class_5574.java:54)
	at knot//net.minecraft.class_638.method_18116(class_638.java:251)
	at knot//net.minecraft.class_310.method_1574(class_310.java:1901)
	at knot//net.minecraft.class_310.method_1523(class_310.java:1181)
	at knot//net.minecraft.class_310.method_1514(class_310.java:802)
	at knot//net.minecraft.client.main.Main.main(Main.java:250)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)

It is possible (nay, likely) that our good friend MehVahdJukaar has done something a bit silly on his end but the stacktrace brought me here so here is where my fix goes.

I also had to modify the build.gradle because it would fail if I didn't give it the modrinth token. Oh yeah and my editor wanted you to have some newlines at the end of your files as a gift.

jcomcl added 2 commits November 1, 2024 12:21
…fect and use a fallback default value. This occurs with the Supplimentaries slingshot and probably some other places too.
@MehVahdJukaar
Copy link

relying on a tick super method (or even baseTick) to be call can be brittle as nothing stops mods from not calling super. thats how inheritance works. A better way of doing this would be to use forge/fabric entity tick events, whose whole purpose is to offer a non mixin way to do this and a way that will be executed all the times for all entities.

@EssGeeEich
Copy link

This PR is the same that I would've proposed.

Hopefully this can be merged soon, as it's a very readable and understandable change that doesn't cause any side effects that I can ever think of, and only helps in making this mod more stable.

I hope this mod's development isn't stalled, in any case it'd be kind of @Chailotl to just merge this PR and release it as a minor patch.

...Pretty please?

@Poopooracoocoo
Copy link

Poopooracoocoo commented Apr 1, 2025

#41 has been compiled so you can use that easily

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants