Can't create weapons with `recipe.extra.SUN`?
Darek505 opened this issue · 1 comments
Although I'm not completely sure that this is the case, it didn't work for me.
Looking at the code responsible for this:
Here you can see that the loop is interrupted if at least some condition = true, so that the loop does not interrupt, we need the opposite conditions:
if(recipe.extra == recipe.extra.FULL_MOON) {
if(world.getCelestialAngle(0) > 0.35 && world.getCelestialAngle(0) < 0.65);
}
if(recipe.extra == recipe.extra.NEW_MOON) {
if(world.getCelestialAngle(0) > 0.35 && world.getCelestialAngle(0) < 0.65);
}
if(recipe.extra == recipe.extra.SUN) {
if(world.getCelestialAngle(0) < 0.15 && world.getCelestialAngle(0) > 0.85);
}
for FULL_MOON
and NEW_MOON
the time restrictions are the same, only the moon phase is different, so the solution to this inequality will be:
world.getCelestialAngle(0)
∊(0.35, 0.65)
or
0.35 < world.getCelestialAngle
< 0.65
However, for SUN
it is completely different:
This inequality has no solutions, which means that the loop to check the possibility of creation will always interrupt the iteration