Peripherals++

Peripherals++

359k Downloads

peripheral container Crafting not working

m10653 opened this issue ยท 1 comments

commented

Description

peripheral container Crafting does not seem to work at all.

When trying to craft a peripheral into the peripheral container nothing happens. This happens in all crafting benches, default,inventory and modded.

This prevents any peripheral from being added to the container.
...

commented

Hey, so I had the same problem and spent the last 9 hours debugging it. Looks like there were three problems:

  1. In ContainerRecipe.java, (ArrayUtils.indexOf(blacklist, block) == -1) ought to have been !=
  2. ContainerRecipe depended on IPeripheralProvider being implemented to mark which items on the crafting table were peripherals. In aug 2015, there was a refactoring which took IPeripheralProvider off the blocks which extended it, at which point ContainerRecipe no longer recognized any peripherals.
  3. Not all peripherals ever extended IPeripheralProvider, anyway, so some peripherals were never usable with the PeripheralContainer to begin with.

I've made some fixes (https://github.com/Erhannis/PeripheralsPlusPlus), but I feel like there's a better way of doing it.

  1. The first was a straightforward fix.
    2/3. I've basically just put in a new empty interface (IPeripheralBlock) that marks the peripheral blocks the way IPeripheralProvider did before it was removed. It means the block peripherals can be contained, but the others still can't. I feel like there's probably a better way of identifying whether an item is a peripheral or not, than by an interface on an associated block (which don't exist for all peripherals). It doesn't help that I've done very little Minecraft modding, so I'm not clear on the distinction between tiles/items/blocks and which is used in the crafting table, etc.

Note that I've tested whether you can combine them in the crafting table, but not whether you can actually use them in a turtle; kindof assuming you can, for now.

Anyway, hope this helps somebody.

Also I hope this gets fixed better and more officially.