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

Voiding Drop Filter rework: tooltips, prevent looping pick up with magnet, fix crash moving filter while its GUI is opened #2

Merged
merged 6 commits into from Jun 17, 2023

Conversation

wlhlm
Copy link
Member

@wlhlm wlhlm commented Jun 17, 2023

Some changes to remove some of the quirks of the (Voiding) Drop Filter:

  1. Rework Voiding Drop Filter pick up logic: this borrows from the /dev/null from OpenBlocks, and instead of canceling the ItemPickUpEvent, it just sets the item stack to 0. Previously, using the Voiding Drop Filter in combination with a magnet would lead to an item getting stuck being picked up continuously.
Minecraft.1.7.10.2023-06-16.22-31-35.mp4
  1. Add a brief description of what the Drop Filter does to its tooltip

  2. Rework items with GUIs to prevent moving them around while the GUI is opened. This is based on the work in Prevent the Ore Finder Wand from imploding IFU#13

Closes GTNewHorizons/GT-New-Horizons-Modpack#13685

There was a bad interaction between the Voiding Drop Filter and a magnet
such as the Draconic Evolution Item Dislocator where it tries to pick up
a dropped item repeatedly in a loop. This changes the logic to mimic the
/dev/null from OpenBlocks, which instead of canceling the drop event,
just sets the item stack to 0. This seems to work better with magnets.
There are some additional checks that are necessary to prevent moving of
an item from the hotbar while its GUI is open. This is necessary for
some other items as well, so move the functionality into a new base
class.
@wlhlm
Copy link
Member Author

wlhlm commented Jun 17, 2023

There seems to be a CI error unrelated to the changes in this PR during "Run server for 1.5 minutes":

...
mkdir run
echo "eula=true" > run/eula.txt
timeout 90 ./gradlew runServer 2>&1 | tee -a server.log || true
shell: /usr/bin/bash -e {0}
env:
  JAVA_HOME: /opt/hostedtoolcache/Java_Adopt_jdk/8.0.372-7/x64
mkdir: cannot create directory ‘run’: File exists
Error: Process completed with exit code 1.

I've tried to rerun the jobs and it's the same error.

@wlhlm wlhlm changed the title Voiding Drop Filter rework Voiding Drop Filter rework: tooltips, prevent looping pick up with magnet, fix crash moving filter while its GUI is opened Jun 17, 2023
@eigenraven
Copy link
Member

The gha workflows need to be updated to the ones from examplemod, that bug has been fixed already

@Dream-Master Dream-Master merged commit cf90410 into master Jun 17, 2023
1 check passed
@Dream-Master Dream-Master deleted the drop-filter-magnet-fix branch June 17, 2023 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants