Recycling Mod 图标

Recycling Mod

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 v1.0.0-beta
本资源为搬运资源,原资源地址: https://modrinth.com/mod/recycling-mod
资源信息

Minecraft 版本: 1.21.4 1.21.5 1.21.6 1.21.7

平台: fabric

标签: game-mechanics technology utility

资源介绍

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.

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Just Enough Lightman's Trades

价格:0 墨喵币
下载量:0

查看详情
Apocalypse Gui

价格:0 墨喵币
下载量:0

查看详情
ZeroX FPS Modpack

价格:0 墨喵币
下载量:0

查看详情
Intermediate Nether Wart

价格:0 墨喵币
下载量:0

查看详情