FlansMods / FlansMod

Flan's Mod for Minecraft
Other
232 stars 149 forks source link

Vehicle Secondary Guns not functioning #910

Closed Glowstonesword closed 5 years ago

Glowstonesword commented 6 years ago

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.

coldblade2000 commented 5 years ago

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

Simpyo commented 5 years ago

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. #

ChrisLane commented 5 years ago

@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.

itsyaboiiOliver commented 5 years ago

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?

ChrisLane commented 5 years ago

@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.

itsyaboiiOliver commented 5 years ago

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?

ChrisLane commented 5 years ago

The bug fixes are in those mod versions

Sent from BlueMail

On 21 Jun 2019, 18:49, at 18:49, itsyaboiiOliver notifications@github.com wrote:

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?

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you were mentioned.
Reply to this email directly, <a href="https://github.com/FlansMods/FlansMod/issues/910?email_source=notifications&amp;email_token=AAHB3IZA6BYSDH3ED7DQI2LP3UIEBA5CNFSM4E7R3NY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYJEK2Y#issuecomment-504513899">view it on GitHub, or <a href="https://github.com/notifications/unsubscribe-auth/AAHB3I7UT6ULQDF4QCFOF43P3UIEBANCNFSM4E7R3NYQ">mute the thread.<img src="https://github.com/notifications/beacon/AAHB3IZUUGK66UQIVJGQZV3P3UIEBA5CNFSM4E7R3NY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYJEK2Y.gif" height="1" width="1" alt="" />

Datboi727 commented 4 years ago

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"??

Liruxo commented 4 years ago

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

Datboi727 commented 4 years ago

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

Liruxo commented 4 years ago

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

Xeladin commented 1 year ago

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?

RafaelJunior1 commented 1 year ago

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