CraftBook 3

CraftBook 3

139k Downloads

Custom Drops cannot be used to craft

LadyCailinBot opened this issue ยท 5 comments

commented

CRAFTBOOK-3266 - Reported by retrontology

I help develop on a server, and we have been trying to get zombies to drop regular iron ingots. Unfortunately, the iron ingots the zombies drop cannot be used to craft. Whenever a player places the iron in a crafting recipe, the desired item shows up for a split second and then disappears. The bugged iron also "infects" any other iron ingots it is stacked with. We did some testing and discovered that this only effected people in Survival mode, while those in creative could craft with the otherwise bugged iron. We also exported a chest with both types of iron via a structure block and discovered they are identical, except that vanilla iron has a Damage of 0 while the Craftbook iron has a Damage of -1. We then spawned in an iron ingot with a -1 Damage via the give command and replicated the error. We had previously experienced this problem with gold as well, but did not narrow it down until now.

We would like people to be able to craft with this iron from the zombies, as we have made it much harder to obtain it in the normal fashion. So we were curious if it were possible to set the Damage in the custom-drops.yml to 0? I checked the documentation on ItemSyntax but could not find a definition of setting the Damage tag in the id string. I also trawled through the source to find exactly how the string is being parsed, but could not find the parseItemSyntax(string) that was referenced in the ItemSyntax.getItem(string) method. If there is any way to set this Damage tag, we would be very grateful to learn of it.

We are running version 3.9-SNAPSHOT
and using the following code in the custom-drops.yml:
Zombie:
entity-type: "ZOMBIE"
drops:
Iron:
item: "iron_ingot"
chance: 30
minimum-amount: 2
maximum-amount: 3
type: entity
append: true

commented

Comment by me4502

Thanks, just fixed it for the next build.

commented

Comment by retrontology

@me4502 thanks for the quick fix! I managed to build the plugin from the source on the github after changing some maven repos in the pom. We also had some trouble with the persistence.yml (which was probably our own fault) but after we deleted it and pushed the new build, we can now craft with the iron dropped by zombies! Thanks again!

commented

Comment by me4502

Perfect, what were the maven repos you needed to change? Just wondering incase some have gone down and I need to switch them over.

commented

Comment by retrontology

I had trouble connecting to the Comphenix Repo (503 service unavailable), so I added http://assets.comphenix.net/plugin/repository/everything/ and http://maven.elmakers.com/repository/ to cover that (might be a bit redundant but it worked). I also kept timing out when trying to connect to http://mvn2.sk89q.com/repo so I had to replace the url of sk89q-mvn2 with https://maven.sk89q.com/repo/ which worked well. I tried to add the maven.sk89q repo as its own repo but it still kept timing out at the mv2.sk89q address so I ended up having to replace it for the sk89-mvn2 id before it worked.

commented

Comment by me4502

Thanks, switched the comphenix one over. I switched sk89q as well, even though mvn2 is still up - however it's just redirecting to maven anyway.