micdoodle8 / Galacticraft

An advanced Space Dimension Mod for Minecraft
Other
617 stars 334 forks source link

Planet Map No Longer Zooms In or Out #1397

Closed ghost closed 9 years ago

ghost commented 9 years ago

as of the latest Galacticraft-1.7-3.0.7.256 the Planet Map No Longer Zooms In or Out?

radfast commented 9 years ago

The Planet Map has not been changed at all. Maybe another cause, did you change your keyboard settings?

ghost commented 9 years ago

Keyboard settings are the same, i put old version back in the map zooms in and out. new version dont, as far as i can find in the controls theres no key for the zoom on the planets map. its always been my mouse wheel up and down to zoom in and out, so not sure.

radfast commented 9 years ago

Which is the old version which works?

ghost commented 9 years ago

255 and lower

EzerArch commented 9 years ago

I'm using 3.0.7.254, the mouse wheel does zoom in and out.

radfast commented 9 years ago

I'm using 3.0.7.256 and the mouse wheel works for me - in both Galaxy Map (press the 'M' key) and when I take a rocket.

The mouse controls have not been changed at all, recently, it is literally impossible for this to have changed between versions .255 and .256. http://ci.micdoodle8.com/job/Galacticraft-1.7/changes

Maybe re-download the latest version all three files, could be a glitched download?

dj3520 commented 9 years ago

Confirmed zoom on 256 working.

drunksob commented 9 years ago

I'm using 1.7-3.0.8.263 and my scroll wheel doesn't zoom ether. It never has and I used several versions back to about 256. Im running the server on ubuntu 14.04 with bevo pack with one other added mod "4-Space 4.11" I suspect this could be the conflict as it also tries to add more planets to galactic craft. If I figure it out ill post back.

ghost commented 9 years ago

mine hasnt worked in a long time either. but radfast seems to think it was just me, but do you use more planets mod with galacticraft? i think that may ave something to do with it. if not the thing i do is i make my gui small before i launch.

drunksob commented 9 years ago

im trying to use: more planets 1.2.0, Galacticraft 1.7-3.0.8.266 with, and latest 4-space. As a work around-ish I've been setting the gui scale in esc menu to small that makes it so I can see most of the whole map zoomed way out but if I click a planet in sirious then it trys to soom in but zooms to empty space in the lower right. Im running these mods with bevo-tech in the at launcher on ubuntu if it helps.

radfast commented 9 years ago

You'll need to raise those issues with the authors of More Planets and 4-space.

(If there is a bug in Galacticraft which is stopping the API working as intended, I'm sure they will tell me)

drunksob commented 9 years ago

update re installed the whole server with just galactic craft 3.0.8.266 without moreplanets and 4 space no other mods at all... the problem persists no scroll zoom. the problem might have something to do with ubuntu LINUX not being able to read mstruetype fonts or have a translation problem. Have you tested this on linux? or could have an issue with atlauncher parsing correctly. Maybe you should actually test this against the launcher and OS mentioned, instead of pretending like the issue doesnt exist or blaming another mod just because its working for you.

radfast commented 9 years ago

Please fix your attitude, drunksob. We are not "pretending" or "blaming" anything, I call it how I see it. Now that you have identified that the issue arises with no other mods, then we can look into it further.

Does this happen in single player, or only on a server?

Does this happen using the vanilla Minecraft launcher?

Have you tested any other in-game features which make use of the scroll wheel?

ghost commented 9 years ago

radfast for me it happens on single player and multiplayer, all i have installed is galacticraft? the scroll wheel works fine for other things? is there any way you could add a key bind in the config to zoom? that may help test? like i said in the original post it used to work and now it dont? i will keep testing.

ghost commented 9 years ago

also just to mention, when injecting bytecode ive noticed that it only injects 4/6? any ideas. everything seems to work fine but the zoom.

radfast commented 9 years ago

4/6 is normal, that's the same for everyone.

The zoom thing is mighty strange. @Cracks777 are you also on Linux or using a non-vanilla launcher, like drunksob?

ghost commented 9 years ago

no i use win 7. using the offical launcher with forge 1307 installed

ghost commented 9 years ago

i can setup a package of the same mods i have on my server and you can join and test. all my friends have the same problem on the server

radfast commented 9 years ago

ok we will test some more, thank you this all helps. Yes, if you can zip up your modpack and put it onto Mediafire or similar, I can ceratinly test it next time I'm on my gaming PC. I don't need to join your server if you get the same issue in Single Player.

ghost commented 9 years ago

ok ill get them ziped up and get you a link

ghost commented 9 years ago

http://www.mediafire.com/download/us3wqfq1zri796c/Cracks777mods.rar

ghost commented 9 years ago

http://www.mediafire.com/download/aa6j5ikkzmxq0aj/config.rar

ghost commented 9 years ago

there is the complete mods folder and all config files

radfast commented 9 years ago

ok nice, thank you, I will test it when I am on my gaming PC, and if I can reproduce the problem then a fix should follow pretty quickly

drunksob commented 9 years ago

new info when starting to install other mods one by one to make sure nothing conflicts I found this error [Client thread/ERROR] [CodeChickenCore]: Unable to do mod description scrolling due to lack of stencil buffer. This "stencil buffer" is most likely the cause but code chicken is the only thing I've seen with an err acociated with it.

and sorry for the aditude, Ive had to basically strip down and rewrite 7 or 8 mods so far because of lazy coders, and they always seem to blame everything else and im getting a bit peeved. If you find a fix Ill be happy to make a donation so that your efforts are not in vien.

radfast commented 9 years ago

Ive had to basically strip down and rewrite 7 or 8 mods so far because of lazy coders, and they always seem to blame everything else

You shouldn't need to do that for Galacticraft. We aim for the mod to be playable by everyone, and therefore we do aim to fix all issues which are within our realm, even if it takes us time to get to them. We also appreciate that for every 1 person who takes the trouble to report an issue, there are probably another 100 players who have the issue and are annoyed by it but don't take the trouble to report it.

However, we can only fix issues which the developers are able to reproduce, and plenty of issues which get posted do turn out to be not Galacticraft issues.

The combined info which you and Cracks777 have posted is pointing to something here which is why I have re-opened this. It could also be 2 different, unrelated, causes of a similar issue. I will be testing his modpack later. Meanwhile any more info you can give to help to isolate + reproduce this issue would definitely be helpful and maybe get to a solution faster.

ghost commented 9 years ago

ill try without code chickencore

radfast commented 9 years ago

You have a "stencil buffer" error in your log, Cracks777?

ghost commented 9 years ago

not that i could find.

radfast commented 9 years ago

This is very weird. Testing the same build of Galacticraft on 2 different PCs, it zooms on one and not the other.

ghost commented 9 years ago

man i told you, its weird,

ghost commented 9 years ago

i think its a problem with a mod, if i take out all mods but galacticraft and its addons it works fine, as far as my testing goes, ive addaed a few mods back in such as liteloader and optifine and it still zooms but problem is i have a little over 100 mods and it starts taking long time to load so ill keep testing, im also wondering if https://github.com/micdoodle8/Galacticraft/issues/1382 is also caused by whatever is causing the zoom not to work?

radfast commented 9 years ago

@Cracks777 in your case the problem is EnderIO. The scroll wheel zooming works as soon as you pull EnderIO out of the pack. Quick research shows it has an item called a Yeta Wrench which has some functionality when you shift scroll, and the way they have coded that it blocks the scroll from getting to any other mod. You'll have to raise it with the EnderIO guys. It will be blocking all other mods, not only Galacticraft.

The reason is EnderIO reads the mouse wheel every tick, even though it is (mostly) not using it, and it makes it so its read of the wheel is one of the first thing which happens each game tick: https://github.com/CrazyPants/EnderIO/blob/master/src/main/java/crazypants/enderio/item/ToolTickHandler.java#L29

That is bad/selfish programming. It means no other mod can use mouse wheel - so whenever any other mod tries to read thewheel it will look like the mouse wheel did not move at all. (A mouse wheel read looks at how much the wheel moved since last time it was read.)

@drunksob I guess that may not help you unless you have EnderIO also? If it's not that, are you able to check whether the org.lwjgl.input.Mouse library functions correctly on your installation of Java? Mouse.hasWheel() needs to return true for Galacticraft map zoom to work.

ghost commented 9 years ago

thank you radfast, i will raise the issue with them and see what happens.

ghost commented 9 years ago

radfast is it to much of a problem to add a option in the config to have a button zoom?

radfast commented 9 years ago

@Cracks777 the problem it's time and updating that would be better spent on improvements to the mod which would help everybody, instead of making a workaround for a problem which we have not caused.

radfast commented 9 years ago

ok I thought of a partial fix, this will be in next Galacticraft build.

Basically the Galacticraft Map now checks the mouse wheel more often, so maybe 2 times out of 3 we get to it before EnderIO does. (The vanilla Achievements screen works the exact same way.) Zooming using the wheel may seem a little jerky / unresponsive with EnderIO installed, but at least it will work.

For the majority of players, who do not have EnderIO, this should make the map zoom movement a little smoother and more responsive, which is nice.

tterrag1098 commented 9 years ago

Is there some way to poll the mousewheel without interrupting other mods?

HenryLoenwind commented 9 years ago

getEventDWheel() seems to be the only other legit way to access the wheel. It returns a stored value that is updated every time an event is polled. However, Minecraft will check the wheel directly after polling and change the inventory item.

Third way would be to use ASM to access private int org.lwjgl.input.Mouse.dwheel.

Fourth way would be to only call getDWheel() if it also should be consumed.

radfast commented 9 years ago

@tterrag1098 hi and thanks for looking at this

Apart from HenryLoenwind's third suggestion I'm not aware of any way to do this polling without having a consequence.

The reason your current code causes a problem is it polls every tick, even when (I think) your mod is not interested in the mouse wheel - maybe even when the player did not craft a Yeta Wrench yet.

Your code also interferes with the vanilla Achievements screen for the same reasons. (There is limited zoom functionality in that still, because that polls the mouse wheel every frame, so it will still see maybe 2/3 of the mouse wheel movement although it's a little jerky - we have now copied that in Galacticraft.)

One suggestion: maybe your code could not poll the mouse wheel if the client has a currentScreen open? That would certainly help to ease the problem for special GUI screens, but not if there's another mod using the mousewheel in normal gameplay obviously.

The only other option I can see is to request that Forge poll the mouse wheel every tick and make the DWheel number available to all mods.

HenryLoenwind commented 9 years ago

Hi @radfast

I implemented a PR ( https://github.com/CrazyPants/EnderIO/issues/2051 ) to only pull the wheel if the player is sneaking with a yeta wrench/network tool in hand. I could add an additional check for an open GuiScreen, but I'd have to research how to do that.

About Forge: Polling getDWheel() is actually the wrong way to do it. Minecraft already is polling the events with getEventDWheel() in net.minecraft.client.Minecraft.runTick() (and a couple of GuiScreen classes). There's a hook for mods that want to use the wheel outside of GuiScreens. (Obvious: I just noticed it while writing this answer...)

radfast commented 9 years ago

sounds awesome.

GuiScreen check is (I think) as simple as seeing whether FMLClientHandler.getClient().currentScreen is non-null.

HenryLoenwind commented 9 years ago

The event was the solution. Much less code, no interference with other mods' GuiScreens, and only the usual "who gets to handle this event"-fighting between mods ;)

https://github.com/CrazyPants/EnderIO/pull/2052

drunksob commented 9 years ago

you fixed it? if not just a thought, you could change it to use AWSD keys to move the gui after double clicking a planet to zoom on, or you could maybe just pick another set of zoom keys like "+" & "-", or add + - gui buttons.

radfast commented 9 years ago

@drunksob The OP's issue is fixed. It's not clear whether or not your issue is fixed, but if not that appears to be due to lack of mouse wheel support on your local implementation of Java or its native libraries. I'm not willing to spend time re-coding Galacticraft to fix an issue which seems to be personal to you - maybe you can try a different Java runtime or update your mouse driver? If you want to code + and - gui buttons to have the same functionality as the mouse wheel, that's OK and a Pull Request would be welcomed if it's suitable for everyone, but be aware of possible conflict with the use of + and - keys by other mods (for example mini map mods).

drunksob commented 9 years ago

@radfast With respect. Im using java jre7 64 on win 7 fully updated client side, and the basic java jre7 and libs on ubuntu server side. What java are you using? and there's nothing wrong with my mouse drivers. When I get some free time I'll be happy to do a pull req and fix it for you. Im thinking a GUI button wouldn't conflict with with any map or other mods as its not a key keyboard key, and no one uses ASWD keys for anything while in map GUI, so that would also work. Also its not just me having issues with your gui, I've been all over 4-space and MorePlanets and so on other people have trouble getting your GUI to work with there mods easily, and in this very topic "Cracks777 commented 4 days ago radfast is it to much of a problem to add a option in the config to have a button zoom?", on the topic he created about this very issue. and to quote you your self "radfast commented 6 days ago "This is very weird. Testing the same build of Galacticraft on 2 different PCs, it zooms on one and not the other." Implementing these suggestion would make it easier to make addons and mods for GC, Increasing its popularity. scrl wheel is just a bad button set to pick, and AWSD function or click and drag would allow for adjusting for moders that get the zoom coordinates off causing you zoom into open space. Just food for thought no one likes a GregyGreg.

radfast commented 9 years ago

Just food for thought no one likes a GregyGreg.

lol, me neither.

But you never answered this question above:

@drunksob I guess that may not help you unless you have EnderIO also? If it's not that, are you able to check whether the org.lwjgl.input.Mouse library functions correctly on your installation of Java? Mouse.hasWheel() needs to return true for Galacticraft map zoom to work.

Are you saying you still have mouse wheel issues across multiple platforms, without EnderIO installed?

The zoom issue on add-ons appears to be an unrelated issue connected with map centering on different suns, but I'm not too sure because I have not yet tested that fully - to be fair, I'm always hopeful that one of the add-on authors will make a PR if there is something broken in the API which affects them.