mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-17 11:05:02 +00:00
Autoformat: spaces to tabs, remove unused imports
This commit is contained in:
1 parent
a6d1a9f1a4
commit
dac7c0ddef
93 files changed
+3159
-3058
No files matched your search
@@ -62,13 +62,13 @@ public class Allele implements IAllele
|
||||
Allele.flowerAuraNode = new AlleleFlower("AuraNode", new FlowerProviderAuraNode(), true);
|
||||
|
||||
Allele.spawnBrainyZombie = new AlleleEffectSpawnMob("Brainy", false, ThaumcraftHelper.Entity.BRAINY_ZOMBIE.entityID)
|
||||
.setAggrosPlayerOnSpawn().setThrottle(800).setSpawnsOnPlayerNear(null).setMaxMobsInSpawnZone(2);
|
||||
|
||||
.setAggrosPlayerOnSpawn().setThrottle(800).setSpawnsOnPlayerNear(null).setMaxMobsInSpawnZone(2);
|
||||
|
||||
Allele.spawnBats = new AlleleEffectSpawnMob("Batty", false, ThaumcraftHelper.Entity.FIREBAT.entityID)
|
||||
.setThrottle(300).setSpawnsOnPlayerNear("Bat");
|
||||
|
||||
.setThrottle(300).setSpawnsOnPlayerNear("Bat");
|
||||
|
||||
Allele.spawnWisp = new AlleleEffectSpawnWisp("Wispy", false, ThaumcraftHelper.Entity.WISP.entityID, "thaumcraft.wisplive")
|
||||
.setThrottle(1800).setChanceToSpawn(79);
|
||||
.setThrottle(1800).setChanceToSpawn(79);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -101,7 +101,7 @@ public class Allele implements IAllele
|
||||
if (ThermalExpansionHelper.isActive())
|
||||
{
|
||||
Allele.spawnBlizz = new AlleleEffectSpawnMob("TEBlizzy", true, ThermalExpansionHelper.Entity.BLIZZ.entityID)
|
||||
.setThrottle(100).setChanceToSpawn(80);
|
||||
.setThrottle(100).setChanceToSpawn(80);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -120,13 +120,13 @@ public class Allele implements IAllele
|
||||
Allele.effectInvisibility = new AlleleEffectPotion("Invisibility", Potion.invisibility, 10, false);
|
||||
|
||||
Allele.spawnGhast = new AlleleEffectSpawnMob("Ghastly", false, "Ghast", "mob.ghast.moan")
|
||||
.setThrottle(2060).setChanceToSpawn(10).setMaxMobsInSpawnZone(1);
|
||||
.setThrottle(2060).setChanceToSpawn(10).setMaxMobsInSpawnZone(1);
|
||||
|
||||
Allele.spawnSpider = new AlleleEffectSpawnMob("Spidery", false, "Spider", "mob.spider.step")
|
||||
.setThrottle(400).setChanceToSpawn(70).setMaxMobsInSpawnZone(4);
|
||||
.setThrottle(400).setChanceToSpawn(70).setMaxMobsInSpawnZone(4);
|
||||
|
||||
Allele.spawnBlaze = new AlleleEffectSpawnMob("Ablaze", false, "Blaze", "mob.blaze.breathe")
|
||||
.setThrottle(800).setChanceToSpawn(60).setMaxMobsInSpawnZone(2);
|
||||
.setThrottle(800).setChanceToSpawn(60).setMaxMobsInSpawnZone(2);
|
||||
}
|
||||
|
||||
public static void registerDeprecatedAlleleReplacements()
|
||||
@@ -214,12 +214,12 @@ public class Allele implements IAllele
|
||||
|
||||
public static IAlleleBeeSpecies getBaseSpecies(String name)
|
||||
{
|
||||
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("forestry.species").append(name).toString());
|
||||
return (IAlleleBeeSpecies)AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("forestry.species").append(name).toString());
|
||||
}
|
||||
|
||||
public static IAlleleBeeSpecies getExtraSpecies(String name)
|
||||
{
|
||||
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("extrabees.species.").append(name).toString());
|
||||
return (IAlleleBeeSpecies)AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("extrabees.species.").append(name).toString());
|
||||
}
|
||||
|
||||
public static IAllele getBaseAllele(String name)
|
||||
@@ -260,9 +260,10 @@ public class Allele implements IAllele
|
||||
return LocalizationManager.getLocalizedString(getUID());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return this.uid;
|
||||
}
|
||||
@Override
|
||||
public String getUnlocalizedName()
|
||||
{
|
||||
return this.uid;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,14 +2,9 @@ package magicbees.bees;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
import magicbees.main.MagicBees;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import forestry.api.apiculture.IAlleleBeeEffect;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
@@ -50,7 +45,6 @@ public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param genome
|
||||
* @param storedData
|
||||
* @param housing
|
||||
|
||||
@@ -77,7 +77,7 @@ public class AlleleEffectCrumbling extends AlleleEffect
|
||||
{
|
||||
ItemStack target = crumbleMap.get(key);
|
||||
world.setBlock(xCoord, yCoord, zCoord, Block.getBlockFromItem(target.getItem()),
|
||||
target.getItemDamage(), 2);
|
||||
target.getItemDamage(), 2);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2,19 +2,12 @@ package magicbees.bees;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
import magicbees.main.MagicBees;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import forestry.api.apiculture.IAlleleBeeEffect;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class AlleleEffectCure extends AlleleEffect
|
||||
|
||||
@@ -7,11 +7,8 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import forestry.api.apiculture.IAlleleBeeEffect;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class AlleleEffectPotion extends AlleleEffect
|
||||
|
||||
@@ -2,7 +2,6 @@ package magicbees.bees;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
import magicbees.item.ItemArmorApiarist;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityList;
|
||||
@@ -10,7 +9,6 @@ import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import forestry.api.apiculture.IAlleleBeeEffect;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
@@ -128,23 +126,23 @@ public class AlleleEffectSpawnMob extends AlleleEffect
|
||||
EntityLiving mob;
|
||||
if (spawnAlternate && this.alternateMob != null)
|
||||
{
|
||||
mob = (EntityLiving) EntityList.createEntityByName(this.alternateMob, world);
|
||||
mob = (EntityLiving)EntityList.createEntityByName(this.alternateMob, world);
|
||||
}
|
||||
else
|
||||
{
|
||||
mob = (EntityLiving) EntityList.createEntityByName(this.mobName, world);
|
||||
mob = (EntityLiving)EntityList.createEntityByName(this.mobName, world);
|
||||
}
|
||||
|
||||
if (mob != null)
|
||||
{
|
||||
double pos[] = this.randomMobSpawnCoords(world, bee, housing);
|
||||
|
||||
double pos[] = this.randomMobSpawnCoords(world, bee, housing);
|
||||
|
||||
int entitiesCount = world.getEntitiesWithinAABB(mob.getClass(),
|
||||
AxisAlignedBB.getBoundingBox((int)pos[0], (int)pos[1], (int)pos[2], (int)pos[0] + 1, (int)pos[1] + 1, (int)pos[2] + 1)
|
||||
.expand(8.0D, 4.0D, 8.0D)).size();
|
||||
|
||||
mob.setPositionAndRotation(pos[0], pos[1], pos[2], world.rand.nextFloat() * 360f, 0f);
|
||||
|
||||
mob.setPositionAndRotation(pos[0], pos[1], pos[2], world.rand.nextFloat() * 360f, 0f);
|
||||
|
||||
if (entitiesCount < this.maxMobsInArea && mob.getCanSpawnHere())
|
||||
{
|
||||
spawnedFlag = world.spawnEntityInWorld(mob);
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.world.World;
|
||||
import forestry.api.apiculture.IAlleleBeeEffect;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
@@ -55,7 +54,7 @@ public class AlleleEffectSpawnMobWeighted extends AlleleEffect
|
||||
|
||||
for (int i = 0; i < this.spawnChance.length && !flag; ++i)
|
||||
{
|
||||
roll = 100 - w.rand.nextInt(100)+1;
|
||||
roll = 100 - w.rand.nextInt(100) + 1;
|
||||
if (roll < this.spawnChance[i])
|
||||
{
|
||||
flag = true;
|
||||
|
||||
@@ -2,9 +2,6 @@ package magicbees.bees;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import magicbees.item.ItemArmorApiarist;
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
import net.minecraft.entity.EntityList;
|
||||
@@ -12,11 +9,13 @@ import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
|
||||
public class AlleleEffectSpawnWisp extends AlleleEffectSpawnMob
|
||||
{
|
||||
|
||||
private byte[] wispTypes = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47 };
|
||||
private byte[] wispTypes = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47 };
|
||||
|
||||
public AlleleEffectSpawnWisp(String id, boolean isDominant, String mobToSpawn, String soundToPlay)
|
||||
{
|
||||
@@ -31,16 +30,16 @@ public class AlleleEffectSpawnWisp extends AlleleEffectSpawnMob
|
||||
EntityLiving mob;
|
||||
if (spawnAlternate && this.alternateMob != null)
|
||||
{
|
||||
mob = (EntityLiving) EntityList.createEntityByName(this.alternateMob, world);
|
||||
mob = (EntityLiving)EntityList.createEntityByName(this.alternateMob, world);
|
||||
}
|
||||
else
|
||||
{
|
||||
mob = (EntityLiving) EntityList.createEntityByName(this.mobName, world);
|
||||
mob = (EntityLiving)EntityList.createEntityByName(this.mobName, world);
|
||||
}
|
||||
|
||||
if (mob != null)
|
||||
{
|
||||
double pos[] = this.randomMobSpawnCoords(world, bee, housing);
|
||||
double pos[] = this.randomMobSpawnCoords(world, bee, housing);
|
||||
|
||||
int entitiesCount = world.getEntitiesWithinAABB(mob.getClass(),
|
||||
AxisAlignedBB.getBoundingBox((int)pos[0], (int)pos[1], (int)pos[2], (int)pos[0] + 1, (int)pos[1] + 1, (int)pos[2] + 1)
|
||||
@@ -57,7 +56,8 @@ public class AlleleEffectSpawnWisp extends AlleleEffectSpawnMob
|
||||
Field type = wispEntity.getDeclaredField("type");
|
||||
type.setByte(mob, wispTypes[world.rand.nextInt(wispTypes.length)]);
|
||||
}
|
||||
catch (Exception e) { /*Last time I had a request to post error messages, I regretted it.*/ }
|
||||
catch (Exception e)
|
||||
{ /*Last time I had a request to post error messages, I regretted it.*/ }
|
||||
|
||||
spawnedFlag = world.spawnEntityInWorld(mob);
|
||||
if (this.aggosOnPlayer && player != null)
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
@@ -3,10 +3,6 @@ package magicbees.bees;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import forestry.api.genetics.IClassification;
|
||||
@@ -36,11 +32,10 @@ public enum BeeClassification implements IClassification
|
||||
|
||||
ESSENTIAL("Essential", "Essentiapis"),
|
||||
|
||||
THERMAL ("Thermal", "Thermametallic"),
|
||||
ADORABLE ("Adorable", "Amabilis"),
|
||||
THERMAL("Thermal", "Thermametallic"),
|
||||
ADORABLE("Adorable", "Amabilis"),
|
||||
|
||||
BLOODY ("Bloody", "Sanguis")
|
||||
;
|
||||
BLOODY("Bloody", "Sanguis");
|
||||
|
||||
private String uID;
|
||||
private String latin;
|
||||
|
||||
@@ -1,21 +1,19 @@
|
||||
package magicbees.bees;
|
||||
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import forestry.api.apiculture.EnumBeeChromosome;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import forestry.apiculture.genetics.Bee;
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import magicbees.main.utils.compat.ExtraBeesHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import forestry.api.apiculture.EnumBeeChromosome;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import forestry.api.genetics.IAllele;
|
||||
|
||||
/**
|
||||
* Simply a class to hold all the functions to manage species' default genomes.
|
||||
* @author MysteriousAges
|
||||
*
|
||||
* @author MysteriousAges
|
||||
*/
|
||||
public class BeeGenomeManager
|
||||
{
|
||||
@@ -25,7 +23,7 @@ public class BeeGenomeManager
|
||||
IAllele[] genome = new IAllele[EnumBeeChromosome.values().length];
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.MYSTICAL;
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlowest");
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlowest");
|
||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanShorter");
|
||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
|
||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
|
||||
@@ -42,7 +40,7 @@ public class BeeGenomeManager
|
||||
}
|
||||
|
||||
public static IAllele[] addRainResist(IAllele[] genome)
|
||||
{
|
||||
{
|
||||
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
|
||||
return genome;
|
||||
@@ -840,7 +838,7 @@ public class BeeGenomeManager
|
||||
IAllele[] genome = getTemplateTCBase();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.TC_EARTH;
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlow");
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlow");
|
||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanLonger");
|
||||
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceDown1");
|
||||
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
@@ -1199,7 +1197,7 @@ public class BeeGenomeManager
|
||||
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedFast");
|
||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityHigh");
|
||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanLonger");
|
||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanLonger");
|
||||
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.getBaseAllele("flowersVanilla");
|
||||
|
||||
|
||||
@@ -1210,7 +1208,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateTEBase();
|
||||
|
||||
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlow");
|
||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityHigh");
|
||||
@@ -1225,7 +1223,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateTEBase();
|
||||
|
||||
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedFastest");
|
||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityHigh");
|
||||
@@ -1244,6 +1242,7 @@ public class BeeGenomeManager
|
||||
|
||||
return genome;
|
||||
}
|
||||
|
||||
public static IAllele[] getTemplateTEPlatinum()
|
||||
{
|
||||
IAllele[] genome = getTemplateTEBaseNether();
|
||||
@@ -1288,6 +1287,7 @@ public class BeeGenomeManager
|
||||
|
||||
return genome;
|
||||
}
|
||||
|
||||
public static IAllele[] getTemplateTEDante()
|
||||
{
|
||||
IAllele[] genome = getTemplateTEBaseNether();
|
||||
@@ -1324,6 +1324,7 @@ public class BeeGenomeManager
|
||||
|
||||
return genome;
|
||||
}
|
||||
|
||||
public static IAllele[] getTemplateTEWinsome()
|
||||
{
|
||||
IAllele[] genome = getTemplateTEBase();
|
||||
@@ -1372,39 +1373,39 @@ public class BeeGenomeManager
|
||||
return genome;
|
||||
}
|
||||
|
||||
private static IAllele[] getTemplateBMBase()
|
||||
{
|
||||
IAllele[] genome = getTemplateModBase();
|
||||
private static IAllele[] getTemplateBMBase()
|
||||
{
|
||||
IAllele[] genome = getTemplateModBase();
|
||||
|
||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth2");
|
||||
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth2");
|
||||
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedFast");
|
||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityHigh");
|
||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanLonger");
|
||||
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.getBaseAllele("flowersVanilla");
|
||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth2");
|
||||
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth2");
|
||||
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedFast");
|
||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityHigh");
|
||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanLonger");
|
||||
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.getBaseAllele("flowersVanilla");
|
||||
|
||||
|
||||
return genome;
|
||||
}
|
||||
return genome;
|
||||
}
|
||||
|
||||
public static IAllele[] getTemplateBMBloody()
|
||||
{
|
||||
IAllele[] genome = getTemplateBMBase();
|
||||
public static IAllele[] getTemplateBMBloody()
|
||||
{
|
||||
IAllele[] genome = getTemplateBMBase();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.BM_BLOODY;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.BM_BLOODY;
|
||||
|
||||
return genome;
|
||||
}
|
||||
return genome;
|
||||
}
|
||||
|
||||
public static IAllele[] getTemplateBMBound()
|
||||
{
|
||||
IAllele[] genome = getTemplateBMBase();
|
||||
public static IAllele[] getTemplateBMBound()
|
||||
{
|
||||
IAllele[] genome = getTemplateBMBase();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.BM_BOUND;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.BM_BOUND;
|
||||
|
||||
return genome;
|
||||
}
|
||||
return genome;
|
||||
}
|
||||
|
||||
/*--------------------- Other Stuff ---------------------------------- */
|
||||
|
||||
@@ -1446,6 +1447,6 @@ public class BeeGenomeManager
|
||||
|
||||
selectedGene.setByte("Slot", (byte)gene.ordinal());
|
||||
selectedGene.setString("UID0", allele.getUID());
|
||||
selectedGene.setString("UID1", allele.getUID());
|
||||
selectedGene.setString("UID1", allele.getUID());
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import forestry.api.apiculture.IBeeRoot;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import magicbees.block.types.HiveType;
|
||||
import magicbees.item.types.DropType;
|
||||
import magicbees.main.Config;
|
||||
import forestry.api.apiculture.IBeeRoot;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
|
||||
public class BeeManager
|
||||
{
|
||||
|
||||
@@ -11,16 +11,15 @@ import magicbees.main.utils.compat.ArsMagicaHelper;
|
||||
import magicbees.main.utils.compat.EquivalentExchangeHelper;
|
||||
import magicbees.main.utils.compat.ExtraBeesHelper;
|
||||
import magicbees.main.utils.compat.ForestryHelper;
|
||||
import magicbees.main.utils.compat.RedstoneArsenalHelper;
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
import magicbees.main.utils.compat.ThermalExpansionHelper;
|
||||
import magicbees.main.utils.compat.RedstoneArsenalHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
import net.minecraftforge.common.BiomeDictionary.Type;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import forestry.api.apiculture.IAlleleBeeSpecies;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
@@ -30,7 +29,7 @@ import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IGenome;
|
||||
|
||||
public class BeeMutation implements IBeeMutation
|
||||
{
|
||||
{
|
||||
public static void setupMutations()
|
||||
{
|
||||
IAlleleBeeSpecies baseA, baseB;
|
||||
@@ -53,9 +52,12 @@ public class BeeMutation implements IBeeMutation
|
||||
for (String str : binnieMundane)
|
||||
{
|
||||
LogHelper.info("Registering " + str);
|
||||
try {
|
||||
try
|
||||
{
|
||||
new BeeMutation(species, Allele.getExtraSpecies(str), ForestryHelper.getTemplateForestryForSpecies("Common"), 15);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LogHelper.info("Unable to register! This mutation will not be available.");
|
||||
}
|
||||
}
|
||||
@@ -67,23 +69,23 @@ public class BeeMutation implements IBeeMutation
|
||||
new BeeMutation(Allele.getBaseSpecies("Cultivated"), BeeSpecies.ELDRITCH, BeeSpecies.ESOTERIC, 10);
|
||||
new BeeMutation(BeeSpecies.ELDRITCH, BeeSpecies.ESOTERIC, BeeSpecies.MYSTERIOUS, 8);
|
||||
new BeeMutation(BeeSpecies.ESOTERIC, BeeSpecies.MYSTERIOUS, BeeSpecies.ARCANE, 8)
|
||||
.setMoonPhaseBonus(MoonPhase.WAXING_CRESCENT, MoonPhase.WAXING_GIBBOUS, 1.2f);
|
||||
.setMoonPhaseBonus(MoonPhase.WAXING_CRESCENT, MoonPhase.WAXING_GIBBOUS, 1.2f);
|
||||
|
||||
new BeeMutation(Allele.getBaseSpecies("Cultivated"), BeeSpecies.ELDRITCH, BeeSpecies.CHARMED, 10);
|
||||
new BeeMutation(BeeSpecies.ELDRITCH, BeeSpecies.CHARMED, BeeSpecies.ENCHANTED, 8);
|
||||
new BeeMutation(BeeSpecies.CHARMED, BeeSpecies.ENCHANTED, BeeSpecies.SUPERNATURAL, 8)
|
||||
.setMoonPhaseBonus(MoonPhase.WANING_GIBBOUS, MoonPhase.WANING_CRESCENT, 1.2f);
|
||||
.setMoonPhaseBonus(MoonPhase.WANING_GIBBOUS, MoonPhase.WANING_CRESCENT, 1.2f);
|
||||
|
||||
new BeeMutation(BeeSpecies.ARCANE, BeeSpecies.SUPERNATURAL, BeeSpecies.ETHEREAL, 7);
|
||||
|
||||
new BeeMutation(BeeSpecies.SUPERNATURAL, BeeSpecies.ETHEREAL, BeeSpecies.WINDY, 14)
|
||||
.setBlockRequired(Blocks.leaves);
|
||||
.setBlockRequired(Blocks.leaves);
|
||||
new BeeMutation(BeeSpecies.SUPERNATURAL, BeeSpecies.ETHEREAL, BeeSpecies.WATERY, 14)
|
||||
.setBlockRequired(Blocks.water);
|
||||
.setBlockRequired(Blocks.water);
|
||||
new BeeMutation(BeeSpecies.SUPERNATURAL, BeeSpecies.ETHEREAL, BeeSpecies.EARTHY, 100)//14)
|
||||
.setBlockRequired(Blocks.brick_block);
|
||||
.setBlockRequired(Blocks.brick_block);
|
||||
new BeeMutation(BeeSpecies.SUPERNATURAL, BeeSpecies.ETHEREAL, BeeSpecies.FIREY, 14)
|
||||
.setBlockRequired(Blocks.lava);
|
||||
.setBlockRequired(Blocks.lava);
|
||||
|
||||
new BeeMutation(BeeSpecies.ETHEREAL, BeeSpecies.ATTUNED, BeeSpecies.AWARE, 10);
|
||||
new BeeMutation(BeeSpecies.ETHEREAL, BeeSpecies.AWARE, BeeSpecies.SPIRIT, 8);
|
||||
@@ -99,23 +101,23 @@ public class BeeMutation implements IBeeMutation
|
||||
new BeeMutation(BeeSpecies.TIMELY, BeeSpecies.LORDLY, BeeSpecies.DOCTORAL, 7);
|
||||
|
||||
new BeeMutation(BeeSpecies.INFERNAL, BeeSpecies.ELDRITCH, BeeSpecies.HATEFUL, 9)
|
||||
.setBiomeRequired(BiomeDictionary.Type.NETHER);
|
||||
.setBiomeRequired(BiomeDictionary.Type.NETHER);
|
||||
new BeeMutation(BeeSpecies.INFERNAL, BeeSpecies.HATEFUL, BeeSpecies.SPITEFUL, 7)
|
||||
.setBiomeRequired(BiomeDictionary.Type.NETHER);
|
||||
.setBiomeRequired(BiomeDictionary.Type.NETHER);
|
||||
new BeeMutation(Allele.getBaseSpecies("Demonic"), BeeSpecies.SPITEFUL, BeeSpecies.WITHERING, 6)
|
||||
.setBiomeRequired(BiomeDictionary.Type.NETHER);
|
||||
|
||||
.setBiomeRequired(BiomeDictionary.Type.NETHER);
|
||||
|
||||
new BeeMutation(Allele.getBaseSpecies("Modest"), BeeSpecies.ELDRITCH, BeeSpecies.SKULKING, 12);
|
||||
new BeeMutation(Allele.getBaseSpecies("Tropical"), BeeSpecies.SKULKING, BeeSpecies.SPIDERY, 10);
|
||||
new BeeMutation(BeeSpecies.SKULKING, BeeSpecies.ETHEREAL, BeeSpecies.GHASTLY, 9);
|
||||
new BeeMutation(BeeSpecies.SKULKING, BeeSpecies.HATEFUL, BeeSpecies.SMOULDERING, 7)
|
||||
.setBiomeRequired(BiomeDictionary.Type.NETHER);
|
||||
.setBiomeRequired(BiomeDictionary.Type.NETHER);
|
||||
|
||||
new BeeMutation(BeeSpecies.ETHEREAL, BeeSpecies.OBLIVION, BeeSpecies.NAMELESS, 10);
|
||||
new BeeMutation(BeeSpecies.OBLIVION, BeeSpecies.NAMELESS, BeeSpecies.ABANDONED, 8);
|
||||
new BeeMutation(BeeSpecies.NAMELESS, BeeSpecies.ABANDONED, BeeSpecies.FORLORN, 6);
|
||||
new BeeMutation(Allele.getBaseSpecies("Imperial"), BeeSpecies.ABANDONED, BeeSpecies.DRACONIC, 6)
|
||||
.setBiomeRequired(BiomeDictionary.Type.END);
|
||||
.setBiomeRequired(BiomeDictionary.Type.END);
|
||||
|
||||
new BeeMutation(BeeSpecies.UNUSUAL, BeeSpecies.ELDRITCH, BeeSpecies.MUTABLE, 12);
|
||||
new BeeMutation(BeeSpecies.UNUSUAL, BeeSpecies.MUTABLE, BeeSpecies.TRANSMUTING, 9);
|
||||
@@ -126,15 +128,15 @@ public class BeeMutation implements IBeeMutation
|
||||
if (BeeSpecies.COPPER.isActive())
|
||||
{
|
||||
new BeeMutation(Allele.getBaseSpecies("Industrious"), Allele.getBaseSpecies("Meadows"), BeeSpecies.COPPER, 12)
|
||||
.setBlockRequired("blockCopper");
|
||||
.setBlockRequired("blockCopper");
|
||||
}
|
||||
if (BeeSpecies.TIN.isActive())
|
||||
{
|
||||
new BeeMutation(Allele.getBaseSpecies("Industrious"), Allele.getBaseSpecies("Forest"), BeeSpecies.TIN, 12)
|
||||
.setBlockRequired("blockTin");
|
||||
.setBlockRequired("blockTin");
|
||||
}
|
||||
new BeeMutation(Allele.getBaseSpecies("Common"), Allele.getBaseSpecies("Industrious"), BeeSpecies.IRON, 12)
|
||||
.setBlockRequired(Blocks.iron_block);
|
||||
.setBlockRequired(Blocks.iron_block);
|
||||
if (BeeSpecies.LEAD.isActive())
|
||||
{
|
||||
baseA = (BeeSpecies.TIN.isActive()) ? BeeSpecies.TIN : (BeeSpecies.COPPER.isActive()) ? BeeSpecies.COPPER : BeeSpecies.IRON;
|
||||
@@ -155,63 +157,63 @@ public class BeeMutation implements IBeeMutation
|
||||
baseA = (BeeSpecies.EE_MINIUM.isActive()) ? BeeSpecies.EE_MINIUM : Allele.getBaseSpecies("Imperial");
|
||||
baseB = (BeeSpecies.LEAD.isActive()) ? BeeSpecies.LEAD : BeeSpecies.IRON;
|
||||
new BeeMutation(baseA, baseB, BeeSpecies.GOLD, 8)
|
||||
.setBlockRequired(Blocks.gold_block);
|
||||
.setBlockRequired(Blocks.gold_block);
|
||||
|
||||
if (BeeSpecies.ALUMINUM.isActive())
|
||||
{
|
||||
new BeeMutation(Allele.getBaseSpecies("Industrious"), Allele.getBaseSpecies("Cultivated"), BeeSpecies.ALUMINUM, 10)
|
||||
.setBlockRequired("blockAluminum");
|
||||
.setBlockRequired("blockAluminum");
|
||||
}
|
||||
if (BeeSpecies.ARDITE.isActive())
|
||||
{
|
||||
new BeeMutation(Allele.getBaseSpecies("Industrious"), BeeSpecies.INFERNAL, BeeSpecies.ARDITE, 9)
|
||||
.setBlockRequired("blockArdite");
|
||||
.setBlockRequired("blockArdite");
|
||||
}
|
||||
if (BeeSpecies.COBALT.isActive())
|
||||
{
|
||||
new BeeMutation(Allele.getBaseSpecies("Imperial"), BeeSpecies.INFERNAL, BeeSpecies.COBALT, 9)
|
||||
.setBlockRequired("blockCobalt");
|
||||
.setBlockRequired("blockCobalt");
|
||||
}
|
||||
if (BeeSpecies.MANYULLYN.isActive())
|
||||
{
|
||||
new BeeMutation(BeeSpecies.ARDITE, BeeSpecies.COBALT, BeeSpecies.MANYULLYN, 9)
|
||||
.setBlockRequired("blockManyullyn");
|
||||
.setBlockRequired("blockManyullyn");
|
||||
}
|
||||
|
||||
new BeeMutation(Allele.getBaseSpecies("Austere"), BeeSpecies.GOLD, BeeSpecies.DIAMOND, 7)
|
||||
.setBlockRequired(Blocks.diamond_block);
|
||||
.setBlockRequired(Blocks.diamond_block);
|
||||
baseA = (BeeSpecies.SILVER.isActive()) ? BeeSpecies.SILVER : Allele.getBaseSpecies("Imperial");
|
||||
new BeeMutation(Allele.getBaseSpecies("Austere"), baseA, BeeSpecies.EMERALD, 6)
|
||||
.setBlockRequired(Blocks.emerald_block);
|
||||
.setBlockRequired(Blocks.emerald_block);
|
||||
new BeeMutation(Allele.getBaseSpecies("Rural"), BeeSpecies.COPPER, BeeSpecies.APATITE, 12)
|
||||
.setBlockRequired("oreApatite");
|
||||
.setBlockRequired("oreApatite");
|
||||
|
||||
if (ThaumcraftHelper.isActive())
|
||||
{
|
||||
{
|
||||
new BeeMutation(BeeSpecies.WINDY, BeeSpecies.WINDY, BeeSpecies.TC_AIR, 8)
|
||||
.setBlockAndMetaRequired(Config.tcCrystal, ThaumcraftHelper.ShardType.AIR.ordinal());
|
||||
.setBlockAndMetaRequired(Config.tcCrystal, ThaumcraftHelper.ShardType.AIR.ordinal());
|
||||
new BeeMutation(BeeSpecies.FIREY, BeeSpecies.FIREY, BeeSpecies.TC_FIRE, 8)
|
||||
.setBlockAndMetaRequired(Config.tcCrystal, ThaumcraftHelper.ShardType.FIRE.ordinal());
|
||||
.setBlockAndMetaRequired(Config.tcCrystal, ThaumcraftHelper.ShardType.FIRE.ordinal());
|
||||
new BeeMutation(BeeSpecies.WATERY, BeeSpecies.WATERY, BeeSpecies.TC_WATER, 8)
|
||||
.setBlockAndMetaRequired(Config.tcCrystal, ThaumcraftHelper.ShardType.WATER.ordinal());
|
||||
.setBlockAndMetaRequired(Config.tcCrystal, ThaumcraftHelper.ShardType.WATER.ordinal());
|
||||
new BeeMutation(BeeSpecies.EARTHY, BeeSpecies.EARTHY, BeeSpecies.TC_EARTH, 8)
|
||||
.setBlockAndMetaRequired(Config.tcCrystal, ThaumcraftHelper.ShardType.EARTH.ordinal());
|
||||
.setBlockAndMetaRequired(Config.tcCrystal, ThaumcraftHelper.ShardType.EARTH.ordinal());
|
||||
new BeeMutation(BeeSpecies.ETHEREAL, BeeSpecies.ARCANE, BeeSpecies.TC_ORDER, 8)
|
||||
.setBlockAndMetaRequired(Config.tcCrystal, ThaumcraftHelper.ShardType.ORDER.ordinal());
|
||||
.setBlockAndMetaRequired(Config.tcCrystal, ThaumcraftHelper.ShardType.ORDER.ordinal());
|
||||
new BeeMutation(BeeSpecies.ETHEREAL, BeeSpecies.SUPERNATURAL, BeeSpecies.TC_CHAOS, 8)
|
||||
.setBlockAndMetaRequired(Config.tcCrystal, ThaumcraftHelper.ShardType.CHAOS.ordinal());
|
||||
.setBlockAndMetaRequired(Config.tcCrystal, ThaumcraftHelper.ShardType.CHAOS.ordinal());
|
||||
|
||||
new BeeMutation(BeeSpecies.SKULKING, BeeSpecies.WINDY, BeeSpecies.TC_BATTY, 9);
|
||||
new BeeMutation(BeeSpecies.SKULKING, BeeSpecies.PUPIL, BeeSpecies.TC_BRAINY, 9);
|
||||
new BeeMutation(BeeSpecies.ETHEREAL, BeeSpecies.GHASTLY, BeeSpecies.TC_WISPY, 9)
|
||||
.setMoonPhaseRestricted(MoonPhase.WANING_CRESCENT, MoonPhase.WAXING_CRESCENT);
|
||||
.setMoonPhaseRestricted(MoonPhase.WANING_CRESCENT, MoonPhase.WAXING_CRESCENT);
|
||||
|
||||
new BeeMutation(Allele.getBaseSpecies("Common"), BeeSpecies.SKULKING, BeeSpecies.TC_CHICKEN, 12)
|
||||
.setBiomeRequired(Type.FOREST);
|
||||
.setBiomeRequired(Type.FOREST);
|
||||
new BeeMutation(Allele.getBaseSpecies("Common"), BeeSpecies.SKULKING, BeeSpecies.TC_BEEF, 12)
|
||||
.setBiomeRequired(Type.PLAINS);
|
||||
.setBiomeRequired(Type.PLAINS);
|
||||
new BeeMutation(Allele.getBaseSpecies("Common"), BeeSpecies.SKULKING, BeeSpecies.TC_PORK, 12)
|
||||
.setBiomeRequired(Type.MOUNTAIN);
|
||||
.setBiomeRequired(Type.MOUNTAIN);
|
||||
}
|
||||
|
||||
if (ArsMagicaHelper.isActive())
|
||||
@@ -240,44 +242,44 @@ public class BeeMutation implements IBeeMutation
|
||||
|
||||
if (RedstoneArsenalHelper.isActive())
|
||||
{
|
||||
new BeeMutation(BeeSpecies.TE_ELECTRUM, BeeSpecies.TE_DESTABILIZED, BeeSpecies.RSA_FLUXED, 10)
|
||||
.setBlockRequired("blockElectrumFlux");
|
||||
new BeeMutation(BeeSpecies.TE_ELECTRUM, BeeSpecies.TE_DESTABILIZED, BeeSpecies.RSA_FLUXED, 10)
|
||||
.setBlockRequired("blockElectrumFlux");
|
||||
}
|
||||
|
||||
if (ThermalExpansionHelper.isActive())
|
||||
{
|
||||
new BeeMutation(BeeSpecies.TIN, BeeSpecies.COPPER, BeeSpecies.TE_BRONZE, 12)
|
||||
.setBlockRequired("blockBronze");
|
||||
.setBlockRequired("blockBronze");
|
||||
|
||||
new BeeMutation(BeeSpecies.GOLD, BeeSpecies.SILVER, BeeSpecies.TE_ELECTRUM, 10)
|
||||
.setBlockRequired("blockElectrum");
|
||||
.setBlockRequired("blockElectrum");
|
||||
|
||||
new BeeMutation(BeeSpecies.IRON, BeeSpecies.ESOTERIC, BeeSpecies.TE_NICKEL, 14)
|
||||
.setBlockRequired("blockNickel");
|
||||
.setBlockRequired("blockNickel");
|
||||
|
||||
new BeeMutation(BeeSpecies.IRON, BeeSpecies.TE_NICKEL, BeeSpecies.TE_INVAR, 14)
|
||||
.setBlockRequired("blockInvar");
|
||||
.setBlockRequired("blockInvar");
|
||||
|
||||
new BeeMutation(BeeSpecies.TE_NICKEL, BeeSpecies.TE_INVAR, BeeSpecies.TE_PLATINUM, 10)
|
||||
.setBlockRequired("blockPlatinum");
|
||||
.setBlockRequired("blockPlatinum");
|
||||
|
||||
new BeeMutation(BeeSpecies.TIN, BeeSpecies.COPPER, BeeSpecies.TE_BRONZE, 12)
|
||||
.setBlockRequired("blockBronze");
|
||||
.setBlockRequired("blockBronze");
|
||||
|
||||
new BeeMutation(BeeSpecies.SPITEFUL, BeeSpecies.TIN, BeeSpecies.TE_COAL, 12)
|
||||
.setBlockRequired(Blocks.coal_ore);
|
||||
.setBlockRequired(Blocks.coal_ore);
|
||||
|
||||
new BeeMutation(BeeSpecies.SPITEFUL, Allele.getBaseSpecies("Industrious"), BeeSpecies.TE_DESTABILIZED, 12)
|
||||
.setBlockRequired(Blocks.redstone_ore);
|
||||
.setBlockRequired(Blocks.redstone_ore);
|
||||
|
||||
new BeeMutation(BeeSpecies.SMOULDERING, BeeSpecies.INFERNAL, BeeSpecies.TE_LUX, 12)
|
||||
.setBlockRequired(Blocks.glowstone);
|
||||
.setBlockRequired(Blocks.glowstone);
|
||||
|
||||
new BeeMutation(BeeSpecies.SMOULDERING, Allele.getBaseSpecies("Austere"), BeeSpecies.TE_DANTE, 12)
|
||||
.setBiomeRequired(BiomeDictionary.Type.NETHER);
|
||||
.setBiomeRequired(BiomeDictionary.Type.NETHER);
|
||||
|
||||
new BeeMutation(BeeSpecies.TE_DANTE, BeeSpecies.TE_COAL, BeeSpecies.TE_PYRO, 8)
|
||||
.setBiomeRequired(BiomeDictionary.Type.NETHER);
|
||||
.setBiomeRequired(BiomeDictionary.Type.NETHER);
|
||||
|
||||
new BeeMutation(BeeSpecies.SKULKING, Allele.getBaseSpecies("Wintry"), BeeSpecies.TE_BLIZZY, 12);
|
||||
|
||||
@@ -286,7 +288,7 @@ public class BeeMutation implements IBeeMutation
|
||||
new BeeMutation(BeeSpecies.TE_PLATINUM, BeeSpecies.OBLIVION, BeeSpecies.TE_WINSOME, 12);
|
||||
|
||||
new BeeMutation(BeeSpecies.TE_WINSOME, BeeSpecies.TE_COAL, BeeSpecies.TE_ENDEARING, 8)
|
||||
.setBlockRequired("blockEnderium");
|
||||
.setBlockRequired("blockEnderium");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -413,11 +415,11 @@ public class BeeMutation implements IBeeMutation
|
||||
}
|
||||
|
||||
finalChance = Math.round(chance
|
||||
* housing.getMutationModifier((IBeeGenome) genome0,
|
||||
(IBeeGenome) genome1, chance)
|
||||
* housing.getMutationModifier((IBeeGenome)genome0,
|
||||
(IBeeGenome)genome1, chance)
|
||||
* BeeManager.beeRoot.getBeekeepingMode(housing.getWorld())
|
||||
.getMutationModifier((IBeeGenome) genome0,
|
||||
(IBeeGenome) genome1, chance));
|
||||
.getMutationModifier((IBeeGenome)genome0,
|
||||
(IBeeGenome)genome1, chance));
|
||||
}
|
||||
|
||||
return finalChance;
|
||||
@@ -503,7 +505,7 @@ public class BeeMutation implements IBeeMutation
|
||||
{
|
||||
meta = this.requiredBlockMeta;
|
||||
}
|
||||
conditions.add(String.format(LocalizationManager.getLocalizedString("research.requiresBlock"),
|
||||
conditions.add(String.format(LocalizationManager.getLocalizedString("research.requiresBlock"),
|
||||
new ItemStack(this.requiredBlock, 1, this.requiredBlockMeta).getDisplayName()));
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -18,11 +18,13 @@ public class EffectData implements IEffectData
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbttagcompound)
|
||||
{ }
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbttagcompound)
|
||||
{ }
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInteger(int index, int val)
|
||||
|
||||
@@ -12,9 +12,9 @@ import forestry.api.genetics.IPollinatable;
|
||||
|
||||
public class FlowerProviderArsMagicaFlower implements IFlowerProvider
|
||||
{
|
||||
private ItemStack[] flowers = {new ItemStack(Config.amBlackOrchid), new ItemStack(Config.amDesertNova),
|
||||
new ItemStack(Config.amAum), new ItemStack(Config.amWakebloom),
|
||||
new ItemStack(Config.amTarmaRoot) };
|
||||
private ItemStack[] flowers = { new ItemStack(Config.amBlackOrchid), new ItemStack(Config.amDesertNova),
|
||||
new ItemStack(Config.amAum), new ItemStack(Config.amWakebloom),
|
||||
new ItemStack(Config.amTarmaRoot) };
|
||||
|
||||
@Override
|
||||
public boolean isAcceptedFlower(World world, IIndividual genome, int x, int y, int z)
|
||||
@@ -34,7 +34,9 @@ public class FlowerProviderArsMagicaFlower implements IFlowerProvider
|
||||
public boolean growFlower(World world, IIndividual genome, int x, int y, int z)
|
||||
{
|
||||
boolean flag = false;
|
||||
x = -222; y = 70; z = -51;
|
||||
x = -222;
|
||||
y = 70;
|
||||
z = -51;
|
||||
Block blockDown = world.getBlock(x, y - 1, z);
|
||||
if (world.getBlock(x, y, z).isAir(world, x, y, z))
|
||||
{
|
||||
|
||||
@@ -83,7 +83,7 @@ public class FlowerProviderAuraNode implements IFlowerProvider
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (itemStack.stackSize > 0)
|
||||
{
|
||||
ItemStack[] newProducts = new ItemStack[products.length + 1];
|
||||
|
||||
@@ -3,12 +3,10 @@ package magicbees.bees;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.genetics.IFlowerProvider;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.genetics.IPollinatable;
|
||||
@@ -47,7 +45,7 @@ public class FlowerProviderBookshelf implements IFlowerProvider
|
||||
public boolean isAcceptedPollinatable(World world, IPollinatable pollinatable)
|
||||
{
|
||||
EnumSet<EnumPlantType> types = pollinatable.getPlantType();
|
||||
return types.size() > 0 && !types.contains(EnumPlantType.Nether) && !types.contains(EnumPlantType.Water) ;
|
||||
return types.size() > 0 && !types.contains(EnumPlantType.Nether) && !types.contains(EnumPlantType.Water);
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
|
||||
@@ -13,8 +13,8 @@ import forestry.api.genetics.IPollinatable;
|
||||
|
||||
public class FlowerProviderThaumcraftFlower implements IFlowerProvider
|
||||
{
|
||||
private ItemStack[] flowers = {new ItemStack(Config.tcPlant, 1, 2), new ItemStack(Config.tcPlant, 1, 3) };
|
||||
|
||||
private ItemStack[] flowers = { new ItemStack(Config.tcPlant, 1, 2), new ItemStack(Config.tcPlant, 1, 3) };
|
||||
|
||||
@Override
|
||||
public boolean isAcceptedFlower(World world, IIndividual genome, int x, int y, int z)
|
||||
{
|
||||
|
||||
@@ -2,13 +2,13 @@ package magicbees.bees;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import magicbees.api.MagicBeesAPI;
|
||||
import magicbees.api.bees.ITransmutationEffectController;
|
||||
import magicbees.api.bees.ITransmutationEffectLogic;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
|
||||
public class TransmutationEffectController implements ITransmutationEffectController
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@ package magicbees.bees;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import magicbees.api.bees.ITransmutationEffectLogic;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -10,7 +11,6 @@ import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class TransmutationEffectRailcraft implements ITransmutationEffectLogic
|
||||
{
|
||||
@@ -22,7 +22,7 @@ public class TransmutationEffectRailcraft implements ITransmutationEffectLogic
|
||||
OreDictionary.itemMatches(new ItemStack(Blocks.cobblestone), sourceBlock, false))
|
||||
{
|
||||
flag = trySpawnQuarriedStone(world, biome, sourceBlock, x, y, z) ||
|
||||
trySpawnAbyssalStone(world, biome, sourceBlock, x, y, z);
|
||||
trySpawnAbyssalStone(world, biome, sourceBlock, x, y, z);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
@@ -30,8 +30,8 @@ public class TransmutationEffectRailcraft implements ITransmutationEffectLogic
|
||||
private boolean trySpawnQuarriedStone(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z)
|
||||
{
|
||||
boolean flag = false;
|
||||
if (BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.FOREST) &&
|
||||
!BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.SNOWY))
|
||||
if (BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.FOREST) &&
|
||||
!BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.SNOWY))
|
||||
{
|
||||
ItemStack item = GameRegistry.findItemStack("Railcraft", "cube.stone.quarried", 1);
|
||||
if (item != null)
|
||||
@@ -39,15 +39,15 @@ public class TransmutationEffectRailcraft implements ITransmutationEffectLogic
|
||||
world.setBlock(x, y, z, Block.getBlockFromItem(item.getItem()), item.getItemDamage(), 2);
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
private boolean trySpawnAbyssalStone(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z)
|
||||
{
|
||||
boolean flag = false;
|
||||
if (BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.WATER) &&
|
||||
!biome.biomeName.toLowerCase(Locale.ENGLISH).contains("river"))
|
||||
if (BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.WATER) &&
|
||||
!biome.biomeName.toLowerCase(Locale.ENGLISH).contains("river"))
|
||||
{
|
||||
ItemStack item = GameRegistry.findItemStack("Railcraft", "cube.stone.abyssal", 1);
|
||||
if (item != null)
|
||||
@@ -55,7 +55,7 @@ public class TransmutationEffectRailcraft implements ITransmutationEffectLogic
|
||||
world.setBlock(x, y, z, Block.getBlockFromItem(item.getItem()), item.getItemDamage(), 2);
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import magicbees.api.bees.ITransmutationEffectLogic;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -19,7 +19,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockEffectJar extends BlockContainer
|
||||
{
|
||||
{
|
||||
public BlockEffectJar()
|
||||
{
|
||||
super(Material.glass);
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package magicbees.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
import magicbees.block.types.HiveType;
|
||||
import magicbees.main.MagicBees;
|
||||
import net.minecraft.block.Block;
|
||||
@@ -14,14 +16,11 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.IWorldAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import forestry.api.core.Tabs;
|
||||
|
||||
public class BlockHive extends Block
|
||||
{
|
||||
{
|
||||
public BlockHive()
|
||||
{
|
||||
super(new MaterialHive());
|
||||
@@ -38,7 +37,7 @@ public class BlockHive extends Block
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int meta)
|
||||
public int damageDropped(int meta)
|
||||
{
|
||||
return meta;
|
||||
}
|
||||
@@ -96,17 +95,17 @@ public class BlockHive extends Block
|
||||
{
|
||||
Block block = world.getBlock(x, y, z);
|
||||
|
||||
if (block.isAir(world, x, y, z))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if (block.isAir(world, x, y, z))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Item item = Item.getItemFromBlock(block);
|
||||
if (item == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new ItemStack(item, 1, getDamageValue(world, x, y, z) & 7);
|
||||
Item item = Item.getItemFromBlock(block);
|
||||
if (item == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new ItemStack(item, 1, getDamageValue(world, x, y, z) & 7);
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,8 @@ package magicbees.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.block.types.PlankType;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.MagicBees;
|
||||
@@ -13,8 +15,6 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockPlanks extends Block
|
||||
{
|
||||
@@ -49,20 +49,20 @@ public class BlockPlanks extends Block
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta)
|
||||
{
|
||||
return this.IIcons[Math.max(0, Math.min(meta & 7, IIcons.length-1))];
|
||||
return this.IIcons[Math.max(0, Math.min(meta & 7, IIcons.length - 1))];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister par1IIconRegister)
|
||||
{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister par1IIconRegister)
|
||||
{
|
||||
this.IIcons = new IIcon[PlankType.values().length];
|
||||
for (PlankType t : PlankType.values())
|
||||
{
|
||||
this.IIcons[t.ordinal()] = par1IIconRegister.registerIcon(CommonProxy.DOMAIN + ":" + t.name);
|
||||
}
|
||||
}
|
||||
for (PlankType t : PlankType.values())
|
||||
{
|
||||
this.IIcons[t.ordinal()] = par1IIconRegister.registerIcon(CommonProxy.DOMAIN + ":" + t.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,40 +15,41 @@ import net.minecraft.world.World;
|
||||
|
||||
public class BlockThaumicApiary extends BlockContainer
|
||||
{
|
||||
public BlockThaumicApiary()
|
||||
{
|
||||
super(Material.wood);
|
||||
this.setCreativeTab(TabMagicBees.tabMagicBees);
|
||||
this.setBlockName("thaumicApiary");
|
||||
this.setHardness(1f);
|
||||
this.setResistance(1.5f);
|
||||
this.setHarvestLevel("axe", 0);
|
||||
}
|
||||
public BlockThaumicApiary()
|
||||
{
|
||||
super(Material.wood);
|
||||
this.setCreativeTab(TabMagicBees.tabMagicBees);
|
||||
this.setBlockName("thaumicApiary");
|
||||
this.setHardness(1f);
|
||||
this.setResistance(1.5f);
|
||||
this.setHarvestLevel("axe", 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9 )
|
||||
{
|
||||
boolean activate = false;
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
boolean activate = false;
|
||||
|
||||
if (!player.isSneaking())
|
||||
{
|
||||
player.openGui(MagicBees.object, UIScreens.THAUMIC_APIARY.ordinal(), world, x, y, z);
|
||||
activate = true;
|
||||
}
|
||||
if (!player.isSneaking())
|
||||
{
|
||||
player.openGui(MagicBees.object, UIScreens.THAUMIC_APIARY.ordinal(), world, x, y, z);
|
||||
activate = true;
|
||||
}
|
||||
|
||||
return activate;
|
||||
}
|
||||
return activate;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister register)
|
||||
{
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister register)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityThaumicApiary();
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
||||
{
|
||||
return new TileEntityThaumicApiary();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,6 +3,8 @@ package magicbees.block;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.block.types.PlankType;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.Config;
|
||||
@@ -18,8 +20,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockWoodSlab extends BlockSlab
|
||||
{
|
||||
@@ -41,15 +41,15 @@ public class BlockWoodSlab extends BlockSlab
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int id, Random rand, int par3)
|
||||
{
|
||||
return Item.getItemFromBlock(Config.slabWoodHalf);
|
||||
}
|
||||
public Item getItemDropped(int id, Random rand, int par3)
|
||||
{
|
||||
return Item.getItemFromBlock(Config.slabWoodHalf);
|
||||
}
|
||||
|
||||
protected ItemStack createStackedBlock(int meta)
|
||||
{
|
||||
return new ItemStack(Config.planksWood, 1, meta & 7);
|
||||
}
|
||||
protected ItemStack createStackedBlock(int meta)
|
||||
{
|
||||
return new ItemStack(Config.planksWood, 1, meta & 7);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String func_150002_b(int meta)
|
||||
@@ -71,35 +71,35 @@ public class BlockWoodSlab extends BlockSlab
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta)
|
||||
{
|
||||
return this.icons[Math.max(0, Math.min(meta & 7, icons.length-1))];
|
||||
return this.icons[Math.max(0, Math.min(meta & 7, icons.length - 1))];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.icons = new IIcon[PlankType.values().length];
|
||||
for (PlankType t : PlankType.values())
|
||||
{
|
||||
this.icons[t.ordinal()] = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":" + t.name);
|
||||
}
|
||||
}
|
||||
for (PlankType t : PlankType.values())
|
||||
{
|
||||
this.icons[t.ordinal()] = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":" + t.name);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z)
|
||||
{
|
||||
Block block = world.getBlock(x, y, z);
|
||||
|
||||
if (block.isAir(world, x, y, z))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Item item = Item.getItemFromBlock(block);
|
||||
if (item == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new ItemStack(item, 1, getDamageValue(world, x, y, z) & 7);
|
||||
if (block.isAir(world, x, y, z))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Item item = Item.getItemFromBlock(block);
|
||||
if (item == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new ItemStack(item, 1, getDamageValue(world, x, y, z) & 7);
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
package magicbees.block.types;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.apiculture.IHiveDrop;
|
||||
import magicbees.bees.BeeGenomeManager;
|
||||
import magicbees.bees.BeeSpecies;
|
||||
import magicbees.bees.HiveDrop;
|
||||
@@ -19,9 +21,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
import net.minecraftforge.common.BiomeDictionary.Type;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
import forestry.api.apiculture.IHiveDrop;
|
||||
|
||||
public enum HiveType
|
||||
{
|
||||
@@ -57,7 +57,7 @@ public enum HiveType
|
||||
|
||||
public static void initHiveData()
|
||||
{
|
||||
ItemStack[] combs = new ItemStack[] {Config.combs.getStackForType(CombType.MUNDANE)};
|
||||
ItemStack[] combs = new ItemStack[] { Config.combs.getStackForType(CombType.MUNDANE) };
|
||||
HiveDrop valiantDrop = new HiveDrop(BeeGenomeManager.addRainResist(ForestryHelper.getTemplateForestryForSpecies("Valiant")), combs, 5);
|
||||
|
||||
CURIOUS.validBiomes.add(Type.FOREST);
|
||||
@@ -87,14 +87,14 @@ public enum HiveType
|
||||
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(Items.glowstone_dust, 6)};
|
||||
combs = new ItemStack[] { Config.combs.getStackForType(CombType.MOLTEN), new ItemStack(Items.glowstone_dust, 6) };
|
||||
|
||||
INFERNAL.validBiomes.add(Type.NETHER);
|
||||
INFERNAL.validBiomes.add(Type.MAGICAL);
|
||||
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(Items.ender_pearl, 1)};
|
||||
combs = new ItemStack[] { Config.combs.getStackForType(CombType.FORGOTTEN), new ItemStack(Items.ender_pearl, 1) };
|
||||
|
||||
OBLIVION.validBiomes.add(Type.END);
|
||||
OBLIVION.validBiomes.add(Type.MAGICAL);
|
||||
@@ -217,75 +217,75 @@ public enum HiveType
|
||||
{
|
||||
switch (this)
|
||||
{
|
||||
case CURIOUS:
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
int coordX = chunkX * 16 + random.nextInt(16);
|
||||
int coordZ = chunkZ * 16 + random.nextInt(16);
|
||||
if (FeatureHive.generateHiveCurious(world, random, coordX, coordZ, initialGen))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case UNUSUAL:
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
int coordX = chunkX * 16 + random.nextInt(16);
|
||||
int coordZ = chunkZ * 16 + random.nextInt(16);
|
||||
if (FeatureHive.generateHiveUnusual(world, random, coordX, coordZ, initialGen))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RESONANT:
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
int coordX = chunkX * 16 + random.nextInt(16);
|
||||
int coordZ = chunkZ * 16 + random.nextInt(16);
|
||||
if (FeatureHive.generateHiveResonant(world, random, coordX, coordZ, initialGen))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case DEEP:
|
||||
if (chunkX % 2 == 0 && chunkZ % 2 == 0)
|
||||
{
|
||||
for (int i = 0; i < 1; ++i)
|
||||
case CURIOUS:
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
int coordX = chunkX * 16 + random.nextInt(16);
|
||||
int coordZ = chunkZ * 16 + random.nextInt(16);
|
||||
if (FeatureHive.generateHiveDeep(world, random, coordX, coordZ, initialGen))
|
||||
if (FeatureHive.generateHiveCurious(world, random, coordX, coordZ, initialGen))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case INFERNAL:
|
||||
for (int i = 0; i < 2; ++i)
|
||||
{
|
||||
int coordX = chunkX * 16 + random.nextInt(16);
|
||||
int coordZ = chunkZ * 16 + random.nextInt(16);
|
||||
if (FeatureHive.generateHiveInfernal(world, random, coordX, coordZ, initialGen))
|
||||
break;
|
||||
case UNUSUAL:
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
break;
|
||||
int coordX = chunkX * 16 + random.nextInt(16);
|
||||
int coordZ = chunkZ * 16 + random.nextInt(16);
|
||||
if (FeatureHive.generateHiveUnusual(world, random, coordX, coordZ, initialGen))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case OBLIVION:
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
int coordX = chunkX * 16 + random.nextInt(16);
|
||||
int coordZ = chunkZ * 16 + random.nextInt(16);
|
||||
if (FeatureHive.generateHiveOblivion(world, random, coordX, coordZ, initialGen))
|
||||
break;
|
||||
case RESONANT:
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
break;
|
||||
int coordX = chunkX * 16 + random.nextInt(16);
|
||||
int coordZ = chunkZ * 16 + random.nextInt(16);
|
||||
if (FeatureHive.generateHiveResonant(world, random, coordX, coordZ, initialGen))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
case DEEP:
|
||||
if (chunkX % 2 == 0 && chunkZ % 2 == 0)
|
||||
{
|
||||
for (int i = 0; i < 1; ++i)
|
||||
{
|
||||
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 < 2; ++i)
|
||||
{
|
||||
int coordX = chunkX * 16 + random.nextInt(16);
|
||||
int coordZ = chunkZ * 16 + random.nextInt(16);
|
||||
if (FeatureHive.generateHiveInfernal(world, random, coordX, coordZ, initialGen))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case OBLIVION:
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
int coordX = chunkX * 16 + random.nextInt(16);
|
||||
int coordZ = chunkZ * 16 + random.nextInt(16);
|
||||
if (FeatureHive.generateHiveOblivion(world, random, coordX, coordZ, initialGen))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,17 +24,17 @@ public class ContainerEffectJar extends Container
|
||||
("forestry", "beeDroneGE", 1)));
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 74 + i * 18));
|
||||
}
|
||||
}
|
||||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 74 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 132));
|
||||
}
|
||||
for (int i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 132));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,11 +2,9 @@ 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.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package magicbees.client.gui;
|
||||
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import magicbees.tileentity.TileEntityEffectJar;
|
||||
import magicbees.tileentity.TileEntityThaumicApiary;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
|
||||
public class GUIHandler implements IGuiHandler
|
||||
{
|
||||
@@ -18,10 +17,10 @@ public class GUIHandler implements IGuiHandler
|
||||
{
|
||||
value = new ContainerEffectJar((TileEntityEffectJar)world.getTileEntity(x, y, z), player);
|
||||
}
|
||||
else if (ID == UIScreens.THAUMIC_APIARY.ordinal())
|
||||
{
|
||||
//value = new Container((TileEntityThaumicApiary)world.getTileEntity(x, y, z), player);
|
||||
}
|
||||
else if (ID == UIScreens.THAUMIC_APIARY.ordinal())
|
||||
{
|
||||
//value = new Container((TileEntityThaumicApiary)world.getTileEntity(x, y, z), player);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -1,30 +1,35 @@
|
||||
package magicbees.client.gui;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import cpw.mods.fml.client.IModGuiFactory;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
import java.util.Set;
|
||||
public class GuiFactory implements IModGuiFactory
|
||||
{
|
||||
|
||||
public class GuiFactory implements IModGuiFactory {
|
||||
@Override
|
||||
public void initialize(Minecraft minecraftInstance)
|
||||
{
|
||||
|
||||
@Override
|
||||
public void initialize(Minecraft minecraftInstance) {
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public Class<? extends GuiScreen> mainConfigGuiClass()
|
||||
{
|
||||
return ModGuiConfig.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiScreen> mainConfigGuiClass() {
|
||||
return ModGuiConfig.class;
|
||||
}
|
||||
@Override
|
||||
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,21 @@
|
||||
package magicbees.client.gui;
|
||||
|
||||
import cpw.mods.fml.client.config.GuiConfig;
|
||||
import cpw.mods.fml.client.config.IConfigElement;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.VersionInfo;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraftforge.common.config.ConfigElement;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ModGuiConfig extends GuiConfig {
|
||||
public ModGuiConfig(GuiScreen guiScreen)
|
||||
{
|
||||
super(guiScreen,
|
||||
new ConfigElement(Config.configuration.getCategory(Configuration.CATEGORY_GENERAL)).getChildElements(),
|
||||
VersionInfo.ModName,
|
||||
false,
|
||||
false,
|
||||
GuiConfig.getAbridgedConfigPath(Config.configuration.toString()));
|
||||
}
|
||||
public class ModGuiConfig extends GuiConfig
|
||||
{
|
||||
public ModGuiConfig(GuiScreen guiScreen)
|
||||
{
|
||||
super(guiScreen,
|
||||
new ConfigElement(Config.configuration.getCategory(Configuration.CATEGORY_GENERAL)).getChildElements(),
|
||||
VersionInfo.ModName,
|
||||
false,
|
||||
false,
|
||||
GuiConfig.getAbridgedConfigPath(Config.configuration.toString()));
|
||||
}
|
||||
}
|
||||
@@ -9,9 +9,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MysteriousAges
|
||||
*
|
||||
*/
|
||||
public class SlotCustomItems extends Slot
|
||||
{
|
||||
@@ -34,7 +32,6 @@ public class SlotCustomItems extends Slot
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return List of valid ItemStacks
|
||||
*/
|
||||
public List<ItemStack> getValidItems()
|
||||
@@ -69,7 +66,6 @@ public class SlotCustomItems extends Slot
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param removeItem ItemStack to remove.
|
||||
*/
|
||||
public void removeValidItem(ItemStack removeItem)
|
||||
@@ -108,7 +104,7 @@ public class SlotCustomItems extends Slot
|
||||
}
|
||||
else
|
||||
{
|
||||
flag = this.items.get(i).getItemDamage() ==OreDictionary.WILDCARD_VALUE;
|
||||
flag = this.items.get(i).getItemDamage() == OreDictionary.WILDCARD_VALUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,5 @@ package magicbees.client.gui;
|
||||
public enum UIScreens
|
||||
{
|
||||
EFFECT_JAR,
|
||||
THAUMIC_APIARY,
|
||||
;
|
||||
THAUMIC_APIARY,;
|
||||
}
|
||||
@@ -1,15 +1,13 @@
|
||||
package magicbees.client.model;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
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 cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ModelEffectJar
|
||||
{
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
package magicbees.client.render;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import magicbees.client.model.ModelEffectJar;
|
||||
import magicbees.tileentity.TileEntityEffectJar;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class EffectJarRenderer extends TileEntitySpecialRenderer implements IItemRenderer
|
||||
{
|
||||
public static EffectJarRenderer instance = new EffectJarRenderer();
|
||||
@@ -42,22 +39,22 @@ public class EffectJarRenderer extends TileEntitySpecialRenderer implements IIte
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
default:
|
||||
case ENTITY:
|
||||
doRender(0, 0, 0, 1.8f);
|
||||
break;
|
||||
default:
|
||||
case ENTITY:
|
||||
doRender(0, 0, 0, 1.8f);
|
||||
break;
|
||||
|
||||
case EQUIPPED:
|
||||
doRender(0, 0, 0, 1.5f);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
doRender(0, 0, 0, 1.5f);
|
||||
break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
doRender(-.5, .5, 0.25, 1f);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
doRender(-.5, .5, 0.25, 1f);
|
||||
break;
|
||||
|
||||
case INVENTORY:
|
||||
doRender(0.3, 0.25, 0.3, 1.5f);
|
||||
break;
|
||||
case INVENTORY:
|
||||
doRender(0.3, 0.25, 0.3, 1.5f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,16 +17,20 @@ public class ItemArmorApiarist extends Item implements IArmorApiarist
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
if (wearsHelmet(player)) {
|
||||
if (wearsHelmet(player))
|
||||
{
|
||||
count++;
|
||||
}
|
||||
if (wearsChest(player)) {
|
||||
if (wearsChest(player))
|
||||
{
|
||||
count++;
|
||||
}
|
||||
if (wearsLegs(player)) {
|
||||
if (wearsLegs(player))
|
||||
{
|
||||
count++;
|
||||
}
|
||||
if (wearsBoots(player)) {
|
||||
if (wearsBoots(player))
|
||||
{
|
||||
count++;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package magicbees.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -13,8 +15,6 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemCapsule extends Item
|
||||
{
|
||||
private CapsuleType capsuleType;
|
||||
@@ -66,19 +66,19 @@ public class ItemCapsule extends Item
|
||||
return true;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":capsule" + this.capsuleType.getName().substring(0, 1).toUpperCase()
|
||||
+ this.capsuleType.getName().substring(1));
|
||||
for (FluidType t : FluidType.values())
|
||||
{
|
||||
if (t != FluidType.EMPTY && t.liquidIcon == null)
|
||||
{
|
||||
t.liquidIcon = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":liquids/" + t.liquidID.toLowerCase());
|
||||
}
|
||||
}
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":capsule" + this.capsuleType.getName().substring(0, 1).toUpperCase()
|
||||
+ this.capsuleType.getName().substring(1));
|
||||
for (FluidType t : FluidType.values())
|
||||
{
|
||||
if (t != FluidType.EMPTY && t.liquidIcon == null)
|
||||
{
|
||||
t.liquidIcon = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":liquids/" + t.liquidID.toLowerCase());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package magicbees.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
import magicbees.item.types.CombType;
|
||||
import magicbees.main.MagicBees;
|
||||
import magicbees.main.utils.compat.ForestryHelper;
|
||||
@@ -12,8 +13,7 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import java.util.List;
|
||||
import forestry.api.core.Tabs;
|
||||
|
||||
public class ItemComb extends Item
|
||||
{
|
||||
@@ -29,7 +29,7 @@ public class ItemComb extends Item
|
||||
public ItemStack getStackForType(CombType type)
|
||||
{
|
||||
return new ItemStack(this, 1, type.ordinal());
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack getStackForType(CombType type, int count)
|
||||
{
|
||||
@@ -65,12 +65,12 @@ public class ItemComb extends Item
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon secondIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":beeCombs.0");
|
||||
this.secondIcon= par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":beeCombs.1");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":beeCombs.0");
|
||||
this.secondIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":beeCombs.1");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int pass)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package magicbees.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -11,8 +13,6 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemCrystalAspect extends Item
|
||||
{
|
||||
public ItemCrystalAspect()
|
||||
@@ -38,11 +38,11 @@ public class ItemCrystalAspect extends Item
|
||||
}*/
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":crystalAspect");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":crystalAspect");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package magicbees.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
import magicbees.item.types.DropType;
|
||||
import magicbees.main.utils.compat.ForestryHelper;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -11,8 +12,7 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import java.util.List;
|
||||
import forestry.api.core.Tabs;
|
||||
|
||||
public class ItemDrop extends Item
|
||||
{
|
||||
@@ -28,7 +28,7 @@ public class ItemDrop extends Item
|
||||
public ItemStack getStackForType(DropType type)
|
||||
{
|
||||
return new ItemStack(this, 1, type.ordinal());
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack getStackForType(DropType type, int count)
|
||||
{
|
||||
@@ -61,13 +61,13 @@ public class ItemDrop extends Item
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon secondIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":honeyDrop.0");
|
||||
this.secondIcon= par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":honeyDrop.1");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":honeyDrop.0");
|
||||
this.secondIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":honeyDrop.1");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int pass)
|
||||
{
|
||||
|
||||
@@ -1,27 +1,30 @@
|
||||
package magicbees.item;
|
||||
|
||||
import forestry.core.items.ItemForestryBlock;
|
||||
import magicbees.block.types.HiveType;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import forestry.core.items.ItemForestryBlock;
|
||||
|
||||
/**
|
||||
* Created by Allen on 7/29/2014.
|
||||
*/
|
||||
public class ItemMagicHive extends ItemForestryBlock {
|
||||
public ItemMagicHive(Block block) {
|
||||
super(block);
|
||||
}
|
||||
public class ItemMagicHive extends ItemForestryBlock
|
||||
{
|
||||
public ItemMagicHive(Block block)
|
||||
{
|
||||
super(block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack) {
|
||||
return getBlock().getUnlocalizedName() + "." + HiveType.getHiveFromMeta(itemstack.getItemDamage()).name().toLowerCase();
|
||||
}
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
{
|
||||
return getBlock().getUnlocalizedName() + "." + HiveType.getHiveFromMeta(itemstack.getItemDamage()).name().toLowerCase();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack p_77653_1_)
|
||||
{
|
||||
return ("" + StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(p_77653_1_) + ".name")).trim();
|
||||
}
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack p_77653_1_)
|
||||
{
|
||||
return ("" + StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(p_77653_1_) + ".name")).trim();
|
||||
}
|
||||
}
|
||||
@@ -3,10 +3,6 @@ package magicbees.item;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.apiculture.IBee;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IHiveFrame;
|
||||
import magicbees.item.types.HiveFrameType;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.utils.TabMagicBees;
|
||||
@@ -14,6 +10,10 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import forestry.api.apiculture.IBee;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IHiveFrame;
|
||||
|
||||
public class ItemMagicHiveFrame extends Item implements IHiveFrame
|
||||
{
|
||||
@@ -30,11 +30,11 @@ public class ItemMagicHiveFrame extends Item implements IHiveFrame
|
||||
GameRegistry.registerItem(this, "frame" + frameType.getName());
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":frame" + type.getName());
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":frame" + type.getName());
|
||||
}
|
||||
|
||||
// --------- IHiveFrame functions -----------------------------------------
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package magicbees.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -12,8 +14,6 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemMiscResources extends Item
|
||||
{
|
||||
private IIcon[] icons = new IIcon[ResourceType.values().length];
|
||||
@@ -30,7 +30,7 @@ public class ItemMiscResources extends Item
|
||||
public ItemStack getStackForType(ResourceType type)
|
||||
{
|
||||
return new ItemStack(this, 1, type.ordinal());
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack getStackForType(ResourceType type, int count)
|
||||
{
|
||||
@@ -50,15 +50,15 @@ public class ItemMiscResources extends Item
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
for (int i = 0; i < ResourceType.values().length; i++)
|
||||
{
|
||||
this.icons[i] = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":" + ResourceType.values()[i].getName());
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
for (int i = 0; i < ResourceType.values().length; i++)
|
||||
{
|
||||
this.icons[i] = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":" + ResourceType.values()[i].getName());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int meta)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package magicbees.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -13,8 +15,6 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemMoonDial extends Item
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -28,33 +28,33 @@ public class ItemMoonDial extends Item
|
||||
GameRegistry.registerItem(this, "moonDial");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.icons = new IIcon[MoonPhase.values().length];
|
||||
for (int i = 0; i < MoonPhase.values().length; ++i)
|
||||
{
|
||||
this.icons[i] = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":moonDial." + i);
|
||||
}
|
||||
this.itemIcon = this.icons[4];
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.icons = new IIcon[MoonPhase.values().length];
|
||||
for (int i = 0; i < MoonPhase.values().length; ++i)
|
||||
{
|
||||
this.icons[i] = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":moonDial." + i);
|
||||
}
|
||||
this.itemIcon = this.icons[4];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
|
||||
{
|
||||
{
|
||||
return this.icons[MoonPhase.getMoonPhaseFromTime(player.worldObj.getWorldTime()).ordinal()];
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List infoList, boolean par4)
|
||||
{
|
||||
public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List infoList, boolean par4)
|
||||
{
|
||||
if (MagicBees.getConfig().MoonDialShowsPhaseInText &&
|
||||
entityPlayer.getCurrentEquippedItem() != null &&
|
||||
entityPlayer.getCurrentEquippedItem().getItem() == this)
|
||||
{
|
||||
infoList.add("\u00A77" + MoonPhase.getMoonPhaseFromTime(entityPlayer.worldObj.getWorldTime()).getLocalizedName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package magicbees.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -19,8 +21,6 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemMysteriousMagnet extends Item
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -180,7 +180,7 @@ public class ItemMysteriousMagnet extends Item
|
||||
if (world.rand.nextInt(20) == 0)
|
||||
{
|
||||
float pitch = 0.85f - world.rand.nextFloat() * 3f / 10f;
|
||||
world.playSoundEffect(e.posX, e.posY, e.posZ, "mob.endermen.portal", 0.6f, pitch);
|
||||
world.playSoundEffect(e.posX, e.posY, e.posZ, "mob.endermen.portal", 0.6f, pitch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
package magicbees.item;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.item.types.NuggetType;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.utils.LogHelper;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemNugget extends Item
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -50,17 +48,17 @@ public class ItemNugget extends Item
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.icons = new IIcon[NuggetType.values().length];
|
||||
for (int i = 0; i < NuggetType.values().length; i++)
|
||||
{
|
||||
this.icons[i] = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":nugget"
|
||||
+ NuggetType.values()[i].name().substring(0, 1)
|
||||
+ NuggetType.values()[i].name().substring(1).toLowerCase());
|
||||
}
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.icons = new IIcon[NuggetType.values().length];
|
||||
for (int i = 0; i < NuggetType.values().length; i++)
|
||||
{
|
||||
this.icons[i] = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":nugget"
|
||||
+ NuggetType.values()[i].name().substring(0, 1)
|
||||
+ NuggetType.values()[i].name().substring(1).toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package magicbees.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
import magicbees.item.types.PollenType;
|
||||
import magicbees.main.utils.compat.ForestryHelper;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -11,8 +12,7 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import java.util.List;
|
||||
import forestry.api.core.Tabs;
|
||||
|
||||
public class ItemPollen extends Item
|
||||
{
|
||||
@@ -24,10 +24,11 @@ public class ItemPollen extends Item
|
||||
this.setUnlocalizedName("pollen");
|
||||
GameRegistry.registerItem(this, "pollen");
|
||||
}
|
||||
|
||||
public ItemStack getStackForType(PollenType type)
|
||||
{
|
||||
return new ItemStack(this, 1, type.ordinal());
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack getStackForType(PollenType type, int count)
|
||||
{
|
||||
@@ -60,13 +61,13 @@ public class ItemPollen extends Item
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon secondIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":pollen.0");
|
||||
this.secondIcon= par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":pollen.1");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":pollen.0");
|
||||
this.secondIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":pollen.1");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int pass)
|
||||
{
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package magicbees.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
import magicbees.item.types.PropolisType;
|
||||
import magicbees.main.utils.compat.ForestryHelper;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.List;
|
||||
import forestry.api.core.Tabs;
|
||||
|
||||
public class ItemPropolis extends Item
|
||||
{
|
||||
@@ -27,7 +27,7 @@ public class ItemPropolis extends Item
|
||||
public ItemStack getStackForType(PropolisType type)
|
||||
{
|
||||
return new ItemStack(this, 1, type.ordinal());
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack getStackForType(PropolisType type, int count)
|
||||
{
|
||||
@@ -44,11 +44,11 @@ public class ItemPropolis extends Item
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":propolis.0");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":propolis.0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColorFromItemStack(ItemStack stack, int pass)
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package magicbees.item;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -19,12 +21,11 @@ import thaumcraft.api.IRepairableExtended;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import forestry.api.arboriculture.IToolGrafter;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
@Optional.InterfaceList(
|
||||
{@Optional.Interface(iface = "IRepairableExtended", modid = "Thaumcraft", striprefs = true),
|
||||
@Optional.Interface(iface = "IToolGrafter", modid = "forestry", striprefs = true)}
|
||||
{
|
||||
@Optional.Interface(iface = "IRepairableExtended", modid = "Thaumcraft", striprefs = true),
|
||||
@Optional.Interface(iface = "IToolGrafter", modid = "forestry", striprefs = true)
|
||||
}
|
||||
)
|
||||
public class ItemThaumiumGrafter extends Item implements IRepairableExtended, IToolGrafter
|
||||
{
|
||||
@@ -44,14 +45,16 @@ public class ItemThaumiumGrafter extends Item implements IRepairableExtended, IT
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getToolClasses(ItemStack itemStack) {
|
||||
public Set<String> getToolClasses(ItemStack itemStack)
|
||||
{
|
||||
HashSet<String> classes = new HashSet<String>(1);
|
||||
classes.add("grafter");
|
||||
return classes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHarvestLevel(ItemStack itemStack, String toolClass) {
|
||||
public int getHarvestLevel(ItemStack itemStack, String toolClass)
|
||||
{
|
||||
return toolClass.equals("grafter") ? 3 : 0;
|
||||
}
|
||||
|
||||
@@ -69,17 +72,19 @@ public class ItemThaumiumGrafter extends Item implements IRepairableExtended, IT
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack itemstack, World world, Block block, int x, int y, int z,
|
||||
EntityLivingBase entityLiving) {
|
||||
EntityLivingBase entityLiving)
|
||||
{
|
||||
int damage = 1;
|
||||
if (block == Config.tcLeaf)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z) & 1;
|
||||
if (meta == 0 || meta == 1)
|
||||
{
|
||||
double chance = Math.random();
|
||||
if (chance <= Config.ThaumcraftSaplingDroprate) {
|
||||
this.dropItem(world, x, y, z, new ItemStack(Config.tcPlant, 1, meta));
|
||||
}
|
||||
double chance = Math.random();
|
||||
if (chance <= Config.ThaumcraftSaplingDroprate)
|
||||
{
|
||||
this.dropItem(world, x, y, z, new ItemStack(Config.tcPlant, 1, meta));
|
||||
}
|
||||
}
|
||||
}
|
||||
itemstack.damageItem(damage, entityLiving);
|
||||
@@ -88,48 +93,48 @@ public class ItemThaumiumGrafter extends Item implements IRepairableExtended, IT
|
||||
|
||||
private void dropItem(World world, int x, int y, int z, ItemStack item)
|
||||
{
|
||||
if (!world.isRemote && world.getGameRules().getGameRuleBooleanValue("doTileDrops"))
|
||||
{
|
||||
float f = 0.7F;
|
||||
double d0 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
||||
double d1 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
||||
double d2 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
||||
EntityItem entityitem = new EntityItem(world, (double)x + d0, (double)y + d1, (double)z + d2, item);
|
||||
entityitem.delayBeforeCanPickup = 10;
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
if (!world.isRemote && world.getGameRules().getGameRuleBooleanValue("doTileDrops"))
|
||||
{
|
||||
float f = 0.7F;
|
||||
double d0 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
||||
double d1 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
||||
double d2 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
||||
EntityItem entityitem = new EntityItem(world, (double)x + d0, (double)y + d1, (double)z + d2, item);
|
||||
entityitem.delayBeforeCanPickup = 10;
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the enchantability factor of the item, most of the time is based on material.
|
||||
*/
|
||||
@Optional.Method(modid = "Thaumcraft")
|
||||
public int getItemEnchantability()
|
||||
{
|
||||
return ThaumcraftApi.toolMatThaumium.getEnchantability();
|
||||
}
|
||||
/**
|
||||
* Return the enchantability factor of the item, most of the time is based on material.
|
||||
*/
|
||||
@Optional.Method(modid = "Thaumcraft")
|
||||
public int getItemEnchantability()
|
||||
{
|
||||
return ThaumcraftApi.toolMatThaumium.getEnchantability();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the name for this tool's material.
|
||||
*/
|
||||
@Optional.Method(modid = "Thaumcraft")
|
||||
public String getToolMaterialName()
|
||||
{
|
||||
return ThaumcraftApi.toolMatThaumium.toString();
|
||||
}
|
||||
/**
|
||||
* Return the name for this tool's material.
|
||||
*/
|
||||
@Optional.Method(modid = "Thaumcraft")
|
||||
public String getToolMaterialName()
|
||||
{
|
||||
return ThaumcraftApi.toolMatThaumium.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether this item is repairable in an anvil.
|
||||
*/
|
||||
@Optional.Method(modid = "Thaumcraft")
|
||||
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
|
||||
{
|
||||
return ThaumcraftApi.toolMatThaumium.customCraftingMaterial == par2ItemStack.getItem() ? true : super.getIsRepairable
|
||||
(par1ItemStack, par2ItemStack);
|
||||
}
|
||||
/**
|
||||
* Return whether this item is repairable in an anvil.
|
||||
*/
|
||||
@Optional.Method(modid = "Thaumcraft")
|
||||
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
|
||||
{
|
||||
return ThaumcraftApi.toolMatThaumium.customCraftingMaterial == par2ItemStack.getItem() ? true : super.getIsRepairable
|
||||
(par1ItemStack, par2ItemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "Thaumcraft")
|
||||
@Optional.Method(modid = "Thaumcraft")
|
||||
public boolean doRepair(ItemStack stack, EntityPlayer player, int enchantLevel)
|
||||
{
|
||||
boolean flag = false;
|
||||
@@ -141,10 +146,10 @@ public class ItemThaumiumGrafter extends Item implements IRepairableExtended, IT
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon(CommonProxy.DOMAIN + ":thaumiumGrafter");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon(CommonProxy.DOMAIN + ":thaumiumGrafter");
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
package magicbees.item;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -15,12 +18,11 @@ import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import forestry.api.core.IToolScoop;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
@Optional.InterfaceList(
|
||||
{@Optional.Interface(iface = "IRepairable", modid = "Thaumcraft", striprefs = true),
|
||||
@Optional.Interface(iface = "IToolScoop", modid = "forestry", striprefs = true)}
|
||||
{
|
||||
@Optional.Interface(iface = "IRepairable", modid = "Thaumcraft", striprefs = true),
|
||||
@Optional.Interface(iface = "IToolScoop", modid = "forestry", striprefs = true)
|
||||
}
|
||||
)
|
||||
public class ItemThaumiumScoop extends Item implements IRepairable, IToolScoop
|
||||
{
|
||||
@@ -34,14 +36,16 @@ public class ItemThaumiumScoop extends Item implements IRepairable, IToolScoop
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getToolClasses(ItemStack itemStack) {
|
||||
public Set<String> getToolClasses(ItemStack itemStack)
|
||||
{
|
||||
HashSet<String> classes = new HashSet<String>(1);
|
||||
classes.add("scoop");
|
||||
return classes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHarvestLevel(ItemStack itemStack, String toolClass) {
|
||||
public int getHarvestLevel(ItemStack itemStack, String toolClass)
|
||||
{
|
||||
return toolClass.equals("scoop") ? 3 : 0;
|
||||
}
|
||||
|
||||
@@ -59,40 +63,41 @@ public class ItemThaumiumScoop extends Item implements IRepairable, IToolScoop
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack itemstack, World world, Block block, int j, int k, int l,
|
||||
EntityLivingBase entityliving) {
|
||||
EntityLivingBase entityliving)
|
||||
{
|
||||
itemstack.damageItem(1, entityliving);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the enchantability factor of the item, most of the time is based on material.
|
||||
*/
|
||||
public int getItemEnchantability()
|
||||
{
|
||||
return ThaumcraftApi.toolMatThaumium.getEnchantability();
|
||||
}
|
||||
/**
|
||||
* Return the enchantability factor of the item, most of the time is based on material.
|
||||
*/
|
||||
public int getItemEnchantability()
|
||||
{
|
||||
return ThaumcraftApi.toolMatThaumium.getEnchantability();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the name for this tool's material.
|
||||
*/
|
||||
public String getToolMaterialName()
|
||||
{
|
||||
return ThaumcraftApi.toolMatThaumium.toString();
|
||||
}
|
||||
/**
|
||||
* Return the name for this tool's material.
|
||||
*/
|
||||
public String getToolMaterialName()
|
||||
{
|
||||
return ThaumcraftApi.toolMatThaumium.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether this item is repairable in an anvil.
|
||||
*/
|
||||
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
|
||||
{
|
||||
return ThaumcraftApi.toolMatThaumium.customCraftingMaterial == par2ItemStack.getItem() ? true : super
|
||||
.getIsRepairable(par1ItemStack, par2ItemStack);
|
||||
}
|
||||
/**
|
||||
* Return whether this item is repairable in an anvil.
|
||||
*/
|
||||
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
|
||||
{
|
||||
return ThaumcraftApi.toolMatThaumium.customCraftingMaterial == par2ItemStack.getItem() ? true : super
|
||||
.getIsRepairable(par1ItemStack, par2ItemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon(CommonProxy.DOMAIN + ":thaumiumScoop");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon(CommonProxy.DOMAIN + ":thaumiumScoop");
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
package magicbees.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
import magicbees.item.types.WaxType;
|
||||
import magicbees.main.CommonProxy;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -11,8 +12,7 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import java.util.List;
|
||||
import forestry.api.core.Tabs;
|
||||
|
||||
public class ItemWax extends Item
|
||||
{
|
||||
@@ -37,14 +37,14 @@ public class ItemWax extends Item
|
||||
{
|
||||
return new ItemStack(this, count, type.ordinal());
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":wax.0");
|
||||
this.secondaryIcon = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":wax.1");
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":wax.0");
|
||||
this.secondaryIcon = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":wax.1");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int meta)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package magicbees.item.types;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
public enum CapsuleType
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package magicbees.item.types;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public enum CombType
|
||||
{
|
||||
@@ -40,38 +39,38 @@ public enum CombType
|
||||
;
|
||||
|
||||
private static int[][] colours = new int[][] {
|
||||
{0xFF9859, 0xFFC58E},
|
||||
{0xcc3333, 0x1E160E},
|
||||
{0x9872FF, 0x2D2D2D},
|
||||
{0x3EE0D8, 0x3A3820},
|
||||
{0xE5425D, 0x323291},
|
||||
|
||||
{0xBCA664, 0x35332E},
|
||||
{0x7F7171, 0x876D53},
|
||||
{0xB7ACB7, 0x636363},
|
||||
{0x0092e9, 0x618fff},
|
||||
{0x2F9381, 0x773C31},
|
||||
{0xB191D8, 0x35443B},
|
||||
|
||||
{0xffff7e, 0x606308},
|
||||
{0xff3C01, 0x5B0D10},
|
||||
{0x0090ff, 0x102F6B},
|
||||
{0x00a000, 0x043004},
|
||||
{ 0xFF9859, 0xFFC58E },
|
||||
{ 0xcc3333, 0x1E160E },
|
||||
{ 0x9872FF, 0x2D2D2D },
|
||||
{ 0x3EE0D8, 0x3A3820 },
|
||||
{ 0xE5425D, 0x323291 },
|
||||
|
||||
{0xFFDF14, 0x707019},
|
||||
{0xE21802, 0x3F0E12},
|
||||
{0x00B6FF, 0x0F373D},
|
||||
{0x28D328, 0x333004},
|
||||
{0xDDDDFF, 0x9D9DB5},
|
||||
{0x555577, 0x2D2D56},
|
||||
|
||||
{0xCC8604, 0x41046F},
|
||||
{0xCCCC04, 0x41046F},
|
||||
|
||||
{0xCC002C, 0x6B0118},
|
||||
{0x454545, 0x0F0F0F},
|
||||
{0xF5F3A4, 0xC9C87D},
|
||||
{0x12E3D9, 0x069E97},
|
||||
{ 0xBCA664, 0x35332E },
|
||||
{ 0x7F7171, 0x876D53 },
|
||||
{ 0xB7ACB7, 0x636363 },
|
||||
{ 0x0092e9, 0x618fff },
|
||||
{ 0x2F9381, 0x773C31 },
|
||||
{ 0xB191D8, 0x35443B },
|
||||
|
||||
{ 0xffff7e, 0x606308 },
|
||||
{ 0xff3C01, 0x5B0D10 },
|
||||
{ 0x0090ff, 0x102F6B },
|
||||
{ 0x00a000, 0x043004 },
|
||||
|
||||
{ 0xFFDF14, 0x707019 },
|
||||
{ 0xE21802, 0x3F0E12 },
|
||||
{ 0x00B6FF, 0x0F373D },
|
||||
{ 0x28D328, 0x333004 },
|
||||
{ 0xDDDDFF, 0x9D9DB5 },
|
||||
{ 0x555577, 0x2D2D56 },
|
||||
|
||||
{ 0xCC8604, 0x41046F },
|
||||
{ 0xCCCC04, 0x41046F },
|
||||
|
||||
{ 0xCC002C, 0x6B0118 },
|
||||
{ 0x454545, 0x0F0F0F },
|
||||
{ 0xF5F3A4, 0xC9C87D },
|
||||
{ 0x12E3D9, 0x069E97 },
|
||||
};
|
||||
|
||||
private CombType(String pName, boolean show)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package magicbees.item.types;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
public enum DropType
|
||||
{
|
||||
|
||||
@@ -14,14 +14,14 @@ public enum HiveFrameType
|
||||
;
|
||||
|
||||
private HiveFrameType(String name, int damage,
|
||||
float territory, float mutation, float lifespan, float production, float geneticDecay)
|
||||
float territory, float mutation, float lifespan, float production, float geneticDecay)
|
||||
{
|
||||
this(name, damage, territory, mutation, lifespan, production, 1f, geneticDecay, false, false, false, false);
|
||||
}
|
||||
|
||||
private HiveFrameType(String name, int damage,
|
||||
float territory, float mutation, float lifespan, float production, float flowering, float geneticDecay,
|
||||
boolean sealed, boolean lit, boolean sunlit, boolean hellish)
|
||||
float territory, float mutation, float lifespan, float production, float flowering, float geneticDecay,
|
||||
boolean sealed, boolean lit, boolean sunlit, boolean hellish)
|
||||
{
|
||||
this.frameName = name;
|
||||
this.maxDamage = damage;
|
||||
|
||||
@@ -2,7 +2,6 @@ package magicbees.item.types;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public enum NuggetType
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package magicbees.item.types;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
public enum PollenType
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package magicbees.item.types;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
public enum PropolisType
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package magicbees.item.types;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
public enum ResourceType
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package magicbees.item.types;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
public enum WaxType
|
||||
{
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
package magicbees.main;
|
||||
|
||||
import magicbees.client.render.EffectJarRenderer;
|
||||
import magicbees.tileentity.TileEntityEffectJar;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.client.render.EffectJarRenderer;
|
||||
import magicbees.tileentity.TileEntityEffectJar;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ClientProxy extends CommonProxy
|
||||
{ @Override
|
||||
{
|
||||
@Override
|
||||
public void registerRenderers()
|
||||
{
|
||||
super.registerRenderers();
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
package magicbees.main;
|
||||
|
||||
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 DOMAIN = "magicbees";
|
||||
|
||||
@@ -1,22 +1,39 @@
|
||||
package magicbees.main;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import forestry.api.apiculture.BeeManager;
|
||||
import forestry.api.storage.BackpackManager;
|
||||
import forestry.api.storage.EnumBackpackType;
|
||||
import forestry.api.storage.IBackpackDefinition;
|
||||
import magicbees.block.BlockEffectJar;
|
||||
import magicbees.block.BlockHive;
|
||||
import magicbees.block.BlockPlanks;
|
||||
import magicbees.block.BlockWoodSlab;
|
||||
import magicbees.block.types.HiveType;
|
||||
import magicbees.block.types.PlankType;
|
||||
import magicbees.item.*;
|
||||
import magicbees.item.types.*;
|
||||
import magicbees.item.ItemCapsule;
|
||||
import magicbees.item.ItemComb;
|
||||
import magicbees.item.ItemCrystalAspect;
|
||||
import magicbees.item.ItemDrop;
|
||||
import magicbees.item.ItemMagicHive;
|
||||
import magicbees.item.ItemMagicHiveFrame;
|
||||
import magicbees.item.ItemMiscResources;
|
||||
import magicbees.item.ItemMoonDial;
|
||||
import magicbees.item.ItemMysteriousMagnet;
|
||||
import magicbees.item.ItemNugget;
|
||||
import magicbees.item.ItemPollen;
|
||||
import magicbees.item.ItemPropolis;
|
||||
import magicbees.item.ItemThaumiumGrafter;
|
||||
import magicbees.item.ItemThaumiumScoop;
|
||||
import magicbees.item.ItemWax;
|
||||
import magicbees.item.types.CapsuleType;
|
||||
import magicbees.item.types.HiveFrameType;
|
||||
import magicbees.item.types.NuggetType;
|
||||
import magicbees.item.types.ResourceType;
|
||||
import magicbees.item.types.WaxType;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.LogHelper;
|
||||
import magicbees.main.utils.VersionInfo;
|
||||
@@ -26,57 +43,54 @@ import magicbees.tileentity.TileEntityEffectJar;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemMultiTexture;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
import net.minecraftforge.common.ChestGenHooks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Field;
|
||||
import forestry.api.apiculture.BeeManager;
|
||||
import forestry.api.storage.BackpackManager;
|
||||
import forestry.api.storage.EnumBackpackType;
|
||||
|
||||
/**
|
||||
* A class to hold some data related to mod state & functions.
|
||||
* @author MysteriousAges
|
||||
*
|
||||
* @author MysteriousAges
|
||||
*/
|
||||
public class Config
|
||||
{
|
||||
public boolean DrawParticleEffects;
|
||||
public boolean BeeInfusionsAdded;
|
||||
public static boolean ThaumaturgeBackpackActive;
|
||||
public boolean AddThaumcraftItemsToBackpacks;
|
||||
public boolean DisableUpdateNotification;
|
||||
public boolean AreMagicPlanksFlammable;
|
||||
public boolean UseImpregnatedStickInTools;
|
||||
public boolean MoonDialShowsPhaseInText;
|
||||
public boolean DoSpecialHiveGen;
|
||||
public String ThaumaturgeExtraItems;
|
||||
public int CapsuleStackSizeMax;
|
||||
public boolean DoHiveRetrogen;
|
||||
public boolean ForceHiveRegen;
|
||||
public static boolean LogHiveSpawns;
|
||||
public static double ThaumcraftSaplingDroprate;
|
||||
public boolean DrawParticleEffects;
|
||||
public boolean BeeInfusionsAdded;
|
||||
public static boolean ThaumaturgeBackpackActive;
|
||||
public boolean AddThaumcraftItemsToBackpacks;
|
||||
public boolean DisableUpdateNotification;
|
||||
public boolean AreMagicPlanksFlammable;
|
||||
public boolean UseImpregnatedStickInTools;
|
||||
public boolean MoonDialShowsPhaseInText;
|
||||
public boolean DoSpecialHiveGen;
|
||||
public String ThaumaturgeExtraItems;
|
||||
public int CapsuleStackSizeMax;
|
||||
public boolean DoHiveRetrogen;
|
||||
public boolean ForceHiveRegen;
|
||||
public static boolean LogHiveSpawns;
|
||||
public static double ThaumcraftSaplingDroprate;
|
||||
|
||||
public static boolean ArsMagicaActive;
|
||||
public static boolean BloodMagicActive;
|
||||
public static boolean EquivalentExchangeActive;
|
||||
public static boolean ExtraBeesActive;
|
||||
public static boolean RedstoneArsenalActive;
|
||||
public static boolean ThaumcraftActive;
|
||||
public static boolean ThermalExpansionActive;
|
||||
|
||||
public float MagnetBaseRange;
|
||||
public float MagnetLevelMultiplier;
|
||||
public int MagnetMaxLevel;
|
||||
|
||||
public boolean ForestryDebugEnabled;
|
||||
public static boolean ArsMagicaActive;
|
||||
public static boolean BloodMagicActive;
|
||||
public static boolean EquivalentExchangeActive;
|
||||
public static boolean ExtraBeesActive;
|
||||
public static boolean RedstoneArsenalActive;
|
||||
public static boolean ThaumcraftActive;
|
||||
public static boolean ThermalExpansionActive;
|
||||
|
||||
public float MagnetBaseRange;
|
||||
public float MagnetLevelMultiplier;
|
||||
public int MagnetMaxLevel;
|
||||
|
||||
public boolean ForestryDebugEnabled;
|
||||
|
||||
public static BlockPlanks planksWood;
|
||||
public static BlockWoodSlab slabWoodHalf;
|
||||
@@ -160,14 +174,14 @@ public class Config
|
||||
public static Item amEssence;
|
||||
//----Redstone Arsenal Items---
|
||||
public static ItemStack rsaFluxBlock;
|
||||
public static ItemStack rsaFluxNugget;
|
||||
public static ItemStack rsaFluxNugget;
|
||||
//---ThermalExpansion Items ---
|
||||
public static ItemStack teEnderiumBlock;
|
||||
public static ItemStack teElectrumBlock;
|
||||
public static ItemStack teInvarBlock;
|
||||
public static ItemStack teNickelBlock;
|
||||
public static ItemStack tePlatinumBlock;
|
||||
public static ItemStack teBronzeBlock;
|
||||
public static ItemStack teBronzeBlock;
|
||||
public static ItemStack teEnderiumNugget;
|
||||
public static ItemStack teInvarNugget;
|
||||
public static ItemStack teElectrumNugget;
|
||||
@@ -182,23 +196,20 @@ public class Config
|
||||
public static FluidStack teFluidCoal;
|
||||
public static FluidStack teFluidRedstone;
|
||||
public static FluidStack teFluidEnder;
|
||||
//--- Blood Magic Blocks ---
|
||||
public static Block bmBloodStoneBrick;
|
||||
//--- Blood Magic Items ---
|
||||
public static ItemStack bmIncendium;
|
||||
public static ItemStack bmMagicales;
|
||||
public static ItemStack bmSanctus;
|
||||
public static ItemStack bmAether;
|
||||
public static ItemStack bmCrepitous;
|
||||
public static ItemStack bmCrystallos;
|
||||
public static ItemStack bmTerrae;
|
||||
public static ItemStack bmAquasalus;
|
||||
public static ItemStack bmTennebrae;
|
||||
//--- Blood Magic Blocks ---
|
||||
public static Block bmBloodStoneBrick;
|
||||
//--- Blood Magic Items ---
|
||||
public static ItemStack bmIncendium;
|
||||
public static ItemStack bmMagicales;
|
||||
public static ItemStack bmSanctus;
|
||||
public static ItemStack bmAether;
|
||||
public static ItemStack bmCrepitous;
|
||||
public static ItemStack bmCrystallos;
|
||||
public static ItemStack bmTerrae;
|
||||
public static ItemStack bmAquasalus;
|
||||
public static ItemStack bmTennebrae;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//----- Config State info ----------------------------------
|
||||
public static Configuration configuration;
|
||||
|
||||
@@ -209,20 +220,20 @@ public class Config
|
||||
this.doMiscConfig();
|
||||
|
||||
this.ForestryDebugEnabled = (new File("./config/forestry/DEBUG.ON")).exists();
|
||||
this.configuration.save();
|
||||
this.configuration.save();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onConfigurationChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event)
|
||||
{
|
||||
if (event.modID.equalsIgnoreCase(VersionInfo.ModName))
|
||||
{
|
||||
if (configuration.hasChanged())
|
||||
{
|
||||
this.configuration.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
@SubscribeEvent
|
||||
public void onConfigurationChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event)
|
||||
{
|
||||
if (event.modID.equalsIgnoreCase(VersionInfo.ModName))
|
||||
{
|
||||
if (configuration.hasChanged())
|
||||
{
|
||||
this.configuration.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void saveConfigs()
|
||||
{
|
||||
@@ -234,33 +245,33 @@ public class Config
|
||||
{
|
||||
if (ThaumcraftHelper.isActive())
|
||||
{
|
||||
/**
|
||||
planksWood = new BlockPlanks();
|
||||
planksWood.setBlockName("planks");
|
||||
/**
|
||||
planksWood = new BlockPlanks();
|
||||
planksWood.setBlockName("planks");
|
||||
|
||||
//Item.itemsList[planksWood.blockID] = null;
|
||||
//Item.itemsList[planksWood.blockID] = new ItemMultiTexture(planksWood.blockID - 256, planksWood,
|
||||
// PlankType.getAllNames());
|
||||
//Item.itemsList[planksWood.blockID] = null;
|
||||
//Item.itemsList[planksWood.blockID] = new ItemMultiTexture(planksWood.blockID - 256, planksWood,
|
||||
// PlankType.getAllNames());
|
||||
|
||||
//FMLInterModComms.sendMessage("BuildCraft|Transport", "add-facade", MagicBees.getConfig().planksWood
|
||||
// .blockID + "@" + PlankType.GREATWOOD.ordinal());
|
||||
//FMLInterModComms.sendMessage("BuildCraft|Transport", "add-facade", MagicBees.getConfig().planksWood
|
||||
// .blockID + "@" + PlankType.SILVERWOOD.ordinal());
|
||||
//FMLInterModComms.sendMessage("BuildCraft|Transport", "add-facade", MagicBees.getConfig().planksWood
|
||||
// .blockID + "@" + PlankType.GREATWOOD.ordinal());
|
||||
//FMLInterModComms.sendMessage("BuildCraft|Transport", "add-facade", MagicBees.getConfig().planksWood
|
||||
// .blockID + "@" + PlankType.SILVERWOOD.ordinal());
|
||||
|
||||
slabWoodFull = new BlockWoodSlab(true);
|
||||
slabWoodHalf = new BlockWoodSlab(false);
|
||||
slabWoodFull = new BlockWoodSlab(true);
|
||||
slabWoodHalf = new BlockWoodSlab(false);
|
||||
|
||||
slabWoodFull.setBlockName("planks");
|
||||
slabWoodHalf.setBlockName("planks");
|
||||
slabWoodFull.setBlockName("planks");
|
||||
slabWoodHalf.setBlockName("planks");
|
||||
|
||||
/*Item.itemsList[slabWoodHalf.blockID] = null;
|
||||
Item.itemsList[slabWoodHalf.blockID] = new ItemSlab(slabWoodHalf.blockID - 256, slabWoodHalf, slabWoodFull, false);
|
||||
Item.itemsList[slabWoodFull.blockID] = null;
|
||||
Item.itemsList[slabWoodFull.blockID] = new ItemSlab(slabWoodFull.blockID - 256, slabWoodHalf,
|
||||
slabWoodFull, true);*/
|
||||
/*Item.itemsList[slabWoodHalf.blockID] = null;
|
||||
Item.itemsList[slabWoodHalf.blockID] = new ItemSlab(slabWoodHalf.blockID - 256, slabWoodHalf, slabWoodFull, false);
|
||||
Item.itemsList[slabWoodFull.blockID] = null;
|
||||
Item.itemsList[slabWoodFull.blockID] = new ItemSlab(slabWoodFull.blockID - 256, slabWoodHalf,
|
||||
slabWoodFull, true);*/
|
||||
|
||||
//OreDictionary.registerOre("plankWood", new ItemStack(planksWood, 1, -1));
|
||||
//OreDictionary.registerOre("slabWood", new ItemStack(slabWoodHalf, 1, -1));
|
||||
//OreDictionary.registerOre("plankWood", new ItemStack(planksWood, 1, -1));
|
||||
//OreDictionary.registerOre("slabWood", new ItemStack(slabWoodHalf, 1, -1));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -274,7 +285,7 @@ public class Config
|
||||
|
||||
for (HiveType t : HiveType.values())
|
||||
{
|
||||
hive.setHarvestLevel("scoop", 0, t.ordinal() );
|
||||
hive.setHarvestLevel("scoop", 0, t.ordinal());
|
||||
}
|
||||
|
||||
LogHelper.info("Replacing stupid-block with 'Here, have some delicious textures' ItemBlock. This is 100%% normal.");
|
||||
@@ -283,7 +294,7 @@ public class Config
|
||||
}
|
||||
|
||||
public void setupItems()
|
||||
{
|
||||
{
|
||||
combs = new ItemComb();
|
||||
wax = new ItemWax();
|
||||
propolis = new ItemPropolis();
|
||||
@@ -303,10 +314,10 @@ public class Config
|
||||
BackpackDefinition def = new BackpackDefinition("thaumaturge", backpackName, 0x8700C6);
|
||||
thaumaturgeBackpackT1 = BackpackManager.backpackInterface.addBackpack(def, EnumBackpackType.T1);
|
||||
thaumaturgeBackpackT1.setUnlocalizedName("backpack.thaumaturgeT1");
|
||||
GameRegistry.registerItem(thaumaturgeBackpackT1, "backpack.thaumaturgeT1");
|
||||
GameRegistry.registerItem(thaumaturgeBackpackT1, "backpack.thaumaturgeT1");
|
||||
thaumaturgeBackpackT2 = BackpackManager.backpackInterface.addBackpack(def, EnumBackpackType.T2);
|
||||
thaumaturgeBackpackT2.setUnlocalizedName("backpack.thaumaturgeT2");
|
||||
GameRegistry.registerItem(thaumaturgeBackpackT2, "backpack.thaumaturgeT2");
|
||||
GameRegistry.registerItem(thaumaturgeBackpackT2, "backpack.thaumaturgeT2");
|
||||
// Add additional items from configs to backpack.
|
||||
if (MagicBees.getConfig().ThaumaturgeExtraItems.length() > 0)
|
||||
{
|
||||
@@ -354,7 +365,8 @@ public class Config
|
||||
{
|
||||
if (ThaumcraftHelper.isActive())
|
||||
{
|
||||
try {
|
||||
try
|
||||
{
|
||||
// Reflecting avoids the need to directly include the Thaumcraft API in the jar. BAM!
|
||||
Constructor ctor1 = Class.forName("magicbees.item.ItemThaumiumScoop").getConstructor();
|
||||
thaumiumScoop = new ItemThaumiumScoop();
|
||||
@@ -363,7 +375,10 @@ public class Config
|
||||
Constructor ctor2 = Class.forName("magicbees.item.ItemThaumiumGrafter").getConstructor();
|
||||
thaumiumGrafter = new ItemThaumiumGrafter();
|
||||
GameRegistry.registerItem(thaumiumGrafter, thaumiumGrafter.getUnlocalizedName(), CommonProxy.DOMAIN);
|
||||
} catch (Exception e) { }
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -375,8 +390,8 @@ public class Config
|
||||
magnet.setBaseRange(MagnetBaseRange);
|
||||
magnet.setLevelMultiplier(MagnetLevelMultiplier);
|
||||
magnet.setMaximumLevel(MagnetMaxLevel);
|
||||
GameRegistry.registerItem(magnet, "magnet", CommonProxy.DOMAIN);
|
||||
|
||||
GameRegistry.registerItem(magnet, "magnet", CommonProxy.DOMAIN);
|
||||
|
||||
for (int level = 0; level <= 8; level++)
|
||||
{
|
||||
OreDictionary.registerOre("mb.magnet.level" + level, new ItemStack(magnet, 1, level * 2));
|
||||
@@ -397,24 +412,24 @@ public class Config
|
||||
OreDictionary.registerOre("shardApatite", nuggets.getStackForType(NuggetType.APATITE));
|
||||
|
||||
|
||||
String item;
|
||||
for (NuggetType type: NuggetType.values())
|
||||
{
|
||||
LogHelper.info("Found nugget of type " + type.toString());
|
||||
item = type.toString().toLowerCase();
|
||||
item = Character.toString(item.charAt(0)).toUpperCase() + item.substring(1);
|
||||
if (OreDictionary.getOres("ingot" + item).size() <= 0)
|
||||
{
|
||||
if (OreDictionary.getOres("shard" + item).size() <= 0)
|
||||
{
|
||||
LogHelper.info("Disabled nugget " + type.toString());
|
||||
type.setInactive();
|
||||
}
|
||||
}
|
||||
String item;
|
||||
for (NuggetType type : NuggetType.values())
|
||||
{
|
||||
LogHelper.info("Found nugget of type " + type.toString());
|
||||
item = type.toString().toLowerCase();
|
||||
item = Character.toString(item.charAt(0)).toUpperCase() + item.substring(1);
|
||||
if (OreDictionary.getOres("ingot" + item).size() <= 0)
|
||||
{
|
||||
if (OreDictionary.getOres("shard" + item).size() <= 0)
|
||||
{
|
||||
LogHelper.info("Disabled nugget " + type.toString());
|
||||
type.setInactive();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
GameRegistry.registerItem(nuggets, "beeNugget");
|
||||
GameRegistry.registerItem(nuggets, "beeNugget");
|
||||
}
|
||||
|
||||
private void doMiscConfig()
|
||||
@@ -433,9 +448,9 @@ public class Config
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
p = configuration.get("general", "backpack.thaumaturge.active", true);
|
||||
p.comment = "Set to false to disable the Thaumaturge backpack";
|
||||
this.ThaumaturgeBackpackActive = p.getBoolean(true);
|
||||
p = configuration.get("general", "backpack.thaumaturge.active", true);
|
||||
p.comment = "Set to false to disable the Thaumaturge backpack";
|
||||
this.ThaumaturgeBackpackActive = p.getBoolean(true);
|
||||
|
||||
p = configuration.get("general", "backpack.thaumaturge.additionalItems", "");
|
||||
p.comment = "Add additional items to the Thaumaturge's Backpack." +
|
||||
@@ -464,9 +479,9 @@ public class Config
|
||||
p.comment = "Set to true to make Thaumium Grafter & Scoop require impregnated sticks in the recipe.";
|
||||
this.UseImpregnatedStickInTools = p.getBoolean(false);
|
||||
|
||||
p = configuration.get("general", "thaumCraftSaplingDroprate", 0.1, "The chance for thaumcraft saplings using the thaumium grafter", 0.0, 1.0);
|
||||
this.ThaumcraftSaplingDroprate = p.getDouble(0.1);
|
||||
|
||||
p = configuration.get("general", "thaumCraftSaplingDroprate", 0.1, "The chance for thaumcraft saplings using the thaumium grafter", 0.0, 1.0);
|
||||
this.ThaumcraftSaplingDroprate = p.getDouble(0.1);
|
||||
|
||||
p = configuration.get("general", "moonDialShowText", false);
|
||||
p.comment = "set to true to show the current moon phase in mouse-over text.";
|
||||
this.MoonDialShowsPhaseInText = p.getBoolean(false);
|
||||
@@ -506,32 +521,32 @@ public class Config
|
||||
p.comment = "Maximum level of the magnets.";
|
||||
this.MagnetMaxLevel = p.getInt();
|
||||
|
||||
//Modules
|
||||
p = configuration.get("modules", "ArsMagica", true);
|
||||
this.ArsMagicaActive = p.getBoolean();
|
||||
//Modules
|
||||
p = configuration.get("modules", "ArsMagica", true);
|
||||
this.ArsMagicaActive = p.getBoolean();
|
||||
|
||||
p = configuration.get("modules", "BloodMagic", true);
|
||||
this.BloodMagicActive = p.getBoolean();
|
||||
p = configuration.get("modules", "BloodMagic", true);
|
||||
this.BloodMagicActive = p.getBoolean();
|
||||
|
||||
p = configuration.get("modules", "EquivalentExchange", true);
|
||||
this.EquivalentExchangeActive = p.getBoolean();
|
||||
p = configuration.get("modules", "EquivalentExchange", true);
|
||||
this.EquivalentExchangeActive = p.getBoolean();
|
||||
|
||||
p = configuration.get("modules", "ExtraBees", true);
|
||||
this.ExtraBeesActive = p.getBoolean();
|
||||
p = configuration.get("modules", "ExtraBees", true);
|
||||
this.ExtraBeesActive = p.getBoolean();
|
||||
|
||||
p = configuration.get("modules", "RedstoneArsenal", true);
|
||||
this.RedstoneArsenalActive = p.getBoolean();
|
||||
p = configuration.get("modules", "RedstoneArsenal", true);
|
||||
this.RedstoneArsenalActive = p.getBoolean();
|
||||
|
||||
p = configuration.get("modules", "Thaumcraft", true);
|
||||
this.ThaumcraftActive = p.getBoolean();
|
||||
p = configuration.get("modules", "Thaumcraft", true);
|
||||
this.ThaumcraftActive = p.getBoolean();
|
||||
|
||||
p = configuration.get("modules", "ThermalExpansion", true);
|
||||
this.ThermalExpansionActive = p.getBoolean();
|
||||
p = configuration.get("modules", "ThermalExpansion", true);
|
||||
this.ThermalExpansionActive = p.getBoolean();
|
||||
|
||||
// Debug
|
||||
p = configuration.get("debug", "logHiveSpawns", false);
|
||||
p.comment = "Enable to see exact locations of MagicBees hive spawns.";
|
||||
this.LogHiveSpawns = p.getBoolean();
|
||||
// Debug
|
||||
p = configuration.get("debug", "logHiveSpawns", false);
|
||||
p.comment = "Enable to see exact locations of MagicBees hive spawns.";
|
||||
this.LogHiveSpawns = p.getBoolean();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,22 +12,25 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import magicbees.bees.BeeManager;
|
||||
import magicbees.bees.TransmutationEffectController;
|
||||
import magicbees.client.gui.GUIHandler;
|
||||
import magicbees.main.utils.*;
|
||||
import magicbees.main.utils.compat.*;
|
||||
import magicbees.main.utils.CraftingManager;
|
||||
import magicbees.main.utils.IMCManager;
|
||||
import magicbees.main.utils.LogHelper;
|
||||
import magicbees.main.utils.VersionInfo;
|
||||
import magicbees.main.utils.compat.ModHelper;
|
||||
import magicbees.world.WorldGeneratorHandler;
|
||||
|
||||
@Mod(
|
||||
modid=VersionInfo.ModName,
|
||||
dependencies=VersionInfo.Depends,
|
||||
guiFactory=VersionInfo.GUI_FACTORY_CLASS
|
||||
modid = VersionInfo.ModName,
|
||||
dependencies = VersionInfo.Depends,
|
||||
guiFactory = VersionInfo.GUI_FACTORY_CLASS
|
||||
)
|
||||
public class MagicBees
|
||||
{
|
||||
|
||||
@Mod.Instance(VersionInfo.ModName)
|
||||
public static MagicBees object;
|
||||
|
||||
@SidedProxy(serverSide="magicbees.main.CommonProxy", clientSide="magicbees.main.ClientProxy")
|
||||
|
||||
@SidedProxy(serverSide = "magicbees.main.CommonProxy", clientSide = "magicbees.main.ClientProxy")
|
||||
public static CommonProxy proxy;
|
||||
|
||||
public GUIHandler guiHandler;
|
||||
@@ -40,8 +43,8 @@ public class MagicBees
|
||||
{
|
||||
this.configsPath = event.getModConfigurationDirectory().getAbsolutePath();
|
||||
this.modConfig = new Config(event.getSuggestedConfigurationFile());
|
||||
FMLCommonHandler.instance().bus().register(modConfig);
|
||||
|
||||
FMLCommonHandler.instance().bus().register(modConfig);
|
||||
|
||||
// Compatibility Helpers setup time.
|
||||
ModHelper.preInit();
|
||||
|
||||
@@ -51,47 +54,47 @@ public class MagicBees
|
||||
// LocalizationManager.setupLocalizationInfo();
|
||||
|
||||
new TransmutationEffectController();
|
||||
LogHelper.info("Preinit completed");
|
||||
LogHelper.info("Preinit completed");
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void init(FMLInitializationEvent event)
|
||||
{
|
||||
ModHelper.init();
|
||||
ModHelper.init();
|
||||
|
||||
worldHandler = new WorldGeneratorHandler();
|
||||
GameRegistry.registerWorldGenerator(worldHandler, 0);
|
||||
|
||||
LogHelper.info("Init completed");
|
||||
LogHelper.info("Init completed");
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event)
|
||||
{
|
||||
ModHelper.postInit();
|
||||
|
||||
ModHelper.postInit();
|
||||
|
||||
this.guiHandler = new GUIHandler();
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(this, this.guiHandler);
|
||||
|
||||
|
||||
proxy.registerRenderers();
|
||||
|
||||
BeeManager.ititializeBees();
|
||||
|
||||
|
||||
this.modConfig.saveConfigs();
|
||||
|
||||
|
||||
CraftingManager.setupCrafting();
|
||||
CraftingManager.registerLiquidContainers();
|
||||
|
||||
|
||||
VersionInfo.doVersionCheck();
|
||||
LogHelper.info("Postinit completed");
|
||||
LogHelper.info("Postinit completed");
|
||||
}
|
||||
|
||||
|
||||
@Mod.EventHandler
|
||||
public void handleIMCMessage(IMCEvent event)
|
||||
{
|
||||
IMCManager.handle(event);
|
||||
}
|
||||
|
||||
|
||||
public static Config getConfig()
|
||||
{
|
||||
return object.modConfig;
|
||||
|
||||
@@ -2,16 +2,16 @@ package magicbees.main.utils;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BlockInterface {
|
||||
public static Block getBlock(String item)
|
||||
{
|
||||
return GameRegistry.findBlock("Forestry", item);
|
||||
}
|
||||
public class BlockInterface
|
||||
{
|
||||
public static Block getBlock(String item)
|
||||
{
|
||||
return GameRegistry.findBlock("Forestry", item);
|
||||
}
|
||||
|
||||
public static Block getBlock(String modId, String item)
|
||||
{
|
||||
return GameRegistry.findBlock(modId, item);
|
||||
}
|
||||
public static Block getBlock(String modId, String item)
|
||||
{
|
||||
return GameRegistry.findBlock(modId, item);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,15 @@
|
||||
package magicbees.main.utils;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import magicbees.main.utils.BlockInterface;
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import magicbees.item.ItemCapsule;
|
||||
import magicbees.item.types.*;
|
||||
import magicbees.item.types.CombType;
|
||||
import magicbees.item.types.DropType;
|
||||
import magicbees.item.types.FluidType;
|
||||
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.utils.compat.ArsMagicaHelper;
|
||||
import magicbees.main.utils.compat.ForestryHelper;
|
||||
@@ -19,6 +23,7 @@ import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
|
||||
public class CraftingManager
|
||||
{
|
||||
@@ -27,7 +32,7 @@ public class CraftingManager
|
||||
registerLiquidContainer(Config.magicCapsule);
|
||||
registerLiquidContainer(Config.voidCapsule);
|
||||
}
|
||||
|
||||
|
||||
public static void setupCrafting()
|
||||
{
|
||||
// Broken up into seperate sections to make things a bit easier to find.
|
||||
@@ -35,14 +40,15 @@ public class CraftingManager
|
||||
setupCentrifugeRecipes();
|
||||
setupCarpenterRecipes();
|
||||
}
|
||||
|
||||
|
||||
private static void setupVanillaCrafting()
|
||||
{
|
||||
ItemStack input;
|
||||
ItemStack output;
|
||||
|
||||
// Magic capsules
|
||||
output = new ItemStack(Config.magicCapsule); output.stackSize = 4;
|
||||
output = new ItemStack(Config.magicCapsule);
|
||||
output.stackSize = 4;
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(output, new Object[] {
|
||||
"WWW",
|
||||
'W', "waxMagical"
|
||||
@@ -62,8 +68,8 @@ public class CraftingManager
|
||||
'S', Blocks.sand
|
||||
});
|
||||
|
||||
output = output.copy();
|
||||
output.stackSize = 12;
|
||||
output = output.copy();
|
||||
output.stackSize = 12;
|
||||
GameRegistry.addRecipe(output, new Object[] {
|
||||
"aaa", "aFa", "aaa",
|
||||
'F', input,
|
||||
@@ -72,173 +78,173 @@ public class CraftingManager
|
||||
|
||||
// "bottling" Intellect drops
|
||||
GameRegistry.addRecipe(new ItemStack(Items.experience_bottle), new Object[] {
|
||||
"DDD", "DBD", "DDD",
|
||||
'D', Config.drops.getStackForType(DropType.INTELLECT),
|
||||
'B', Items.glass_bottle
|
||||
"DDD", "DBD", "DDD",
|
||||
'D', Config.drops.getStackForType(DropType.INTELLECT),
|
||||
'B', Items.glass_bottle
|
||||
});
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(Blocks.soul_sand, 4), new Object[] {
|
||||
"SwS", "wDw", "SwS",
|
||||
'S', Blocks.sand,
|
||||
'D', Blocks.dirt,
|
||||
'w', Config.wax.getStackForType(WaxType.SOUL)
|
||||
"SwS", "wDw", "SwS",
|
||||
'S', Blocks.sand,
|
||||
'D', Blocks.dirt,
|
||||
'w', Config.wax.getStackForType(WaxType.SOUL)
|
||||
});
|
||||
GameRegistry.addRecipe(new ItemStack(Blocks.soul_sand, 4), new Object[] {
|
||||
"wSw", "SDS", "wSw",
|
||||
'S', Blocks.sand,
|
||||
'D', Blocks.dirt,
|
||||
'w', Config.wax.getStackForType(WaxType.SOUL)
|
||||
"wSw", "SDS", "wSw",
|
||||
'S', Blocks.sand,
|
||||
'D', Blocks.dirt,
|
||||
'w', Config.wax.getStackForType(WaxType.SOUL)
|
||||
});
|
||||
|
||||
output = new ItemStack(Config.hiveFrameMagic);
|
||||
input = ItemInterface.getItemStack("frameUntreated");
|
||||
GameRegistry.addRecipe(output, new Object[] {
|
||||
"www", "wfw", "www",
|
||||
'w', Config.wax.getStackForType(WaxType.MAGIC),
|
||||
'f', input
|
||||
"www", "wfw", "www",
|
||||
'w', Config.wax.getStackForType(WaxType.MAGIC),
|
||||
'f', input
|
||||
});
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(Config.hiveFrameTemporal), new Object[] {
|
||||
"sPs", "PfP", "sPs",
|
||||
's', Blocks.sand,
|
||||
'P', Config.pollen.getStackForType(PollenType.PHASED),
|
||||
'f', Config.hiveFrameMagic
|
||||
"sPs", "PfP", "sPs",
|
||||
's', Blocks.sand,
|
||||
'P', Config.pollen.getStackForType(PollenType.PHASED),
|
||||
'f', Config.hiveFrameMagic
|
||||
});
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Config.effectJar), new Object[] {
|
||||
"GSG", "QPQ", "GGG",
|
||||
'G', Blocks.glass,
|
||||
'S', "slabWood",
|
||||
'P', Config.pollen.getStackForType(PollenType.UNUSUAL),
|
||||
'Q', Items.quartz
|
||||
"GSG", "QPQ", "GGG",
|
||||
'G', Blocks.glass,
|
||||
'S', "slabWood",
|
||||
'P', Config.pollen.getStackForType(PollenType.UNUSUAL),
|
||||
'Q', Items.quartz
|
||||
}));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Config.moonDial), new Object[] {
|
||||
"DqD", "qrq", "DqD",
|
||||
'r', Items.redstone,
|
||||
'q', Items.quartz,
|
||||
'D', "dyeGreen"
|
||||
"DqD", "qrq", "DqD",
|
||||
'r', Items.redstone,
|
||||
'q', Items.quartz,
|
||||
'D', "dyeGreen"
|
||||
}));
|
||||
|
||||
GameRegistry.addRecipe(Config.miscResources.getStackForType(ResourceType.SKULL_FRAGMENT), new Object[] {
|
||||
"xxx", "xxx", "xxx",
|
||||
'x', Config.miscResources.getStackForType(ResourceType.SKULL_CHIP)
|
||||
"xxx", "xxx", "xxx",
|
||||
'x', Config.miscResources.getStackForType(ResourceType.SKULL_CHIP)
|
||||
});
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(Items.skull, 1, 1), new Object[] {
|
||||
"xxx", "xxx",
|
||||
'x', Config.miscResources.getStackForType(ResourceType.SKULL_FRAGMENT)
|
||||
"xxx", "xxx",
|
||||
'x', Config.miscResources.getStackForType(ResourceType.SKULL_FRAGMENT)
|
||||
});
|
||||
|
||||
GameRegistry.addRecipe(Config.miscResources.getStackForType(ResourceType.DRAGON_CHUNK), new Object[] {
|
||||
"xxx", "xxx",
|
||||
'x', Config.miscResources.getStackForType(ResourceType.DRAGON_DUST)
|
||||
"xxx", "xxx",
|
||||
'x', Config.miscResources.getStackForType(ResourceType.DRAGON_DUST)
|
||||
});
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(Blocks.dragon_egg, 1), new Object[] {
|
||||
"ccc", "cec", "ccc",
|
||||
'c', Config.miscResources.getStackForType(ResourceType.DRAGON_CHUNK),
|
||||
'e', Config.miscResources.getStackForType(ResourceType.ESSENCE_FALSE_LIFE)
|
||||
"ccc", "cec", "ccc",
|
||||
'c', Config.miscResources.getStackForType(ResourceType.DRAGON_CHUNK),
|
||||
'e', Config.miscResources.getStackForType(ResourceType.ESSENCE_FALSE_LIFE)
|
||||
});
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(Config.miscResources.getStackForType(ResourceType.ESSENCE_EVERLASTING_DURABILITY), new Object[] {
|
||||
"gwg", "wiw", "gwg",
|
||||
'g', Blocks.glass,
|
||||
'w', "waxMagical",
|
||||
'i', Blocks.iron_block
|
||||
"gwg", "wiw", "gwg",
|
||||
'g', Blocks.glass,
|
||||
'w', "waxMagical",
|
||||
'i', Blocks.iron_block
|
||||
}));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(Config.miscResources.getStackForType(ResourceType.ESSENCE_EVERLASTING_DURABILITY), new Object[] {
|
||||
"wgw", "gig", "wgw",
|
||||
'g', Blocks.glass,
|
||||
'w', "waxMagical",
|
||||
'i', Blocks.iron_block
|
||||
"wgw", "gig", "wgw",
|
||||
'g', Blocks.glass,
|
||||
'w', "waxMagical",
|
||||
'i', Blocks.iron_block
|
||||
}));
|
||||
|
||||
GameRegistry.addRecipe(Config.miscResources.getStackForType(ResourceType.ESSENCE_FALSE_LIFE), new Object[] {
|
||||
"gwg", "wfw", "gwg",
|
||||
'g', Blocks.glass,
|
||||
'w', Config.wax.getStackForType(WaxType.SOUL),
|
||||
'f', Blocks.red_flower
|
||||
"gwg", "wfw", "gwg",
|
||||
'g', Blocks.glass,
|
||||
'w', Config.wax.getStackForType(WaxType.SOUL),
|
||||
'f', Blocks.red_flower
|
||||
});
|
||||
GameRegistry.addRecipe(Config.miscResources.getStackForType(ResourceType.ESSENCE_FALSE_LIFE), new Object[] {
|
||||
"wgw", "gfg", "wgw",
|
||||
'g', Blocks.glass,
|
||||
'w', Config.wax.getStackForType(WaxType.SOUL),
|
||||
'f', Blocks.red_flower
|
||||
"wgw", "gfg", "wgw",
|
||||
'g', Blocks.glass,
|
||||
'w', Config.wax.getStackForType(WaxType.SOUL),
|
||||
'f', Blocks.red_flower
|
||||
});
|
||||
|
||||
GameRegistry.addRecipe(Config.miscResources.getStackForType(ResourceType.ESSENCE_SHALLOW_GRAVE), new Object[] {
|
||||
"gwg", "wfw", "gwg",
|
||||
'g', Blocks.glass,
|
||||
'w', Config.wax.getStackForType(WaxType.SOUL),
|
||||
'f', Items.rotten_flesh
|
||||
"gwg", "wfw", "gwg",
|
||||
'g', Blocks.glass,
|
||||
'w', Config.wax.getStackForType(WaxType.SOUL),
|
||||
'f', Items.rotten_flesh
|
||||
});
|
||||
GameRegistry.addRecipe(Config.miscResources.getStackForType(ResourceType.ESSENCE_SHALLOW_GRAVE), new Object[] {
|
||||
"wgw", "gfg", "wgw",
|
||||
'g', Blocks.glass,
|
||||
'w', Config.wax.getStackForType(WaxType.SOUL),
|
||||
'f', Items.rotten_flesh
|
||||
"wgw", "gfg", "wgw",
|
||||
'g', Blocks.glass,
|
||||
'w', Config.wax.getStackForType(WaxType.SOUL),
|
||||
'f', Items.rotten_flesh
|
||||
});
|
||||
|
||||
GameRegistry.addRecipe(Config.miscResources.getStackForType(ResourceType.ESSENCE_LOST_TIME), new Object[] {
|
||||
"wgw", "gcg", "wgw",
|
||||
'g', Blocks.glass,
|
||||
'w', Config.wax.getStackForType(WaxType.SOUL),
|
||||
'c', Items.clock
|
||||
"wgw", "gcg", "wgw",
|
||||
'g', Blocks.glass,
|
||||
'w', Config.wax.getStackForType(WaxType.SOUL),
|
||||
'c', Items.clock
|
||||
});
|
||||
GameRegistry.addRecipe(Config.miscResources.getStackForType(ResourceType.ESSENCE_LOST_TIME), new Object[] {
|
||||
"gwg", "wcw", "gwg",
|
||||
'g', Blocks.glass,
|
||||
'w', Config.wax.getStackForType(WaxType.SOUL),
|
||||
'c', Items.clock
|
||||
"gwg", "wcw", "gwg",
|
||||
'g', Blocks.glass,
|
||||
'w', Config.wax.getStackForType(WaxType.SOUL),
|
||||
'c', Items.clock
|
||||
});
|
||||
|
||||
GameRegistry.addRecipe(Config.miscResources.getStackForType(ResourceType.ESSENCE_FICKLE_PERMANENCE), new Object[] {
|
||||
"wew", "gcg", "wew",
|
||||
'w', Config.wax.getStackForType(WaxType.SOUL),
|
||||
'c', Items.magma_cream,
|
||||
'e', Items.egg,
|
||||
'g', Blocks.glowstone
|
||||
"wew", "gcg", "wew",
|
||||
'w', Config.wax.getStackForType(WaxType.SOUL),
|
||||
'c', Items.magma_cream,
|
||||
'e', Items.egg,
|
||||
'g', Blocks.glowstone
|
||||
});
|
||||
|
||||
GameRegistry.addRecipe(Config.miscResources.getStackForType(ResourceType.ESSENCE_SCORNFUL_OBLIVION), new Object[] {
|
||||
"gst", "sEs", "tsg",
|
||||
'g', Config.miscResources.getStackForType(ResourceType.ESSENCE_SHALLOW_GRAVE),
|
||||
't', Config.miscResources.getStackForType(ResourceType.ESSENCE_LOST_TIME),
|
||||
's', new ItemStack(Items.skull, 1, 1),
|
||||
'E', Blocks.dragon_egg,
|
||||
"gst", "sEs", "tsg",
|
||||
'g', Config.miscResources.getStackForType(ResourceType.ESSENCE_SHALLOW_GRAVE),
|
||||
't', Config.miscResources.getStackForType(ResourceType.ESSENCE_LOST_TIME),
|
||||
's', new ItemStack(Items.skull, 1, 1),
|
||||
'E', Blocks.dragon_egg,
|
||||
});
|
||||
|
||||
// IF YOU UPDATE THESE, CHANGE THE RECIPES IN THAUMCRAFT HELPER, YOU IDIOT.
|
||||
input = new ItemStack(Config.hiveFrameMagic);
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Config.hiveFrameResilient), new Object[] {
|
||||
Config.miscResources.getStackForType(ResourceType.ESSENCE_EVERLASTING_DURABILITY),
|
||||
input
|
||||
Config.miscResources.getStackForType(ResourceType.ESSENCE_EVERLASTING_DURABILITY),
|
||||
input
|
||||
});
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Config.hiveFrameGentle), new Object[] {
|
||||
Config.miscResources.getStackForType(ResourceType.ESSENCE_FALSE_LIFE),
|
||||
input
|
||||
Config.miscResources.getStackForType(ResourceType.ESSENCE_FALSE_LIFE),
|
||||
input
|
||||
});
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Config.hiveFrameNecrotic), new Object[] {
|
||||
Config.miscResources.getStackForType(ResourceType.ESSENCE_SHALLOW_GRAVE),
|
||||
input
|
||||
Config.miscResources.getStackForType(ResourceType.ESSENCE_SHALLOW_GRAVE),
|
||||
input
|
||||
});
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Config.hiveFrameMetabolic), new Object[] {
|
||||
Config.miscResources.getStackForType(ResourceType.ESSENCE_FICKLE_PERMANENCE),
|
||||
input
|
||||
Config.miscResources.getStackForType(ResourceType.ESSENCE_FICKLE_PERMANENCE),
|
||||
input
|
||||
});
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Config.hiveFrameTemporal), new Object[] {
|
||||
Config.miscResources.getStackForType(ResourceType.ESSENCE_LOST_TIME),
|
||||
input
|
||||
Config.miscResources.getStackForType(ResourceType.ESSENCE_LOST_TIME),
|
||||
input
|
||||
});
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Config.hiveFrameOblivion), new Object[] {
|
||||
Config.miscResources.getStackForType(ResourceType.ESSENCE_SCORNFUL_OBLIVION),
|
||||
ItemInterface.getItemStack("frameProven")
|
||||
Config.miscResources.getStackForType(ResourceType.ESSENCE_SCORNFUL_OBLIVION),
|
||||
ItemInterface.getItemStack("frameProven")
|
||||
});
|
||||
// </idiot>
|
||||
|
||||
@@ -249,8 +255,8 @@ public class CraftingManager
|
||||
else
|
||||
{
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(OreDictionary.getOres("ingotCopper").get(0), new Object[] {
|
||||
"xxx", "xxx", "xxx",
|
||||
'x', "nuggetCopper"
|
||||
"xxx", "xxx", "xxx",
|
||||
'x', "nuggetCopper"
|
||||
}));
|
||||
}
|
||||
if (OreDictionary.getOres("ingotTin").size() <= 0)
|
||||
@@ -260,8 +266,8 @@ public class CraftingManager
|
||||
else
|
||||
{
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(OreDictionary.getOres("ingotTin").get(0), new Object[] {
|
||||
"xxx", "xxx", "xxx",
|
||||
'x', "nuggetTin"
|
||||
"xxx", "xxx", "xxx",
|
||||
'x', "nuggetTin"
|
||||
}));
|
||||
}
|
||||
if (OreDictionary.getOres("ingotSilver").size() <= 0)
|
||||
@@ -271,8 +277,8 @@ public class CraftingManager
|
||||
else
|
||||
{
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(OreDictionary.getOres("ingotSilver").get(0), new Object[] {
|
||||
"xxx", "xxx", "xxx",
|
||||
'x', "nuggetSilver"
|
||||
"xxx", "xxx", "xxx",
|
||||
'x', "nuggetSilver"
|
||||
}));
|
||||
}
|
||||
if (OreDictionary.getOres("ingotLead").size() <= 0)
|
||||
@@ -282,56 +288,56 @@ public class CraftingManager
|
||||
else
|
||||
{
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(OreDictionary.getOres("ingotLead").get(0), new Object[] {
|
||||
"xxx", "xxx", "xxx",
|
||||
'x', "nuggetLead"
|
||||
"xxx", "xxx", "xxx",
|
||||
'x', "nuggetLead"
|
||||
}));
|
||||
}
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.iron_ingot), new Object[] {
|
||||
"xxx", "xxx", "xxx",
|
||||
'x', "nuggetIron"
|
||||
"xxx", "xxx", "xxx",
|
||||
'x', "nuggetIron"
|
||||
}));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.diamond), new Object[] {
|
||||
"xxx", "xxx", "xxx",
|
||||
'x', "shardDiamond"
|
||||
"xxx", "xxx", "xxx",
|
||||
'x', "shardDiamond"
|
||||
}));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.emerald), new Object[] {
|
||||
"xxx", "xxx", "xxx",
|
||||
'x', "shardEmerald"
|
||||
"xxx", "xxx", "xxx",
|
||||
'x', "shardEmerald"
|
||||
}));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemInterface.getItemStack("apatite"), new Object[] {
|
||||
"xxx", "xxx", "xxx",
|
||||
'x', Config.nuggets.getStackForType(NuggetType.APATITE)
|
||||
"xxx", "xxx", "xxx",
|
||||
'x', Config.nuggets.getStackForType(NuggetType.APATITE)
|
||||
}));
|
||||
|
||||
output = Config.miscResources.getStackForType(ResourceType.DIMENSIONAL_SINGULARITY);
|
||||
GameRegistry.addRecipe(output, new Object[] {
|
||||
" G ", "QEQ", " W ",
|
||||
'E', Items.ender_eye,
|
||||
'Q', Blocks.quartz_block,
|
||||
'W', Blocks.end_stone,
|
||||
'G', Blocks.gold_block
|
||||
" G ", "QEQ", " W ",
|
||||
'E', Items.ender_eye,
|
||||
'Q', Blocks.quartz_block,
|
||||
'W', Blocks.end_stone,
|
||||
'G', Blocks.gold_block
|
||||
});
|
||||
|
||||
output = Config.voidCapsule.getCapsuleForLiquid(FluidType.EMPTY);
|
||||
output.stackSize = 4;
|
||||
GameRegistry.addRecipe(output, new Object[] {
|
||||
"T T", "GFG", "T T",
|
||||
'G', Blocks.glass_pane,
|
||||
'F', Config.miscResources.getStackForType(ResourceType.DIMENSIONAL_SINGULARITY),
|
||||
'T', Items.gold_nugget
|
||||
"T T", "GFG", "T T",
|
||||
'G', Blocks.glass_pane,
|
||||
'F', Config.miscResources.getStackForType(ResourceType.DIMENSIONAL_SINGULARITY),
|
||||
'T', Items.gold_nugget
|
||||
});
|
||||
|
||||
output = new ItemStack(Config.magnet);
|
||||
GameRegistry.addRecipe(output, new Object[] {
|
||||
" i ", "cSc", " d ",
|
||||
'i', Items.iron_ingot,
|
||||
'c', Items.compass,
|
||||
'd', Items.diamond,
|
||||
'S', Config.miscResources.getStackForType(ResourceType.DIMENSIONAL_SINGULARITY)
|
||||
" i ", "cSc", " d ",
|
||||
'i', Items.iron_ingot,
|
||||
'c', Items.compass,
|
||||
'd', Items.diamond,
|
||||
'S', Config.miscResources.getStackForType(ResourceType.DIMENSIONAL_SINGULARITY)
|
||||
});
|
||||
|
||||
for (int level = 1; level <= 8; level++)
|
||||
@@ -383,16 +389,17 @@ public class CraftingManager
|
||||
input, input, input, input
|
||||
});
|
||||
|
||||
if(Config.ThaumaturgeBackpackActive) {
|
||||
// T1 Thaumaturge's backpack
|
||||
GameRegistry.addRecipe(new ItemStack(Config.thaumaturgeBackpackT1), new Object[]{
|
||||
"SWS", "NCN", "SWS",
|
||||
'S', Items.string,
|
||||
'W', Blocks.wool,
|
||||
'N', new ItemStack(Config.tcMiscResource, 1, ThaumcraftHelper.MiscResource.AMBER.ordinal()),
|
||||
'C', Blocks.chest
|
||||
});
|
||||
}
|
||||
if (Config.ThaumaturgeBackpackActive)
|
||||
{
|
||||
// T1 Thaumaturge's backpack
|
||||
GameRegistry.addRecipe(new ItemStack(Config.thaumaturgeBackpackT1), new Object[] {
|
||||
"SWS", "NCN", "SWS",
|
||||
'S', Items.string,
|
||||
'W', Blocks.wool,
|
||||
'N', new ItemStack(Config.tcMiscResource, 1, ThaumcraftHelper.MiscResource.AMBER.ordinal()),
|
||||
'C', Blocks.chest
|
||||
});
|
||||
}
|
||||
|
||||
// "bottling" Crystal aspects.
|
||||
/*for (EnumTag tag : EnumTag.values())
|
||||
@@ -432,26 +439,26 @@ public class CraftingManager
|
||||
|
||||
// 20 is the 'average' time to centrifuge a comb.
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.MUNDANE),
|
||||
new ItemStack[] {beeswax, ItemInterface.getItemStack("honeyDrop"),
|
||||
Config.wax.getStackForType(WaxType.MAGIC)},
|
||||
new int[] {90, 60, 10});
|
||||
new ItemStack[] { beeswax, ItemInterface.getItemStack("honeyDrop"),
|
||||
Config.wax.getStackForType(WaxType.MAGIC) },
|
||||
new int[] { 90, 60, 10 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.MOLTEN),
|
||||
new ItemStack[] {ItemInterface.getItemStack("refractoryWax"),
|
||||
ItemInterface.getItemStack("honeyDrop")},
|
||||
new int[] {86, 8});
|
||||
new ItemStack[] { ItemInterface.getItemStack("refractoryWax"),
|
||||
ItemInterface.getItemStack("honeyDrop") },
|
||||
new int[] { 86, 8 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.FORGOTTEN),
|
||||
new ItemStack[] {Config.wax.getStackForType(WaxType.AMNESIC), propolis,
|
||||
ItemInterface.getItemStack("honeyDrop")},
|
||||
new int[] {50, 50, 22});
|
||||
new ItemStack[] { Config.wax.getStackForType(WaxType.AMNESIC), propolis,
|
||||
ItemInterface.getItemStack("honeyDrop") },
|
||||
new int[] { 50, 50, 22 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.OCCULT),
|
||||
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItemStack("honeyDrop")},
|
||||
new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItemStack("honeyDrop") },
|
||||
new int[] { 100, 60 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.OTHERWORLDLY),
|
||||
new ItemStack[] {beeswax, Config.wax.getStackForType(WaxType.MAGIC),
|
||||
new ItemStack[] { beeswax, Config.wax.getStackForType(WaxType.MAGIC),
|
||||
ItemInterface.getItemStack("honeyDrop") },
|
||||
new int[] { 50, 20, 100 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.PAPERY),
|
||||
new ItemStack[] {ItemInterface.getItemStack("beeswax"),
|
||||
new ItemStack[] { ItemInterface.getItemStack("beeswax"),
|
||||
Config.wax.getStackForType(WaxType.MAGIC),
|
||||
new ItemStack(Items.paper) },
|
||||
new int[] { 80, 20, 5 });
|
||||
@@ -460,104 +467,104 @@ public class CraftingManager
|
||||
new int[] { 90, 40, 10 });
|
||||
propolis.setItemDamage(ForestryHelper.Propolis.NORMAL.ordinal());
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.FURTIVE),
|
||||
new ItemStack[] {ItemInterface.getItemStack("beeswax"), propolis,
|
||||
new ItemStack[] { ItemInterface.getItemStack("beeswax"), propolis,
|
||||
ItemInterface.getItemStack("honeydew") },
|
||||
new int[] { 90, 20, 35 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.SOUL),
|
||||
new ItemStack[] {Config.wax.getStackForType(WaxType.SOUL), ItemInterface.getItemStack("honeydew")},
|
||||
new ItemStack[] { Config.wax.getStackForType(WaxType.SOUL), ItemInterface.getItemStack("honeydew") },
|
||||
new int[] { 95, 26 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.TEMPORAL),
|
||||
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.pollen.getStackForType(PollenType.PHASED), new ItemStack(Config.fHoneydew, 1)},
|
||||
new int[] {100, 5, 60});
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.TEMPORAL),
|
||||
new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), Config.pollen.getStackForType(PollenType.PHASED), new ItemStack(Config.fHoneydew, 1) },
|
||||
new int[] { 100, 5, 60 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.TRANSMUTED),
|
||||
new ItemStack[] {ItemInterface.getItemStack("beeswax"),
|
||||
Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.UNSTABLE)},
|
||||
new int[] {80, 80, 15});
|
||||
new ItemStack[] { ItemInterface.getItemStack("beeswax"),
|
||||
Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.UNSTABLE) },
|
||||
new int[] { 80, 80, 15 });
|
||||
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.AIRY),
|
||||
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Items.feather) },
|
||||
new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Items.feather) },
|
||||
new int[] { 100, 60 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.FIREY),
|
||||
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Items.blaze_powder) },
|
||||
new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Items.blaze_powder) },
|
||||
new int[] { 100, 60 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.WATERY),
|
||||
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Items.dye) },
|
||||
new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Items.dye) },
|
||||
new int[] { 100, 60 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.EARTHY),
|
||||
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Items.clay_ball) },
|
||||
new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Items.clay_ball) },
|
||||
new int[] { 100, 60 });
|
||||
|
||||
if (ThaumcraftHelper.isActive())
|
||||
{
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.TC_AIR),
|
||||
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Items.feather),
|
||||
new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Items.feather),
|
||||
Config.propolis.getStackForType(PropolisType.AIR) },
|
||||
new int[] { 100, 60, 80 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.TC_FIRE),
|
||||
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Items.blaze_powder),
|
||||
new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Items.blaze_powder),
|
||||
Config.propolis.getStackForType(PropolisType.FIRE) },
|
||||
new int[] { 100, 60, 80 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.TC_WATER),
|
||||
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Items.dye),
|
||||
new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Items.dye),
|
||||
Config.propolis.getStackForType(PropolisType.WATER) },
|
||||
new int[] { 100, 60, 80 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.TC_EARTH),
|
||||
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Items.clay_ball),
|
||||
new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Items.clay_ball),
|
||||
Config.propolis.getStackForType(PropolisType.EARTH) },
|
||||
new int[] { 100, 60, 80 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.TC_ORDER),
|
||||
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.ORDER) },
|
||||
new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.ORDER) },
|
||||
new int[] { 100, 80 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.TC_CHAOS),
|
||||
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.CHAOS) },
|
||||
new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.CHAOS) },
|
||||
new int[] { 100, 80 });
|
||||
|
||||
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.AIR),
|
||||
new ItemStack[] {propolis, Config.miscResources.getStackForType(ResourceType.TC_DUST_AIR) },
|
||||
new int[] { 100, 65 } );
|
||||
new ItemStack[] { propolis, Config.miscResources.getStackForType(ResourceType.TC_DUST_AIR) },
|
||||
new int[] { 100, 65 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.FIRE),
|
||||
new ItemStack[] {propolis, Config.miscResources.getStackForType(ResourceType.TC_DUST_FIRE) },
|
||||
new int[] { 100, 65 } );
|
||||
new ItemStack[] { propolis, Config.miscResources.getStackForType(ResourceType.TC_DUST_FIRE) },
|
||||
new int[] { 100, 65 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.WATER),
|
||||
new ItemStack[] {propolis, Config.miscResources.getStackForType(ResourceType.TC_DUST_WATER) },
|
||||
new int[] { 100, 65 } );
|
||||
new ItemStack[] { propolis, Config.miscResources.getStackForType(ResourceType.TC_DUST_WATER) },
|
||||
new int[] { 100, 65 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.EARTH),
|
||||
new ItemStack[] {propolis, Config.miscResources.getStackForType(ResourceType.TC_DUST_EARTH) },
|
||||
new int[] { 100, 65 } );
|
||||
new ItemStack[] { propolis, Config.miscResources.getStackForType(ResourceType.TC_DUST_EARTH) },
|
||||
new int[] { 100, 65 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.ORDER),
|
||||
new ItemStack[] {propolis, Config.miscResources.getStackForType(ResourceType.TC_DUST_ORDER) },
|
||||
new int[] { 100, 65 } );
|
||||
new ItemStack[] { propolis, Config.miscResources.getStackForType(ResourceType.TC_DUST_ORDER) },
|
||||
new int[] { 100, 65 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.CHAOS),
|
||||
new ItemStack[] {propolis, Config.miscResources.getStackForType(ResourceType.TC_DUST_CHAOS) },
|
||||
new int[] { 100, 65 } );
|
||||
new ItemStack[] { propolis, Config.miscResources.getStackForType(ResourceType.TC_DUST_CHAOS) },
|
||||
new int[] { 100, 65 });
|
||||
}
|
||||
|
||||
if (ArsMagicaHelper.isActive())
|
||||
{
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.AM_ESSENCE),
|
||||
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Config.amItemResource), new ItemStack(Config.amItemResource) },
|
||||
new int[] { 85, 10, 2 } );
|
||||
new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Config.amItemResource), new ItemStack(Config.amItemResource) },
|
||||
new int[] { 85, 10, 2 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.AM_POTENT),
|
||||
new ItemStack[] {ItemInterface.getItemStack("beeswax"),
|
||||
new ItemStack[] { ItemInterface.getItemStack("beeswax"),
|
||||
ItemInterface.getItemStack("refractoryWax"),
|
||||
ItemInterface.getItemStack("honeydew")},
|
||||
new int[] { 50, 50, 65 } );
|
||||
ItemInterface.getItemStack("honeydew") },
|
||||
new int[] { 50, 50, 65 });
|
||||
}
|
||||
if (ThermalExpansionHelper.isActive())
|
||||
{
|
||||
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.TE_DESTABILIZED),
|
||||
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.drops.getStackForType(DropType.DESTABILIZED)},
|
||||
new int[] {50, 22});
|
||||
new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), Config.drops.getStackForType(DropType.DESTABILIZED) },
|
||||
new int[] { 50, 22 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.TE_CARBON),
|
||||
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.drops.getStackForType(DropType.CARBON)},
|
||||
new int[] {50, 22});
|
||||
new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), Config.drops.getStackForType(DropType.CARBON) },
|
||||
new int[] { 50, 22 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.TE_LUX),
|
||||
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.drops.getStackForType(DropType.LUX)},
|
||||
new int[] {50, 22});
|
||||
new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), Config.drops.getStackForType(DropType.LUX) },
|
||||
new int[] { 50, 22 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.TE_ENDEARING),
|
||||
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.drops.getStackForType(DropType.ENDEARING)},
|
||||
new int[] {50, 22});
|
||||
new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), Config.drops.getStackForType(DropType.ENDEARING) },
|
||||
new int[] { 50, 22 });
|
||||
|
||||
}
|
||||
|
||||
@@ -570,33 +577,33 @@ public class CraftingManager
|
||||
|
||||
output = ItemInterface.getItemStack("Forestry", "candle", 24);
|
||||
RecipeManagers.carpenterManager.addRecipe(30, new FluidStack(FluidRegistry.WATER, 600), null, output, new Object[] {
|
||||
" S ", "WWW", "WWW",
|
||||
'W', Config.wax,
|
||||
'S', Items.string
|
||||
" S ", "WWW", "WWW",
|
||||
'W', Config.wax,
|
||||
'S', Items.string
|
||||
});
|
||||
|
||||
output = ItemInterface.getItemStack("Forestry", "candle", 6);
|
||||
input = ItemInterface.getItemStack("craftingMaterial");
|
||||
input.setItemDamage(ForestryHelper.CraftingMaterial.SILK_WISP.ordinal()); // Set to Silk Wisp
|
||||
RecipeManagers.carpenterManager.addRecipe(30, new FluidStack(FluidRegistry.WATER, 600), null, output, new Object[] {
|
||||
"WSW",
|
||||
'W', Config.wax,
|
||||
'S', input
|
||||
"WSW",
|
||||
'W', Config.wax,
|
||||
'S', input
|
||||
});
|
||||
|
||||
output = Config.miscResources.getStackForType(ResourceType.AROMATIC_LUMP, 2);
|
||||
RecipeManagers.carpenterManager.addRecipe(30, FluidRegistry.getFluidStack("honey", 1000), null, output, new Object[] {
|
||||
" P ", "JDJ", " P ",
|
||||
'P', ItemInterface.getItemStack("pollen"),
|
||||
'J', ItemInterface.getItemStack("royalJelly"),
|
||||
'D', Config.drops.getStackForType(DropType.ENCHANTED)
|
||||
" P ", "JDJ", " P ",
|
||||
'P', ItemInterface.getItemStack("pollen"),
|
||||
'J', ItemInterface.getItemStack("royalJelly"),
|
||||
'D', Config.drops.getStackForType(DropType.ENCHANTED)
|
||||
});
|
||||
|
||||
RecipeManagers.carpenterManager.addRecipe(30, FluidRegistry.getFluidStack("honey", 1000), null, output, new Object[] {
|
||||
" J ", "PDP", " J ",
|
||||
'P', ItemInterface.getItemStack("pollen"),
|
||||
'J', ItemInterface.getItemStack("royalJelly"),
|
||||
'D', Config.drops.getStackForType(DropType.ENCHANTED)
|
||||
" J ", "PDP", " J ",
|
||||
'P', ItemInterface.getItemStack("pollen"),
|
||||
'J', ItemInterface.getItemStack("royalJelly"),
|
||||
'D', Config.drops.getStackForType(DropType.ENCHANTED)
|
||||
});
|
||||
|
||||
if (ThaumcraftHelper.isActive())
|
||||
@@ -606,10 +613,10 @@ public class CraftingManager
|
||||
input.setItemDamage(3); // Set to Silk Mesh
|
||||
output = new ItemStack(Config.thaumaturgeBackpackT2);
|
||||
RecipeManagers.carpenterManager.addRecipe(200, new FluidStack(FluidRegistry.WATER, 1000), null, output, new Object[] {
|
||||
"WXW", "WTW", "WWW",
|
||||
'X', Items.diamond,
|
||||
'W', input,
|
||||
'T', new ItemStack(Config.thaumaturgeBackpackT1)
|
||||
"WXW", "WTW", "WWW",
|
||||
'X', Items.diamond,
|
||||
'W', input,
|
||||
'T', new ItemStack(Config.thaumaturgeBackpackT1)
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -645,7 +652,7 @@ public class CraftingManager
|
||||
|
||||
// Register with Squeezer/Bottler
|
||||
//RecipeManagers.bottlerManager.addRecipe(5, liquid, empty, filled); Outdated?
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[] {filled} , liquid,
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[] { filled }, liquid,
|
||||
Config.wax.getStackForType(WaxType.MAGIC), 20);
|
||||
fluidType.available = true;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package magicbees.main.utils;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
import magicbees.bees.AlleleEffectCrumbling;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
|
||||
public class IMCManager
|
||||
{
|
||||
@@ -23,30 +23,30 @@ public class IMCManager
|
||||
else
|
||||
{
|
||||
FMLLog.warning("Magic Bees recieved an IMC Message from a mod %s " +
|
||||
"but does not support messages keyed with %s.",
|
||||
message.getSender(), message.key);
|
||||
"but does not support messages keyed with %s.",
|
||||
message.getSender(), message.key);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
FMLLog.warning("Magic Bees recieved an invalid IMC Message from a mod %s! Please inform " +
|
||||
"the author of %s that they may not be correctly implementing message for key '%s'. Error details follow.",
|
||||
message.getSender(), message.key);
|
||||
"the author of %s that they may not be correctly implementing message for key '%s'. Error details follow.",
|
||||
message.getSender(), message.key);
|
||||
FMLLog.info(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void handleCrumbleBlock(IMCMessage message) throws Exception
|
||||
{
|
||||
NBTTagCompound root = message.getNBTValue();
|
||||
NBTBase source = root.getTag("source");
|
||||
NBTBase target = root.getTag("target");
|
||||
|
||||
|
||||
if (source != null && source instanceof NBTTagCompound)
|
||||
{
|
||||
ItemStack sourceItem = ItemStack.loadItemStackFromNBT((NBTTagCompound)source);
|
||||
if (target instanceof NBTTagCompound)
|
||||
if (target instanceof NBTTagCompound)
|
||||
{
|
||||
ItemStack targetItem = ItemStack.loadItemStackFromNBT((NBTTagCompound)target);
|
||||
AlleleEffectCrumbling.addPairToMap(sourceItem, targetItem);
|
||||
|
||||
@@ -4,41 +4,42 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemInterface {
|
||||
public static ItemStack getItemStack(String item)
|
||||
{
|
||||
return GameRegistry.findItemStack("Forestry", item, 1);
|
||||
}
|
||||
public class ItemInterface
|
||||
{
|
||||
public static ItemStack getItemStack(String item)
|
||||
{
|
||||
return GameRegistry.findItemStack("Forestry", item, 1);
|
||||
}
|
||||
|
||||
public static ItemStack getItemStack(String modId, String item)
|
||||
{
|
||||
return GameRegistry.findItemStack(modId, item, 1);
|
||||
}
|
||||
public static ItemStack getItemStack(String modId, String item)
|
||||
{
|
||||
return GameRegistry.findItemStack(modId, item, 1);
|
||||
}
|
||||
|
||||
public static ItemStack getItemStack(String modId, String item, int stackSize)
|
||||
{
|
||||
return GameRegistry.findItemStack(modId, item, stackSize);
|
||||
}
|
||||
public static ItemStack getItemStack(String modId, String item, int stackSize)
|
||||
{
|
||||
return GameRegistry.findItemStack(modId, item, stackSize);
|
||||
}
|
||||
|
||||
public static Item getItem(String item)
|
||||
{
|
||||
Item i;
|
||||
i = GameRegistry.findItem("Forestry", item);
|
||||
if (i == null)
|
||||
{
|
||||
LogHelper.warn("Trying to get Item " + item + " from Forestry which does not exist!");
|
||||
}
|
||||
return i;
|
||||
}
|
||||
public static Item getItem(String item)
|
||||
{
|
||||
Item i;
|
||||
i = GameRegistry.findItem("Forestry", item);
|
||||
if (i == null)
|
||||
{
|
||||
LogHelper.warn("Trying to get Item " + item + " from Forestry which does not exist!");
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
public static Item getItem(String modId, String item)
|
||||
{
|
||||
Item i;
|
||||
i = GameRegistry.findItem(modId, item);
|
||||
if (i == null)
|
||||
{
|
||||
LogHelper.warn("Trying to get Item " + item + " from " + modId + " which does not exist!");
|
||||
}
|
||||
return i;
|
||||
}
|
||||
public static Item getItem(String modId, String item)
|
||||
{
|
||||
Item i;
|
||||
i = GameRegistry.findItem(modId, item);
|
||||
if (i == null)
|
||||
{
|
||||
LogHelper.warn("Trying to get Item " + item + " from " + modId + " which does not exist!");
|
||||
}
|
||||
return i;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
package magicbees.main.utils;
|
||||
|
||||
import magicbees.main.CommonProxy;
|
||||
import net.minecraft.util.StringTranslate;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import magicbees.main.CommonProxy;
|
||||
|
||||
public class LocalizationManager
|
||||
{
|
||||
@@ -11,16 +10,15 @@ public class LocalizationManager
|
||||
de_DE("de_DE"),
|
||||
en_US("en_US"),
|
||||
ru_RU("ru_RU"),
|
||||
zh_CN("zh_CN"),
|
||||
;
|
||||
zh_CN("zh_CN"),;
|
||||
public String locale;
|
||||
|
||||
|
||||
private Locale(String loc)
|
||||
{
|
||||
this.locale = loc;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void setupLocalizationInfo()
|
||||
{
|
||||
for (Locale l : Locale.values())
|
||||
@@ -38,8 +36,8 @@ public class LocalizationManager
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static String getLocalizedString(String key, Object ...objects)
|
||||
|
||||
public static String getLocalizedString(String key, Object... objects)
|
||||
{
|
||||
String result = LanguageRegistry.instance().getStringLocalization(key);
|
||||
if (result.isEmpty())
|
||||
|
||||
@@ -5,23 +5,48 @@ import org.apache.logging.log4j.Level;
|
||||
|
||||
public class LogHelper
|
||||
{
|
||||
public static void log(Level logLevel, Object object){
|
||||
FMLLog.log(VersionInfo.ModName, logLevel, String.valueOf(object));
|
||||
}
|
||||
public static void log(Level logLevel, Object object)
|
||||
{
|
||||
FMLLog.log(VersionInfo.ModName, logLevel, String.valueOf(object));
|
||||
}
|
||||
|
||||
public static void all(Object object){ log(Level.ALL, object); }
|
||||
public static void all(Object object)
|
||||
{
|
||||
log(Level.ALL, object);
|
||||
}
|
||||
|
||||
public static void debug(Object object){ log(Level.DEBUG, object); }
|
||||
public static void debug(Object object)
|
||||
{
|
||||
log(Level.DEBUG, object);
|
||||
}
|
||||
|
||||
public static void error(Object object){ log(Level.ERROR, object); }
|
||||
public static void error(Object object)
|
||||
{
|
||||
log(Level.ERROR, object);
|
||||
}
|
||||
|
||||
public static void fatal(Object object){ log(Level.FATAL, object); }
|
||||
public static void fatal(Object object)
|
||||
{
|
||||
log(Level.FATAL, object);
|
||||
}
|
||||
|
||||
public static void info(Object object){ log(Level.INFO, object); }
|
||||
public static void info(Object object)
|
||||
{
|
||||
log(Level.INFO, object);
|
||||
}
|
||||
|
||||
public static void off(Object object){ log(Level.OFF, object); }
|
||||
public static void off(Object object)
|
||||
{
|
||||
log(Level.OFF, object);
|
||||
}
|
||||
|
||||
public static void trace(Object object){ log(Level.TRACE, object); }
|
||||
public static void trace(Object object)
|
||||
{
|
||||
log(Level.TRACE, object);
|
||||
}
|
||||
|
||||
public static void warn(Object object){ log(Level.WARN, object); }
|
||||
public static void warn(Object object)
|
||||
{
|
||||
log(Level.WARN, object);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package magicbees.main.utils;
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
@@ -16,17 +15,18 @@ public enum MoonPhase
|
||||
WAXING_CRESCENT("crecentWaxing"),
|
||||
WAXING_HALF("halfWaxing"),
|
||||
WAXING_GIBBOUS("gibbousWaxing");
|
||||
|
||||
|
||||
private String phaseName;
|
||||
|
||||
private MoonPhase(String name)
|
||||
{
|
||||
this.phaseName = name;
|
||||
}
|
||||
|
||||
|
||||
public boolean isBetween(MoonPhase first, MoonPhase second)
|
||||
{
|
||||
boolean flag = false;
|
||||
|
||||
|
||||
if (first.ordinal() <= second.ordinal())
|
||||
{
|
||||
// Straightforward.
|
||||
@@ -38,20 +38,20 @@ public enum MoonPhase
|
||||
flag = (first.ordinal() <= this.ordinal() && this.ordinal() <= WAXING_GIBBOUS.ordinal()) ||
|
||||
(FULL.ordinal() <= this.ordinal() && this.ordinal() <= second.ordinal());
|
||||
}
|
||||
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
|
||||
public String getLocalizedName()
|
||||
{
|
||||
return LocalizationManager.getLocalizedString("moon." + this.phaseName);
|
||||
}
|
||||
|
||||
|
||||
public static MoonPhase getMoonPhase(World w)
|
||||
{
|
||||
return getMoonPhaseFromTime(w.getWorldTime());
|
||||
}
|
||||
|
||||
|
||||
public static MoonPhase getMoonPhaseFromTime(long time)
|
||||
{
|
||||
return MoonPhase.values()[(int)((time - 6000) / 24000L) % 8];
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
package magicbees.main.utils;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.item.types.ResourceType;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.MagicBees;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TabMagicBees extends CreativeTabs
|
||||
{
|
||||
@@ -18,8 +14,8 @@ public class TabMagicBees extends CreativeTabs
|
||||
super(getNextID(), "magicBees");
|
||||
}
|
||||
|
||||
public Item getTabIconItem()
|
||||
{
|
||||
return Config.miscResources.getStackForType(ResourceType.RESEARCH_BEEINFUSION).getItem();
|
||||
}
|
||||
public Item getTabIconItem()
|
||||
{
|
||||
return Config.miscResources.getStackForType(ResourceType.RESEARCH_BEEINFUSION).getItem();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
package magicbees.main.utils;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
@@ -9,10 +7,12 @@ import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
|
||||
/**
|
||||
* Using some of the VersionInfo code from cofh. (Thanks, Lemming!)
|
||||
* @author MysteriousAges
|
||||
*
|
||||
* @author MysteriousAges
|
||||
*/
|
||||
public class VersionInfo
|
||||
{
|
||||
@@ -21,7 +21,7 @@ public class VersionInfo
|
||||
public static final String Build = "@BUILD_NUMBER@";
|
||||
public static final String MCVersion = "@MCVERSION@";
|
||||
public static final String VersionURL = "http://bit.ly/magicbeesVersionInfo";
|
||||
public static final String GUI_FACTORY_CLASS = "magicbees.client.gui.GuiFactory";
|
||||
public static final String GUI_FACTORY_CLASS = "magicbees.client.gui.GuiFactory";
|
||||
|
||||
public static final String Logo = "/gfx/magicbees/logo.png";
|
||||
|
||||
@@ -55,11 +55,11 @@ public class VersionInfo
|
||||
}
|
||||
else if (tokens[i].matches("[0-9]+[a-z]"))
|
||||
{
|
||||
String numberString = tokens[i].substring(0, tokens[i].length()-1);
|
||||
String numberString = tokens[i].substring(0, tokens[i].length() - 1);
|
||||
versionTokens.add(Integer.valueOf(numberString));
|
||||
versionTokens.add(Character.getNumericValue(tokens[i].charAt(tokens[i].length()-1)));
|
||||
versionTokens.add(Character.getNumericValue(tokens[i].charAt(tokens[i].length() - 1)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Can't use versionTokens.toArray 'cause that returns an Integer[], not int[]
|
||||
int[] value = new int[versionTokens.size()];
|
||||
@@ -84,13 +84,13 @@ public class VersionInfo
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
else if (versionTokens[i] > targetTokens[i])
|
||||
else if (versionTokens[i] > targetTokens[i])
|
||||
{
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == versionTokens.length-1 && versionTokens.length < targetTokens.length)
|
||||
|
||||
if (i == versionTokens.length - 1 && versionTokens.length < targetTokens.length)
|
||||
{
|
||||
// If the versions compared are the same, but target has an extra token, it's probably a "letter" build
|
||||
// and is ahead of this one.
|
||||
@@ -189,14 +189,14 @@ public class VersionInfo
|
||||
try
|
||||
{
|
||||
String location = VersionURL;
|
||||
|
||||
|
||||
HttpURLConnection connection = null;
|
||||
|
||||
|
||||
// Used to "dereference" any location headers we may get.
|
||||
while (location != null && !location.isEmpty())
|
||||
{
|
||||
URL url = new URL(location);
|
||||
connection = (HttpURLConnection) url.openConnection();
|
||||
connection = (HttpURLConnection)url.openConnection();
|
||||
connection.setRequestProperty("User-Agent",
|
||||
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.60 Safari/537.17");
|
||||
connection.connect();
|
||||
@@ -247,7 +247,7 @@ public class VersionInfo
|
||||
/*TickHandlerVersion.registerModVersionInfo(main);
|
||||
TickHandlerVersion.initialize();*/
|
||||
//TickRegistry.registerScheduledTickHandler(TickHandlerVersion.instance, Side.CLIENT);
|
||||
|
||||
|
||||
VersionCheckThread thread = main.new VersionCheckThread();
|
||||
thread.start();
|
||||
}
|
||||
|
||||
@@ -4,8 +4,6 @@ import cpw.mods.fml.common.Loader;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.BlockInterface;
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class ArsMagicaHelper
|
||||
{
|
||||
@@ -20,7 +18,7 @@ public class ArsMagicaHelper
|
||||
SUNSTONE,
|
||||
MOONSTONE,
|
||||
}
|
||||
|
||||
|
||||
public enum EssenceType
|
||||
{
|
||||
ARCANE,
|
||||
@@ -37,15 +35,15 @@ public class ArsMagicaHelper
|
||||
HIGH,
|
||||
BASE,
|
||||
}
|
||||
|
||||
|
||||
private static boolean isArsMagicaPresent = false;
|
||||
public static final String Name = "arsmagica2";
|
||||
|
||||
|
||||
public static boolean isActive()
|
||||
{
|
||||
return isArsMagicaPresent;
|
||||
}
|
||||
|
||||
|
||||
public static void preInit()
|
||||
{
|
||||
if (Loader.isModLoaded(Name) && Config.ArsMagicaActive)
|
||||
@@ -53,7 +51,7 @@ public class ArsMagicaHelper
|
||||
isArsMagicaPresent = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void init()
|
||||
{
|
||||
if (isActive())
|
||||
@@ -61,11 +59,13 @@ public class ArsMagicaHelper
|
||||
getBlocks();
|
||||
getItems();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void postInit() {}
|
||||
|
||||
|
||||
public static void postInit()
|
||||
{
|
||||
}
|
||||
|
||||
private static void getBlocks()
|
||||
{
|
||||
try
|
||||
@@ -80,10 +80,10 @@ public class ArsMagicaHelper
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void getItems()
|
||||
{
|
||||
try
|
||||
@@ -94,7 +94,7 @@ public class ArsMagicaHelper
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,87 +1,87 @@
|
||||
package magicbees.main.utils.compat;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import magicbees.bees.BeeSpecies;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.BlockInterface;
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
import magicbees.main.utils.LogHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
|
||||
public class BloodMagicHelper {
|
||||
public class BloodMagicHelper
|
||||
{
|
||||
|
||||
private static boolean isBloodMagicActive = false;
|
||||
public static final String Name = "AWWayofTime";
|
||||
private static boolean isBloodMagicActive = false;
|
||||
public static final String Name = "AWWayofTime";
|
||||
|
||||
public static boolean isActive()
|
||||
{
|
||||
return isBloodMagicActive;
|
||||
}
|
||||
public static boolean isActive()
|
||||
{
|
||||
return isBloodMagicActive;
|
||||
}
|
||||
|
||||
public static void preInit()
|
||||
{
|
||||
if (Loader.isModLoaded(Name) && Config.BloodMagicActive)
|
||||
{
|
||||
isBloodMagicActive = true;
|
||||
}
|
||||
}
|
||||
public static void preInit()
|
||||
{
|
||||
if (Loader.isModLoaded(Name) && Config.BloodMagicActive)
|
||||
{
|
||||
isBloodMagicActive = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void init()
|
||||
{
|
||||
if (isActive())
|
||||
{
|
||||
getBlocks();
|
||||
getItems();
|
||||
}
|
||||
}
|
||||
public static void init()
|
||||
{
|
||||
if (isActive())
|
||||
{
|
||||
getBlocks();
|
||||
getItems();
|
||||
}
|
||||
}
|
||||
|
||||
public static void postInit(){}
|
||||
public static void postInit()
|
||||
{
|
||||
}
|
||||
|
||||
public static void getBlocks()
|
||||
{
|
||||
Config.bmBloodStoneBrick = BlockInterface.getBlock(Name, "bloodStoneBrick");
|
||||
}
|
||||
public static void getBlocks()
|
||||
{
|
||||
Config.bmBloodStoneBrick = BlockInterface.getBlock(Name, "bloodStoneBrick");
|
||||
}
|
||||
|
||||
public static void getItems()
|
||||
{
|
||||
Config.bmIncendium = ItemInterface.getItemStack(Name, "incendium");
|
||||
Config.bmMagicales = ItemInterface.getItemStack(Name, "magicales");
|
||||
Config.bmSanctus = ItemInterface.getItemStack(Name, "sanctus");
|
||||
Config.bmAether = ItemInterface.getItemStack(Name, "aether");
|
||||
Config.bmCrepitous = ItemInterface.getItemStack(Name, "crepitous");
|
||||
Config.bmCrystallos = ItemInterface.getItemStack(Name, "crystallos");
|
||||
Config.bmTerrae = ItemInterface.getItemStack(Name, "terrae");
|
||||
Config.bmAquasalus = ItemInterface.getItemStack(Name, "aquasalus");
|
||||
Config.bmTennebrae = ItemInterface.getItemStack(Name, "tennebrae");
|
||||
}
|
||||
public static void getItems()
|
||||
{
|
||||
Config.bmIncendium = ItemInterface.getItemStack(Name, "incendium");
|
||||
Config.bmMagicales = ItemInterface.getItemStack(Name, "magicales");
|
||||
Config.bmSanctus = ItemInterface.getItemStack(Name, "sanctus");
|
||||
Config.bmAether = ItemInterface.getItemStack(Name, "aether");
|
||||
Config.bmCrepitous = ItemInterface.getItemStack(Name, "crepitous");
|
||||
Config.bmCrystallos = ItemInterface.getItemStack(Name, "crystallos");
|
||||
Config.bmTerrae = ItemInterface.getItemStack(Name, "terrae");
|
||||
Config.bmAquasalus = ItemInterface.getItemStack(Name, "aquasalus");
|
||||
Config.bmTennebrae = ItemInterface.getItemStack(Name, "tennebrae");
|
||||
}
|
||||
|
||||
public static void addAltarRecipe(ItemStack requiredItem, ItemStack result, int minTier, int liquidRequired, int consumptionRate, int drainRate, boolean canBeFilled)
|
||||
{
|
||||
AltarRecipeRegistry.registerAltarRecipe(result, requiredItem, minTier, liquidRequired, consumptionRate, drainRate, canBeFilled);
|
||||
}
|
||||
public static void addAltarRecipe(ItemStack requiredItem, ItemStack result, int minTier, int liquidRequired, int consumptionRate, int drainRate, boolean canBeFilled)
|
||||
{
|
||||
AltarRecipeRegistry.registerAltarRecipe(result, requiredItem, minTier, liquidRequired, consumptionRate, drainRate, canBeFilled);
|
||||
}
|
||||
|
||||
public static void addAltarRecipeBee(BeeSpecies inputBee, BeeSpecies outputBee, int minTier, int liquidRequired, int consumptionRate, int drainRate)
|
||||
{
|
||||
addAltarRecipe(inputBee.getBeeItem(EnumBeeType.DRONE), outputBee.getBeeItem(EnumBeeType.DRONE), minTier, liquidRequired, consumptionRate, drainRate, false);
|
||||
addAltarRecipe(inputBee.getBeeItem(EnumBeeType.PRINCESS), outputBee.getBeeItem(EnumBeeType.PRINCESS), minTier, liquidRequired, consumptionRate, drainRate, false);
|
||||
addAltarRecipe(inputBee.getBeeItem(EnumBeeType.QUEEN), outputBee.getBeeItem(EnumBeeType.QUEEN), minTier, liquidRequired, consumptionRate, drainRate, false);
|
||||
}
|
||||
public static void addAltarRecipeBee(BeeSpecies inputBee, BeeSpecies outputBee, int minTier, int liquidRequired, int consumptionRate, int drainRate)
|
||||
{
|
||||
addAltarRecipe(inputBee.getBeeItem(EnumBeeType.DRONE), outputBee.getBeeItem(EnumBeeType.DRONE), minTier, liquidRequired, consumptionRate, drainRate, false);
|
||||
addAltarRecipe(inputBee.getBeeItem(EnumBeeType.PRINCESS), outputBee.getBeeItem(EnumBeeType.PRINCESS), minTier, liquidRequired, consumptionRate, drainRate, false);
|
||||
addAltarRecipe(inputBee.getBeeItem(EnumBeeType.QUEEN), outputBee.getBeeItem(EnumBeeType.QUEEN), minTier, liquidRequired, consumptionRate, drainRate, false);
|
||||
}
|
||||
|
||||
public static void addBindingRecipe(ItemStack input, ItemStack output)
|
||||
{
|
||||
BindingRegistry.registerRecipe(output, input);
|
||||
}
|
||||
public static void addBindingRecipe(ItemStack input, ItemStack output)
|
||||
{
|
||||
BindingRegistry.registerRecipe(output, input);
|
||||
}
|
||||
|
||||
public static void addBindingRecipeBee(BeeSpecies inputBee, BeeSpecies outputBee)
|
||||
{
|
||||
addBindingRecipe(inputBee.getBeeItem(EnumBeeType.DRONE), outputBee.getBeeItem(EnumBeeType.DRONE));
|
||||
addBindingRecipe(inputBee.getBeeItem(EnumBeeType.PRINCESS), outputBee.getBeeItem(EnumBeeType.PRINCESS));
|
||||
addBindingRecipe(inputBee.getBeeItem(EnumBeeType.QUEEN), outputBee.getBeeItem(EnumBeeType.QUEEN));
|
||||
}
|
||||
public static void addBindingRecipeBee(BeeSpecies inputBee, BeeSpecies outputBee)
|
||||
{
|
||||
addBindingRecipe(inputBee.getBeeItem(EnumBeeType.DRONE), outputBee.getBeeItem(EnumBeeType.DRONE));
|
||||
addBindingRecipe(inputBee.getBeeItem(EnumBeeType.PRINCESS), outputBee.getBeeItem(EnumBeeType.PRINCESS));
|
||||
addBindingRecipe(inputBee.getBeeItem(EnumBeeType.QUEEN), outputBee.getBeeItem(EnumBeeType.QUEEN));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,17 +4,16 @@ import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class EquivalentExchangeHelper
|
||||
{
|
||||
private static boolean isEquivalentExchangePresent = false;
|
||||
|
||||
|
||||
public static boolean isActive()
|
||||
{
|
||||
return isEquivalentExchangePresent;
|
||||
}
|
||||
|
||||
|
||||
public static void preInit()
|
||||
{
|
||||
if (Loader.isModLoaded("EE3") && Config.EquivalentExchangeActive)
|
||||
@@ -22,7 +21,7 @@ public class EquivalentExchangeHelper
|
||||
isEquivalentExchangePresent = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void init()
|
||||
{
|
||||
if (isActive())
|
||||
@@ -31,11 +30,15 @@ public class EquivalentExchangeHelper
|
||||
getItems();
|
||||
}
|
||||
}
|
||||
|
||||
public static void postInit() {}
|
||||
|
||||
private static void getBlocks() {}
|
||||
|
||||
|
||||
public static void postInit()
|
||||
{
|
||||
}
|
||||
|
||||
private static void getBlocks()
|
||||
{
|
||||
}
|
||||
|
||||
private static void getItems()
|
||||
{
|
||||
try
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package magicbees.main.utils.compat;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import magicbees.main.Config;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
public class ExtraBeesHelper
|
||||
{
|
||||
public enum CombType
|
||||
@@ -83,7 +83,7 @@ public class ExtraBeesHelper
|
||||
PINK,
|
||||
LIMEGREEN,
|
||||
MAGENTA,
|
||||
LIGHTGRAY,
|
||||
LIGHTGRAY,
|
||||
NICKEL,
|
||||
INVAR,
|
||||
GLOWSTONE,
|
||||
@@ -91,17 +91,16 @@ public class ExtraBeesHelper
|
||||
PULP,
|
||||
MULCH,
|
||||
COMPOST,
|
||||
SAWDUST,
|
||||
;
|
||||
SAWDUST,;
|
||||
}
|
||||
|
||||
|
||||
private static boolean isEBPresent = false;
|
||||
|
||||
|
||||
public static boolean isActive()
|
||||
{
|
||||
return isEBPresent;
|
||||
}
|
||||
|
||||
|
||||
public static void preInit()
|
||||
{
|
||||
if (Loader.isModLoaded("ExtraBees") && Config.ExtraBeesActive)
|
||||
@@ -109,10 +108,15 @@ public class ExtraBeesHelper
|
||||
isEBPresent = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void init() {}
|
||||
public static void postInit() {}
|
||||
|
||||
|
||||
public static void init()
|
||||
{
|
||||
}
|
||||
|
||||
public static void postInit()
|
||||
{
|
||||
}
|
||||
|
||||
public static ItemStack getExtraBeeItem(String field)
|
||||
{
|
||||
ItemStack value = null;
|
||||
@@ -120,11 +124,13 @@ public class ExtraBeesHelper
|
||||
{
|
||||
Class src = Class.forName("binnie.extrabees.core.ExtraBeeItem");
|
||||
Field f = src.getDeclaredField(field);
|
||||
|
||||
Item i = (Item) f.get(null);
|
||||
|
||||
Item i = (Item)f.get(null);
|
||||
value = new ItemStack(i);
|
||||
}
|
||||
catch (Exception e) { }
|
||||
catch (Exception e)
|
||||
{
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,12 @@
|
||||
package magicbees.main.utils.compat;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.core.config.ForestryBlock;
|
||||
import forestry.core.config.ForestryItem;
|
||||
import magicbees.main.utils.BlockInterface;
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import magicbees.bees.BeeManager;
|
||||
import magicbees.main.Config;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import magicbees.main.utils.BlockInterface;
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.genetics.IAllele;
|
||||
|
||||
public class ForestryHelper
|
||||
{
|
||||
@@ -20,10 +14,9 @@ public class ForestryHelper
|
||||
{
|
||||
APATITE,
|
||||
COPPER,
|
||||
TIN,
|
||||
;
|
||||
TIN,;
|
||||
}
|
||||
|
||||
|
||||
public enum CraftingMaterial
|
||||
{
|
||||
PULSATING_DUST, // unused
|
||||
@@ -32,10 +25,9 @@ public class ForestryHelper
|
||||
WOVEN_SILK,
|
||||
DISSIPATION_CHARGE,
|
||||
ICE_SHARD,
|
||||
SCENTED_PANELING,
|
||||
;
|
||||
SCENTED_PANELING,;
|
||||
}
|
||||
|
||||
|
||||
public enum Comb
|
||||
{
|
||||
HONEY,
|
||||
@@ -53,35 +45,31 @@ public class ForestryHelper
|
||||
DARKENED,
|
||||
OMEGA,
|
||||
WHEATEN,
|
||||
MOSSY,
|
||||
;
|
||||
MOSSY,;
|
||||
}
|
||||
|
||||
|
||||
public enum Propolis
|
||||
{
|
||||
NORMAL,
|
||||
STICKY, // Unused.
|
||||
PULSATING,
|
||||
SILKY,
|
||||
;
|
||||
SILKY,;
|
||||
}
|
||||
|
||||
|
||||
public enum Pollen
|
||||
{
|
||||
NORMAL,
|
||||
CRYSTALLINE,
|
||||
;
|
||||
CRYSTALLINE,;
|
||||
}
|
||||
|
||||
|
||||
public enum CircuitBoard
|
||||
{
|
||||
BASIC,
|
||||
ENHANCED,
|
||||
REFINED,
|
||||
INTRICATE,
|
||||
;
|
||||
INTRICATE,;
|
||||
}
|
||||
|
||||
|
||||
public enum Tube
|
||||
{
|
||||
COPPER,
|
||||
@@ -95,22 +83,25 @@ public class ForestryHelper
|
||||
RUBBER,
|
||||
EMERALD,
|
||||
APATITE,
|
||||
LAPIS,
|
||||
;
|
||||
LAPIS,;
|
||||
}
|
||||
|
||||
|
||||
public static final String Name = "Forestry";
|
||||
|
||||
public static void preInit() {}
|
||||
|
||||
|
||||
public static void preInit()
|
||||
{
|
||||
}
|
||||
|
||||
public static void init()
|
||||
{
|
||||
getBlocks();
|
||||
getItems();
|
||||
}
|
||||
|
||||
public static void postInit() {}
|
||||
|
||||
|
||||
public static void postInit()
|
||||
{
|
||||
}
|
||||
|
||||
private static void getBlocks()
|
||||
{
|
||||
try
|
||||
@@ -121,10 +112,10 @@ public class ForestryHelper
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void getItems()
|
||||
{
|
||||
Config.fBeeComb = ItemInterface.getItem("beeCombs");
|
||||
@@ -138,12 +129,12 @@ public class ForestryHelper
|
||||
{
|
||||
return BeeManager.beeRoot.getTemplate("forestry.species" + speciesName);
|
||||
}
|
||||
|
||||
|
||||
public static EnumTemperature getEnumTemperatureFromValue(float rawTemp)
|
||||
{
|
||||
return EnumTemperature.getFromValue(rawTemp);
|
||||
}
|
||||
|
||||
|
||||
public static EnumHumidity getEnumHumidityFromValue(float rawHumidity)
|
||||
{
|
||||
return EnumHumidity.getFromValue(rawHumidity);
|
||||
|
||||
@@ -2,42 +2,42 @@ package magicbees.main.utils.compat;
|
||||
|
||||
public class ModHelper
|
||||
{
|
||||
public static void preInit()
|
||||
{
|
||||
ForestryHelper.preInit();
|
||||
ExtraBeesHelper.preInit();
|
||||
ThaumcraftHelper.preInit();
|
||||
EquivalentExchangeHelper.preInit();
|
||||
ArsMagicaHelper.preInit();
|
||||
ThermalFoundationHelper.preInit();
|
||||
ThermalExpansionHelper.preInit();
|
||||
RedstoneArsenalHelper.preInit();
|
||||
BloodMagicHelper.preInit();
|
||||
}
|
||||
public static void preInit()
|
||||
{
|
||||
ForestryHelper.preInit();
|
||||
ExtraBeesHelper.preInit();
|
||||
ThaumcraftHelper.preInit();
|
||||
EquivalentExchangeHelper.preInit();
|
||||
ArsMagicaHelper.preInit();
|
||||
ThermalFoundationHelper.preInit();
|
||||
ThermalExpansionHelper.preInit();
|
||||
RedstoneArsenalHelper.preInit();
|
||||
BloodMagicHelper.preInit();
|
||||
}
|
||||
|
||||
public static void init()
|
||||
{
|
||||
ForestryHelper.init();
|
||||
ExtraBeesHelper.init();
|
||||
ThaumcraftHelper.init();
|
||||
EquivalentExchangeHelper.init();
|
||||
ArsMagicaHelper.init();
|
||||
ThermalFoundationHelper.init();
|
||||
ThermalExpansionHelper.init();
|
||||
RedstoneArsenalHelper.init();
|
||||
BloodMagicHelper.init();
|
||||
}
|
||||
public static void init()
|
||||
{
|
||||
ForestryHelper.init();
|
||||
ExtraBeesHelper.init();
|
||||
ThaumcraftHelper.init();
|
||||
EquivalentExchangeHelper.init();
|
||||
ArsMagicaHelper.init();
|
||||
ThermalFoundationHelper.init();
|
||||
ThermalExpansionHelper.init();
|
||||
RedstoneArsenalHelper.init();
|
||||
BloodMagicHelper.init();
|
||||
}
|
||||
|
||||
public static void postInit()
|
||||
{
|
||||
ForestryHelper.postInit();
|
||||
ExtraBeesHelper.postInit();
|
||||
ThaumcraftHelper.postInit();
|
||||
EquivalentExchangeHelper.postInit();
|
||||
ArsMagicaHelper.postInit();
|
||||
ThermalFoundationHelper.postInit();
|
||||
ThermalExpansionHelper.postInit();
|
||||
RedstoneArsenalHelper.postInit();
|
||||
BloodMagicHelper.postInit();
|
||||
}
|
||||
public static void postInit()
|
||||
{
|
||||
ForestryHelper.postInit();
|
||||
ExtraBeesHelper.postInit();
|
||||
ThaumcraftHelper.postInit();
|
||||
EquivalentExchangeHelper.postInit();
|
||||
ArsMagicaHelper.postInit();
|
||||
ThermalFoundationHelper.postInit();
|
||||
ThermalExpansionHelper.postInit();
|
||||
RedstoneArsenalHelper.postInit();
|
||||
BloodMagicHelper.postInit();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package magicbees.main.utils.compat;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -10,26 +9,23 @@ public class RedstoneArsenalHelper
|
||||
{
|
||||
public enum MiscResource
|
||||
{
|
||||
FLUXED_ELECTRUMBLOCK,
|
||||
;
|
||||
FLUXED_ELECTRUMBLOCK,;
|
||||
}
|
||||
|
||||
|
||||
public enum NuggetType
|
||||
{
|
||||
ELECTRUMFLUX,
|
||||
;
|
||||
ELECTRUMFLUX,;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static final String Name = "RedstoneArsenal";
|
||||
private static boolean isRedstoneArsenalPresent = false;
|
||||
|
||||
|
||||
public static boolean isActive()
|
||||
{
|
||||
return isRedstoneArsenalPresent;
|
||||
}
|
||||
|
||||
|
||||
public static void preInit()
|
||||
{
|
||||
if (Loader.isModLoaded(Name) && Config.RedstoneArsenalActive)
|
||||
@@ -39,18 +35,18 @@ public class RedstoneArsenalHelper
|
||||
else
|
||||
{
|
||||
// Switch off RSA-dependant items.
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void init()
|
||||
{
|
||||
if (isActive())
|
||||
{
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void postInit()
|
||||
{
|
||||
if (isActive())
|
||||
@@ -58,32 +54,33 @@ public class RedstoneArsenalHelper
|
||||
// Apparently the Game Registry isn't populated until now. ):
|
||||
getBlocks();
|
||||
getItems();
|
||||
|
||||
//addItemsToBackpack();
|
||||
|
||||
//addItemsToBackpack();
|
||||
setupCrafting();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private static void getBlocks()
|
||||
{
|
||||
Config.rsaFluxBlock = ItemInterface.getItemStack("RedstoneArsenal", "blockElectrumFlux", 1);
|
||||
}
|
||||
|
||||
|
||||
private static void getItems()
|
||||
{
|
||||
Config.rsaFluxNugget = ItemInterface.getItemStack("RedstoneArsenal", "nuggetElectrumFlux", 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private static void setupCrafting()
|
||||
{
|
||||
ItemStack input, output;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
package magicbees.main.utils.compat;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import forestry.core.config.ForestryBlock;
|
||||
import forestry.core.config.ForestryItem;
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
import magicbees.main.utils.BlockInterface;
|
||||
import magicbees.item.types.PollenType;
|
||||
import magicbees.item.types.PropolisType;
|
||||
import magicbees.item.types.ResourceType;
|
||||
import magicbees.item.types.WaxType;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.BlockInterface;
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.LogHelper;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -29,8 +28,8 @@ import thaumcraft.api.crafting.InfusionRecipe;
|
||||
import thaumcraft.api.research.ResearchCategories;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import forestry.core.config.ForestryBlock;
|
||||
import forestry.core.config.ForestryItem;
|
||||
|
||||
public class ThaumcraftHelper
|
||||
{
|
||||
@@ -46,10 +45,9 @@ public class ThaumcraftHelper
|
||||
ENCHANTED_FABRIC,
|
||||
FLUX_FILTER,
|
||||
KNOWLEDGE_FRAGMENT,
|
||||
MIRRORED_GLASS,
|
||||
;
|
||||
MIRRORED_GLASS,;
|
||||
}
|
||||
|
||||
|
||||
public enum NuggetType
|
||||
{
|
||||
IRON,
|
||||
@@ -58,16 +56,15 @@ public class ThaumcraftHelper
|
||||
SILVER,
|
||||
LEAD,
|
||||
QUICKSILVER,
|
||||
THAUMIUM, _7,_8,_9,_10,_11,_12,_13,_14,_15,
|
||||
THAUMIUM, _7, _8, _9, _10, _11, _12, _13, _14, _15,
|
||||
NATIVE_IRON,
|
||||
NATIVE_COPPER,
|
||||
NATIVE_TIN,
|
||||
NATIVE_SILVER,
|
||||
NATIVE_LEAD, _21,_22,_23,_24,_25,_26,_27,_28,_29,_30,
|
||||
NATIVE_GOLD,
|
||||
;
|
||||
NATIVE_LEAD, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30,
|
||||
NATIVE_GOLD,;
|
||||
}
|
||||
|
||||
|
||||
public enum ShardType
|
||||
{
|
||||
AIR,
|
||||
@@ -75,61 +72,57 @@ public class ThaumcraftHelper
|
||||
WATER,
|
||||
EARTH,
|
||||
ORDER,
|
||||
CHAOS,
|
||||
;
|
||||
CHAOS,;
|
||||
}
|
||||
|
||||
|
||||
public enum Entity
|
||||
{
|
||||
BRAINY_ZOMBIE("entBrainyZombie", "EntityBrainyZombie"),
|
||||
GIANT_BRAINY_ZOMBIE("entGiantBrainyZombie", "EntityGiantBrainyZombie"),
|
||||
WISP("entWisp", "EntityWisp"),
|
||||
FIREBAT("entFirebat", "EntityFireBat"),
|
||||
;
|
||||
|
||||
FIREBAT("entFirebat", "EntityFireBat"),;
|
||||
|
||||
private static String packageName = "thaumcraft.common.entities.monster.";
|
||||
|
||||
|
||||
public String entityID;
|
||||
private String className;
|
||||
|
||||
|
||||
private Entity(String id, String clazz)
|
||||
{
|
||||
this.entityID = id;
|
||||
this.className = clazz;
|
||||
}
|
||||
|
||||
|
||||
public String getClassName()
|
||||
{
|
||||
return packageName + this.className;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public enum BlockPlant
|
||||
{
|
||||
GREATWOOD_SAPLING,
|
||||
SILVERWOOD_SAPLING,
|
||||
SHIMMERLEAF,
|
||||
CINDERPEARL,
|
||||
PURIFYING_PLANT,
|
||||
;
|
||||
PURIFYING_PLANT,;
|
||||
}
|
||||
|
||||
|
||||
public enum TreeType
|
||||
{
|
||||
GREATWOOD,
|
||||
SILVERWOOD,
|
||||
;
|
||||
SILVERWOOD,;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static final String Name = "Thaumcraft";
|
||||
private static boolean isThaumcraftPresent = false;
|
||||
|
||||
|
||||
public static boolean isActive()
|
||||
{
|
||||
return isThaumcraftPresent;
|
||||
}
|
||||
|
||||
|
||||
public static void preInit()
|
||||
{
|
||||
if (Loader.isModLoaded(Name) && Config.ThaumcraftActive)
|
||||
@@ -148,12 +141,12 @@ public class ThaumcraftHelper
|
||||
ResourceType.TC_DUST_WATER.setHidden();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void init()
|
||||
{
|
||||
//if (isActive()) { }
|
||||
}
|
||||
|
||||
|
||||
public static void postInit()
|
||||
{
|
||||
if (isActive())
|
||||
@@ -161,19 +154,19 @@ public class ThaumcraftHelper
|
||||
// Apparently the Game Registry isn't populated until now. ):
|
||||
getBlocks();
|
||||
getItems();
|
||||
|
||||
|
||||
aspectTime = new Aspect("tempus", 0xB68CFF, new Aspect[] { Aspect.VOID, Aspect.ORDER },
|
||||
new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.TEXTURE + "aspects/tempus.png"), 1);
|
||||
|
||||
|
||||
//addItemsToBackpack();
|
||||
setupItemAspects();
|
||||
setupCrafting();
|
||||
setupResearch();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static Object aspectTime;
|
||||
|
||||
|
||||
private static void getBlocks()
|
||||
{
|
||||
Config.tcPlant = BlockInterface.getBlock(Name, "blockCustomPlant");
|
||||
@@ -185,7 +178,7 @@ public class ThaumcraftHelper
|
||||
Config.tcLeaf = BlockInterface.getBlock(Name, "blockMagicalLeaves");
|
||||
Config.tcWarded = BlockInterface.getBlock(Name, "blockWarded");
|
||||
}
|
||||
|
||||
|
||||
private static void getItems()
|
||||
{
|
||||
Config.tcFilledJar = ItemInterface.getItem(Name, "BlockJarFilledItem");
|
||||
@@ -237,7 +230,7 @@ public class ThaumcraftHelper
|
||||
// FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "builder@" + ids);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
private static void setupCrafting()
|
||||
{
|
||||
ItemStack input, output;
|
||||
@@ -245,7 +238,7 @@ public class ThaumcraftHelper
|
||||
input = Config.miscResources.getStackForType(ResourceType.TC_DUST_AIR);
|
||||
output = new ItemStack(Config.tcShard, 1, ShardType.AIR.ordinal());
|
||||
GameRegistry.addShapelessRecipe(output, input, input, input, input);
|
||||
|
||||
|
||||
input = Config.miscResources.getStackForType(ResourceType.TC_DUST_WATER);
|
||||
output = new ItemStack(Config.tcShard, 1, ShardType.WATER.ordinal());
|
||||
GameRegistry.addShapelessRecipe(output, input, input, input, input);
|
||||
@@ -265,68 +258,68 @@ public class ThaumcraftHelper
|
||||
input = Config.miscResources.getStackForType(ResourceType.TC_DUST_CHAOS);
|
||||
output = new ItemStack(Config.tcShard, 1, ShardType.CHAOS.ordinal());
|
||||
GameRegistry.addShapelessRecipe(output, input, input, input, input);
|
||||
|
||||
|
||||
thaumScoop = ThaumcraftApi.addArcaneCraftingRecipe("MB_Scoop", new ItemStack(Config.thaumiumScoop),
|
||||
new AspectList().add(Aspect.ORDER, 2), new Object[] {
|
||||
"sWs", "sTs", " T ",
|
||||
's', Items.stick,
|
||||
'W', Blocks.wool,
|
||||
'T', new ItemStack(Config.tcMiscResource, 1, MiscResource.THAUMIUM.ordinal())
|
||||
});
|
||||
|
||||
new AspectList().add(Aspect.ORDER, 2), new Object[] {
|
||||
"sWs", "sTs", " T ",
|
||||
's', Items.stick,
|
||||
'W', Blocks.wool,
|
||||
'T', new ItemStack(Config.tcMiscResource, 1, MiscResource.THAUMIUM.ordinal())
|
||||
});
|
||||
|
||||
thaumGrafter = ThaumcraftApi.addArcaneCraftingRecipe("MB_Grafter", new ItemStack(Config.thaumiumGrafter),
|
||||
new AspectList().add(Aspect.ORDER, 5), new Object[] {
|
||||
" T", " s ", "s ",
|
||||
's', Items.stick,
|
||||
'T', new ItemStack(Config.tcMiscResource, 1, MiscResource.THAUMIUM.ordinal())
|
||||
});
|
||||
|
||||
frameMagic = ThaumcraftApi.addArcaneCraftingRecipe("MB_FrameMagic", new ItemStack(Config.hiveFrameMagic),
|
||||
new AspectList().add(Aspect.ORDER, 5), new Object[] {
|
||||
" T", " s ", "s ",
|
||||
's', Items.stick,
|
||||
'T', new ItemStack(Config.tcMiscResource, 1, MiscResource.THAUMIUM.ordinal())
|
||||
});
|
||||
|
||||
frameMagic = ThaumcraftApi.addArcaneCraftingRecipe("MB_FrameMagic", new ItemStack(Config.hiveFrameMagic),
|
||||
new AspectList().add(Aspect.ORDER, 5).add(Aspect.AIR, 2).add(Aspect.EARTH, 2), new Object[] {
|
||||
"sss", "sCs", "sss",
|
||||
's', Items.stick,
|
||||
'C', new ItemStack(Config.tcMiscResource, 1, MiscResource.ENCHANTED_FABRIC.ordinal())
|
||||
});
|
||||
|
||||
"sss", "sCs", "sss",
|
||||
's', Items.stick,
|
||||
'C', new ItemStack(Config.tcMiscResource, 1, MiscResource.ENCHANTED_FABRIC.ordinal())
|
||||
});
|
||||
|
||||
essenceLife = ThaumcraftApi.addCrucibleRecipe("MB_EssenceLife", Config.miscResources.getStackForType(ResourceType.ESSENCE_FALSE_LIFE),
|
||||
new ItemStack(Blocks.red_flower), new AspectList().add(Aspect.EXCHANGE, 4).add(Aspect.PLANT, 4));
|
||||
|
||||
|
||||
essenceDeath = ThaumcraftApi.addCrucibleRecipe("MB_EssenceDeath", Config.miscResources.getStackForType(ResourceType.ESSENCE_SHALLOW_GRAVE),
|
||||
new ItemStack(Items.rotten_flesh), new AspectList().add(Aspect.DEATH, 4).add(Aspect.ENTROPY, 4));
|
||||
|
||||
|
||||
essenceArmor = ThaumcraftApi.addCrucibleRecipe("MB_EssenceArmor", Config.miscResources.getStackForType(ResourceType.ESSENCE_EVERLASTING_DURABILITY),
|
||||
new ItemStack(Items.leather), new AspectList().add(Aspect.ARMOR, 4).add(Aspect.MAGIC, 2));
|
||||
|
||||
|
||||
output = Config.miscResources.getStackForType(ResourceType.ESSENCE_FICKLE_PERMANENCE);
|
||||
essenceUnstableA = ThaumcraftApi.addCrucibleRecipe("MB_EssenceUnstable", output,
|
||||
Config.propolis.getStackForType(PropolisType.UNSTABLE), new AspectList().add(Aspect.ENTROPY, 2).add(Aspect.EXCHANGE, 1));
|
||||
|
||||
|
||||
essenceUnstableB = ThaumcraftApi.addCrucibleRecipe("MB_EssenceUnstable", output,
|
||||
new ItemStack(Blocks.netherrack), new AspectList().add(Aspect.ENTROPY, 8).add(Aspect.EXCHANGE, 5));
|
||||
|
||||
|
||||
essenceTime = ThaumcraftApi.addCrucibleRecipe("MB_EssenceTime", Config.miscResources.getStackForType(ResourceType.ESSENCE_LOST_TIME),
|
||||
new ItemStack(Items.clock), new AspectList().add(Aspect.ORDER, 10).add(Aspect.VOID,
|
||||
10).add(Aspect.TRAP, 4));
|
||||
|
||||
|
||||
input = new ItemStack(Items.ender_pearl);
|
||||
singularityA = ThaumcraftApi.addInfusionCraftingRecipe("MB_DimensionalSingularity", Config.miscResources.getStackForType(ResourceType.DIMENSIONAL_SINGULARITY, 3),
|
||||
5, new AspectList().add(Aspect.ELDRITCH, 10).add(Aspect.EXCHANGE, 20),
|
||||
new ItemStack(Blocks.gold_block),
|
||||
new ItemStack[] { input, input});
|
||||
|
||||
new ItemStack[] { input, input });
|
||||
|
||||
ItemStack in2 = new ItemStack(Items.diamond);
|
||||
singularityB = ThaumcraftApi.addInfusionCraftingRecipe("MB_DimensionalSingularity", Config.miscResources.getStackForType(ResourceType.DIMENSIONAL_SINGULARITY, 3),
|
||||
6, new AspectList().add(Aspect.ELDRITCH, 10).add(Aspect.EXCHANGE, 20).add(Aspect.VOID, 15),
|
||||
Config.propolis.getStackForType(PropolisType.UNSTABLE),
|
||||
new ItemStack[] { input, input, in2 });
|
||||
|
||||
|
||||
essenceOblivion = ThaumcraftApi.addShapelessArcaneCraftingRecipe("MB_EssenceOblivion", Config.miscResources.getStackForType(ResourceType.ESSENCE_SCORNFUL_OBLIVION),
|
||||
new AspectList().add(Aspect.ENTROPY, 25).add(Aspect.AIR, 40).add(Aspect.ORDER, 15), new Object[] {
|
||||
Config.miscResources.getStackForType(ResourceType.DIMENSIONAL_SINGULARITY),
|
||||
Blocks.dragon_egg,
|
||||
});
|
||||
Config.miscResources.getStackForType(ResourceType.DIMENSIONAL_SINGULARITY),
|
||||
Blocks.dragon_egg,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private static Object frameMagic;
|
||||
private static Object thaumScoop;
|
||||
private static Object thaumGrafter;
|
||||
@@ -339,147 +332,147 @@ public class ThaumcraftHelper
|
||||
private static Object essenceUnstableB;
|
||||
private static Object essenceTime;
|
||||
private static Object essenceOblivion;
|
||||
|
||||
|
||||
private static void setupResearch()
|
||||
{
|
||||
|
||||
|
||||
ArrayList<Object> list;
|
||||
ItemStack input;
|
||||
IRecipe recipe;
|
||||
String category = "MAGICBEES";
|
||||
ResearchCategories.registerCategory(category, new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.ITEM_TEXTURE + "beeInfusion.png"),
|
||||
new ResourceLocation("thaumcraft", "textures/gui/gui_researchback.png"));
|
||||
|
||||
|
||||
ResearchItem rootNodeR = new ResearchItem("MB_Root", category, new AspectList(),
|
||||
0, 0, 0,
|
||||
Config.miscResources.getStackForType(ResourceType.RESEARCH_BEEINFUSION))
|
||||
.setRound().setStub().setAutoUnlock()
|
||||
.setPages(getResearchPage("MB_Root.1"), getResearchPage("MB_Root.2") )
|
||||
.registerResearchItem();
|
||||
|
||||
.setRound().setStub().setAutoUnlock()
|
||||
.setPages(getResearchPage("MB_Root.1"), getResearchPage("MB_Root.2"))
|
||||
.registerResearchItem();
|
||||
|
||||
list = new ArrayList<Object>(4);
|
||||
list.add(Config.miscResources.getStackForType(ResourceType.LORE_FRAGMENT));
|
||||
list.add(Config.miscResources.getStackForType(ResourceType.LORE_FRAGMENT));
|
||||
list.add(Config.miscResources.getStackForType(ResourceType.LORE_FRAGMENT));
|
||||
list.add(Config.miscResources.getStackForType(ResourceType.LORE_FRAGMENT));
|
||||
recipe = new ShapelessRecipes(new ItemStack(Config.tcMiscResource, 1, MiscResource.KNOWLEDGE_FRAGMENT.ordinal()), list);
|
||||
|
||||
|
||||
ResearchItem researchFragment = new ResearchItem("MB_LoreFragment", category, new AspectList(),
|
||||
0, -3, 0,
|
||||
Config.miscResources.getStackForType(ResourceType.LORE_FRAGMENT))
|
||||
.setPages(getResearchPage("MB_LoreFragment.1"), new ResearchPage(recipe))
|
||||
.setParents("MB_Root")
|
||||
.setStub().setAutoUnlock().setRound()
|
||||
.registerResearchItem();
|
||||
|
||||
.setPages(getResearchPage("MB_LoreFragment.1"), new ResearchPage(recipe))
|
||||
.setParents("MB_Root")
|
||||
.setStub().setAutoUnlock().setRound()
|
||||
.registerResearchItem();
|
||||
|
||||
ResearchItem thaumiumScoopR = new ResearchItem("MB_Scoop", category, new AspectList().add(Aspect.TOOL, 1),
|
||||
-2, -3, 1,
|
||||
new ItemStack(Config.thaumiumScoop))
|
||||
.setPages(getResearchPage("MB_Scoop.1"), new ResearchPage((IArcaneRecipe)thaumScoop) )
|
||||
.setParentsHidden("THAUMIUM")
|
||||
.registerResearchItem();
|
||||
|
||||
.setPages(getResearchPage("MB_Scoop.1"), new ResearchPage((IArcaneRecipe)thaumScoop))
|
||||
.setParentsHidden("THAUMIUM")
|
||||
.registerResearchItem();
|
||||
|
||||
ResearchItem thaumiumGrafterR = new ResearchItem("MB_Grafter", category, new AspectList().add(Aspect.TOOL, 2).add(Aspect.TREE, 1).add(Aspect.GREED, 1),
|
||||
-2, -1, 4,
|
||||
new ItemStack(Config.thaumiumGrafter))
|
||||
.setPages(getResearchPage("MB_Grafter.1"), new ResearchPage((IArcaneRecipe)thaumGrafter) )
|
||||
.setParents("MB_Scoop")
|
||||
.registerResearchItem();
|
||||
|
||||
.setPages(getResearchPage("MB_Grafter.1"), new ResearchPage((IArcaneRecipe)thaumGrafter))
|
||||
.setParents("MB_Scoop")
|
||||
.registerResearchItem();
|
||||
|
||||
ResearchItem frameMagicR = new ResearchItem("MB_FrameMagic", category, new AspectList().add(Aspect.TOOL, 2).add(Aspect.ARMOR, 1),
|
||||
-2, 1, 2,
|
||||
new ItemStack(Config.hiveFrameMagic))
|
||||
.setPages(getResearchPage("MB_FrameMagic"), new ResearchPage((IArcaneRecipe)frameMagic) )
|
||||
.registerResearchItem();
|
||||
|
||||
.setPages(getResearchPage("MB_FrameMagic"), new ResearchPage((IArcaneRecipe)frameMagic))
|
||||
.registerResearchItem();
|
||||
|
||||
input = new ItemStack(Config.hiveFrameMagic);
|
||||
list = new ArrayList<Object>(2);
|
||||
list.add(Config.miscResources.getStackForType(ResourceType.ESSENCE_FALSE_LIFE));
|
||||
list.add(input);
|
||||
recipe = new ShapelessRecipes(new ItemStack(Config.hiveFrameGentle), list);
|
||||
|
||||
|
||||
ResearchItem essenceFalseLifeR = new ResearchItem("MB_EssenceLife", category, new AspectList().add(Aspect.LIFE, 2).add(Aspect.MAGIC, 1),
|
||||
2, -1, 2,
|
||||
Config.miscResources.getStackForType(ResourceType.ESSENCE_FALSE_LIFE))
|
||||
.setPages(getResearchPage("MB_EssenceLife.1"), new ResearchPage((CrucibleRecipe)essenceLife), new ResearchPage(recipe) )
|
||||
.setParentsHidden("CRUCIBLE")
|
||||
.registerResearchItem();
|
||||
|
||||
.setPages(getResearchPage("MB_EssenceLife.1"), new ResearchPage((CrucibleRecipe)essenceLife), new ResearchPage(recipe))
|
||||
.setParentsHidden("CRUCIBLE")
|
||||
.registerResearchItem();
|
||||
|
||||
list = new ArrayList<Object>(2);
|
||||
list.add(Config.miscResources.getStackForType(ResourceType.ESSENCE_EVERLASTING_DURABILITY));
|
||||
list.add(input);
|
||||
recipe = new ShapelessRecipes(new ItemStack(Config.hiveFrameResilient), list);
|
||||
|
||||
|
||||
ResearchItem essenceDurabilityR = new ResearchItem("MB_EssenceArmor", category, new AspectList().add(Aspect.ARMOR, 1),
|
||||
5, 0, 3,
|
||||
Config.miscResources.getStackForType(ResourceType.ESSENCE_EVERLASTING_DURABILITY))
|
||||
.setPages(getResearchPage("MB_EssenceArmor.1"), new ResearchPage((CrucibleRecipe)essenceArmor), new ResearchPage(recipe) )
|
||||
.setParents("MB_EssenceLife")
|
||||
.registerResearchItem();
|
||||
|
||||
.setPages(getResearchPage("MB_EssenceArmor.1"), new ResearchPage((CrucibleRecipe)essenceArmor), new ResearchPage(recipe))
|
||||
.setParents("MB_EssenceLife")
|
||||
.registerResearchItem();
|
||||
|
||||
list = new ArrayList<Object>(2);
|
||||
list.add(Config.miscResources.getStackForType(ResourceType.ESSENCE_FICKLE_PERMANENCE));
|
||||
list.add(input);
|
||||
recipe = new ShapelessRecipes(new ItemStack(Config.hiveFrameMetabolic), list);
|
||||
|
||||
|
||||
ResearchItem essenceUnstableR = new ResearchItem("MB_EssenceUnstable", category, new AspectList().add(Aspect.ENTROPY, 2).add(Aspect.ORDER, 1),
|
||||
3, 1, 4,
|
||||
Config.miscResources.getStackForType(ResourceType.ESSENCE_FICKLE_PERMANENCE))
|
||||
.setPages(getResearchPage("MB_EssenceUnstable.1"), new ResearchPage((CrucibleRecipe)essenceUnstableA),
|
||||
new ResearchPage((CrucibleRecipe)essenceUnstableB), new ResearchPage(recipe) )
|
||||
.setParents("MB_EssenceLife")
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
.setPages(getResearchPage("MB_EssenceUnstable.1"), new ResearchPage((CrucibleRecipe)essenceUnstableA),
|
||||
new ResearchPage((CrucibleRecipe)essenceUnstableB), new ResearchPage(recipe))
|
||||
.setParents("MB_EssenceLife")
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
|
||||
list = new ArrayList<Object>(2);
|
||||
list.add(Config.miscResources.getStackForType(ResourceType.ESSENCE_SHALLOW_GRAVE));
|
||||
list.add(input);
|
||||
recipe = new ShapelessRecipes(new ItemStack(Config.hiveFrameNecrotic), list);
|
||||
|
||||
|
||||
ResearchItem essenceShallowGraveR = new ResearchItem("MB_EssenceDeath", category, new AspectList().add(Aspect.DEATH, 2).add(Aspect.MAGIC, 1),
|
||||
2, 3, 2,
|
||||
Config.miscResources.getStackForType(ResourceType.ESSENCE_SHALLOW_GRAVE))
|
||||
.setPages(getResearchPage("MB_EssenceDeath.1"), new ResearchPage((CrucibleRecipe)essenceDeath), new ResearchPage(recipe) )
|
||||
.setParents("MB_EssenceUnstable")
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
.setPages(getResearchPage("MB_EssenceDeath.1"), new ResearchPage((CrucibleRecipe)essenceDeath), new ResearchPage(recipe))
|
||||
.setParents("MB_EssenceUnstable")
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
|
||||
list = new ArrayList<Object>(2);
|
||||
list.add(Config.miscResources.getStackForType(ResourceType.ESSENCE_LOST_TIME));
|
||||
list.add(input);
|
||||
recipe = new ShapelessRecipes(new ItemStack(Config.hiveFrameTemporal), list);
|
||||
|
||||
|
||||
ResearchItem essenceTimeR = new ResearchItem("MB_EssenceTime", category, new AspectList().add((Aspect)aspectTime, 2),
|
||||
0, 2, 5,
|
||||
Config.miscResources.getStackForType(ResourceType.ESSENCE_LOST_TIME))
|
||||
.setPages(getResearchPage("MB_EssenceTime.1"), new ResearchPage((CrucibleRecipe)essenceTime), new ResearchPage(recipe) )
|
||||
.setParents("MB_EssenceUnstable")
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
|
||||
.setPages(getResearchPage("MB_EssenceTime.1"), new ResearchPage((CrucibleRecipe)essenceTime), new ResearchPage(recipe))
|
||||
.setParents("MB_EssenceUnstable")
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
|
||||
ResearchItem singularityR = new ResearchItem("MB_DimensionalSingularity", category, new AspectList().add(Aspect.ELDRITCH, 2).add((Aspect)aspectTime, 1).add(Aspect.VOID, 1),
|
||||
-1, 4, 5,
|
||||
Config.miscResources.getStackForType(ResourceType.DIMENSIONAL_SINGULARITY))
|
||||
.setPages(getResearchPage("MB_DimensionalSingularity.1"), new ResearchPage((InfusionRecipe)singularityA) , new ResearchPage((InfusionRecipe)singularityB))
|
||||
.setParents("MB_FrameMagic", "MB_EssenceTime", "MB_EssenceDeath")
|
||||
.setConcealed()
|
||||
.setSpecial()
|
||||
.registerResearchItem();
|
||||
|
||||
.setPages(getResearchPage("MB_DimensionalSingularity.1"), new ResearchPage((InfusionRecipe)singularityA), new ResearchPage((InfusionRecipe)singularityB))
|
||||
.setParents("MB_FrameMagic", "MB_EssenceTime", "MB_EssenceDeath")
|
||||
.setConcealed()
|
||||
.setSpecial()
|
||||
.registerResearchItem();
|
||||
|
||||
list = new ArrayList<Object>(2);
|
||||
list.add(Config.miscResources.getStackForType(ResourceType.ESSENCE_SCORNFUL_OBLIVION));
|
||||
list.add(ItemInterface.getItemStack("frameProven"));
|
||||
recipe = new ShapelessRecipes(new ItemStack(Config.hiveFrameOblivion), list);
|
||||
|
||||
|
||||
ResearchItem essenceOblivionR = new ResearchItem("MB_EssenceOblivion", category, new AspectList().add(Aspect.VOID, 2).add(Aspect.HUNGER, 1).add((Aspect)aspectTime, 1),
|
||||
-3, 3, 5,
|
||||
Config.miscResources.getStackForType(ResourceType.ESSENCE_SCORNFUL_OBLIVION))
|
||||
.setPages(getResearchPage("MB_EssenceOblivion.1"), new ResearchPage((IArcaneRecipe)essenceOblivion), new ResearchPage(recipe) )
|
||||
.setParents("MB_DimensionalSingularity")
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
.setPages(getResearchPage("MB_EssenceOblivion.1"), new ResearchPage((IArcaneRecipe)essenceOblivion), new ResearchPage(recipe))
|
||||
.setParents("MB_DimensionalSingularity")
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
}
|
||||
|
||||
|
||||
private static ResearchPage getResearchPage(String ident)
|
||||
{
|
||||
// Helps get around all the stupid XML Doctype restrictions.
|
||||
@@ -489,14 +482,14 @@ public class ThaumcraftHelper
|
||||
.replaceAll("##img##", "<IMG>")
|
||||
.replaceAll("##/img##", "</IMG>"));
|
||||
}
|
||||
|
||||
|
||||
private static void setupItemAspects()
|
||||
{
|
||||
ItemStack item;
|
||||
AspectList list;
|
||||
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.clock), new AspectList(new ItemStack(Items.clock)).add(
|
||||
(Aspect) aspectTime, 4));
|
||||
(Aspect)aspectTime, 4));
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.repeater), new AspectList(new ItemStack(Items.repeater)).add(
|
||||
(Aspect)aspectTime, 2));
|
||||
|
||||
@@ -520,7 +513,7 @@ public class ThaumcraftHelper
|
||||
ThaumcraftApi.registerObjectTag(item, list);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
list = new AspectList().add(Aspect.ORDER, 5).add(Aspect.ARMOR, 2).add(Aspect.BEAST, 1);
|
||||
item = new ItemStack(Config.fHiveBlock);
|
||||
ThaumcraftApi.registerObjectTag(item, list);
|
||||
@@ -529,40 +522,40 @@ public class ThaumcraftHelper
|
||||
list = new AspectList().add(Aspect.LIGHT, 1);
|
||||
item = ForestryBlock.candle.getItemStack();
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] { item.getItemDamage() }, list);
|
||||
|
||||
|
||||
list = new AspectList().add(Aspect.DARKNESS, 1);
|
||||
item = ForestryBlock.stump.getItemStack();
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] { item.getItemDamage() }, list);
|
||||
|
||||
|
||||
list = new AspectList(new ItemStack(Blocks.glass)).add(Aspect.SENSES, 1);
|
||||
item = ForestryBlock.glass.getItemStack();
|
||||
ThaumcraftApi.registerObjectTag(item, list);
|
||||
|
||||
|
||||
list = new AspectList().add(Aspect.EARTH, 2).add(Aspect.WATER, 2);
|
||||
item = ForestryBlock.soil.getItemStack();
|
||||
ThaumcraftApi.registerObjectTag(item, new int[]{1}, list);
|
||||
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] { 1 }, list);
|
||||
|
||||
list = new AspectList(new ItemStack(Blocks.leaves));
|
||||
item = ForestryBlock.leaves.getItemStack();
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] { item.getItemDamage() }, list);
|
||||
|
||||
|
||||
list = new AspectList(new ItemStack(Blocks.sapling));
|
||||
item = ForestryBlock.saplingGE.getItemStack();
|
||||
ThaumcraftApi.registerObjectTag(item, list);
|
||||
|
||||
|
||||
list = new AspectList()/*.add(Aspect.SEED, 1)*/.add(Aspect.PLANT, 1);
|
||||
item = ForestryItem.pollenFertile.getItemStack();
|
||||
ThaumcraftApi.registerObjectTag(item, list);
|
||||
|
||||
|
||||
list = new AspectList().add(Aspect.CRYSTAL, 1).add(Aspect.EARTH, 2);
|
||||
item = ForestryItem.apatite.getItemStack();
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(item.getItem(), 1, ForestryHelper.BlockResource.APATITE.ordinal()),
|
||||
list.copy()/*.add(Aspect.STONE, 2)*/);
|
||||
item = ForestryItem.apatite.getItemStack();
|
||||
item = ForestryItem.apatite.getItemStack();
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(item.getItem(), 1, item.getItemDamage()),
|
||||
list.copy().add(Aspect.CRYSTAL, 2));
|
||||
|
||||
|
||||
|
||||
|
||||
list = new AspectList().add(Aspect.MOTION, 2).add(Aspect.FLIGHT, 1);
|
||||
item = ItemInterface.getItemStack("beeDroneGE");
|
||||
ThaumcraftApi.registerObjectTag(item, list);
|
||||
@@ -574,22 +567,22 @@ public class ThaumcraftHelper
|
||||
list = new AspectList().add(Aspect.LIFE, 2).add(Aspect.EXCHANGE, 5);
|
||||
item = ItemInterface.getItemStack("beeLarvaeGE");
|
||||
ThaumcraftApi.registerObjectTag(item, list);
|
||||
|
||||
|
||||
item = ItemInterface.getItemStack("scoop");
|
||||
list = new AspectList(new ItemStack(item.getItem(), 1, 0)).add(Aspect.TOOL, 2);
|
||||
ThaumcraftApi.registerComplexObjectTag(item, list);
|
||||
|
||||
|
||||
item = ItemInterface.getItemStack("grafter");
|
||||
list = new AspectList(new ItemStack(item.getItem(), 1, item.getItemDamage())).add(Aspect.TOOL, 2);
|
||||
ThaumcraftApi.registerComplexObjectTag(item, list);
|
||||
|
||||
|
||||
item = ItemInterface.getItemStack("grafterProven");
|
||||
list = list.copy().add(Aspect.TOOL, 2).add(Aspect.EXCHANGE, 3);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(item.getItem(), 1, item.getItemDamage()), list);
|
||||
|
||||
|
||||
list = new AspectList().add(Aspect.TRAP, 2);
|
||||
ThaumcraftApi.registerObjectTag("beeComb", list);
|
||||
|
||||
|
||||
list = new AspectList().add(Aspect.SLIME, 1);
|
||||
item = ItemInterface.getItemStack("propolis");
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(item.getItem(), 1, ForestryHelper.Propolis.NORMAL.ordinal()),
|
||||
@@ -612,7 +605,7 @@ public class ThaumcraftHelper
|
||||
list.copy().add(Aspect.ORDER, 2));
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Config.propolis, 1, PropolisType.CHAOS.ordinal()),
|
||||
list.copy().add(Aspect.ENTROPY, 2));
|
||||
|
||||
|
||||
list = new AspectList().add(Aspect.PLANT, 2);
|
||||
item = ItemInterface.getItemStack("pollen");
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(item.getItem(), 1, ForestryHelper.Pollen.NORMAL.ordinal()), list);
|
||||
@@ -622,10 +615,10 @@ public class ThaumcraftHelper
|
||||
list.copy().add(Aspect.MAGIC, 2));
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Config.pollen, 1, PollenType.PHASED.ordinal()),
|
||||
list.copy().add((Aspect)aspectTime, 2));
|
||||
|
||||
|
||||
list = new AspectList().add(Aspect.ORDER, 1);
|
||||
item = ItemInterface.getItemStack("beeswax");
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] {item.getItemDamage()}, list.copy().add(Aspect.ORDER,
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] { item.getItemDamage() }, list.copy().add(Aspect.ORDER,
|
||||
2));
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Config.wax, 1, WaxType.MAGIC.ordinal()),
|
||||
list.copy().add(Aspect.MAGIC, 2));
|
||||
@@ -633,34 +626,34 @@ public class ThaumcraftHelper
|
||||
list.copy().add(Aspect.SOUL, 2));
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Config.wax, 1, WaxType.AMNESIC.ordinal()),
|
||||
list.copy().add(Aspect.MIND, 2));
|
||||
|
||||
|
||||
list = new AspectList().add(Aspect.EXCHANGE, 2).add(Aspect.LIFE, 2);
|
||||
item = ItemInterface.getItemStack("honeyDrop");
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] {item.getItemDamage()}, list);
|
||||
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] { item.getItemDamage() }, list);
|
||||
|
||||
list = new AspectList().add(Aspect.LIFE, 2).add(Aspect.ENERGY, 2);
|
||||
item = ItemInterface.getItemStack("honeydew");
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] {item.getItemDamage()}, list);
|
||||
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] { item.getItemDamage() }, list);
|
||||
|
||||
list = new AspectList().add(Aspect.GREED, 1).add(Aspect.LIFE, 4);
|
||||
item = ItemInterface.getItemStack("royalJelly");
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] {item.getItemDamage()}, list);
|
||||
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] { item.getItemDamage() }, list);
|
||||
|
||||
list = new AspectList().add(Aspect.FIRE, 1).add(Aspect.TRAP, 2);
|
||||
item = ItemInterface.getItemStack("phosphor");
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] {item.getItemDamage()}, list);
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] { item.getItemDamage() }, list);
|
||||
|
||||
item = Config.miscResources.getStackForType(ResourceType.ESSENCE_FALSE_LIFE);
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] {item.getItemDamage()}, new AspectList().add(Aspect.LIFE, 6));
|
||||
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] { item.getItemDamage() }, new AspectList().add(Aspect.LIFE, 6));
|
||||
|
||||
item = Config.miscResources.getStackForType(ResourceType.ESSENCE_SHALLOW_GRAVE);
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] {item.getItemDamage()}, new AspectList().add(Aspect.DEATH, 6));
|
||||
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] { item.getItemDamage() }, new AspectList().add(Aspect.DEATH, 6));
|
||||
|
||||
item = Config.miscResources.getStackForType(ResourceType.ESSENCE_EVERLASTING_DURABILITY);
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] {item.getItemDamage()}, new AspectList().add(Aspect.ARMOR, 6));
|
||||
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] { item.getItemDamage() }, new AspectList().add(Aspect.ARMOR, 6));
|
||||
|
||||
item = Config.miscResources.getStackForType(ResourceType.ESSENCE_LOST_TIME);
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] {item.getItemDamage()}, new AspectList().add(Aspect.VOID,
|
||||
6).add((Aspect)aspectTime, 8 ));
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] { item.getItemDamage() }, new AspectList().add(Aspect.VOID,
|
||||
6).add((Aspect)aspectTime, 8));
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@ package magicbees.main.utils.compat;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import magicbees.item.types.DropType;
|
||||
import magicbees.main.Config;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -19,41 +18,39 @@ public class ThermalExpansionHelper
|
||||
FluidCoal,
|
||||
FluidRedstone,
|
||||
FluidGlowstone,
|
||||
FluidEnder,
|
||||
;
|
||||
FluidEnder,;
|
||||
}
|
||||
|
||||
|
||||
public enum NuggetType
|
||||
{
|
||||
ENDERIUM,
|
||||
ELECTRUM,
|
||||
BRONZE,
|
||||
BRONZE,
|
||||
INVAR,
|
||||
NICKEL,
|
||||
PLATINUM,
|
||||
;
|
||||
PLATINUM,;
|
||||
}
|
||||
|
||||
|
||||
public enum Entity
|
||||
{
|
||||
BLIZZ("Blizz"),
|
||||
;
|
||||
|
||||
BLIZZ("Blizz"),;
|
||||
|
||||
public final String entityID;
|
||||
|
||||
private Entity(String s)
|
||||
{
|
||||
this.entityID = s;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static final String Name = "ThermalExpansion";
|
||||
private static boolean isThermalExpansionPresent = false;
|
||||
|
||||
|
||||
public static boolean isActive()
|
||||
{
|
||||
return isThermalExpansionPresent;
|
||||
}
|
||||
|
||||
|
||||
public static void preInit()
|
||||
{
|
||||
if (Loader.isModLoaded(Name) && Config.ThermalExpansionActive)
|
||||
@@ -64,25 +61,27 @@ public class ThermalExpansionHelper
|
||||
|
||||
public static void init()
|
||||
{
|
||||
if (isActive()) {
|
||||
if (isActive())
|
||||
{
|
||||
getFluids();
|
||||
setupCrafting();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void getFluids()
|
||||
{
|
||||
Config.teFluidGlowstone = FluidRegistry.getFluidStack("glowstone", 50);
|
||||
Config.teFluidCoal = FluidRegistry.getFluidStack("coal", 50);
|
||||
Config.teFluidRedstone = FluidRegistry.getFluidStack("redstone", 50);
|
||||
Config.teFluidEnder = FluidRegistry.getFluidStack("ender", 50);
|
||||
Config.teFluidEnder = FluidRegistry.getFluidStack("ender", 50);
|
||||
}
|
||||
|
||||
private static void setupCrafting()
|
||||
{
|
||||
//crucible recipes
|
||||
// carbon to liquid coal
|
||||
ItemStack carbonDrop = Config.drops.getStackForType(DropType.CARBON);
|
||||
|
||||
|
||||
NBTTagCompound toSend = new NBTTagCompound();
|
||||
toSend.setInteger("energy", 4000);
|
||||
toSend.setTag("input", new NBTTagCompound());
|
||||
@@ -91,11 +90,11 @@ public class ThermalExpansionHelper
|
||||
carbonDrop.writeToNBT(toSend.getCompoundTag("input"));
|
||||
Config.teFluidCoal.writeToNBT(toSend.getCompoundTag("output"));
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "CrucibleRecipe", toSend);
|
||||
|
||||
|
||||
//redstone drop to molten redstone
|
||||
|
||||
|
||||
ItemStack destabilizedDrop = Config.drops.getStackForType(DropType.DESTABILIZED);
|
||||
|
||||
|
||||
toSend = new NBTTagCompound();
|
||||
toSend.setInteger("energy", 4000);
|
||||
toSend.setTag("input", new NBTTagCompound());
|
||||
@@ -104,11 +103,11 @@ public class ThermalExpansionHelper
|
||||
destabilizedDrop.writeToNBT(toSend.getCompoundTag("input"));
|
||||
Config.teFluidRedstone.writeToNBT(toSend.getCompoundTag("output"));
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "CrucibleRecipe", toSend);
|
||||
|
||||
|
||||
//endearing drop to molten ender
|
||||
|
||||
ItemStack endearingDrop = Config.drops.getStackForType(DropType.ENDEARING);
|
||||
|
||||
|
||||
ItemStack endearingDrop = Config.drops.getStackForType(DropType.ENDEARING);
|
||||
|
||||
toSend = new NBTTagCompound();
|
||||
toSend.setInteger("energy", 4000);
|
||||
toSend.setTag("input", new NBTTagCompound());
|
||||
@@ -117,11 +116,11 @@ public class ThermalExpansionHelper
|
||||
endearingDrop.writeToNBT(toSend.getCompoundTag("input"));
|
||||
Config.teFluidEnder.writeToNBT(toSend.getCompoundTag("output"));
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "CrucibleRecipe", toSend);
|
||||
|
||||
|
||||
//lux drop to molten glowstone
|
||||
|
||||
ItemStack luxDrop = Config.drops.getStackForType(DropType.LUX);
|
||||
|
||||
|
||||
ItemStack luxDrop = Config.drops.getStackForType(DropType.LUX);
|
||||
|
||||
toSend = new NBTTagCompound();
|
||||
toSend.setInteger("energy", 4000);
|
||||
toSend.setTag("input", new NBTTagCompound());
|
||||
@@ -131,7 +130,7 @@ public class ThermalExpansionHelper
|
||||
Config.teFluidGlowstone.writeToNBT(toSend.getCompoundTag("output"));
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "CrucibleRecipe", toSend);
|
||||
}
|
||||
|
||||
|
||||
public static void postInit()
|
||||
{
|
||||
if (isActive())
|
||||
@@ -146,10 +145,10 @@ public class ThermalExpansionHelper
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private static void getItems()
|
||||
{
|
||||
|
||||
|
||||
private static void getItems()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,62 +3,64 @@ package magicbees.main.utils.compat;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.LogHelper;
|
||||
|
||||
public class ThermalFoundationHelper {
|
||||
public static final String Name = "ThermalFoundation";
|
||||
private static boolean isThermalFoundationPresent = false;
|
||||
public class ThermalFoundationHelper
|
||||
{
|
||||
public static final String Name = "ThermalFoundation";
|
||||
private static boolean isThermalFoundationPresent = false;
|
||||
|
||||
public static boolean isActive(){return isThermalFoundationPresent; }
|
||||
public static boolean isActive()
|
||||
{
|
||||
return isThermalFoundationPresent;
|
||||
}
|
||||
|
||||
public static void preInit()
|
||||
{
|
||||
if(Loader.isModLoaded(Name) && Config.ThermalExpansionActive)
|
||||
{
|
||||
isThermalFoundationPresent = true;
|
||||
}
|
||||
}
|
||||
public static void preInit()
|
||||
{
|
||||
if (Loader.isModLoaded(Name) && Config.ThermalExpansionActive)
|
||||
{
|
||||
isThermalFoundationPresent = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void init()
|
||||
{
|
||||
if(isActive())
|
||||
{
|
||||
public static void init()
|
||||
{
|
||||
if (isActive())
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void postInit()
|
||||
{
|
||||
if(isActive())
|
||||
{
|
||||
getBlocks();
|
||||
getItems();
|
||||
}
|
||||
}
|
||||
public static void postInit()
|
||||
{
|
||||
if (isActive())
|
||||
{
|
||||
getBlocks();
|
||||
getItems();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void getBlocks()
|
||||
{
|
||||
Config.teEnderiumBlock = GameRegistry.findItemStack(Name, "blockEnderium", 1);
|
||||
Config.teElectrumBlock = GameRegistry.findItemStack(Name, "blockElectrum", 1);
|
||||
Config.teInvarBlock = GameRegistry.findItemStack(Name, "blockInvar", 1);
|
||||
Config.teNickelBlock = GameRegistry.findItemStack(Name, "blockNickel", 1);
|
||||
Config.tePlatinumBlock = GameRegistry.findItemStack(Name, "blockPlatinum", 1);
|
||||
Config.teBronzeBlock = GameRegistry.findItemStack(Name, "blockBronze", 1);
|
||||
}
|
||||
|
||||
public static void getBlocks()
|
||||
{
|
||||
Config.teEnderiumBlock = GameRegistry.findItemStack(Name, "blockEnderium", 1);
|
||||
Config.teElectrumBlock = GameRegistry.findItemStack(Name, "blockElectrum", 1);
|
||||
Config.teInvarBlock = GameRegistry.findItemStack(Name, "blockInvar", 1);
|
||||
Config.teNickelBlock = GameRegistry.findItemStack(Name, "blockNickel", 1);
|
||||
Config.tePlatinumBlock = GameRegistry.findItemStack(Name, "blockPlatinum", 1);
|
||||
Config.teBronzeBlock = GameRegistry.findItemStack(Name, "blockBronze", 1);
|
||||
}
|
||||
|
||||
public static void getItems()
|
||||
{
|
||||
Config.teEnderiumNugget = GameRegistry.findItemStack(Name, "nuggetEnderium", 1);
|
||||
Config.teInvarNugget = GameRegistry.findItemStack(Name, "nuggetInvar", 1);
|
||||
Config.teElectrumNugget = GameRegistry.findItemStack(Name, "nuggetElectrum", 1);
|
||||
Config.teNickelNugget = GameRegistry.findItemStack(Name, "nuggetNickel", 1);
|
||||
Config.tePlatinumNugget = GameRegistry.findItemStack(Name, "nuggetPlatinum", 1);
|
||||
Config.teDustCryotheum = GameRegistry.findItemStack(Name, "dustCryotheum", 1);
|
||||
Config.teDustBlizz = GameRegistry.findItemStack(Name, "dustBlizz", 1);
|
||||
Config.teDustPyrotheum = GameRegistry.findItemStack(Name, "dustPyrotheum", 1);
|
||||
Config.teDustSulfur = GameRegistry.findItemStack(Name, "dustSulfur", 1);
|
||||
Config.teDustPlatinum = GameRegistry.findItemStack(Name, "dustPlatinum", 1);
|
||||
}
|
||||
public static void getItems()
|
||||
{
|
||||
Config.teEnderiumNugget = GameRegistry.findItemStack(Name, "nuggetEnderium", 1);
|
||||
Config.teInvarNugget = GameRegistry.findItemStack(Name, "nuggetInvar", 1);
|
||||
Config.teElectrumNugget = GameRegistry.findItemStack(Name, "nuggetElectrum", 1);
|
||||
Config.teNickelNugget = GameRegistry.findItemStack(Name, "nuggetNickel", 1);
|
||||
Config.tePlatinumNugget = GameRegistry.findItemStack(Name, "nuggetPlatinum", 1);
|
||||
Config.teDustCryotheum = GameRegistry.findItemStack(Name, "dustCryotheum", 1);
|
||||
Config.teDustBlizz = GameRegistry.findItemStack(Name, "dustBlizz", 1);
|
||||
Config.teDustPyrotheum = GameRegistry.findItemStack(Name, "dustPyrotheum", 1);
|
||||
Config.teDustSulfur = GameRegistry.findItemStack(Name, "dustSulfur", 1);
|
||||
Config.teDustPlatinum = GameRegistry.findItemStack(Name, "dustPlatinum", 1);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package magicbees.storage;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -10,8 +9,8 @@ import forestry.api.storage.IBackpackDefinition;
|
||||
|
||||
/**
|
||||
* Backpack definition for Forestry.
|
||||
* @author MysteriousAges
|
||||
*
|
||||
* @author MysteriousAges
|
||||
*/
|
||||
public class BackpackDefinition implements IBackpackDefinition
|
||||
{
|
||||
@@ -34,12 +33,13 @@ public class BackpackDefinition implements IBackpackDefinition
|
||||
return this.key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(ItemStack backpack) {
|
||||
return name;
|
||||
}
|
||||
@Override
|
||||
public String getName(ItemStack backpack)
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public int getPrimaryColour()
|
||||
{
|
||||
return this.colour;
|
||||
@@ -64,7 +64,7 @@ public class BackpackDefinition implements IBackpackDefinition
|
||||
public boolean isValidItem(EntityPlayer player, ItemStack itemStack)
|
||||
{
|
||||
boolean flag = false;
|
||||
|
||||
|
||||
ItemStack stack;
|
||||
for (int i = 0; i < this.items.size() && !flag; i++)
|
||||
{
|
||||
@@ -75,15 +75,16 @@ public class BackpackDefinition implements IBackpackDefinition
|
||||
flag = stack.getItemDamage() == -1 || stack.getItemDamage() == itemStack.getItemDamage();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addValidItems(List<ItemStack> validItems) {
|
||||
for(ItemStack s : validItems)
|
||||
public void addValidItems(List<ItemStack> validItems)
|
||||
{
|
||||
for (ItemStack s : validItems)
|
||||
addValidItem(s);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,7 +3,6 @@ package magicbees.tileentity;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import forestry.api.apiculture.BeeManager;
|
||||
import forestry.api.apiculture.IBee;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
@@ -12,18 +11,16 @@ import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
|
||||
/**
|
||||
*
|
||||
* Singleton object to simulate enough of a bee house to fire the bee effects. =D
|
||||
*
|
||||
* @author MysteriousAges
|
||||
*
|
||||
* @author MysteriousAges
|
||||
*/
|
||||
public class EffectJarHousing implements IBeeHousing
|
||||
{
|
||||
private static EffectJarHousing instance = new EffectJarHousing();
|
||||
|
||||
|
||||
TileEntityEffectJar jarEntity;
|
||||
|
||||
|
||||
public static EffectJarHousing getFor(TileEntityEffectJar entity)
|
||||
{
|
||||
instance.jarEntity = entity;
|
||||
@@ -103,16 +100,24 @@ public class EffectJarHousing implements IBeeHousing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onQueenChange(ItemStack queen) { }
|
||||
public void onQueenChange(ItemStack queen)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wearOutEquipment(int amount) { }
|
||||
public void wearOutEquipment(int amount)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onQueenDeath(IBee queen) { }
|
||||
public void onQueenDeath(IBee queen)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPostQueenDeath(IBee queen) { }
|
||||
public void onPostQueenDeath(IBee queen)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getQueen()
|
||||
@@ -133,7 +138,9 @@ public class EffectJarHousing implements IBeeHousing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDrone(ItemStack itemstack) { }
|
||||
public void setDrone(ItemStack itemstack)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBiomeId()
|
||||
@@ -180,7 +187,9 @@ public class EffectJarHousing implements IBeeHousing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setErrorState(int state) { }
|
||||
public void setErrorState(int state)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getErrorOrdinal()
|
||||
|
||||
@@ -8,10 +8,10 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import forestry.api.apiculture.IAlleleBeeSpecies;
|
||||
import forestry.api.apiculture.IBee;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
|
||||
|
||||
public class TileEntityEffectJar extends TileEntity implements IInventory
|
||||
@@ -40,7 +40,7 @@ public class TileEntityEffectJar extends TileEntity implements IInventory
|
||||
|
||||
public void setOwner(EntityPlayer player)
|
||||
{
|
||||
this.ownerName = player.getGameProfile();
|
||||
this.ownerName = player.getGameProfile();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -120,7 +120,7 @@ public class TileEntityEffectJar extends TileEntity implements IInventory
|
||||
}
|
||||
else
|
||||
{
|
||||
droneStack.stackSize--;
|
||||
droneStack.stackSize--;
|
||||
}
|
||||
|
||||
this.beeSlots[QUEEN_SLOT] = droneStack.copy();
|
||||
@@ -171,19 +171,19 @@ public class TileEntityEffectJar extends TileEntity implements IInventory
|
||||
{
|
||||
super.readFromNBT(tagRoot);
|
||||
|
||||
NBTTagList nbttaglist = tagRoot.getTagList("Items", Constants.NBT.TAG_COMPOUND);
|
||||
this.beeSlots = new ItemStack[SLOT_COUNT];
|
||||
NBTTagList nbttaglist = tagRoot.getTagList("Items", Constants.NBT.TAG_COMPOUND);
|
||||
this.beeSlots = new ItemStack[SLOT_COUNT];
|
||||
|
||||
for (int i = 0; i < nbttaglist.tagCount(); ++i)
|
||||
{
|
||||
NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
|
||||
byte b0 = nbttagcompound1.getByte("Slot");
|
||||
for (int i = 0; i < nbttaglist.tagCount(); ++i)
|
||||
{
|
||||
NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
|
||||
byte b0 = nbttagcompound1.getByte("Slot");
|
||||
|
||||
if (b0 >= 0 && b0 < this.beeSlots.length)
|
||||
{
|
||||
this.beeSlots[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
|
||||
}
|
||||
}
|
||||
if (b0 >= 0 && b0 < this.beeSlots.length)
|
||||
{
|
||||
this.beeSlots[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
|
||||
}
|
||||
}
|
||||
this.currentBeeHealth = tagRoot.getInteger("currentBeeHealth");
|
||||
this.throttle = tagRoot.getInteger("throttle");
|
||||
}
|
||||
@@ -193,18 +193,18 @@ public class TileEntityEffectJar extends TileEntity implements IInventory
|
||||
{
|
||||
super.writeToNBT(tagRoot);
|
||||
|
||||
NBTTagList inventory = new NBTTagList();
|
||||
for (int i = 0; i < this.beeSlots.length; ++i)
|
||||
{
|
||||
if (this.beeSlots[i] != null)
|
||||
{
|
||||
NBTTagCompound itemTag = new NBTTagCompound();
|
||||
itemTag.setByte("Slot", (byte)i);
|
||||
this.beeSlots[i].writeToNBT(itemTag);
|
||||
inventory.appendTag(itemTag);
|
||||
}
|
||||
}
|
||||
tagRoot.setTag("Items", inventory);
|
||||
NBTTagList inventory = new NBTTagList();
|
||||
for (int i = 0; i < this.beeSlots.length; ++i)
|
||||
{
|
||||
if (this.beeSlots[i] != null)
|
||||
{
|
||||
NBTTagCompound itemTag = new NBTTagCompound();
|
||||
itemTag.setByte("Slot", (byte)i);
|
||||
this.beeSlots[i].writeToNBT(itemTag);
|
||||
inventory.appendTag(itemTag);
|
||||
}
|
||||
}
|
||||
tagRoot.setTag("Items", inventory);
|
||||
tagRoot.setInteger("currentBeeHealth", this.currentBeeHealth);
|
||||
tagRoot.setInteger("throttle", this.throttle);
|
||||
}
|
||||
@@ -252,8 +252,12 @@ public class TileEntityEffectJar extends TileEntity implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() { }
|
||||
public void openInventory()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory() { }
|
||||
public void closeInventory()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,242 +1,289 @@
|
||||
package magicbees.tileentity;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import forestry.api.apiculture.IBee;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.apiculture.gadgets.TileBeehouse;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityThaumicApiary extends TileEntity implements IInventory, IBeeHousing {
|
||||
public class TileEntityThaumicApiary extends TileEntity implements IInventory, IBeeHousing
|
||||
{
|
||||
|
||||
private GameProfile ownerName;
|
||||
private GameProfile ownerName;
|
||||
|
||||
public void setOwner(EntityPlayer player) { this.ownerName = player.getGameProfile(); }
|
||||
public void setOwner(EntityPlayer player)
|
||||
{
|
||||
this.ownerName = player.getGameProfile();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getQueen() {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public ItemStack getQueen()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDrone() {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public ItemStack getDrone()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setQueen(ItemStack itemstack) {
|
||||
@Override
|
||||
public void setQueen(ItemStack itemstack)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDrone(ItemStack itemstack) {
|
||||
@Override
|
||||
public void setDrone(ItemStack itemstack)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBreed() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean canBreed()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onQueenChange(ItemStack queen) {
|
||||
@Override
|
||||
public void onQueenChange(ItemStack queen)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wearOutEquipment(int amount) {
|
||||
@Override
|
||||
public void wearOutEquipment(int amount)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onQueenDeath(IBee queen) {
|
||||
@Override
|
||||
public void onQueenDeath(IBee queen)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPostQueenDeath(IBee queen) {
|
||||
@Override
|
||||
public void onPostQueenDeath(IBee queen)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPollenRetrieved(IBee queen, IIndividual pollen, boolean isHandled) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean onPollenRetrieved(IBee queen, IIndividual pollen, boolean isHandled)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onEggLaid(IBee queen) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean onEggLaid(IBee queen)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getTerritoryModifier(IBeeGenome genome, float currentModifier) {
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public float getTerritoryModifier(IBeeGenome genome, float currentModifier)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) {
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) {
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getProductionModifier(IBeeGenome genome, float currentModifier) {
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public float getProductionModifier(IBeeGenome genome, float currentModifier)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getFloweringModifier(IBeeGenome genome, float currentModifier) {
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public float getFloweringModifier(IBeeGenome genome, float currentModifier)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getGeneticDecay(IBeeGenome genome, float currentModifier) {
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public float getGeneticDecay(IBeeGenome genome, float currentModifier)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSealed() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isSealed()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSelfLighted() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isSelfLighted()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSunlightSimulated() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isSunlightSimulated()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isHellish() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isHellish()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GameProfile getOwnerName() {
|
||||
return this.ownerName;
|
||||
}
|
||||
@Override
|
||||
public GameProfile getOwnerName()
|
||||
{
|
||||
return this.ownerName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public World getWorld() {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public World getWorld()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getXCoord() {
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public int getXCoord()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getYCoord() {
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public int getYCoord()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getZCoord() {
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public int getZCoord()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBiomeId() {
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public int getBiomeId()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumTemperature getTemperature() {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public EnumTemperature getTemperature()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumHumidity getHumidity() {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public EnumHumidity getHumidity()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setErrorState(int state) {
|
||||
@Override
|
||||
public void setErrorState(int state)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getErrorOrdinal() {
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public int getErrorOrdinal()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addProduct(ItemStack product, boolean all) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean addProduct(ItemStack product, boolean all)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public int getSizeInventory()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int p_70301_1_) {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int p_70301_1_)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int p_70304_1_) {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int p_70304_1_)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) {
|
||||
@Override
|
||||
public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public String getInventoryName()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean hasCustomInventoryName()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public int getInventoryStackLimit()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer p_70300_1_) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer p_70300_1_)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {
|
||||
@Override
|
||||
public void openInventory()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
@Override
|
||||
public void closeInventory()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package magicbees.world;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
@@ -13,8 +15,6 @@ import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.world.ChunkDataEvent;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class WorldGeneratorHandler implements IWorldGenerator
|
||||
{
|
||||
public WorldTicker ticker;
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
package magicbees.world;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
import magicbees.main.utils.ChunkCoords;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Random;
|
||||
|
||||
public class WorldTicker
|
||||
{
|
||||
private WorldGeneratorHandler parent;
|
||||
private HashMap<Integer, LinkedList<ChunkCoords>> chunkRegenList;
|
||||
|
||||
|
||||
public WorldTicker(WorldGeneratorHandler p)
|
||||
{
|
||||
this.parent = p;
|
||||
@@ -21,8 +21,10 @@ public class WorldTicker
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onTick(TickEvent.WorldTickEvent event) {
|
||||
if(event.phase == TickEvent.Phase.END) {
|
||||
public void onTick(TickEvent.WorldTickEvent event)
|
||||
{
|
||||
if (event.phase == TickEvent.Phase.END)
|
||||
{
|
||||
World world = event.world;
|
||||
int dimensionID = world.provider.dimensionId;
|
||||
LinkedList<ChunkCoords> chunkList = chunkRegenList.get(dimensionID);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package magicbees.world.feature;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import magicbees.block.types.HiveType;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.MagicBees;
|
||||
@@ -9,17 +11,15 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class FeatureHive
|
||||
{
|
||||
private static FeatureOreVein redstoneGen;
|
||||
private static FeatureOreVein netherQuartzGen;
|
||||
private static FeatureOreVein glowstoneGen;
|
||||
private static FeatureOreVein endStoneGen;
|
||||
|
||||
|
||||
private static boolean logSpawns = MagicBees.getConfig().LogHiveSpawns;
|
||||
|
||||
|
||||
public static void initialize()
|
||||
{
|
||||
redstoneGen = new FeatureOreVein(Blocks.redstone_ore, Blocks.stone);
|
||||
@@ -27,7 +27,7 @@ public class FeatureHive
|
||||
glowstoneGen = new FeatureOreVein(Blocks.glowstone, Blocks.stone);
|
||||
endStoneGen = new FeatureOreVein(Blocks.end_stone, Blocks.stone);
|
||||
}
|
||||
|
||||
|
||||
public static void generateHives(World world, Random random, int chunkX, int chunkZ, boolean initialGen)
|
||||
{
|
||||
for (HiveType type : HiveType.values())
|
||||
@@ -35,29 +35,30 @@ public class FeatureHive
|
||||
type.generateHive(world, random, chunkX, chunkZ, initialGen);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static boolean generateHiveCurious(World world, Random random, int coordX, int coordZ, boolean initialGen)
|
||||
{
|
||||
int coordY = getHeight(world, random, coordX, coordZ);
|
||||
boolean doSpawn = false;
|
||||
|
||||
|
||||
Block b = world.getBlock(coordX, coordY + 1, coordZ);
|
||||
if (world.isAirBlock(coordX, coordY - 1, coordZ) &&
|
||||
world.isAirBlock(coordX, coordY, coordZ) &&
|
||||
b != null && b.isLeaves(world, coordX, coordY + 1, coordZ))
|
||||
{
|
||||
world.setBlock(coordX, coordY, coordZ, Config.hive, HiveType.CURIOUS.ordinal(), 3);
|
||||
if (logSpawns) LogHelper.info("Spawning curious hive at: X " + coordX + ", Y: " + coordY + ", Z: " + coordZ);
|
||||
if (logSpawns)
|
||||
LogHelper.info("Spawning curious hive at: X " + coordX + ", Y: " + coordY + ", Z: " + coordZ);
|
||||
doSpawn = true;
|
||||
}
|
||||
|
||||
|
||||
return doSpawn;
|
||||
}
|
||||
|
||||
|
||||
public static boolean generateHiveUnusual(World world, Random random, int coordX, int coordZ, boolean initialGen)
|
||||
{
|
||||
int coordY = getHeight(world, random, coordX, coordZ);
|
||||
|
||||
|
||||
boolean doSpawn = false;
|
||||
if (world.isAirBlock(coordX, coordY + 1, coordZ) &&
|
||||
world.isAirBlock(coordX, coordY, coordZ) &&
|
||||
@@ -65,16 +66,17 @@ public class FeatureHive
|
||||
{
|
||||
doSpawn = true;
|
||||
}
|
||||
|
||||
|
||||
if (doSpawn)
|
||||
{
|
||||
world.setBlock(coordX, coordY, coordZ, Config.hive, HiveType.UNUSUAL.ordinal(), 3);
|
||||
if (logSpawns) LogHelper.info("Spawning unusual hive at: X " + coordX + ", Y: " + coordY + ", Z: " + coordZ);
|
||||
if (logSpawns)
|
||||
LogHelper.info("Spawning unusual hive at: X " + coordX + ", Y: " + coordY + ", Z: " + coordZ);
|
||||
}
|
||||
|
||||
|
||||
return doSpawn;
|
||||
}
|
||||
|
||||
|
||||
public static boolean generateHiveResonant(World world, Random random, int coordX, int coordZ, boolean initialGen)
|
||||
{
|
||||
int coordY = getHeight(world, random, coordX, coordZ);
|
||||
@@ -87,16 +89,17 @@ public class FeatureHive
|
||||
{
|
||||
doSpawn = true;
|
||||
}
|
||||
|
||||
|
||||
if (doSpawn)
|
||||
{
|
||||
world.setBlock(coordX, coordY, coordZ, Config.hive, HiveType.RESONANT.ordinal(), 3);
|
||||
if (logSpawns) LogHelper.info("Spawning resonant hive at: X " + coordX + ", Y: " + coordY + ", Z: " + coordZ);
|
||||
if (logSpawns)
|
||||
LogHelper.info("Spawning resonant hive at: X " + coordX + ", Y: " + coordY + ", Z: " + coordZ);
|
||||
}
|
||||
|
||||
|
||||
return doSpawn;
|
||||
}
|
||||
|
||||
|
||||
public static boolean generateHiveDeep(World world, Random random, int coordX, int coordZ, boolean initialGen)
|
||||
{
|
||||
|
||||
@@ -104,19 +107,19 @@ public class FeatureHive
|
||||
int coordY = 10 + random.nextInt(10);
|
||||
|
||||
boolean doSpawn = false;
|
||||
|
||||
if (random.nextInt(100) < 40 &&
|
||||
|
||||
if (random.nextInt(100) < 40 &&
|
||||
!world.isAirBlock(coordX, coordY, coordZ) && canBlockReplaceAt(world, coordX, coordY, coordZ,
|
||||
Blocks.stone))
|
||||
{
|
||||
{
|
||||
doSpawn = getSurroundCount(world, coordX, coordY, coordZ, Blocks.stone) >= 6;
|
||||
}
|
||||
|
||||
|
||||
if (doSpawn)
|
||||
{
|
||||
world.setBlock(coordX, coordY, coordZ, Config.hive, HiveType.DEEP.ordinal(), 3);
|
||||
if (logSpawns) LogHelper.info("Spawning deep hive at: X " + coordX + ", Y: " + coordY + ", Z: " + coordZ);
|
||||
|
||||
if (logSpawns) LogHelper.info("Spawning deep hive at: X " + coordX + ", Y: " + coordY + ", Z: " + coordZ);
|
||||
|
||||
|
||||
redstoneGen.generateVein(world, random, coordX + 1, coordY, coordZ, 2);
|
||||
redstoneGen.generateVein(world, random, coordX - 1, coordY, coordZ, 2);
|
||||
@@ -125,10 +128,10 @@ public class FeatureHive
|
||||
redstoneGen.generateVein(world, random, coordX, coordY, coordZ + 1, 2);
|
||||
redstoneGen.generateVein(world, random, coordX, coordY, coordZ - 1, 2);
|
||||
}
|
||||
|
||||
|
||||
return doSpawn;
|
||||
}
|
||||
|
||||
|
||||
public static boolean generateHiveInfernal(World world, Random random, int coordX, int coordZ, boolean initialGen)
|
||||
{
|
||||
boolean doSpawn = false;
|
||||
@@ -136,18 +139,19 @@ public class FeatureHive
|
||||
{
|
||||
int chop = random.nextInt(2) + 1;
|
||||
int coordY = random.nextInt(60 / chop) + random.nextInt(chop) * (120 / chop) - 5;
|
||||
|
||||
if(!world.isAirBlock(coordX, coordY, coordZ) && world.getBlock(coordX, coordY, coordZ) != null &&
|
||||
|
||||
if (!world.isAirBlock(coordX, coordY, coordZ) && world.getBlock(coordX, coordY, coordZ) != null &&
|
||||
world.getBlock(coordX, coordY, coordZ).isReplaceableOreGen(world, coordX, coordY, coordZ,
|
||||
Blocks.netherrack))
|
||||
{
|
||||
{
|
||||
doSpawn = getSurroundCount(world, coordX, coordY, coordZ, Blocks.netherrack) >= 5;
|
||||
}
|
||||
|
||||
|
||||
if (doSpawn)
|
||||
{
|
||||
world.setBlock(coordX, coordY, coordZ, Config.hive, HiveType.INFERNAL.ordinal(), 3);
|
||||
if (logSpawns) LogHelper.info("Spawning infernal hive at: X " + coordX + ", Y: " + coordY + ", Z: " + coordZ);
|
||||
if (logSpawns)
|
||||
LogHelper.info("Spawning infernal hive at: X " + coordX + ", Y: " + coordY + ", Z: " + coordZ);
|
||||
|
||||
netherQuartzGen.generateVein(world, random, coordX + 1, coordY, coordZ, 4);
|
||||
netherQuartzGen.generateVein(world, random, coordX - 1, coordY, coordZ, 4);
|
||||
@@ -160,42 +164,43 @@ public class FeatureHive
|
||||
else if (MagicBees.getConfig().DoSpecialHiveGen && world.rand.nextInt() < 11)
|
||||
{
|
||||
int coordY = random.nextInt(13) + 5;
|
||||
|
||||
|
||||
if (!world.isAirBlock(coordX, coordY, coordZ) &&
|
||||
canBlockReplaceAt(world, coordX, coordY, coordZ, Blocks.stone))
|
||||
{
|
||||
|
||||
|
||||
doSpawn = getSurroundCount(world, coordX, coordY, coordZ, Blocks.stone) >= 6;
|
||||
}
|
||||
|
||||
|
||||
if (doSpawn)
|
||||
{
|
||||
world.setBlock(coordX, coordY, coordZ, Config.hive, HiveType.INFERNAL.ordinal(), 3);
|
||||
if (logSpawns) LogHelper.info("Spawning infernal hive at: X " + coordX + ", Y: " + coordY + ", Z: " + coordZ);
|
||||
if (logSpawns)
|
||||
LogHelper.info("Spawning infernal hive at: X " + coordX + ", Y: " + coordY + ", Z: " + coordZ);
|
||||
|
||||
glowstoneGen.generateVein(world, random, coordX + 1, coordY, coordZ, world.rand.nextInt(4) + 1);
|
||||
glowstoneGen.generateVein(world, random, coordX - 1, coordY, coordZ, world.rand.nextInt(4) + 1);
|
||||
|
||||
|
||||
if (canBlockReplaceAt(world, coordX, coordY + 1, coordZ, Blocks.stone) ||
|
||||
canBlockReplaceAt(world, coordX, coordY + 1, coordZ, Blocks.netherrack))
|
||||
{
|
||||
world.setBlock(coordX, coordY + 1, coordZ, Blocks.glowstone, 0, 3);
|
||||
}
|
||||
|
||||
|
||||
if (canBlockReplaceAt(world, coordX, coordY - 1, coordZ, Blocks.stone) ||
|
||||
canBlockReplaceAt(world, coordX, coordY + 1, coordZ, Blocks.netherrack))
|
||||
{
|
||||
world.setBlock(coordX, coordY - 1, coordZ, Blocks.glowstone, 0, 3);
|
||||
}
|
||||
|
||||
|
||||
glowstoneGen.generateVein(world, random, coordX, coordY, coordZ + 1, world.rand.nextInt(4) + 1);
|
||||
glowstoneGen.generateVein(world, random, coordX, coordY, coordZ - 1, world.rand.nextInt(4) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return doSpawn;
|
||||
}
|
||||
|
||||
|
||||
public static boolean generateHiveOblivion(World world, Random random, int coordX, int coordZ, boolean initialGen)
|
||||
{
|
||||
boolean doSpawn = false;
|
||||
@@ -203,21 +208,22 @@ public class FeatureHive
|
||||
{
|
||||
// 1 per gen
|
||||
int coordY = 10 + random.nextInt(25);
|
||||
|
||||
|
||||
if (world.isAirBlock(coordX, coordY - 2, coordZ) &&
|
||||
canBlockReplaceAt(world, coordX, coordY - 1, coordZ, Blocks.end_stone) &&
|
||||
canBlockReplaceAt(world, coordX, coordY, coordZ, Blocks.end_stone))
|
||||
{
|
||||
doSpawn = true;
|
||||
}
|
||||
|
||||
|
||||
if (doSpawn)
|
||||
{
|
||||
world.setBlock(coordX, coordY, coordZ, Config.hive, HiveType.OBLIVION.ordinal(), 3);
|
||||
if (logSpawns) LogHelper.info("Spawning oblivion hive at: X " + coordX + ", Y: " + coordY + ", Z: " + coordZ);
|
||||
|
||||
if (logSpawns)
|
||||
LogHelper.info("Spawning oblivion hive at: X " + coordX + ", Y: " + coordY + ", Z: " + coordZ);
|
||||
|
||||
int obsidianSpikeHeight = random.nextInt(8) + 2;
|
||||
|
||||
|
||||
for (int i = 1; i < obsidianSpikeHeight && coordY - i > 0; ++i)
|
||||
{
|
||||
world.setBlock(coordX, coordY - i, coordZ, Blocks.obsidian, 0, 2);
|
||||
@@ -228,25 +234,26 @@ public class FeatureHive
|
||||
{
|
||||
// 1 per gen
|
||||
int coordY = random.nextInt(5) + 5;
|
||||
|
||||
|
||||
do
|
||||
{
|
||||
--coordY;
|
||||
|
||||
|
||||
if (!world.isAirBlock(coordX, coordY, coordZ) &&
|
||||
canBlockReplaceAt(world, coordX, coordY, coordZ, Blocks.stone) ||
|
||||
canBlockReplaceAt(world, coordX, coordY, coordZ, Blocks.end_stone))
|
||||
{
|
||||
{
|
||||
doSpawn = getSurroundCount(world, coordX, coordY, coordZ, Blocks.end_stone) >= 5 ||
|
||||
getSurroundCount(world, coordX, coordY, coordZ, Blocks.stone) >= 5;
|
||||
}
|
||||
}
|
||||
while (!doSpawn && coordY > 5);
|
||||
|
||||
|
||||
if (doSpawn)
|
||||
{
|
||||
world.setBlock(coordX, coordY, coordZ, Config.hive, HiveType.OBLIVION.ordinal(), 3);
|
||||
if (logSpawns) LogHelper.info("Spawning oblivion hive at: X " + coordX + ", Y: " + coordY + ", Z: " + coordZ);
|
||||
if (logSpawns)
|
||||
LogHelper.info("Spawning oblivion hive at: X " + coordX + ", Y: " + coordY + ", Z: " + coordZ);
|
||||
|
||||
endStoneGen.generateVein(world, random, coordX + 1, coordY, coordZ, world.rand.nextInt(6) + 1);
|
||||
endStoneGen.generateVein(world, random, coordX - 1, coordY, coordZ, world.rand.nextInt(6) + 1);
|
||||
@@ -258,7 +265,7 @@ public class FeatureHive
|
||||
}
|
||||
return doSpawn;
|
||||
}
|
||||
|
||||
|
||||
private static int getHeight(World world, Random random, int coordX, int coordZ)
|
||||
{
|
||||
BiomeGenBase biome = world.getBiomeGenForCoords(coordX, coordZ);
|
||||
@@ -269,45 +276,45 @@ public class FeatureHive
|
||||
max = (max > 10) ? max : 10;
|
||||
return min + random.nextInt(max);
|
||||
}
|
||||
|
||||
|
||||
// Determines if surrounding material is "equivalent" to provided block using isGenMineableReplaceable.
|
||||
private static int getSurroundCount(World world, int x, int y, int z, Block blockType)
|
||||
{
|
||||
int surroundCount = 0;
|
||||
|
||||
if (canBlockReplaceAt(world, x+1, y, z, blockType))
|
||||
|
||||
if (canBlockReplaceAt(world, x + 1, y, z, blockType))
|
||||
{
|
||||
++surroundCount;
|
||||
}
|
||||
|
||||
if (canBlockReplaceAt(world, x-1, y, z, blockType))
|
||||
|
||||
if (canBlockReplaceAt(world, x - 1, y, z, blockType))
|
||||
{
|
||||
++surroundCount;
|
||||
}
|
||||
|
||||
if (canBlockReplaceAt(world, x, y+1, z, blockType))
|
||||
|
||||
if (canBlockReplaceAt(world, x, y + 1, z, blockType))
|
||||
{
|
||||
++surroundCount;
|
||||
}
|
||||
|
||||
if (canBlockReplaceAt(world, x, y-1, z, blockType))
|
||||
|
||||
if (canBlockReplaceAt(world, x, y - 1, z, blockType))
|
||||
{
|
||||
++surroundCount;
|
||||
}
|
||||
|
||||
if (canBlockReplaceAt(world, x, y, z+1, blockType))
|
||||
|
||||
if (canBlockReplaceAt(world, x, y, z + 1, blockType))
|
||||
{
|
||||
++surroundCount;
|
||||
}
|
||||
|
||||
if (canBlockReplaceAt(world, x, y, z-1, blockType))
|
||||
|
||||
if (canBlockReplaceAt(world, x, y, z - 1, blockType))
|
||||
{
|
||||
++surroundCount;
|
||||
}
|
||||
|
||||
|
||||
return surroundCount;
|
||||
}
|
||||
|
||||
|
||||
private static boolean canBlockReplaceAt(World world, int x, int y, int z, Block block)
|
||||
{
|
||||
return world.getBlock(x, y, z) != null &&
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
package magicbees.world.feature;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class FeatureOreVein
|
||||
{
|
||||
private Block veinBlock;
|
||||
private int veinBlockMeta;
|
||||
private Block replacesBlock;
|
||||
|
||||
|
||||
public FeatureOreVein(Block block, Block replacesBlock)
|
||||
{
|
||||
this(block, 0, replacesBlock);
|
||||
}
|
||||
|
||||
|
||||
public FeatureOreVein(Block block, int meta, Block replacesBlock)
|
||||
{
|
||||
this.veinBlock = block;
|
||||
this.veinBlockMeta = meta;
|
||||
this.replacesBlock = replacesBlock;
|
||||
}
|
||||
|
||||
|
||||
public void generateVein(World world, Random random, int startX, int startY, int startZ, int maxSpawnCount)
|
||||
{
|
||||
int currentX = startX;
|
||||
@@ -30,11 +30,11 @@ public class FeatureOreVein
|
||||
int currentZ = startZ;
|
||||
int spawnAttempts = 0;
|
||||
int spawnCount = 0;
|
||||
|
||||
|
||||
while (spawnCount < maxSpawnCount && spawnAttempts < maxSpawnCount * 2)
|
||||
{
|
||||
++spawnAttempts;
|
||||
|
||||
|
||||
if (!world.isAirBlock(currentX, currentY, currentZ) && canBlockReplaceAt(world, currentX, currentY, currentZ, replacesBlock))
|
||||
{
|
||||
world.setBlock(currentX, currentY, currentZ, this.veinBlock, this.veinBlockMeta, 2);
|
||||
@@ -43,28 +43,28 @@ public class FeatureOreVein
|
||||
|
||||
switch (random.nextInt(6))
|
||||
{
|
||||
case 0:
|
||||
++currentY;
|
||||
break;
|
||||
case 1:
|
||||
--currentY;
|
||||
break;
|
||||
case 2:
|
||||
++currentZ;
|
||||
break;
|
||||
case 3:
|
||||
--currentZ;
|
||||
break;
|
||||
case 4:
|
||||
++currentX;
|
||||
break;
|
||||
case 5:
|
||||
--currentX;
|
||||
break;
|
||||
case 0:
|
||||
++currentY;
|
||||
break;
|
||||
case 1:
|
||||
--currentY;
|
||||
break;
|
||||
case 2:
|
||||
++currentZ;
|
||||
break;
|
||||
case 3:
|
||||
--currentZ;
|
||||
break;
|
||||
case 4:
|
||||
++currentX;
|
||||
break;
|
||||
case 5:
|
||||
--currentX;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static boolean canBlockReplaceAt(World world, int x, int y, int z, Block block)
|
||||
{
|
||||
return world.getBlock(x, y, z) != null &&
|
||||
|
||||
Reference in new issue
Block a user