resonant-induction/archive/java/resonantinduction/electrical/transformer/ItemTransformer.java
2014-01-11 17:44:07 +08:00

35 lines
1 KiB
Java

package resonantinduction.electrical.transformer;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import resonantinduction.core.prefab.part.ItemMultipartBase;
import resonantinduction.electrical.wire.EnumWireMaterial;
import codechicken.lib.vec.BlockCoord;
import codechicken.lib.vec.Vector3;
import codechicken.multipart.MultiPartRegistry;
import codechicken.multipart.TMultiPart;
public class ItemTransformer extends ItemMultipartBase
{
private Icon[] icons = new Icon[EnumWireMaterial.values().length];
public ItemTransformer(int id)
{
super("transformer", id);
}
@Override
public TMultiPart newPart(ItemStack itemStack, EntityPlayer player, World world, BlockCoord pos, int side, Vector3 hit)
{
PartTransformer part = (PartTransformer) MultiPartRegistry.createPart("resonant_induction_transformer", false);
if (part != null)
{
part.preparePlacement(side, itemStack.getItemDamage());
}
return part;
}
}