▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/Recycling Mod
Recycling Mod

Recycling Mod

A Simple mod to economize materials. Beta State

61
3

Recycling Mod

This mod allows people to recycle Items

This mod is the successor of the Recycling Mod

Made by the same author, but this one was Rewritten for Fabric, and now adds more mechanics, and it is now in Beta, no longer in alpha

Disclaimer

THIS MOD IS CURRENTLY IN BETA AND BUG/GLITCHES MAY OCCOUR

v1.0.0-beta WAS MADE FOR Minecraft 1.21.4, OTHER Minecraft VERSIONS MAY NOT BE SUPPORTED

How to Recycle Items

To recycle them you use an Powder Recycler

Powder Recycler

To recycle items open the GUI and put the items you want to recycle, and click the recycle button:

Interface

In the image above the Chest is the input item, and the other 8 planks are inside the output slots;

In the GUI we have 9 output slots, 1 input slot and 1 modifer slot;

Modifiers

Modifiers modify the output of the recipe, they are inserted in the modifier slot

Currently we have only one modifer, which is the Diamond Modifier(Also Known As Diamontifier)

Modifiers are registered using Java code

Diamontifier

This modifier changes some of the output items to Diamonds.

The Diamontifier has 32 of Durability, and everytime the recipe is modified one durability is consumed;


new PowderRecyclerModifer() {

        @Override
        public ItemStack[] modifyOutput(ItemStack modifierStack, ItemStack[] outputs) {
          double d = RND.nextDouble();
          if (d > 0.4) {
            return outputs;
          }
          boolean mod = false;
          for (int i = 0; i < outputs.length; i++) {
            ItemStack output = outputs[i].copy();
            if (output.getItem() == Registries.ITEM.get(Identifier.ofVanilla("diamond"))
                || output.getItem() == Registries.ITEM.get(Identifier.ofVanilla("air")))
              continue;
            d = RND.nextDouble();
            if (d < (0.5d / Math.pow(1.5, output.getCount()))) {
              outputs[i] = new ItemStack(Registries.ITEM.getEntry(Identifier.ofVanilla("diamond")).get(),
                  output.getCount(), output.getComponentChanges());
              if (mod == false) {
                mod = true;
              }
              LOGGER.info("Modified stack(" + output.getItem().toString() + ")");
            }
          }
          if (mod == true) {
            LOGGER.info("Modifer got damaged");
            modifierStack.setDamage(modifierStack.getDamage() + 1);
          }
          return outputs;

        }

      }

As seen in the code above, we see that the chance of Replacing one item slot with an Diamond is:

0.5 / (1.5 ^ count)

count is the item count

And that the chance of attemping to modify the slot is: 0.4

To craft a Diamontifier you need to use the following Recipe:

Crafting

Why Recycling?

Recycling is a mod that allows you to define custom recipes for recycling, and allows you to re-use items.

Совместимость

Minecraft: Java Edition

1.21.x

Платформы

Поддерживаемые окружения

Клиент и сервер

Создатели

Детали

Лицензия:MIT
Опубликован:7 месяцев назад
Обновлён:7 месяцев назад
Главная