mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-18 03:25:07 +00:00
Remove Unused Encylopedia
This commit is contained in:
1 parent
5927258a90
commit
8a103a72cc
6 files changed
+29
-28
No files matched your search
@@ -65,8 +65,6 @@ public class Botany extends AbstractMod {
|
||||
public static ItemBotany seed;
|
||||
public static ItemBotany pollen;
|
||||
public static ItemDictionary database;
|
||||
public static ItemEncyclopedia encyclopedia;
|
||||
public static ItemEncyclopedia encyclopediaIron;
|
||||
|
||||
/* MODULE GARDENING */
|
||||
public static BlockPlant plant;
|
||||
|
||||
@@ -38,8 +38,6 @@ public class ModuleGenetics implements IInitializable {
|
||||
Botany.pollen = new ItemBotany("pollen", EnumFlowerStage.POLLEN, "pollen");
|
||||
Botany.seed = new ItemBotany("seed", EnumFlowerStage.SEED, "germling");
|
||||
Botany.database = new ItemDictionary();
|
||||
Botany.encyclopedia = new ItemEncyclopedia(false);
|
||||
Botany.encyclopediaIron = new ItemEncyclopedia(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -57,13 +55,6 @@ public class ModuleGenetics implements IInitializable {
|
||||
OreDictionary.registerOre("flower", new ItemStack(Blocks.DOUBLE_PLANT, 1, 4));
|
||||
OreDictionary.registerOre("flower", new ItemStack(Blocks.DOUBLE_PLANT, 1, 5));
|
||||
OreDictionary.registerOre("flower", new ItemStack(Botany.flower, 1, OreDictionary.WILDCARD_VALUE));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Botany.encyclopedia),
|
||||
"fff",
|
||||
"fbf",
|
||||
"fff",
|
||||
'f', "flower",
|
||||
'b', Items.BOOK));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Botany.encyclopediaIron), new ItemStack(Botany.encyclopedia), "ingotIron"));
|
||||
FlowerManager.flowerRegistry.registerAcceptableFlower(Botany.flower, "flowersVanilla");
|
||||
RecipeManagers.carpenterManager.addRecipe(100, Binnie.Liquid.getFluidStack("water", 2000), null, new ItemStack(Botany.database),
|
||||
"X#X",
|
||||
|
||||
@@ -2,16 +2,20 @@ package binnie.core.item;
|
||||
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.api.IFlower;
|
||||
import binnie.botany.api.IFlowerGenome;
|
||||
import binnie.botany.flower.TileEntityFlower;
|
||||
import binnie.botany.network.PacketID;
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.IInitializable;
|
||||
import binnie.core.network.packet.MessageNBT;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
@@ -37,24 +41,31 @@ public class ModuleItems implements IInitializable {
|
||||
if (!BinnieCore.isBotanyActive()) {
|
||||
return;
|
||||
}
|
||||
BlockPos pos = event.getPos();
|
||||
World world = event.getWorld();
|
||||
EntityPlayer player = event.getEntityPlayer();
|
||||
|
||||
if (event.getEntityPlayer() != null && event.getEntityPlayer().getHeldItemMainhand() != null && event.getEntityPlayer().getHeldItemMainhand().getItem() == BinnieCore.fieldKit && event.getEntityPlayer().isSneaking()) {
|
||||
final TileEntity tile = event.getWorld().getTileEntity(event.getPos());
|
||||
if (tile instanceof TileEntityFlower) {
|
||||
final TileEntityFlower tileFlower = (TileEntityFlower) tile;
|
||||
final IFlower flower = tileFlower.getFlower();
|
||||
if (flower != null) {
|
||||
final NBTTagCompound info = new NBTTagCompound();
|
||||
info.setString("Species", flower.getGenome().getPrimary().getUID());
|
||||
info.setString("Species2", flower.getGenome().getSecondary().getUID());
|
||||
info.setFloat("Age", flower.getAge() / flower.getGenome().getLifespan());
|
||||
info.setShort("Colour", (short) flower.getGenome().getPrimaryColor().getID());
|
||||
info.setShort("Colour2", (short) flower.getGenome().getSecondaryColor().getID());
|
||||
info.setBoolean("Wilting", flower.isWilted());
|
||||
info.setBoolean("Flowered", flower.hasFlowered());
|
||||
Botany.proxy.sendToPlayer(new MessageNBT(PacketID.Encylopedia.ordinal(), info), event.getEntityPlayer());
|
||||
event.getEntityPlayer().getHeldItemMainhand().damageItem(1, event.getEntityPlayer());
|
||||
}
|
||||
if (player != null) {
|
||||
ItemStack heldItem = player.getHeldItemMainhand();
|
||||
if(heldItem != null && heldItem.getItem() == BinnieCore.fieldKit && player.isSneaking()){
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile instanceof TileEntityFlower) {
|
||||
TileEntityFlower tileFlower = (TileEntityFlower) tile;
|
||||
IFlower flower = tileFlower.getFlower();
|
||||
if (flower != null && flower.getGenome() != null) {
|
||||
IFlowerGenome flowerGenome = flower.getGenome();
|
||||
NBTTagCompound info = new NBTTagCompound();
|
||||
info.setString("Species", flowerGenome.getPrimary().getUID());
|
||||
info.setString("Species2", flowerGenome.getSecondary().getUID());
|
||||
info.setFloat("Age", flower.getAge() / flowerGenome.getLifespan());
|
||||
info.setShort("Colour", (short) flowerGenome.getPrimaryColor().getID());
|
||||
info.setShort("Colour2", (short) flowerGenome.getSecondaryColor().getID());
|
||||
info.setBoolean("Wilting", flower.isWilted());
|
||||
info.setBoolean("Flowered", flower.hasFlowered());
|
||||
Botany.proxy.sendToPlayer(new MessageNBT(PacketID.Encylopedia.ordinal(), info), player);
|
||||
heldItem.damageItem(1, event.getEntityPlayer());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package binnie.genetics.gui;
|
||||
import binnie.botany.api.IFlower;
|
||||
import binnie.craftgui.botany.ControlColourDisplay;
|
||||
import binnie.craftgui.controls.ControlTextCentered;
|
||||
import binnie.craftgui.core.CraftGUI;
|
||||
import binnie.craftgui.core.IWidget;
|
||||
import binnie.craftgui.core.geometry.IArea;
|
||||
import binnie.craftgui.minecraft.control.ControlIconDisplay;
|
||||
|
||||
Reference in new issue
Block a user