Magnet upgrade performance issues
Stalkstalks opened this issue ยท 16 comments
When I wander past my mob farm with a wireless crafting terminal with a magnet upgrade installed, the magnet upgrade seems to try to pull items from the mob farm into my inventory, through the walls that contain the mobs.
This results in a lot of noise as well as a big performance hit - to the point where the game stops letting me interact with the world. (I was trying to turn the mob farm off, and the lever wouldn't respond at all for several seconds, etc. After quite a bit of time things suddenly snapped forward, though, when I managed to stuff the terminal into a bag.)
I also noticed this happen once when I went into the nether and a nitro creeper detonated near me - I'm assuming it was related to the netherrack that was dropped, though obviously fewer items were dropped and nothing should have kept me from picking them up. I couldn't get sub-inventories to open that time, so I tried just throwing the terminal away - this didn't work. After restarting the problem was gone but the terminal had been deleted
In any case, something about the way the magnet upgrade works seems to cause serious performance issues at times.
you can set the magnet to whitelist mode..add items to be put into ae system to the filter (ope filter gui by right-click)..then crouch+right-click to change mode to "Magnet Card Activated - Items not stored in AE network will be left on ground", this will essentially deactivate the magnet except for items you want to be picked up. in 1.4b, there is a bug where you must initially set the magnet up while having it in-hand before you can set those options via the keybind. I'm working diligently to get v1.5b out tonight
I tried this using a whitelist as well as "extra items left on ground" mode. It still happens, even with the hotfix you just released.
Actually, it doesn't seem to depend on the walls - I'll just run around with the thing, killing or mining, and usually it will as expected for a little while (and while it does, it's a pretty excellent item magnet) but then, for some reason I can't understand, upon some random drop it will freak out, play popping noises endlessly, and lag the game out for several seconds. It seems to happen a lot more when multiple items are dropped at once.
The noises are localized - I can walk to and from the point where the items dropped, and the noise will get quiter/louder based on how close I am. It seems that the magnet keeps trying to pick up something that isn't there to be picked up anymore?
What are your PC specs? mainly cpu/ram? The part that collects the items is from @jotato's QuantumFlux mod. I've had this happen as well, but only while using vein miner in Project Ozone. It actually did cause my game to freeze up on two different occasions. Are you using vein miner when this happens? Also, are you saying that when you have the magnet in Whitelisting mode it tries to pick up non-whitelisted items? I've tested this thoroughly and haven't had an issue.
there are a few things I can try..what sets this method apart from other methods is that most other magnets draw items toward the player and let the vanilla item pickup mechanic take care of picking the item up.,.this is why Botania's magnet will have items follow you when your inventory is full...being that this magnet inserts items into the AE network, I couldn't go this route even if I wanted to. I'll lok into it though
The "extra items left on ground" mode seems to work correctly on 1.5.6b, leaving most things on the ground.
I can still reproduce the clacking hanging mess pretty easily - two quick ways, for example:
- get a wireless crafting terminal, install infinity upgrade and magnet upgrade (here set to whitelist with an empty whitelist, and "extra items added to inventory,"
- Get Tinker's construct hammer
- walk up to 3x3 flat stone surface
- hammer surface until blocks break
- experience noisy hang
- spawn in thaumcraft loot bag
- use loot bag
- experience another noisy hang
It seems that the hangs vary in length - and that if I flee the area where the hang started as soon as it starts, it ends sooner (though not immediately after leaving range, and I can hear the noise continuing to run when coming close to the point the hang began, until it is over)
Minecraft is running on a phenom II, 3.3 ghz, with 4GB of ram. I'm not using veinmeiner. The issue so far only occurs when multiple items drop at once, like when an explosion goes off, when I mine using a 3x3 method (the one I tested with was ars magica mining spell) or, sometimes, when mobs are killed.
I think that the iterator for entities in range is returning something it shouldn't, and getting the while(hasNext) loop to hang for a while. Hopefully you can identify what, but if not, maybe the issue could be sidestepped by adding a limit to the number of dropped items the magnet will examine in a given tick?
the filter is functioning correctly though? I've got some ideas on fixes..the hard part is not being able to reproduce what's happen consistently..I'll get something going..if veinminer has a deobf(dev) version, i'll throw that into my dev env and work on this to see if I can reproduce the problem..if I can then I'll do what I can to resolve it
Using a whitelist filter, it only adds whitelisted things to the AE network, so that seems to be functioning properly.
Just now, it seems that even when set to "extra items left on ground," it picks up stuff and puts it in my inventory, so maybe that part isn't working right?
honeslty..i don't even remember lol..check to make sure with v1.7b i didn't use tinker's tools, but used the draconic staff instead..I also turned the magnet off and then dropped 2000+ sandstone blocks on the ground and then turned the magnet on and had no issues
Unfortunately it still seems to be happening for me on 1.7b... looking at your commit, the only change to the magnet source is a check for creative mode. Maybe your fix didn't get included?
wow..ok..so I just used the draconic staff and I cannot believe no one else has reported this..i'll have a fix asap