Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Industrial Centrifuge treating empty cells as lava cells in FTB Ultimate Reloaded 1.12.2 #68

Open
builder396 opened this issue Dec 12, 2021 · 4 comments

Comments

@builder396
Copy link

As stated above, the Industrial Centrifuge will absorb empty cells in either input slot and centrifuge them as though they were lava cells, keeping the machine busy for quite some time and generating resources out of nothing. Also makes it impossible to store cells inside the machine like normal.

Edit: Now I looked up and it centrifuged empty cells as though they were filled with hydrogen, giving me a single deuterium cell. WTF. Maybe its because that recipe requires only 4 cells of hydrogen rather than 16 of lava when I had only 6 cells inside the machine.

@lcy0x1
Copy link

lcy0x1 commented Dec 13, 2021

My inspection:
TileMachine line 189: recipeHandler.findAndApply(inputs,true)
RecipeHandler line 314 cachedRecipes.get(ingredients);
RecipeHandler line 829 build(this::getRecipe)
RecipeHandler line 165 temp.matches(entry.ingredient)
ItemStackInputIngredient line 85: ItemUtils.isItemEqual(ingredient, (ItemStack) other, true, false);

It does not check the NBT data of the cells even though in CentrifugeRecipe it sets useNBT to true

It could be fixed by checking if recipe requires NBT match in RecipeHandler.getRecipe

So it should be a RebornCore issue

@Technici4n Technici4n transferred this issue from TechReborn/TechReborn Dec 13, 2021
@Drathonix
Copy link

Drathonix commented Dec 13, 2021

Yeah so conveniently I just finished uploading a fixer mod that patches this out.
The solution was to replace the centrifuge's recipe handler with one that calls matchesStrict which checks the NBT data.

Not sure the rules here of posting my own work but screw it, I've already alerted the devs about it in here so I'm going to do so.
https://www.curseforge.com/minecraft/mc-mods/vicious-core

@Technici4n
Copy link

@Drathonix in case you want to fork TR and fix it, the MIT license allows it. Maybe that would be better, depending on how interested in fixing TR you are?

@Drathonix
Copy link

@Technici4n I did not make a fork of this as I needed for TR to be an optional dependency. The intention is to use the patch on older modpacks (such as FTB:UR) where updates may come a lot less often and on servers (such as my own) which just need the problem patched out.
Honestly I also wanted to test whether this way of "overwriting" mod code without using mixins/asm is viable.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants