OHakimen / MorePeripherals

Adds new peripherals for CC:Tweaked
MIT License
8 stars 2 forks source link

Java exception when combining items with anvil interface #20

Closed crazyvinvin closed 1 year ago

crazyvinvin commented 1 year ago

Hello,

I'm trying to combine items using the anvil interface, but can't get it to work. This is the setup i'm using: image The lua function looks like this: anvil.combine("minecraft:chest_3", 1, "minecraft:chest_4", 1, "xp_collector_0")

This throws a java exception: image

OHakimen commented 1 year ago

Hello, it uses 8 bottles of enchanting per combine, it can't interface directly with the collector

here is the docs for the combine method https://jheffersonmarques.github.io/More-Peripherals-Docs/peripherals/anvil_interface/

combine(from:string,fromSlot:number,resources:string,resourceSlot:number,xpSource:string) -> Combines two items, one from the first input, and other from the resources input, using 8 bottles of enchanting from the xpSource inventory

crazyvinvin commented 1 year ago

I'm still experiencing the same problem, I tried seperating all the peripherals like this: image But it's still throwing the same error as before and I'm quite sure I have the combine method correct. I threw a bunch of experience bottles against the xp collector and the getCurrentXP() method returns 427. When calling dumpXP() on the xp collector I don't see any xp coming out, it just deletes it all (sets the current xp to 0). I also have one diamond helmet in one chest, and a prot 3 book in the other chest.

crazyvinvin commented 1 year ago

Nevermind, It works now. I had to replace the xp collector with a chest full of experience bottles. (I think that might be what you meant).

On a side note: Do you have any idea when a new version for 1.19.2 will be released to curseforge with all the latest updates? 1.19.2 is seen as one of the new major modding versions.

OHakimen commented 1 year ago

i intend to make an update soon, i'm waiting to fix most of the stuff being reported and implementing suggestions under the hood, probably next monday i can update both the 1.19.2 and 1.19.3 versions

and also a plan on doing a rewrite for 1.20 supporting both forge and fabric ENVs, probably adding new stuff too :D

crazyvinvin commented 1 year ago

That's amazing, thank you so much! For now we're staying with 1.19.2, because many mods are supported and will stay supported for this version. Would love to see the new features over there :wink:.