Ender IO Zoo

Ender IO Zoo

961k Downloads

Vacuum Chest NBT tag check

comp500 opened this issue ยท 2 comments

commented

Issue Description:

This isn't a bug in EnderIO per se, but it does affect it's usage with my mod. I'm making a mod called Demagnetize which applies the PreventRemoteMovement NBT tag to items around the Demagnetizer, which prevents them from being picked up from Item Magnets.

This behaviour works very well with the Electromagnet from this mod, but the Vacuum Chest also checks this NBT tag. As it isn't a magnet, it shouldn't be prevented from picking up these items; however removing this check would break compatability with Immersive Engineering's Conveyors, as it stops items being removed from conveyors. I have posted a similar issue on the CoFH issue tracker for the Vacuumulator, as it is the only other "Vacuum" block that checks this NBT tag.

I therefore propose that a check for an extra NBT tag be added, called AllowMachineRemoteMovement (or similar) that permits machines (but not item magnets) to remotely move items with it. It should only be checked if PreventRemoteMovement already exists on the EntityItem, to enable compatibility with existing mods.

If PreventRemoteMovement exists and AllowMachineRemoteMovement also exists, machines can remotely move items, but magnets cannot. If PreventRemoteMovement exists but AllowMachineRemoteMovement doesn't exist, neither machines nor magnets can remotely move items.

What happens:

The Vacuum Chest doesn't pick up the items.

What you expected to happen:

The Vacuum Chest should pick up items that have been Demagnetized, as it is not a magnet.

Steps to reproduce:

  1. Place a Vacuum Chest
  2. Place a Demagnetizer within 4 blocks
  3. Drop an item
  4. The item is not picked up

Affected Versions (Do not use "latest"):

  • EnderIO: 5.0.26
  • EnderCore: 0.5.31
  • Minecraft: 1.12.2
  • Forge: 14.23.4.2715
  • Demagnetize: 1.0.0.0
  • SpongeForge? no
  • Optifine? no
  • Single Player and/or Server? Singleplayer tested (applies to both)

The main code that handles this is in EnderCore.

Your most recent log file where the issue was present:

https://paste.ee/p/DB7Dt (probably not that useful though, there are no relevant errors in it)

commented

It appears that this wasn't implemented correctly for the Vacuum Chest, and instead it runs the method shouldAttract(@Nullable BlockPos pullerPos, @Nullable Entity entity, boolean isMachine) with false on the isMachine argument, causing it to not suck any items "modified" by any demagnetization mod.

Is this intentional?

commented

Darn, I messed up. Sorry and thank you.