private void attemptButterflySpawn(World world, IButterfly butterfly, double x, double y, double z) { if (BinnieCore.isLepidopteryActive()) { ButterflyManager.butterflyRoot.spawnButterflyInWorld(world, butterfly.copy(), x, y + 0.10000000149011612, z); } }
@SubscribeEvent public static void speciesRegister(AlleleSpeciesRegisterEvent event) { if (!ModuleManager.isModuleEnabled(Constants.EXTRA_TREES_MOD_ID, ExtraTreesModuleUIDs.WOOD)) { return; } if (event.getRoot() instanceof ITreeRoot) { ETTreeDefinition.preInitTrees(); ExtraTreePlanks.initWoodTypes(); } else if (event.getRoot() instanceof IButterflyRoot && BinnieCore.isLepidopteryActive()) { ButterflySpecies.preInit(); } }
@Override public void readFromNBT(NBTTagCompound nbtCompound) { if (nbtCompound.hasKey("Flower")) { flower = new Flower(nbtCompound.getCompoundTag("Flower")); if (flower.getAge() == 0) { flower.setFlowered(false); } } if (nbtCompound.hasKey("section")) { section = nbtCompound.getByte("section"); } if (nbtCompound.hasKey("owner")) { owner = NBTUtil.readGameProfileFromNBT(nbtCompound.getCompoundTag("owner")); } if (nbtCompound.hasKey("CATER") && BinnieCore.isLepidopteryActive()) { matureTime = nbtCompound.getInteger("caterTime"); caterpillar = ButterflyManager.butterflyRoot.getMember(nbtCompound.getCompoundTag("cater")); } readRenderInfo(nbtCompound); super.readFromNBT(nbtCompound); }
public static void setupRecipes() { if (BinnieCore.isApicultureActive()) { addTolerance(EnumBeeChromosome.HUMIDITY_TOLERANCE, ToleranceType.Humidity); addTolerance(EnumBeeChromosome.TEMPERATURE_TOLERANCE, ToleranceType.Temperature); } if (BinnieCore.isLepidopteryActive()) { addTolerance(EnumButterflyChromosome.HUMIDITY_TOLERANCE, ToleranceType.Humidity); addTolerance(EnumButterflyChromosome.TEMPERATURE_TOLERANCE, ToleranceType.Temperature); } addTemperatureItem(new ItemStack(Items.BLAZE_POWDER), 0.5f); addTemperatureItem(new ItemStack(Items.BLAZE_ROD), 0.75f); addTemperatureItem(new ItemStack(Items.LAVA_BUCKET), 0.75f); addTemperatureItem(new ItemStack(Items.SNOWBALL), -0.15f); addTemperatureItem(new ItemStack(Blocks.ICE), -0.75f); addHumidityItem(new ItemStack(Items.WATER_BUCKET), 0.75f); addHumidityDict("sand", -0.15f); addTemperatureItem(FluidContainerType.CAN.getFilled(FluidRegistry.LAVA), 0.75f); addTemperatureItem(FluidContainerType.REFRACTORY.getFilled(FluidRegistry.LAVA), 0.75f); addHumidityItem(FluidContainerType.CAN.getFilled(FluidRegistry.WATER), 0.75f); addHumidityItem(FluidContainerType.REFRACTORY.getFilled(FluidRegistry.WATER), 0.75f); addHumidityItem(FluidContainerType.CAPSULE.getFilled(FluidRegistry.WATER), 0.75f); }
ETTreeDefinition.initTrees(); ExtraTreeMutation.init(); if (BinnieCore.isLepidopteryActive()) { ButterflySpecies.initButterflies();