Ex Deorum

Ex Deorum

689 Downloads

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

arketec opened this issue ยท 4 comments

commented

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)

commented

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"
});
commented

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

commented

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" });
?

commented

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.