From 4ee2d8bd078f1d8f2de81d344669440e7edafba2 Mon Sep 17 00:00:00 2001 From: CovertJaguar Date: Mon, 14 Oct 2013 12:33:26 -0700 Subject: [PATCH] Remove depreciated addCreativeItems() function --- common/buildcraft/factory/BlockFrame.java | 6 +++--- common/buildcraft/factory/BlockPlainPipe.java | 20 +++++++++---------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/common/buildcraft/factory/BlockFrame.java b/common/buildcraft/factory/BlockFrame.java index fa063b39..19a96c38 100644 --- a/common/buildcraft/factory/BlockFrame.java +++ b/common/buildcraft/factory/BlockFrame.java @@ -15,12 +15,12 @@ import buildcraft.core.IFramePipeConnection; import buildcraft.core.utils.Utils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import java.util.ArrayList; import java.util.List; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; @@ -188,8 +188,8 @@ public class BlockFrame extends Block implements IFramePipeConnection { @SuppressWarnings({ "unchecked", "rawtypes" }) @Override - public void addCreativeItems(ArrayList itemList) { - itemList.add(new ItemStack(this)); + public void getSubBlocks(int id, CreativeTabs tab, List list) { + list.add(new ItemStack(this)); } @Override diff --git a/common/buildcraft/factory/BlockPlainPipe.java b/common/buildcraft/factory/BlockPlainPipe.java index bba34558..5a3f9a85 100644 --- a/common/buildcraft/factory/BlockPlainPipe.java +++ b/common/buildcraft/factory/BlockPlainPipe.java @@ -1,12 +1,10 @@ /** - * Copyright (c) SpaceToad, 2011 - * http://www.mod-buildcraft.com + * Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com * - * BuildCraft is distributed under the terms of the Minecraft Mod Public - * License 1.0, or MMPL. Please check the contents of the license located in + * BuildCraft is distributed under the terms of the Minecraft Mod Public License + * 1.0, or MMPL. Please check the contents of the license located in * http://www.mod-buildcraft.com/MMPL-1.0.txt */ - package buildcraft.factory; import buildcraft.core.CoreConstants; @@ -14,10 +12,12 @@ import buildcraft.core.IFramePipeConnection; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; +import java.util.List; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; import net.minecraft.world.IBlockAccess; @@ -65,15 +65,13 @@ public class BlockPlainPipe extends Block implements IFramePipeConnection { @SuppressWarnings({ "unchecked", "rawtypes" }) @Override - public void addCreativeItems(ArrayList itemList) { - itemList.add(new ItemStack(this)); + public void getSubBlocks(int id, CreativeTabs tab, List list) { + list.add(new ItemStack(this)); } - @Override @SideOnly(Side.CLIENT) - public void registerIcons(IconRegister par1IconRegister) - { - this.blockIcon = par1IconRegister.registerIcon("buildcraft:blockPlainPipe"); + public void registerIcons(IconRegister par1IconRegister) { + this.blockIcon = par1IconRegister.registerIcon("buildcraft:blockPlainPipe"); } }