mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-27 23:46:05 +00:00
Working on Gardening
This commit is contained in:
1 parent
9f04dc7ed0
commit
57494b1f81
20 files changed
+374
-380
No files matched your search
@@ -1,36 +1,24 @@
|
||||
package binnie.botany.genetics;
|
||||
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.CreativeTabBotany;
|
||||
import binnie.botany.core.BotanyGUI;
|
||||
import forestry.api.core.IItemModelRegister;
|
||||
import forestry.api.core.IModelManager;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemDictionary extends Item {
|
||||
// IIcon iconMaster;
|
||||
//
|
||||
// @Override
|
||||
// @SideOnly(Side.CLIENT)
|
||||
// public void registerIcons(final IIconRegister register) {
|
||||
// this.itemIcon = Botany.proxy.getIcon(register, "botanistDatabase");
|
||||
// this.iconMaster = Botany.proxy.getIcon(register, "masterBotanistDatabase");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @SideOnly(Side.CLIENT)
|
||||
// public IIcon getIconFromDamage(final int par1) {
|
||||
// return (par1 == 0) ? this.itemIcon : this.iconMaster;
|
||||
// }
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(final Item par1, final CreativeTabs par2CreativeTabs, final List par3List) {
|
||||
super.getSubItems(par1, par2CreativeTabs, par3List);
|
||||
par3List.add(new ItemStack(par1, 1, 1));
|
||||
}
|
||||
public class ItemDictionary extends Item implements IItemModelRegister {
|
||||
|
||||
public ItemDictionary() {
|
||||
this.setCreativeTab(CreativeTabBotany.instance);
|
||||
@@ -38,17 +26,30 @@ public class ItemDictionary extends Item {
|
||||
this.setMaxStackSize(1);
|
||||
setRegistryName("database");
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public ItemStack onItemRightClick(final ItemStack itemstack, final World world, final EntityPlayer player) {
|
||||
// if (itemstack.getItemDamage() == 0) {
|
||||
// Botany.proxy.openGui(BotanyGUI.Database, player, (int) player.posX, (int) player.posY, (int) player.posZ);
|
||||
// }
|
||||
// else {
|
||||
// Botany.proxy.openGui(BotanyGUI.DatabaseNEI, player, (int) player.posX, (int) player.posY, (int) player.posZ);
|
||||
// }
|
||||
// return itemstack;
|
||||
// }
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(final Item par1, final CreativeTabs par2CreativeTabs, final List par3List) {
|
||||
super.getSubItems(par1, par2CreativeTabs, par3List);
|
||||
par3List.add(new ItemStack(par1, 1, 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerModel(Item item, IModelManager manager) {
|
||||
manager.registerItemModel(item, 0, "botanistDatabase");
|
||||
manager.registerItemModel(item, 1, "masterBotanistDatabase");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack itemStack, World world, EntityPlayer player, EnumHand hand) {
|
||||
if(itemStack.getMetadata() == 0){
|
||||
Botany.proxy.openGui(BotanyGUI.Database, player, player.getPosition());
|
||||
}else{
|
||||
Botany.proxy.openGui(BotanyGUI.DatabaseNEI, player, player.getPosition());
|
||||
}
|
||||
return ActionResult.newResult(EnumActionResult.SUCCESS, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(final ItemStack i) {
|
||||
|
||||
Reference in new issue
Block a user