diff options
author | Jakub <53441451+kuba6000@users.noreply.github.com> | 2022-08-25 19:58:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 19:58:55 +0200 |
commit | 0618db983f399da0556aae55179906504100a663 (patch) | |
tree | 56222b0bd035f94386bb26586babe432b4a70304 /src/main/java/kubatech/loaders/item/ItemProxy.java | |
parent | 6a2b3f3dea2071b4c459106496621c655df98e6c (diff) | |
download | GT5-Unofficial-0618db983f399da0556aae55179906504100a663.tar.gz GT5-Unofficial-0618db983f399da0556aae55179906504100a663.tar.bz2 GT5-Unofficial-0618db983f399da0556aae55179906504100a663.zip |
Add Secret Tea collection (#10)
* Licensing stuff
* Turbo Legendary Secret Tea Collection
* Turbo Legendary Secret Tea Collection
*
Diffstat (limited to 'src/main/java/kubatech/loaders/item/ItemProxy.java')
-rw-r--r-- | src/main/java/kubatech/loaders/item/ItemProxy.java | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/src/main/java/kubatech/loaders/item/ItemProxy.java b/src/main/java/kubatech/loaders/item/ItemProxy.java new file mode 100644 index 0000000000..67491a0ba8 --- /dev/null +++ b/src/main/java/kubatech/loaders/item/ItemProxy.java @@ -0,0 +1,84 @@ +/* + * KubaTech - Gregtech Addon + * Copyright (C) 2022 kuba6000 + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + */ + +package kubatech.loaders.item; + +import java.util.List; +import kubatech.Tags; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; + +public class ItemProxy { + private final String unlocalizedName; + private final String texturepath; + private IIcon icon; + private int itemID; + + public ItemProxy(String unlocalizedName, String texture) { + this.unlocalizedName = "item.kubaitem." + unlocalizedName; + texturepath = Tags.MODID + ":" + texture; + } + + public void ItemInit(int index) { + itemID = index; + } + + public String getUnlocalizedName() { + return unlocalizedName; + } + + public String getDisplayName(ItemStack stack) { + return StatCollector.translateToLocal(this.unlocalizedName + ".name").trim(); + } + + public void registerIcon(IIconRegister iconRegister) { + icon = iconRegister.registerIcon(texturepath); + } + + public IIcon getIcon() { + return icon; + } + + public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) {} + + public void onUpdate( + ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) {} + + public EnumAction getItemUseAction(ItemStack p_77661_1_) { + return EnumAction.none; + } + + public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { + return p_77659_1_; + } + + public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) { + return p_77654_1_; + } + + public int getMaxItemUseDuration() { + return 0; + } +} |