Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

right-click harvest crops disabling ability to open backpack/ender pouches/inventory items #87

Closed
usafphoenix opened this issue Apr 28, 2015 · 13 comments

Comments

@usafphoenix
Copy link

custom modpack that contains a lot of mods, but if i enable click-to-harvest, and then do-so in-game, thereafter i am unable to open my golden bag, ender pouch, or inventory container i'm holding without closing the client and rebooting. Problem is, i rather LOVE the click-to-harvest option and it makes harvesting food not a total pain in the ass...
without it, and to have spice of life enabled, makes getting food items take up all my time...
and if i remove those, it makes minecraft too easy again....

@usafphoenix
Copy link
Author

no crash log as it doesn't cause a crash, but not sure why other right-click events fail to function after using the hunger overhaul click-to-harvest

@squeek502
Copy link
Collaborator

Can you try setting foodsUnplantable to false in the config and see if it resolves the issue?

@squeek502
Copy link
Collaborator

Hm, actually, that couldn't cause it. Can you post a full mod list? Do you have any mods installed that might alter how time passes?

@usafphoenix
Copy link
Author

to save time, i removed the 1.7.10 from the mod names. each one was (at the time downloaded) the newest release for compatibility with MC1.7.10 and latest forge [some updates required after forge's liquid update----namely extrautilities]

Forge 13.3.1373
Infinibows
AOBD 2.5.0
AppleCore 1.1.0
AromaCore 1.0.2.13
AromaDimensional World
AromaBackup0.0.0.5
Automagy 0.22.2
Baubles 1.0.1.10
Bibliocraft 1.10.3
biblioWoods[BOP]v1.9
biblioWoods[Forestry]v1.7
BiblioWoods[Natura]v1.5
BigReactors0.4.2A2
BiomesOPlenty 2.1.0.1067
BloodMagic1.3.1-7
CarpentersBlocks v3.3.6
Chisel2-2.3.7.34
ChiselFacades2.10-Cricket
CofHCore3.02-262
CofHLib1.0.1-151
CodeChickenlib1.1.3.127
ComputerCraft1.73
CookieCore1.3.1-5
DecoCraft1.12b
DragonsRadioMod1.6.3
EnchantingPlus3.0.2-d
EnderIO 2.2.8.367
EnderTech 3.2.382
Ex-Astris 1.16-31
Ex-Nihilo 1.38-29
ExtraCells 2.2.58b88
Flesh2Leather
Forbiddenmagic 0.562
Galacticraft-Planets3.0.11.306
GalacticraftCore3.0.11.306
MicdoodleCore3.0.11.306
Gravestone2.12.2
IguanaTinkerTweaks2.1.2
InventoryTweaks1-59dev-152
IronChestMod
Jabba1.2.1a
JourneyMap5.0.1unlimited
LuckyBlocks
mantle 0.3.2
Mekanism 8.1.1.217
MekanismGenerators 8.1.1.217
MekanismTools 8.1.1.217
Metallurgy-4.0.8.97
MetallurgyCore4.0.4.18
MineFactoryReloaded2.8.0-104
MoVillages1.3.1
MoreChisels1.0-20
MorePistons1.5.2.0
MorphBeta0.9.4
MrCrayfishFurnitureMod 3.4.7
MrTJPCore1.0.5.11-universal
NetherOres2.3.0-12
NodalMechanics1.7-1.0-7
NEI 1.0.4.95-universal
ObsidiPlates 3.0.0.18
Openblocks1.4.1
OpenComputers1.5.7.14
OpenModsLib0.7.1
OpenperipheralAddons0.3.1
OpenPeripheralCore1-1
OpenPeripheralIntegration0.2.1
OreDictionaryConverter1.6.1
Origin3.5.1
PamsHarvestcraft1.7.10h
Pneumaticcraft1.6.6.68
projectblue1.1.4
projectRed4.5.16.77 (all)
RandomThings2.2.4
ropePlus
Schematica-Mod
SimplyJetpacks1.2.0
SolarFlux0.5a
SpiceOfLife1.2.3
StevesFactoryManagerA92
StevesWorkshop0.5.1
Sync4.0.0
TConstruct1.8.3b
TMechworks0.2.14.100
TWarden1.1.1
Thaumcraft4.2.3.5
ThaumcraftGates
ThaumcraftMobAspects
ThaumicExpansion
ThaumicExploration
ThaumicTInkerer
ThermalDynamics1.0.0-122
ThermalExpansion4.0.1-182
ThermalFoundation1.0.0-81
WAILA1.5.10
Waila Plugins0.0.1-14
Waila Harvestability1.1.2
Wawla1.1.1
SecurityCraft1.7.4.1
WR-CBE-1.4.19 (wireless redstone chickenbones)
treeCapitator2.0.4
appliedEnergistics2rv2beta-8
autopackager1.5.3
backpack2.0.0-1.7x
bdlib-mc1710-1.7.1.71
buildcraft6.4.11
denseores-1.5
dimensionalAnchor59.0.2
forestry3.5.2.10
funkylocomotion beta5a
iChunutil4.2.2
immibiscore59.0.8
immibis-microblocks59.0.5
immibis-peripherals59.0.2
liquidXP 59.0.0
magicalCrops4.0.0 public beta 1
malisis core11.4
natura2.2.0.1
neiAddons1.12.5.17
secretroomsmod4.7.1409
supercraftingframe10.1
thaumichorizons1.1
ttCore0.1.0-67
witchery0.24.0
zeldaswordskillsaddon0.0.4a
LunatriusCore
storagedrawers1.3.9
ancientwarfare2.4.83-beta
botania r1.6-181
codechickencore 1.0.5.37
draconicevolution v1.0.1-RC5
EnderStorage1.4.7.32
MFRCompat Magical crops v1.2.0
Nei integration 1.0.9
extrautilities1.2.4b
mystcraft0.11.5.00
zeldaswordskills2.2.5c
Enchiridion2-1710-2.0.1
extraTIC 1.4.1
Steve'sAddons0.10.4
hungerOverhaul1.7.10-beta6
ProjectE PE1.4.5
Railcraft9.6.0.0
TicToolTips1.2.4
malisisDoors1.7.1

@usafphoenix
Copy link
Author

also foods unplantable is set to false. Also, while i could see how a ticking / time distortion issue could cause input to not function properly, ticking-issues usually result in an immediate crash. I'll run a few more tests to see if anything else in the world causes inventory containers to be un-openable, or what happens under other case-scenarios.

@usafphoenix
Copy link
Author

i'm not familiar with some of the inner workings of the mods i got---if there are any that you think i should remove or temporary disable for testing purposes, let me know. i can take those out, start a new world, and see what happens :)

Since this is a personal project, i can't expect anyone else to do the heavy lifting for me. but any suggestions or insight would be VERY helpful

@usafphoenix
Copy link
Author

I know randomThings2.2.4 adds in bloodmoon, though i'm not sure if that sets daylightCycles to false during a bloodmoon or not---not sure how that works.

@squeek502
Copy link
Collaborator

The issue is HO is using an unfortunate workaround for client-server desync due to some Forge bugs with the right click event.

See https://github.com/progwml6/HungerOverhaul/blob/master/src/main/java/iguanaman/hungeroverhaul/util/IguanaEventHook.java#L330-L337:

        // slightly hacky workaround:
        // if RIGHT_CLICK_BLOCK is canceled or useItem == Result.DENY, then
        // the right click falls through to RIGHT_CLICK_AIR. To correctly cancel the RIGHT_CLICK_AIR,
        // we need to make sure that it is happening on the same tick that the right click was performed
        if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_AIR && lastRightClickCrop == event.world.getWorldTime())
        {
            event.setCanceled(true);
        }

And, if this is what's being triggered (which it seems to be the most likely cause), then that means that somehow event.world.getWorldTime() is never changing from when you right clicked a crop.

So, that's my theory, and if it's true, it's a pretty crazy incompatibility that might be difficult to track down.

Can you do me a favor and try reproducing the bug with just AppleCore, HO, and ExtraUtilities (or whatever mod you want that adds a bag that is affected)?

@usafphoenix
Copy link
Author

I figured it out (or at least, i think i did)
I had been playing with gamerule doDaylightCycle = false.
If the option is false and right-click-to-harvest is enabled....you wont be
able to right click bags until you set doDaylightCycle = true.
figured this out once i removed all the mods and it worked....added the
most-likely culprits and it still worked fine...until after i did my usual
gamerule changes (mobgriefing off, keepInventory, and "always sunny"....and
then i was like: OHHHHHHHHHH.)

On Fri, May 1, 2015 at 4:23 PM, Ryan Liptak notifications@github.com
wrote:

The issue is we're using an unforunate workaround for client-server desync
due to some Forge bugs with the right click event.

See
https://github.com/progwml6/HungerOverhaul/blob/master/src/main/java/iguanaman/hungeroverhaul/util/IguanaEventHook.java#L330-L337
:

    // slightly hacky workaround:
    // if RIGHT_CLICK_BLOCK is canceled or useItem == Result.DENY, then
    // the right click falls through to RIGHT_CLICK_AIR. To correctly cancel the RIGHT_CLICK_AIR,
    // we need to make sure that it is happening on the same tick that the right click was performed
    if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_AIR && lastRightClickCrop == event.world.getWorldTime())
    {
        event.setCanceled(true);
    }

And, if this is what's being triggered (which it seems to be the most
likely cause), then that means that somehow event.world.getWorldTime() is
never changing from when you right clicked a crop
https://github.com/progwml6/HungerOverhaul/blob/master/src/main/java/iguanaman/hungeroverhaul/util/IguanaEventHook.java#L389
.

So, that's my theory, and if it's true, it's a pretty insane
incompatibility that might be difficult to track down.

Can you do me a favor and try reproducing the bug with just AppleCore, HO,
and ExtraUtilities (or whatever mod you want that adds a bag that is
affected)?


Reply to this email directly or view it on GitHub
#87 (comment)
.

@usafphoenix
Copy link
Author

so maybe add an info to the config file next to the "right-click-to-harvest" that doDaylightCycles must not be disabled. because the way your function is written, it appears to cancel right-click events if a crop was the last thing clicked on and the time hasn't incremented. (or at least, thats what i think the function does. i'm no java-expert)

@usafphoenix
Copy link
Author

i'll continue testing this over the next few days just to be sure, but i'm pretty certain now that this is all it was.

@squeek502
Copy link
Collaborator

Very interesting, will look into that more and see if I can make it work with doDaylightCycle = false. Thank you for tracking it down.

@squeek502
Copy link
Collaborator

Fixed by #104

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

No branches or pull requests

2 participants