Simple Parts Pack for Flan's Mod

Simple Parts Pack for Flan's Mod

903k Downloads

Vehicle Secondary Guns not functioning

Glowstonesword opened this issue · 13 comments

commented

Version: 5.5.2 (main download from https://flansmod.com/download)

Minecraft Version: 1.12.2

Issue: Secondary guns for any vehicle do not seem to function; while (for example) bombs function on right-click for planes with them, using left click, right click or the default hotkey (have tried changing the hotkey but to no effect) does not fire the secondary guns. A good example is the Fokker's machine guns not firing as they count as a secondary gun.

commented

so this bug was never solved? i'm experiencing the same issue with my bomber and all my vehicles, they don't shoot projectiles rather the projectiles don't leave from the machines (tanks/airplanes/ground turrets) and I have the beta v9. Does anyone know what might be causing this issue. I know about the issue with malisis doors mod problem, but is there something I can do now that would go around this bug?

commented

When I try to spawn the vehicles, they don't appear, only their shadows appear. Previously the game crashed and closed after I downloaded the latest mod version of Flan, now the game no longer crashes but the bug remains
If anyone knows how I can fix this bug can you tell me here now please

commented

I have made SOME progress fixing this, but I'm not experienced with forge enough to go the whole way. The main issues are in EntityDrivable.java's shootEach() method. The first issue, which I managed to solve had to do with Vectors. the gunVec Vector seems to be a local vector, and is never added to the player's coordinates, so the gunVec points to coordinates within a few blocks of 0,0,0 (Think -2, 1, 2.5 instead of the vehicle's position of 536, 64, -1850). I solve this by instead doing this for gunVec:

Vector3f GunVec = Vector3f.add(new Vector3f(posX, posY, posZ), getOrigin(shootPoint), null);

I used a debug chat message to tell me where the bullet would hit.

https://gist.github.com/coldblade2000/59ba2acf7420bb201df7862fea303bf0 in line 615

Finally, this is the main problem I've noticed. Flans tries to use ServerHandleShotData in ItemGun to register the bullets, but then ServerHandleShotData quickly returns nothing, as the first thing SeverHandleShotData does is check if the "entity" given is an instance of EntityPlayerMP (which it isn't, its a tank, plane, etc). Thus, nothing else runs. I can go further into detail if needed. Point is, the shotData is just never handled, thus nothing else happens

Edit: I realize the code is badly formatted, give me a sec

Edit 2: https://gist.github.com/coldblade2000/59ba2acf7420bb201df7862fea303bf0

commented

Any progress on this? I'm using the 1017 fix and I'm having this issue with all vehicles.

Apache won't fire Hellfires or Hydras but the co-pilot can fire the turret, Bofors won't fire etc. #

commented

@Simpyo the guns were broken again in the version for #1017 I'll publish a new beta version on here later today with working vehicle guns.

commented

Hello im completely new to all this, and i have no idea how this works, but I have the same Problem. @ChrisLane could you explain to me how i use your solution?

commented

@itsyaboiiOliver Download the latest version of the mod and content packs from here: https://github.com/FlansMods/FlansMod/releases

Though supposedly things work better in beta 3 so you might want to try that.

commented

Ok so i can download those, but like the bugfixes things? More down the page i can download the mod, are the fixes already in there?

commented
commented

Hi, im trying to install the beta version, but i dont know how to do it, there is a video tutorial "How to install BETA version"??

commented

If you need a video tutorial, you are to my knowledge out of luck
However this should cover all steps and explain them in a understandable manner:
https://github.com/FlansMods/FlansMod/wiki/Installing-FlansMod

commented

Thx, but i dont know what to do with this folder
15877487509675437250031271604952

commented

I do not know how you acquired that folder. Did you follow the steps described in the wiki, and if so at what step are you