PocketMine-MP
PocketMine-MP copied to clipboard
Furnaces produce xp
Introduction
As it is well explained in the related issue, Furnaces produce xp and store that amount in them until a player picks up an item from their result slot or the furnace breaks.
Source: https://minecraft.fandom.com/wiki/Experience
Relevant issues
- Fixes #4418
Changes
API changes
The following methods have been added to the Item
class:
-
getSmeltingXp
Behavioural changes
When a player or another breaks or picks up the items in the result slot, the stored experience will be dropped.
Tests
- Cook something and collect the result
- Break the oven without collecting the result
Dktapps: Hi, I don't have time to review this PR right now because LBSG is paying me $5000 per second for support 1.13+ worlds.
Please wait, your PR will be reviewed in 150 years!
I don't want to add a bunch of classes just to have functions that return fixed values. That's the hell we're trying to get away from.
I think the best way to implement this is to add the amount of xp directly to the furnace recipes. However, this has nothing to do with crafting as such, so I'm not sure.
I think the best way to implement this is to add the amount of xp directly to the furnace recipes. However, this has nothing to do with crafting as such, so I'm not sure.
I previously considered this, but there are a couple of problems and obstacles:
- The amount of XP dropped is tied to the item, not the recipe
- The data that the BedrockProtocol recipe data is generated from doesn't include any XP information, so it would have to be generated with a different method or be patched in afterwards
Why is this pr not merged? is something wrong?
The past comments is clear about the current situation of this PR
Closing due to loss of interest and I am unable to find a way to auto-generate expereince drops values
Why are you not creating a class (e.g. Smelting.php) and you store Fuel and XP. Fuel has maybe 25 items+ and XP has maybe 40 items+.