Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
made it possible to recycle rubber like materials to dust in macerator
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Sep 29, 2024
1 parent e9a46a7 commit 7c254bb
Showing 1 changed file with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,28 @@ public static void init() {
t == INGOT_HOT || t == GEM || t == GEM_CHIPPED || t == GEM_FLAWED || t == GEM_FLAWLESS || t == GEM_EXQUISITE) continue;
double amount = (double) t.getUnitValue() / U;
t.all().forEach(m -> {
if (!m.has(DUST) || m.has(MaterialTags.RUBBERTOOLS) || m == Bone || m == Carbon || m == Blaze) return;
addRecyclingRecipe(t.getMaterialIngredient(m, 1), of(m, (float) amount), m.getId() + "_" + t.getId() + "_recycling");
if (!m.has(DUST) || m == Bone || m == Carbon || m == Blaze) return;
if (m.has(MaterialTags.RUBBERTOOLS)) {
int i = (int) amount;
float leftover = (float) (amount - i);
var mac = RecipeMaps.PULVERIZER.RB().ii(t.getMaterialIngredient(m, 1));
if (leftover > 0){
float mExtraF = leftover * 4;
int mExtra = (int) (mExtraF);
float mLeftover = mExtraF - mExtra;
int aExtra = (int) (leftover * 9);
if (mLeftover > 0){
mac.io(DUST_TINY.get(m, (i * 9) + aExtra));
} else {
mac.io(DUST_SMALL.get(m, (i * 4) + mExtra));
}
} else {
mac.io(DUST.get(m, i));
}
mac.add(m.getId() + "_" + t.getId() + "_recycling", m.getMass() * 2, 4);
} else {
addRecyclingRecipe(t.getMaterialIngredient(m, 1), of(m, (float) amount), m.getId() + "_" + t.getId() + "_recycling");
}
});
}
AntimatterAPI.all(BlockColoredWall.class).forEach(b -> {
Expand Down

0 comments on commit 7c254bb

Please sign in to comment.