Fixes #675 No disabled feature should log spam or crash anymore.
Deprecates the old usage of the AEItemDefinitions via the direct method access of * blocks() * parts() * items() * materials() and thus use the new re-direct via definitions(). All definitions are now initialized, no matter what. But SubItems, Items and Blocks are not registered, if by chance are disabled.
This commit is contained in:
@@ -23,11 +23,13 @@ import java.util.Collections;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
@@ -81,9 +83,12 @@ public class BlockSkyChest extends AEBaseBlock implements ICustomCollision
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int direction, int metadata)
|
||||
{
|
||||
if ( metadata == 1 )
|
||||
return AEApi.instance().blocks().blockSkyStone.block().getIcon( direction, 1 );
|
||||
return AEApi.instance().blocks().blockSkyStone.block().getIcon( direction, metadata );
|
||||
for ( Block skyStoneBlock : AEApi.instance().definitions().blocks().skyStone().maybeBlock().asSet() )
|
||||
{
|
||||
return skyStoneBlock.getIcon( direction, metadata );
|
||||
}
|
||||
|
||||
return Blocks.stone.getIcon( direction, metadata );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user