Fixes #1474: Prevents crafting of disabled recipes and deletes invalid parts

This commit is contained in:
thatsIch
2015-05-24 13:36:43 +02:00
committed by thatsIch
parent 5d34b4e182
commit e5ee4e0e61
20 changed files with 279 additions and 90 deletions
@@ -313,21 +313,21 @@ public class ItemCrystalSeed extends AEBaseItem implements IGrowableCrystal
}
@Override
public void getSubItems( Item i, CreativeTabs t, List l )
protected void getCheckedSubItems( Item sameItem, CreativeTabs creativeTab, List<ItemStack> itemStacks )
{
// lvl 0
l.add( newStyle( new ItemStack( this, 1, CERTUS ) ) );
l.add( newStyle( new ItemStack( this, 1, NETHER ) ) );
l.add( newStyle( new ItemStack( this, 1, FLUIX ) ) );
itemStacks.add( newStyle( new ItemStack( this, 1, CERTUS ) ) );
itemStacks.add( newStyle( new ItemStack( this, 1, NETHER ) ) );
itemStacks.add( newStyle( new ItemStack( this, 1, FLUIX ) ) );
// lvl 1
l.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET + CERTUS ) ) );
l.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET + NETHER ) ) );
l.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET + FLUIX ) ) );
itemStacks.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET + CERTUS ) ) );
itemStacks.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET + NETHER ) ) );
itemStacks.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET + FLUIX ) ) );
// lvl 2
l.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET * 2 + CERTUS ) ) );
l.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET * 2 + NETHER ) ) );
l.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET * 2 + FLUIX ) ) );
itemStacks.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET * 2 + CERTUS ) ) );
itemStacks.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET * 2 + NETHER ) ) );
itemStacks.add( newStyle( new ItemStack( this, 1, LEVEL_OFFSET * 2 + FLUIX ) ) );
}
}
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -123,13 +123,13 @@ public class ItemPaintBall extends AEBaseItem
}
@Override
public void getSubItems( Item i, CreativeTabs ct, List l )
protected void getCheckedSubItems( Item sameItem, CreativeTabs creativeTab, List<ItemStack> itemStacks )
{
for( AEColor c : AEColor.values() )
{
if( c != AEColor.Transparent )
{
l.add( new ItemStack( this, 1, c.ordinal() ) );
itemStacks.add( new ItemStack( this, 1, c.ordinal() ) );
}
}
@@ -137,7 +137,7 @@ public class ItemPaintBall extends AEBaseItem
{
if( c != AEColor.Transparent )
{
l.add( new ItemStack( this, 1, DAMAGE_THRESHOLD + c.ordinal() ) );
itemStacks.add( new ItemStack( this, 1, DAMAGE_THRESHOLD + c.ordinal() ) );
}
}
}