VanillaAutomation's filtered hopper slots don't work with RMBTweak
ExcitedName opened this issue · 8 comments
Minecraft: 1.12.2
Forge: 14.23.5.2768
MouseTweaks: 2.10-mc1.12.2
VanillaAutomation: 1.12.2-1.5.5
VanillaAutomation has a filtered hopper which works like most other filtering systems out there. There are 5 additional slots below the standard hopper slots to place ghost items. When the RMB tweak is on, charcoal and gold ore will not stay in the filter slots. When I re-open the gui they are gone. So far they are the only two items that do this, I haven't tested too many. When RMB tweak is turned off on the other hand, the items stay in the filter slots, no problem. When RMB is turned off and an item is placed in the filter slots, then the RMB tweak is turned back on, the item is still there. So I can just turn it on and off as needed when filtering my hoppers at the moment. Thanks for your time.
Have you reported this to VanillaAutomation too? It's strange that just having RMB Tweak on causes issues.
No, I have not. I have no problem doing so. I will say, and this is not an attack, that I have had issues with this in the past, I think. I had a hard time getting stable mod packs together in 1.7.10. I would play for so long and then all of a sudden a fatal, world destroying, crash would occur. I started to notice a pattern that it would only happen when I would RClick on a modded tileEntity, Flan's Mods loved to do it. I eventually figured out that it was the RMB tweaks setting of this mod. When I turned it off, all of all of my mod packs stopped having this crash. I have only coded a little on my own, there is A LOT I am unaware of. I read issue #15. It explains a lot of what I mentioned above. But I find myself unsure of where to go from here, lol. I'll surely report it to VanillaAutomation. But what about any other mods in the future? Are you suggesting that I be aware of issue #15 and my issue and report them to those mod authors individually? Just out of curiosity, is there not a way around this on your end? Or is it one of those complex answers that requires more intimate knowledge of coding to fully understand? Thanks again for your time.
Well, ideally Mouse Tweaks should not cause any crashes and behave identically to the player clicking manually. Unfortunately, this isn't really possible in general because:
- other mods may have bugs or make assumptions about how Minecraft player interaction works which don't hold under Mouse Tweaks (it's not really a good idea to attempt to directly click the mouse in Mouse Tweaks so it resorts to emulating the slot clicks);
- Mouse Tweaks itself can have bugs or make assumptions about the containers' behavior that don't hold for some modded containers.
So crashes like this are bound to happen. The best we can do is figure out who's more wrong in every particular case (MT or the other mod) and fix it on that side.
That makes complete sense. The assumptions on both ends and you emulating the slot clicks explains a lot. I completely agree with you in regards to the last part. Crashes are bound to happen. I try my best to report them appropriately and help the authors gather as much information as possible to determine the best course of action. To be honest this is the part about the modded MC community that I love so much. A bunch of random strangers from all over the globe working together towards a common goal, having a great time on minecraft. Whether it be creating mods or testing and bug reporting. Happy Coding :-)
public class SlotGhost extends Slot {
public SlotGhost(IInventory inventoryIn, int index, int xPosition, int yPosition) {
super(inventoryIn, index, xPosition, yPosition);
}
@Override
public boolean canTakeStack(EntityPlayer playerIn) {
putStack(ItemStack.EMPTY);
return false;
}
@Override
public boolean isItemValid(ItemStack stack) {
ItemStack s = stack.copy();
s.setCount(1);
putStack(s);
return false;
}
}
This is the entire code for the ghost item slot, I think I even took some inspiration™ from buildcraft. Maybe you can find something that would conflict with Mouse tweaks
Thanks for that @universal. Hopefully maybe between you and @YaLTeR might be able to straighten this out. Thank you both for your time.
I just checked out Buildcrafts SlotGhost.java and it's a bit different, so it might actually be my implementation.