Reinstated Compression sigil. (#1374)

*  Reinstated Compression sigil.
- does not compress wooden planks into crafting tables
- searches for reversible 3x3/2x2 recipes with a single material type
- probably has a lot of redundant stuff and looks silly
- uses try/catch (might want to find a different approach, some people scoff at this)
- should probably have spent the night sleeping, I'm taking exams tomorrow and will probably sleep the whole day through.

* Learned how to properly handle the "NullPointerException"-situation.

* Update BaseCompressionHandler.java

* Update CompressionRegistry.java

* Removed (almost) all code comments (only a one-liner remains that serves as pointer to a completly commented-out class (StorageBlockCraftingRecipeAssimilator)).
Made methods and variables for long function calls to be more efficient.
Fixed an oversight that resulted in a NullPointerException after removing redundant checks that were made to prevent exactly that.

Rearranged and reformatted code.

* corrected something that could be considered a typo but was an oversight

* This should be it. An Array should be more efficient but you can correct me if I'm wrong. In either case it does what it is supposed to do.

* Fixed. Needed a seperate inventory for the reversible check (or clear the previously used one, but then I'd had to repopulate again and that would just have been messy)

* Forgot one of my lines.

* Fix and cleanup.
Could definitely clean more but that should suffice for now.
This commit is contained in:
AEon - Tobias 2018-08-26 22:05:30 +02:00 committed by Nick Ignoffo
parent 9440d3c0b9
commit 1f392721fa
7 changed files with 153 additions and 180 deletions

View file

@ -17,8 +17,6 @@ public class ItemSigilCompression extends ItemSigilToggleableBase {
@Override
public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected) {
if (true)
return; // TODO - Rewrite compression system
if (PlayerHelper.isFakePlayer(player))
return;