mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-18 19:39:06 +00:00
Porting to 1.6.
This commit is contained in:
1 parent
c5d59a4505
commit
f9ceeba358
16 files changed
+131
-95
No files matched your search
@@ -1066,7 +1066,8 @@ public enum BeeSpecies implements IAlleleBeeSpecies, IIconProvider
|
||||
|
||||
private static final BeeSpecies[] skulkingIconBees = { SKULKING, GHASTLY, SPIDERY, SMOULDERING, TC_BRAINY, TC_WISPY, TC_BATTY, AM_VORTEX, TC_WISPY };
|
||||
|
||||
public void registerItemIcons(IconRegister itemMap)
|
||||
@Override
|
||||
public void registerIcons(IconRegister itemMap)
|
||||
{
|
||||
this.icons = new Icon[EnumBeeType.values().length][3];
|
||||
|
||||
@@ -1114,8 +1115,4 @@ public enum BeeSpecies implements IAlleleBeeSpecies, IIconProvider
|
||||
{
|
||||
return icons[0][0];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerTerrainIcons(IconRegister terrainMap) { }
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import java.util.Collection;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import forestry.api.apiculture.IBee;
|
||||
import forestry.api.apiculture.IHiveDrop;
|
||||
import forestry.api.genetics.IAllele;
|
||||
|
||||
@@ -14,6 +15,7 @@ public class HiveDrop implements IHiveDrop
|
||||
private IAllele[] template;
|
||||
private int chance;
|
||||
private ItemStack[] bonus;
|
||||
private float ignoblePercent = 0f;
|
||||
|
||||
public HiveDrop(IAllele[] beeTemplate, ItemStack[] bonusDrops, int dropChance)
|
||||
{
|
||||
@@ -21,18 +23,36 @@ public class HiveDrop implements IHiveDrop
|
||||
this.bonus = bonusDrops;
|
||||
this.chance = dropChance;
|
||||
}
|
||||
|
||||
public HiveDrop setIgnoblePercentage(float f)
|
||||
{
|
||||
this.ignoblePercent = f;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
private IBee getBee(World w)
|
||||
{
|
||||
IBee bee = BeeManager.beeRoot.getBee(w, BeeManager.beeRoot.templateAsGenome(this.template));
|
||||
if (w.rand.nextFloat() < this.ignoblePercent)
|
||||
{
|
||||
bee.setIsNatural(false);
|
||||
}
|
||||
|
||||
return bee;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPrincess(World world, int x, int y, int z, int fortune)
|
||||
{
|
||||
return BeeManager.beeRoot.getMemberStack(BeeManager.beeRoot.getBee(world, BeeManager.beeRoot.templateAsGenome(this.template)), EnumBeeType.PRINCESS.ordinal());
|
||||
return BeeManager.beeRoot.getMemberStack(getBee(world), EnumBeeType.PRINCESS.ordinal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<ItemStack> getDrones(World world, int x, int y, int z, int fortune)
|
||||
{
|
||||
ArrayList<ItemStack> value = new ArrayList<ItemStack>(1);
|
||||
value.add(BeeManager.beeRoot.getMemberStack(BeeManager.beeRoot.getBee(world, BeeManager.beeRoot.templateAsGenome(this.template)), EnumBeeType.DRONE.ordinal()));
|
||||
value.add(BeeManager.beeRoot.getMemberStack(getBee(world), EnumBeeType.DRONE.ordinal()));
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,35 +64,35 @@ public enum HiveType
|
||||
CURIOUS.validBiomes.add(Type.FOREST);
|
||||
CURIOUS.validBiomes.add(Type.JUNGLE);
|
||||
CURIOUS.validBiomes.add(Type.HILLS);
|
||||
CURIOUS.drops.add(new HiveDrop(BeeSpecies.MYSTICAL.getGenome(), combs, 80));
|
||||
CURIOUS.drops.add(new HiveDrop(BeeSpecies.MYSTICAL.getGenome(), combs, 80).setIgnoblePercentage(0.7f));
|
||||
CURIOUS.drops.add(new HiveDrop(BeeGenomeManager.addRainResist(BeeSpecies.MYSTICAL.getGenome()), combs, 15));
|
||||
CURIOUS.drops.add(valiantDrop);
|
||||
|
||||
UNUSUAL.validBiomes.add(Type.PLAINS);
|
||||
UNUSUAL.validBiomes.add(Type.MOUNTAIN);
|
||||
UNUSUAL.validBiomes.add(Type.HILLS);
|
||||
UNUSUAL.drops.add(new HiveDrop(BeeSpecies.UNUSUAL.getGenome(), combs, 80));
|
||||
UNUSUAL.drops.add(new HiveDrop(BeeSpecies.UNUSUAL.getGenome(), combs, 80).setIgnoblePercentage(0.7f));
|
||||
UNUSUAL.drops.add(new HiveDrop(BeeGenomeManager.addRainResist(BeeSpecies.UNUSUAL.getGenome()), combs, 15));
|
||||
UNUSUAL.drops.add(valiantDrop);
|
||||
|
||||
RESONANT.validBiomes.add(Type.DESERT);
|
||||
RESONANT.validBiomes.add(Type.MAGICAL);
|
||||
RESONANT.drops.add(new HiveDrop(BeeSpecies.SORCEROUS.getGenome(), combs, 80));
|
||||
RESONANT.drops.add(new HiveDrop(BeeSpecies.SORCEROUS.getGenome(), combs, 80).setIgnoblePercentage(0.7f));
|
||||
RESONANT.drops.add(new HiveDrop(BeeGenomeManager.addRainResist(BeeSpecies.SORCEROUS.getGenome()), combs, 20));
|
||||
RESONANT.drops.add(valiantDrop);
|
||||
|
||||
DEEP.validBiomes.add(Type.HILLS);
|
||||
DEEP.validBiomes.add(Type.MOUNTAIN);
|
||||
DEEP.validBiomes.add(Type.MAGICAL);
|
||||
DEEP.drops.add(new HiveDrop(BeeSpecies.ATTUNED.getGenome(), combs, 80));
|
||||
DEEP.drops.add(new HiveDrop(BeeSpecies.ATTUNED.getGenome(), combs, 80).setIgnoblePercentage(0.65f));
|
||||
DEEP.drops.add(new HiveDrop(BeeGenomeManager.addRainResist(BeeSpecies.ATTUNED.getGenome()), combs, 20));
|
||||
DEEP.drops.add(valiantDrop);
|
||||
|
||||
combs = new ItemStack[] {Config.combs.getStackForType(CombType.MOLTEN), new ItemStack(Item.lightStoneDust, 6)};
|
||||
combs = new ItemStack[] {Config.combs.getStackForType(CombType.MOLTEN), new ItemStack(Item.glowstone, 6)};
|
||||
|
||||
INFERNAL.validBiomes.add(Type.NETHER);
|
||||
INFERNAL.validBiomes.add(Type.MAGICAL);
|
||||
INFERNAL.drops.add(new HiveDrop(BeeSpecies.INFERNAL.getGenome(), combs, 80));
|
||||
INFERNAL.drops.add(new HiveDrop(BeeSpecies.INFERNAL.getGenome(), combs, 80).setIgnoblePercentage(0.5f));
|
||||
INFERNAL.drops.add(new HiveDrop(ForestryHelper.getTemplateForestryForSpecies("Steadfast"), combs, 3));
|
||||
|
||||
combs = new ItemStack[] {Config.combs.getStackForType(CombType.FORGOTTEN), new ItemStack(Item.enderPearl, 1)};
|
||||
@@ -180,11 +180,20 @@ public enum HiveType
|
||||
if (dart <= drop.getChance(world, x, y, z))
|
||||
{
|
||||
hiveDrops.addAll(drop.getDrones(world, x, y, z, fortune));
|
||||
hiveDrops.addAll(drop.getAdditional(world, x, y, z, fortune));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Get additional drops.
|
||||
dart = world.rand.nextInt(100);
|
||||
for (IHiveDrop drop : drops)
|
||||
{
|
||||
if (dart <= drop.getChance(world, x, y, z))
|
||||
{
|
||||
hiveDrops.addAll(drop.getAdditional(world, x, y, z, fortune));
|
||||
}
|
||||
}
|
||||
|
||||
return hiveDrops;
|
||||
}
|
||||
|
||||
@@ -243,18 +252,21 @@ public enum HiveType
|
||||
}
|
||||
break;
|
||||
case DEEP:
|
||||
for (int i = 0; i < 1; ++i)
|
||||
if (chunkX % 2 == 0 && chunkZ % 2 == 0)
|
||||
{
|
||||
int coordX = chunkX * 16 + random.nextInt(16);
|
||||
int coordZ = chunkZ * 16 + random.nextInt(16);
|
||||
if (FeatureHive.generateHiveDeep(world, random, coordX, coordZ, initialGen))
|
||||
for (int i = 0; i < 1; ++i)
|
||||
{
|
||||
break;
|
||||
int coordX = chunkX * 16 + random.nextInt(16);
|
||||
int coordZ = chunkZ * 16 + random.nextInt(16);
|
||||
if (FeatureHive.generateHiveDeep(world, random, coordX, coordZ, initialGen))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case INFERNAL:
|
||||
for (int i = 0; i < 1; ++i)
|
||||
for (int i = 0; i < 2; ++i)
|
||||
{
|
||||
int coordX = chunkX * 16 + random.nextInt(16);
|
||||
int coordZ = chunkZ * 16 + random.nextInt(16);
|
||||
|
||||
@@ -2,9 +2,10 @@ package magicbees.client.gui;
|
||||
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.tileentity.TileEntityEffectJar;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -12,6 +13,7 @@ import org.lwjgl.opengl.GL11;
|
||||
public class GUIEffectJar extends GuiContainer
|
||||
{
|
||||
public static final String BACKGROUND_FILE = "jarScreen.png";
|
||||
public static final ResourceLocation BACKGROUND_LOCATION = new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.GUI_TEXTURE + "jarScreen.png");
|
||||
|
||||
private static final int WIDTH = 176;
|
||||
private static final int HEIGHT = 156;
|
||||
@@ -45,11 +47,9 @@ public class GUIEffectJar extends GuiContainer
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int i, int j)
|
||||
{
|
||||
int texture = this.mc.renderEngine.getTexture(CommonProxy.GUI_PATH + BACKGROUND_FILE);
|
||||
|
||||
GL11.glColor4f(1f, 1f, 1f, 1f);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_SRC_ALPHA);
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture);
|
||||
this.mc.func_110434_K().func_110577_a(BACKGROUND_LOCATION);
|
||||
|
||||
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package magicbees.client.model;
|
||||
|
||||
import magicbees.main.CommonProxy;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import magicbees.main.CommonProxy;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -12,7 +14,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
public class ModelEffectJar
|
||||
{
|
||||
public static final String objFile = CommonProxy.MODEL_PATH + "effectJar.obj";
|
||||
public static final String textureFile = CommonProxy.MODEL_TEXTURE_PATH + "jarTexture.png";
|
||||
public static final ResourceLocation textureLocation = new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.MODEL + "jarTexture.png");
|
||||
|
||||
public static final ModelEffectJar model = new ModelEffectJar();
|
||||
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
package magicbees.client.render;
|
||||
|
||||
import magicbees.main.MagicBees;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.MagicBees;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
|
||||
/**
|
||||
* Borrowed from Forestry with some modifications.
|
||||
*/
|
||||
public class BeeRenderEffect extends EntityFX
|
||||
{
|
||||
public int blendmode = 1;
|
||||
private static String texture = "/mods/forestry/textures/items/particles/swarm_bee";
|
||||
private static ResourceLocation texture = new ResourceLocation("Forestry", "textures/items/particles/swarm_bee.png");
|
||||
|
||||
public BeeRenderEffect(World world, double x, double y, double z, float motionScaleX, float motionScaleY, float motionScaleZ, int color)
|
||||
{
|
||||
@@ -65,14 +63,14 @@ public class BeeRenderEffect extends EntityFX
|
||||
public void renderParticle(Tessellator tessellator, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
|
||||
tessellator.draw();
|
||||
/*tessellator.draw();
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, blendmode);
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(texture);
|
||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(texture);
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
@@ -97,8 +95,8 @@ public class BeeRenderEffect extends EntityFX
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GL11.glBindTexture(3553 /* GL_TEXTURE_2D *//* GL_TEXTURE_2D */, MagicBees.proxy.getClientInstance().renderEngine.getTexture("/particles.png"));
|
||||
tessellator.startDrawingQuads();
|
||||
GL11.glBindTexture(3553, MagicBees.proxy.getClientInstance().renderEngine.func_110577_a(texture));
|
||||
tessellator.startDrawingQuads();*/
|
||||
}
|
||||
|
||||
}
|
||||
@@ -69,7 +69,7 @@ public class EffectJarRenderer extends TileEntitySpecialRenderer implements IIte
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated(x, y, z);
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(ModelEffectJar.textureFile);
|
||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(ModelEffectJar.textureLocation);
|
||||
|
||||
ModelEffectJar.model.render();
|
||||
|
||||
|
||||
@@ -117,4 +117,10 @@ public class ItemMagicHiveFrame extends Item implements IHiveFrame
|
||||
return this.type.isHellish;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getGeneticDecay(IBeeGenome genome, float currentModifier)
|
||||
{
|
||||
return this.type.geneticDecayMod;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,21 +1,20 @@
|
||||
package magicbees.item;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.VersionInfo;
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import thaumcraft.api.IVisRepairable;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import forestry.api.arboriculture.IToolGrafter;
|
||||
|
||||
public class ItemThaumiumGrafter extends Item implements IVisRepairable, IToolGrafter
|
||||
@@ -49,7 +48,7 @@ public class ItemThaumiumGrafter extends Item implements IVisRepairable, IToolGr
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack itemstack, World world, int id, int x, int y, int z, EntityLiving entityLiving) {
|
||||
public boolean onBlockDestroyed(ItemStack itemstack, World world, int id, int x, int y, int z, EntityLivingBase entityLiving) {
|
||||
int damage = 1;
|
||||
if (id == Config.tcLeaf.blockID)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ import magicbees.main.utils.VersionInfo;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
@@ -38,7 +39,7 @@ public class ItemThaumiumScoop extends Item implements IVisRepairable, IToolScoo
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack itemstack, World world, int i, int j, int k, int l, EntityLiving entityliving) {
|
||||
public boolean onBlockDestroyed(ItemStack itemstack, World world, int i, int j, int k, int l, EntityLivingBase entityliving) {
|
||||
itemstack.damageItem(1, entityliving);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -16,11 +16,11 @@ public enum HiveFrameType
|
||||
private HiveFrameType(String name, int damage,
|
||||
float territory, float mutation, float lifespan, float production)
|
||||
{
|
||||
this(name, damage, territory, mutation, lifespan, production, 1f, false, false, false, false);
|
||||
this(name, damage, territory, mutation, lifespan, production, 1f, 0f, false, false, false, false);
|
||||
}
|
||||
|
||||
private HiveFrameType(String name, int damage,
|
||||
float territory, float mutation, float lifespan, float production, float flowering,
|
||||
float territory, float mutation, float lifespan, float production, float flowering, float geneticDecay,
|
||||
boolean sealed, boolean lit, boolean sunlit, boolean hellish)
|
||||
{
|
||||
this.frameName = name;
|
||||
@@ -31,6 +31,7 @@ public enum HiveFrameType
|
||||
this.lifespanMod = lifespan;
|
||||
this.productionMod = production;
|
||||
this.floweringMod = flowering;
|
||||
this.geneticDecayMod = geneticDecay;
|
||||
this.isSealed = sealed;
|
||||
this.isLit = lit;
|
||||
this.isSunlit = sunlit;
|
||||
@@ -45,6 +46,7 @@ public enum HiveFrameType
|
||||
public float lifespanMod;
|
||||
public float productionMod;
|
||||
public float floweringMod;
|
||||
public float geneticDecayMod;
|
||||
public boolean isSealed;
|
||||
public boolean isLit;
|
||||
public boolean isSunlit;
|
||||
|
||||
@@ -1,24 +1,34 @@
|
||||
package magicbees.main;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import magicbees.tileentity.TileEntityEffectJar;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class CommonProxy
|
||||
{
|
||||
public static final String RESOURCE_PATH = "/mods/magicbees/";
|
||||
public static final String DOMAIN = "magicbees";
|
||||
public static final String TEXTURE = "textures/";
|
||||
public static final String GUI_TEXTURE = TEXTURE + "gui/";
|
||||
public static final String MODEL = "model/";
|
||||
public static final String LANGS = "lang/";
|
||||
|
||||
@Deprecated
|
||||
public static final String RESOURCE_PATH = "/assets/magicbees/";
|
||||
@Deprecated
|
||||
public static final String TEXTURE_PATH = RESOURCE_PATH + "textures/";
|
||||
@Deprecated
|
||||
public static final String MODEL_PATH = RESOURCE_PATH + "model/";
|
||||
@Deprecated
|
||||
public static final String TCBEES_RESEARCH = RESOURCE_PATH + "research/";
|
||||
@Deprecated
|
||||
public static final String TCBEES_LOCDIR = RESOURCE_PATH + "lang/";
|
||||
|
||||
public static String FORESTRY_GFX_ITEMS;
|
||||
public static String FORESTRY_GFX_BEEEFFECTS;
|
||||
|
||||
@Deprecated
|
||||
public static final String GUI_PATH = TEXTURE_PATH + "gui/";
|
||||
public static final String MODEL_TEXTURE_PATH = TEXTURE_PATH + "model/";
|
||||
|
||||
public static int RenderIdEffectJar;
|
||||
|
||||
|
||||
@@ -1,49 +1,30 @@
|
||||
package magicbees.main.utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import forestry.api.apiculture.BeeManager;
|
||||
import forestry.api.apiculture.EnumBeeChromosome;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import forestry.api.core.BlockInterface;
|
||||
import forestry.api.core.ItemInterface;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import magicbees.bees.Allele;
|
||||
import magicbees.bees.BeeGenomeManager;
|
||||
import magicbees.bees.BeeSpecies;
|
||||
import magicbees.block.types.PlankType;
|
||||
import magicbees.item.ItemCapsule;
|
||||
import magicbees.item.ItemWax;
|
||||
import magicbees.item.types.CombType;
|
||||
import magicbees.item.types.DropType;
|
||||
import magicbees.item.types.HiveFrameType;
|
||||
import magicbees.item.types.LiquidType;
|
||||
import magicbees.item.types.NuggetType;
|
||||
import magicbees.item.types.PollenType;
|
||||
import magicbees.item.types.PropolisType;
|
||||
import magicbees.item.types.ResourceType;
|
||||
import magicbees.item.types.WaxType;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.MagicBees;
|
||||
import magicbees.main.utils.compat.ArsMagicaHelper;
|
||||
import magicbees.main.utils.compat.ForestryHelper;
|
||||
import magicbees.main.utils.compat.ShapelessBeeInfusionCraftingRecipe;
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.liquids.LiquidContainerData;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidDictionary;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import forestry.api.core.BlockInterface;
|
||||
import forestry.api.core.ItemInterface;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
|
||||
public class CraftingManager
|
||||
{
|
||||
@@ -488,7 +469,7 @@ public class CraftingManager
|
||||
|
||||
output = BlockInterface.getBlock("candle");
|
||||
output.stackSize = 24;
|
||||
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(Block.waterStill, 600), null, output, new Object[] {
|
||||
RecipeManagers.carpenterManager.addRecipe(30, new FluidStack(FluidRegistry.WATER, 600), null, output, new Object[] {
|
||||
" S ", "WWW", "WWW",
|
||||
'W', Config.wax,
|
||||
'S', Item.silk
|
||||
@@ -498,21 +479,21 @@ public class CraftingManager
|
||||
output.stackSize = 6;
|
||||
input = ItemInterface.getItem("craftingMaterial");
|
||||
input.setItemDamage(ForestryHelper.CraftingMaterial.SILK_WISP.ordinal()); // Set to Silk Wisp
|
||||
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(Block.waterStill, 600), null, output, new Object[] {
|
||||
RecipeManagers.carpenterManager.addRecipe(30, new FluidStack(FluidRegistry.WATER, 600), null, output, new Object[] {
|
||||
"WSW",
|
||||
'W', Config.wax,
|
||||
'S', input
|
||||
});
|
||||
|
||||
output = Config.miscResources.getStackForType(ResourceType.AROMATIC_LUMP, 2);
|
||||
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(ItemInterface.getItem("liquidHoney").itemID, 1000), null, output, new Object[] {
|
||||
RecipeManagers.carpenterManager.addRecipe(30, FluidRegistry.getFluidStack("honey", 1000), null, output, new Object[] {
|
||||
" P ", "JDJ", " P ",
|
||||
'P', ItemInterface.getItem("pollen"),
|
||||
'J', ItemInterface.getItem("royalJelly"),
|
||||
'D', Config.drops.getStackForType(DropType.ENCHANTED)
|
||||
});
|
||||
|
||||
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(ItemInterface.getItem("liquidHoney").itemID, 1000), null, output, new Object[] {
|
||||
RecipeManagers.carpenterManager.addRecipe(30, FluidRegistry.getFluidStack("honey", 1000), null, output, new Object[] {
|
||||
" J ", "PDP", " J ",
|
||||
'P', ItemInterface.getItem("pollen"),
|
||||
'J', ItemInterface.getItem("royalJelly"),
|
||||
@@ -525,20 +506,20 @@ public class CraftingManager
|
||||
input = ItemInterface.getItem("craftingMaterial");
|
||||
input.setItemDamage(3); // Set to Silk Mesh
|
||||
output = new ItemStack(Config.thaumaturgeBackpackT2);
|
||||
RecipeManagers.carpenterManager.addRecipe(200, new LiquidStack(Block.waterStill.blockID, 1000), null, output, new Object[] {
|
||||
RecipeManagers.carpenterManager.addRecipe(200, new FluidStack(FluidRegistry.WATER, 1000), null, output, new Object[] {
|
||||
"WXW", "WTW", "WWW",
|
||||
'X', Item.diamond,
|
||||
'W', input,
|
||||
'T', new ItemStack(Config.thaumaturgeBackpackT1)
|
||||
});
|
||||
output = new ItemStack(Config.planksWood, 4, 0);
|
||||
RecipeManagers.carpenterManager.addRecipe(8, new LiquidStack(Block.waterStill, 500), null, output, new Object[] {
|
||||
RecipeManagers.carpenterManager.addRecipe(8, new FluidStack(FluidRegistry.WATER, 500), null, output, new Object[] {
|
||||
"B",
|
||||
'B', new ItemStack(Config.tcLog, 1, 0)
|
||||
});
|
||||
|
||||
output = new ItemStack(Config.planksWood, 6, 1);
|
||||
RecipeManagers.carpenterManager.addRecipe(8, new LiquidStack(Block.waterStill, 500), null, output, new Object[] {
|
||||
RecipeManagers.carpenterManager.addRecipe(8, new FluidStack(FluidRegistry.WATER, 500), null, output, new Object[] {
|
||||
"B",
|
||||
'B', new ItemStack(Config.tcLog, 1, 1)
|
||||
});
|
||||
@@ -549,7 +530,7 @@ public class CraftingManager
|
||||
{
|
||||
ItemStack empty = new ItemStack(baseCapsule, 1, 0);
|
||||
ItemStack filled;
|
||||
LiquidStack liquid = null;
|
||||
FluidStack liquid = null;
|
||||
|
||||
for (LiquidType liquidType : LiquidType.values())
|
||||
{
|
||||
@@ -559,20 +540,21 @@ public class CraftingManager
|
||||
liquid = null;
|
||||
break;
|
||||
case WATER:
|
||||
liquid = new LiquidStack(Block.waterStill, baseCapsule.getType().capacity);
|
||||
liquid = new FluidStack(FluidRegistry.WATER, baseCapsule.getType().capacity);
|
||||
break;
|
||||
case LAVA:
|
||||
liquid = new LiquidStack(Block.lavaStill, baseCapsule.getType().capacity);
|
||||
liquid = new FluidStack(FluidRegistry.LAVA, baseCapsule.getType().capacity);
|
||||
break;
|
||||
default:
|
||||
liquid = LiquidDictionary.getLiquid(liquidType.liquidID, baseCapsule.getType().capacity);
|
||||
liquid = FluidRegistry.getFluidStack(liquidType.liquidID, baseCapsule.getType().capacity);
|
||||
break;
|
||||
}
|
||||
|
||||
if (liquid != null)
|
||||
{
|
||||
filled = new ItemStack(baseCapsule, 1, liquidType.ordinal());
|
||||
LiquidContainerRegistry.registerLiquid(new LiquidContainerData(liquid, filled, empty));
|
||||
// WTF is this v ?
|
||||
//LiquidContainerRegistry.registerLiquid(new LiquidContainerData(liquid, filled, empty));
|
||||
|
||||
// Register with Squeezer/Bottler
|
||||
RecipeManagers.bottlerManager.addRecipe(5, liquid, empty, filled);
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.EnumSet;
|
||||
|
||||
import magicbees.main.MagicBees;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ChatMessageComponent;
|
||||
import cpw.mods.fml.common.IScheduledTickHandler;
|
||||
import cpw.mods.fml.common.TickType;
|
||||
|
||||
@@ -58,8 +59,8 @@ public class TickHandlerVersion implements IScheduledTickHandler
|
||||
if ((!MagicBees.getConfig().DisableUpdateNotification || anInfo.isCriticalUpdate()) && anInfo.isNewVersionAvailable())
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer) tickData[0];
|
||||
player.sendChatToPlayer("[" + anInfo.modName + "] A new version is available: " + anInfo.getLatestVersion());
|
||||
player.sendChatToPlayer(anInfo.getVersionDescription());
|
||||
player.sendChatToPlayer(ChatMessageComponent.func_111066_d("[" + anInfo.modName + "] A new version is available: " + anInfo.getLatestVersion()));
|
||||
player.sendChatToPlayer(ChatMessageComponent.func_111066_d(anInfo.getVersionDescription()));
|
||||
}
|
||||
modIndex += 1;
|
||||
}
|
||||
|
||||
@@ -211,4 +211,10 @@ public class EffectJarHousing implements IBeeHousing
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getGeneticDecay(IBeeGenome genome, float currentModifier)
|
||||
{
|
||||
return 0f;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -243,7 +243,7 @@ public class TileEntityEffectJar extends TileEntity implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStackValidForSlot(int i, ItemStack itemStack)
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemStack)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user