MrCrayfish's Vehicle Mod

MrCrayfish's Vehicle Mod

11M Downloads

Issue with Casting a Float to an Integer

TyrellPlayz opened this issue ยท 14 comments

commented

This happened in CUBG. I posted it here cause it has something to do with the vehicle mod.


java.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.Integer
	at com.mrcrayfish.vehicle.entity.EntityAirVehicle.getFlapDirection(EntityAirVehicle.java:234)
	at com.mrcrayfish.vehicle.entity.EntityAirVehicle.updateLift(EntityAirVehicle.java:192)
	at com.mrcrayfish.vehicle.entity.EntityAirVehicle.updateVehicleMotion(EntityAirVehicle.java:56)
	at com.mrcrayfish.vehicle.entity.EntityVehicle.func_70071_h_(EntityVehicle.java:205)
	at net.minecraft.world.World.func_72866_a(World.java:1990)
	at net.minecraft.world.World.func_72870_g(World.java:1952)
	at net.minecraft.world.World.func_72939_s(World.java:1756)
	at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1845)
	at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1096)
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:397)
	at net.minecraft.client.main.Main.main(SourceFile:123)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)``
commented

Experiencing the same issue (see the closed issue referenced above).

Restarting the server seems too occasionally fix the crash. You just have to hope you get lucky.

If you have multiple planes on your server, however.. this might not be possible, as the issue is probably entity specific.

commented

This issue is still persistent. Here is two of my crash reports. Seems to still be the plant.

https://pastebin.com/tU5HwZGF
https://pastebin.com/hQDj4JJS

commented

Issue is happening with the Craft of the Titan's Gog Remix mod pack. The modpack has a plane parked at a Mall. Crash log: https://pastebin.com/vY3U645e?fbclid=IwAR2QtLZ0M9MIN1BNvGCbSUEm37QAA_5RbTC-tUREj9g2nKYqMe9bv_zfhRA

commented

Can anyone confirm this in the latest version? I fixed an issue when DataParameters were actually registered incorrectly.

commented

Marking this as fixed.

commented

Confirmed as working

commented

The exact same thing happened for me in a LAN world. Crash report: https://pastebin.com/ScdGANMd

commented

This issue still exists in the current downloadable version.
https://pastebin.com/378XaRf2

commented

I could get it working by downgrading forge to 2705. This seems to have something to do with the current forge version, especially the data manager that seems to have changed a bit.

commented

@JanHolger I've discovered that DataParameters are handled very poorly in Minecraft's code. If they aren't registered in the same order as the server, then problems can occur. I will look into the issue and see if I can find a fix because it only seems to be the Plane causing the problem.

commented

@MrCrayfish Ty because i love this plane :)

commented

@MrCrayfish Ty because i love this plane :)

As I said already, you can use an older forge version (2705 is working for me) to get it working.

commented

With forge version 2705 crash too.
https://pastebin.com/MRhDXvFA

commented

@MrCrayfish Ty because i love this plane :)

As I said already, you can use an older forge version (2705 is working for me) to get it working.

same on version 2705....