use of binnie.botany.ceramic.brick.CeramicBrickType in project Binnie by ForestryMC.
the class BlockCeramicBrick method getSubBlocks.
@Override
public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> itemList) {
for (EnumFlowerColor color : EnumFlowerColor.values()) {
itemList.add(new CeramicBrickPair(color, color, CeramicBrickType.TILE).getStack(1));
}
for (CeramicBrickType type : CeramicBrickType.VALUES) {
if (type.canDouble()) {
itemList.add(new CeramicBrickPair(EnumFlowerColor.Brown, EnumFlowerColor.Gold, type).getStack(1));
}
}
itemList.add(new CeramicBrickPair(EnumFlowerColor.Gold, EnumFlowerColor.Gold, CeramicBrickType.SPLIT).getStack(1));
itemList.add(new CeramicBrickPair(EnumFlowerColor.Brown, EnumFlowerColor.Brown, CeramicBrickType.CHEQUERED).getStack(1));
itemList.add(new CeramicBrickPair(EnumFlowerColor.Gold, EnumFlowerColor.Brown, CeramicBrickType.LARGE_BRICK).getStack(1));
}
use of binnie.botany.ceramic.brick.CeramicBrickType in project Binnie by ForestryMC.
the class CeramicTileRecipe method getCraftingResult.
@Override
public ItemStack getCraftingResult(InventoryCrafting inv) {
Item ceramicBlock = Item.getItemFromBlock(ModuleCeramic.ceramic);
Item ceramicTile = Item.getItemFromBlock(ModuleCeramic.ceramicTile);
Item ceramicBrick = Item.getItemFromBlock(ModuleCeramic.ceramicBrick);
Item mortar = ModuleCeramic.misc;
List<ItemStack> stacks = new ArrayList<>();
int ix = -1;
int iy = -1;
for (int i = 0; i < inv.getSizeInventory(); ++i) {
ItemStack stack = inv.getStackInSlot(i);
if (!stack.isEmpty()) {
int x = i / 3;
int y = i % 3;
if (ix == -1) {
ix = x;
iy = y;
}
if (x - ix >= 2 || y - iy >= 2 || y < iy || x < ix) {
return ItemStack.EMPTY;
}
if (stack.getItem() != ceramicBlock && stack.getItem() != ceramicTile && stack.getItem() != ceramicBrick && stack.getItem() != mortar) {
return ItemStack.EMPTY;
}
stacks.add(stack);
}
}
for (CeramicBrickType type : CeramicBrickType.VALUES) {
ItemStack result = type.getRecipe(stacks);
if (!result.isEmpty()) {
return result;
}
}
return ItemStack.EMPTY;
}
use of binnie.botany.ceramic.brick.CeramicBrickType in project Binnie by ForestryMC.
the class BlockCeramicBrick method registerSprites.
@Override
@SideOnly(Side.CLIENT)
public void registerSprites(ITextureManager manager) {
TextureMap textureMap = Minecraft.getMinecraft().getTextureMapBlocks();
for (CeramicBrickType type : CeramicBrickType.VALUES) {
TextureAtlasSprite[] sprites = new TextureAtlasSprite[3];
for (int i = 0; i < 3; ++i) {
ResourceLocation location = new ResourceLocation(Constants.BOTANY_MOD_ID + ":blocks/ceramic." + type.getId() + '.' + i);
sprites[i] = textureMap.registerSprite(location);
}
type.setSprites(sprites);
}
}
Aggregations