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

autopickup plugin support #4

Open
KhaozFrost opened this issue Sep 19, 2019 · 6 comments
Open

autopickup plugin support #4

KhaozFrost opened this issue Sep 19, 2019 · 6 comments
Labels
plugin compatibility Bug or suggestion about compatibility with other plugins or mods

Comments

@KhaozFrost
Copy link

pls add support for
https://ore.spongepowered.org/Yeregorix/AutoPickup

@RedNesto
Copy link
Owner

By looking at the AutoPickup's code I find it surprising it does not work. I will look into it when I have time.

Also that's funny because I was refactoring a part of the plugin and I thought about adding a "drop in world" option to CustomDrops which already exists in FasthHarvest, I guess I'll add it then.

@KhaozFrost
Copy link
Author

KhaozFrost commented Sep 19, 2019

from my testing what happens in this example from me trying to mess around with the plugin for a better understanding of it

with autodrop on the overwrite=true option doesn't work. what happens is they still get the iron ore but it also spawns the iron ingot and cobblestone too but those dont go into the inventory by default. so yeah

blocks {
  "minecraft:iron_ore" {
    experience=5
    overwrite=true
    drops=[
      {
        type="minecraft:cobblestone"
        chance=25
      }
      {
        type="minecraft:iron_ingot"
      }
    ]
    money {
      amount=1
      currency = "economylite:coin"
      chance=50
      message="&aYou found {money_amount} Meltan Candy while mining!"
    }
  }
} 

@RedNesto
Copy link
Owner

RedNesto commented Sep 19, 2019

After some tests and changes to both AutoPickup and BoxOUtils I got it working, but I am not certain all those changes are good. The thing I do not understand is why items are duplicated, I still haven't found where the spawn part happens, because AutoPickup should already remove the spawned item.

Here are the modified plugin I got working:
AutoPickup - based on version 1.0.3.
BoxOUtils - Contains a bunch of quite important changes that are not released yet but work fine from what I can tell.

Could you test with these custom and tell me if it works fine for you too?

@RedNesto RedNesto added the plugin compatibility Bug or suggestion about compatibility with other plugins or mods label Sep 19, 2019
@KhaozFrost
Copy link
Author

KhaozFrost commented Sep 19, 2019

the duplicated item must happen within autopickup as the plugin from my understanding equivalent removes the block and gives them the item/items
so whats happening is auto pickup gives them the iron ore + box o utils gives them the items too. it now goes directly into inv which is great but the problem is still that trying to overwrite and make it where like iron ore in the example only gives whats defined rather then both. also it appears that the exp spawned with box-o isnt following autopickup either.

id also like to know about how to do unsafedamage of leaves and such aswell as if its possible to add a chance on the commands if they were to be added

@RedNesto
Copy link
Owner

I am afraid this issue cannot be solved easily, the only way this could work would be to tell AP to not track blocks or mobs drops if a CustomDrop will be processed and let Box O Utils add items to the inventory itself.

I am not sure if there is a proper way to do it, and it will definitely require changes to AP.

@KhaozFrost
Copy link
Author

hm i see. yeah. i think the changes you made to ap may have unless its just broken in ap already cause the blocks to not search inventory and stack with same block if its not max stack. instead it'll just fill the inventory hotbar before targeting the block stack in the inventory itself. kinda wack but will submit a ticket over it in AP just incase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin compatibility Bug or suggestion about compatibility with other plugins or mods
Projects
None yet
Development

No branches or pull requests

2 participants