thedarkcolour / ExDeorum

Port of the original Ex Nihilo to 1.20+.
GNU General Public License v3.0
7 stars 3 forks source link

exdeorum.removeDefaultSieveRecipes(event) does not remove the compressed recipes #102

Open arketec opened 4 months ago

arketec commented 4 months ago

version: 1.20.1 mod version: 1.38

in kubejs:

server_scripts: ServerEvents.recipes((event) => { exdeorum.removeDefaultSieveRecipes(event) event.custom({ type: "exdeorum:sieve", ingredient: { item: "exdeorum:crushed_end_stone", }, mesh: "exdeorum:diamond_mesh", result: "minecraft:ender_pearl", result_amount: { type: "minecraft:binomial", n: 1, p: 0.4, }, }); })

expected: all sieve drops removed except crushed_end_stone with ender_pearl

actual: all sieve drops removed from normal sieve except crushed end endstone with ender pearls (correct), but all compressed block recipes still exists including all the compressed_crushed_end_stone recipes (unexpected)

thedarkcolour commented 4 months ago

This is intended behavior. I made the removeAllSieveRecipes when I didn't know anything about KubeJS. The correct way to remove compressed sieve recipes is by using the following:

remove({
  type: "exdeorum:compressed_sieve"
});
thedarkcolour commented 4 months ago

I'll close this issue when I update the docs with the correct methods.

arketec commented 4 months ago

ok thanks. to clarify, if i then add new drops via event.custom or with a datapack, do those automaitcally get added to the compressed sieve? or must I register drops for the compressed sieve separately? also, how is this affected by remove({ type: "exdeorum:compressed_sieve" }); ?

thedarkcolour commented 4 months ago

They must be registered separately, and you need to multiply the result count by seven (for the binomial number provider, just multiply n). I recommend making a helper function that does both recipes at once.