mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-19 11:59:19 +00:00
Updating to Forestry 2.2.8.0
fixing some shit.
This commit is contained in:
1 parent
c3210c0883
commit
e20ab2dfb9
25 files changed
+211
-208
No files matched your search
@@ -16,7 +16,7 @@
|
||||
|
||||
<property name="mc.version" value="1.5.2"/>
|
||||
<property name="forge.version" value="7.8.0.700"/>
|
||||
<property name="magicbees.version" value="2.0.0"/>
|
||||
<property name="magicbees.version" value="2.0.1"/>
|
||||
|
||||
<!-- for local deployment only, not used by main -->
|
||||
<property name="deploy.type" value="previews" />
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
2.0.1
|
||||
Modifying mutation class to allow block-requiring mutations to work in Alvearies/other multiblock hive structures.
|
||||
Tweaking hive gen
|
||||
Fixing mistakes in bee genome templates
|
||||
Updating Biofuel capsule to use the Ethanol liquid in Forestry
|
||||
|
||||
2.0.0
|
||||
Enabling Retrogen of hives in case you missed them initially.
|
||||
Tearing out all old mutations, rewriting from the ground up. Maybe these will be less frustrating. ;)
|
||||
|
||||
@@ -145,6 +145,7 @@
|
||||
<entry key="research.node.pure">Pure</entry>
|
||||
<entry key="research.node.dark">Dark</entry>
|
||||
<entry key="research.node.chaotic">Chaotic</entry>
|
||||
<entry key="research.block.crystals">Crystal Cluster</entry>
|
||||
|
||||
<!-- Species names -->
|
||||
<entry key="magicbees.speciesMystical">Mystical</entry>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 412 B |
@@ -0,0 +1,5 @@
|
||||
0*64
|
||||
1*2
|
||||
0*48
|
||||
1*2
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 425 B |
@@ -0,0 +1,5 @@
|
||||
0*64
|
||||
1*2
|
||||
0*48
|
||||
1*2
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 403 B |
@@ -0,0 +1,5 @@
|
||||
0*64
|
||||
1*2
|
||||
0*48
|
||||
1*2
|
||||
|
||||
@@ -17,10 +17,12 @@ import forestry.api.genetics.IEffectData;
|
||||
|
||||
public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
||||
{
|
||||
protected int throttle;
|
||||
|
||||
public AlleleEffect(String id, boolean isDominant)
|
||||
public AlleleEffect(String id, boolean isDominant, int timeout)
|
||||
{
|
||||
super("effect" + id, isDominant);
|
||||
this.throttle = timeout;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -33,7 +35,28 @@ public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
||||
public abstract IEffectData validateStorage(IEffectData storedData);
|
||||
|
||||
@Override
|
||||
public abstract IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing);
|
||||
public final IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
{
|
||||
int count = storedData.getInteger(0);
|
||||
if (count >= this.throttle)
|
||||
{
|
||||
storedData = this.doEffectThrottled(genome, storedData, housing);
|
||||
}
|
||||
else
|
||||
{
|
||||
storedData.setInteger(0, count + 1);
|
||||
}
|
||||
return storedData;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param genome
|
||||
* @param storedData
|
||||
* @param housing
|
||||
* @return
|
||||
*/
|
||||
protected abstract IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing);
|
||||
|
||||
@Override
|
||||
public IEffectData doFX(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
|
||||
@@ -12,13 +12,10 @@ import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class AlleleEffectAuraNodeAttract extends AlleleEffect
|
||||
{
|
||||
|
||||
private int throttle;
|
||||
|
||||
public AlleleEffectAuraNodeAttract(String id, boolean isDominant, int timeout)
|
||||
{
|
||||
super(id, isDominant);
|
||||
this.throttle = timeout;
|
||||
super(id, isDominant, timeout);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -32,46 +29,38 @@ public class AlleleEffectAuraNodeAttract extends AlleleEffect
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
public IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
{
|
||||
int value = storedData.getInteger(0);
|
||||
if (value >= throttle)
|
||||
World w = housing.getWorld();
|
||||
if (w.rand.nextInt(10) < 1)
|
||||
{
|
||||
World w = housing.getWorld();
|
||||
if (w.rand.nextInt(10) < 1)
|
||||
float x = housing.getXCoord();
|
||||
float y = housing.getYCoord();
|
||||
float z = housing.getZCoord();
|
||||
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(w, x, y, z, 1800);
|
||||
if (nodeId != -1)
|
||||
{
|
||||
float x = housing.getXCoord();
|
||||
float y = housing.getYCoord();
|
||||
float z = housing.getZCoord();
|
||||
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(w, x, y, z, 1800);
|
||||
if (nodeId != -1)
|
||||
AuraNode node = ThaumcraftApi.getNodeCopy(nodeId);
|
||||
if (node.level >= node.baseLevel * 4 / 5)
|
||||
{
|
||||
AuraNode node = ThaumcraftApi.getNodeCopy(nodeId);
|
||||
if (node.level >= node.baseLevel * 4 / 5)
|
||||
{
|
||||
x = (float)(x - node.xPos);
|
||||
y = (float)(y - node.yPos);
|
||||
z = (float)(z - node.zPos);
|
||||
|
||||
float distance = (float)Math.sqrt(x * x + y * y + z * z);
|
||||
x = x / distance;
|
||||
y = y / distance;
|
||||
z = z / distance;
|
||||
|
||||
x *= 0.05f;
|
||||
y *= 0.05f;
|
||||
z *= 0.05f;
|
||||
|
||||
ThaumcraftApi.queueNodeChanges(nodeId, -1, 0, false, null, x, y, z);
|
||||
}
|
||||
x = (float)(x - node.xPos);
|
||||
y = (float)(y - node.yPos);
|
||||
z = (float)(z - node.zPos);
|
||||
|
||||
float distance = (float)Math.sqrt(x * x + y * y + z * z);
|
||||
x = x / distance;
|
||||
y = y / distance;
|
||||
z = z / distance;
|
||||
|
||||
x *= 0.05f;
|
||||
y *= 0.05f;
|
||||
z *= 0.05f;
|
||||
|
||||
ThaumcraftApi.queueNodeChanges(nodeId, -1, 0, false, null, x, y, z);
|
||||
}
|
||||
}
|
||||
storedData.setInteger(0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
storedData.setInteger(0, value + 1);
|
||||
}
|
||||
storedData.setInteger(0, 0);
|
||||
|
||||
return storedData;
|
||||
}
|
||||
|
||||
@@ -10,13 +10,10 @@ import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class AlleleEffectAuraNodeCharge extends AlleleEffect
|
||||
{
|
||||
|
||||
private int effectTimeout;
|
||||
|
||||
AlleleEffectAuraNodeCharge(String id, boolean dominant, int timeout)
|
||||
{
|
||||
super(id, dominant);
|
||||
this.effectTimeout = timeout;
|
||||
super(id, dominant, timeout);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -30,32 +27,26 @@ public class AlleleEffectAuraNodeCharge extends AlleleEffect
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
public IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
{
|
||||
int timeout = storedData.getInteger(0);
|
||||
if (timeout >= this.effectTimeout)
|
||||
World world = housing.getWorld();
|
||||
int x = housing.getXCoord();
|
||||
int y = housing.getYCoord();
|
||||
int z = housing.getZCoord();
|
||||
|
||||
EnumTag tag;
|
||||
do
|
||||
{
|
||||
World world = housing.getWorld();
|
||||
int x = housing.getXCoord();
|
||||
int y = housing.getYCoord();
|
||||
int z = housing.getZCoord();
|
||||
|
||||
EnumTag tag;
|
||||
do
|
||||
{
|
||||
tag = EnumTag.values()[world.rand.nextInt(EnumTag.values().length)];
|
||||
}
|
||||
while (tag == EnumTag.UNKNOWN || tag == EnumTag.WEATHER);
|
||||
|
||||
if (world.rand.nextBoolean())
|
||||
{
|
||||
ThaumcraftApi.increaseLowestAura(world, x, y, z, 1);
|
||||
}
|
||||
tag = EnumTag.values()[world.rand.nextInt(EnumTag.values().length)];
|
||||
}
|
||||
else
|
||||
while (tag == EnumTag.UNKNOWN || tag == EnumTag.WEATHER);
|
||||
|
||||
if (world.rand.nextBoolean())
|
||||
{
|
||||
storedData.setInteger(0, timeout + 1);
|
||||
ThaumcraftApi.increaseLowestAura(world, x, y, z, 1);
|
||||
}
|
||||
storedData.setInteger(0, 0);
|
||||
|
||||
return storedData;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,13 +10,11 @@ import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class AlleleEffectAuraNodeFlux extends AlleleEffect
|
||||
{
|
||||
private int effectTimeout;
|
||||
private int nodeRange;
|
||||
|
||||
AlleleEffectAuraNodeFlux(String id, boolean dominant, int timeout, int range)
|
||||
{
|
||||
super(id, dominant);
|
||||
this.effectTimeout = timeout;
|
||||
super(id, dominant, timeout);
|
||||
this.nodeRange = range;
|
||||
}
|
||||
|
||||
@@ -31,34 +29,28 @@ public class AlleleEffectAuraNodeFlux extends AlleleEffect
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
public IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
{
|
||||
int timeout = storedData.getInteger(0);
|
||||
if (timeout >= this.effectTimeout)
|
||||
World world = housing.getWorld();
|
||||
int x = housing.getXCoord();
|
||||
int y = housing.getYCoord();
|
||||
int z = housing.getZCoord();
|
||||
|
||||
EnumTag tag;
|
||||
do
|
||||
{
|
||||
World world = housing.getWorld();
|
||||
int x = housing.getXCoord();
|
||||
int y = housing.getYCoord();
|
||||
int z = housing.getZCoord();
|
||||
|
||||
EnumTag tag;
|
||||
do
|
||||
{
|
||||
tag = EnumTag.values()[world.rand.nextInt(EnumTag.values().length)];
|
||||
}
|
||||
while (tag == EnumTag.UNKNOWN || tag == EnumTag.WEATHER);
|
||||
|
||||
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(world, x, y, z, this.nodeRange);
|
||||
if (nodeId != -1)
|
||||
{
|
||||
int quantity = world.rand.nextInt(2) + 1;
|
||||
ThaumcraftApi.queueNodeChanges(nodeId, 0, 0, false, new ObjectTags().add(tag, quantity), 0f, 0f, 0f);
|
||||
}
|
||||
tag = EnumTag.values()[world.rand.nextInt(EnumTag.values().length)];
|
||||
}
|
||||
else
|
||||
while (tag == EnumTag.UNKNOWN || tag == EnumTag.WEATHER);
|
||||
|
||||
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(world, x, y, z, this.nodeRange);
|
||||
if (nodeId != -1)
|
||||
{
|
||||
storedData.setInteger(0, timeout + 1);
|
||||
int quantity = world.rand.nextInt(2) + 1;
|
||||
ThaumcraftApi.queueNodeChanges(nodeId, 0, 0, false, new ObjectTags().add(tag, quantity), 0f, 0f, 0f);
|
||||
}
|
||||
storedData.setInteger(0, 0);
|
||||
|
||||
return storedData;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,13 +13,11 @@ import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class AlleleEffectAuraNodePurify extends AlleleEffect
|
||||
{
|
||||
private int effectTimeout;
|
||||
private int nodeRange;
|
||||
|
||||
public AlleleEffectAuraNodePurify(String id, boolean dominant, int timeout, int range)
|
||||
{
|
||||
super(id, dominant);
|
||||
this.effectTimeout = timeout;
|
||||
super(id, dominant, timeout);
|
||||
this.nodeRange = range;
|
||||
}
|
||||
|
||||
@@ -34,40 +32,32 @@ public class AlleleEffectAuraNodePurify extends AlleleEffect
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
public IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
{
|
||||
int timeout = storedData.getInteger(0);
|
||||
if (timeout >= this.effectTimeout)
|
||||
World world = housing.getWorld();
|
||||
int x = housing.getXCoord();
|
||||
int y = housing.getYCoord();
|
||||
int z = housing.getZCoord();
|
||||
|
||||
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(world, x, y, z, this.nodeRange);
|
||||
if (nodeId >= 0)
|
||||
{
|
||||
World world = housing.getWorld();
|
||||
int x = housing.getXCoord();
|
||||
int y = housing.getYCoord();
|
||||
int z = housing.getZCoord();
|
||||
|
||||
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(world, x, y, z, this.nodeRange);
|
||||
if (nodeId >= 0)
|
||||
AuraNode node = ThaumcraftApi.getNodeCopy(nodeId);
|
||||
if (node != null)
|
||||
{
|
||||
AuraNode node = ThaumcraftApi.getNodeCopy(nodeId);
|
||||
if (node != null)
|
||||
int aspectCount = node.flux.tags.size();
|
||||
if (aspectCount > 0)
|
||||
{
|
||||
int aspectCount = node.flux.tags.size();
|
||||
if (aspectCount > 0)
|
||||
EnumTag selectedTag = node.flux.getAspectsSorted()[world.rand.nextInt(node.flux.tags.size())];
|
||||
if (selectedTag != null && housing.addProduct(new ItemStack(Config.solidFlux, 1, selectedTag.id), true))
|
||||
{
|
||||
EnumTag selectedTag = node.flux.getAspectsSorted()[world.rand.nextInt(node.flux.tags.size())];
|
||||
if (selectedTag != null && housing.addProduct(new ItemStack(Config.solidFlux, 1, selectedTag.id), true))
|
||||
{
|
||||
node.flux.remove(selectedTag, 1);
|
||||
ThaumcraftApi.queueNodeChanges(node.key, 0, 0, false, new ObjectTags().remove(selectedTag, 1), 0, 0, 0);
|
||||
}
|
||||
node.flux.remove(selectedTag, 1);
|
||||
ThaumcraftApi.queueNodeChanges(node.key, 0, 0, false, new ObjectTags().remove(selectedTag, 1), 0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
storedData.setInteger(0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
storedData.setInteger(0, timeout + 1);
|
||||
}
|
||||
storedData.setInteger(0, 0);
|
||||
|
||||
return storedData;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public class AlleleEffectCure extends AlleleEffect
|
||||
|
||||
public AlleleEffectCure(String id, boolean isDominant)
|
||||
{
|
||||
super(id, isDominant);
|
||||
super(id, isDominant, 200);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -35,28 +35,19 @@ public class AlleleEffectCure extends AlleleEffect
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
public IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
{
|
||||
int count = storedData.getInteger(0);
|
||||
List<Entity> entityList = this.getEntitiesWithinRange(genome, housing);
|
||||
|
||||
if (count == 200)
|
||||
for (Entity e : entityList)
|
||||
{
|
||||
List<Entity> entityList = this.getEntitiesWithinRange(genome, housing);
|
||||
|
||||
for (Entity e : entityList)
|
||||
if (e instanceof EntityPlayer)
|
||||
{
|
||||
if (e instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer)e;
|
||||
player.curePotionEffects(new ItemStack(Item.bucketMilk));
|
||||
}
|
||||
EntityPlayer player = (EntityPlayer)e;
|
||||
player.curePotionEffects(new ItemStack(Item.bucketMilk));
|
||||
}
|
||||
storedData.setInteger(0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
storedData.setInteger(0, count + 1);
|
||||
}
|
||||
storedData.setInteger(0, 0);
|
||||
|
||||
return storedData;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class AlleleEffectPotion extends AlleleEffect
|
||||
|
||||
public AlleleEffectPotion(String name, Potion potionApplied, int effectDuration, boolean isDominant)
|
||||
{
|
||||
super(name, isDominant);
|
||||
super(name, isDominant, 200);
|
||||
this.potionId = potionApplied.id;
|
||||
this.duration = 20 * effectDuration;
|
||||
}
|
||||
@@ -36,28 +36,19 @@ public class AlleleEffectPotion extends AlleleEffect
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
public IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
{
|
||||
int count = storedData.getInteger(0);
|
||||
List<Entity> entityList = this.getEntitiesWithinRange(genome, housing);
|
||||
|
||||
if (count == 200)
|
||||
for (Entity e : entityList)
|
||||
{
|
||||
List<Entity> entityList = this.getEntitiesWithinRange(genome, housing);
|
||||
|
||||
for (Entity e : entityList)
|
||||
if (e instanceof EntityPlayer)
|
||||
{
|
||||
if (e instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer)e;
|
||||
player.addPotionEffect(new PotionEffect(this.potionId, this.duration, 0));
|
||||
}
|
||||
EntityPlayer player = (EntityPlayer)e;
|
||||
player.addPotionEffect(new PotionEffect(this.potionId, this.duration, 0));
|
||||
}
|
||||
storedData.setInteger(0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
storedData.setInteger(0, count + 1);
|
||||
}
|
||||
storedData.setInteger(0, 0);
|
||||
|
||||
return storedData;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ public class AlleleEffectSpawnMob extends AlleleEffect
|
||||
protected String alternateMob;
|
||||
protected String mobName;
|
||||
protected String mobSound;
|
||||
protected int throttle;
|
||||
protected int chanceToSpawn;
|
||||
protected int maxMobsInArea;
|
||||
|
||||
@@ -33,10 +32,9 @@ public class AlleleEffectSpawnMob extends AlleleEffect
|
||||
|
||||
public AlleleEffectSpawnMob(String id, boolean isDominant, String mobToSpawn, String mobSoundFx)
|
||||
{
|
||||
super(id, isDominant);
|
||||
super(id, isDominant, 200);
|
||||
this.aggosOnPlayer = false;
|
||||
this.mobName = mobToSpawn;
|
||||
this.throttle = 200;
|
||||
this.chanceToSpawn = 100;
|
||||
this.maxMobsInArea = 6;
|
||||
this.mobSound = mobSoundFx;
|
||||
@@ -54,20 +52,8 @@ public class AlleleEffectSpawnMob extends AlleleEffect
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
public IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
{
|
||||
int count = storedData.getInteger(0);
|
||||
|
||||
if (count >= this.throttle && !storedData.getBoolean(0))
|
||||
{
|
||||
storedData.setBoolean(0, true);
|
||||
storedData.setInteger(0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
storedData.setInteger(0, count + 1);
|
||||
}
|
||||
|
||||
// Check if we're ready to spawn the mob.
|
||||
if (storedData.getBoolean(0))
|
||||
{
|
||||
|
||||
@@ -11,14 +11,12 @@ import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class AlleleEffectSpawnMobWeighted extends AlleleEffect
|
||||
{
|
||||
private int throttle;
|
||||
private String[] entityNames;
|
||||
private int[] spawnChance;
|
||||
|
||||
public AlleleEffectSpawnMobWeighted(String id, boolean isDominant, int throttle, String[] mobs, int[] chance)
|
||||
{
|
||||
super(id, isDominant);
|
||||
this.throttle = throttle;
|
||||
super(id, isDominant, throttle);
|
||||
if (mobs.length != chance.length)
|
||||
{
|
||||
throw new IllegalArgumentException("Array lengths must be equal!");
|
||||
@@ -38,20 +36,11 @@ public class AlleleEffectSpawnMobWeighted extends AlleleEffect
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
public IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
{
|
||||
int value = storedData.getInteger(0);
|
||||
|
||||
if (value >= this.throttle)
|
||||
if (this.spawnMob(genome, housing))
|
||||
{
|
||||
if (this.spawnMob(genome, housing))
|
||||
{
|
||||
storedData.setInteger(0, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
storedData.setInteger(0, value + 1);
|
||||
storedData.setInteger(0, 0);
|
||||
}
|
||||
|
||||
return storedData;
|
||||
|
||||
@@ -296,15 +296,6 @@ public class BeeGenomeManager
|
||||
return genome;
|
||||
}
|
||||
|
||||
public static IAllele[] getTemplateAware()
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseSoul();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.AWARE;
|
||||
|
||||
return genome;
|
||||
}
|
||||
|
||||
private static IAllele[] getTemplateBaseSoul()
|
||||
{
|
||||
IAllele[] genome = getTemplateModBase();
|
||||
@@ -315,6 +306,15 @@ public class BeeGenomeManager
|
||||
return genome;
|
||||
}
|
||||
|
||||
public static IAllele[] getTemplateAware()
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseSoul();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.AWARE;
|
||||
|
||||
return genome;
|
||||
}
|
||||
|
||||
public static IAllele[] getTemplateSpirit()
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseSoul();
|
||||
@@ -330,6 +330,7 @@ public class BeeGenomeManager
|
||||
IAllele[] genome = getTemplateBaseSoul();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.SOUL;
|
||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceDown2");
|
||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanNormal");
|
||||
|
||||
return genome;
|
||||
|
||||
@@ -151,7 +151,7 @@ public class BeeMutation implements IBeeMutation
|
||||
new BeeMutation(Allele.getBaseSpecies("Austere"), baseA, BeeSpecies.EMERALD, 6)
|
||||
.setBlockRequired(Block.blockEmerald);
|
||||
new BeeMutation(Allele.getBaseSpecies("Rural"), BeeSpecies.COPPER, BeeSpecies.APATITE, 12)
|
||||
.setBlockAndMetaRequired(BlockInterface.getBlock("resources").itemID, 0);
|
||||
.setBlockRequired("oreApatite");
|
||||
|
||||
if (ThaumcraftHelper.isActive())
|
||||
{
|
||||
@@ -162,7 +162,8 @@ public class BeeMutation implements IBeeMutation
|
||||
for (int b = a + 1; b < speciesList.length; ++b)
|
||||
{
|
||||
new BeeMutation(speciesList[a], speciesList[b], BeeSpecies.TC_STARK, 8)
|
||||
.setBlockRequired(Config.tcCrystal);
|
||||
.setBlockRequired(Config.tcCrystal)
|
||||
.setBlockRequiredNameOverride("research.block.crystals");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,6 +246,7 @@ public class BeeMutation implements IBeeMutation
|
||||
private int requiredBlockId;
|
||||
private int requiredBlockMeta;
|
||||
private String requiredBlockOreDictEntry;
|
||||
private String requiredBlockName;
|
||||
private BiomeDictionary.Type requiredBiomeType;
|
||||
|
||||
public BeeMutation(IAlleleBeeSpecies species0, IAlleleBeeSpecies species1, BeeSpecies resultSpecies, int percentChance)
|
||||
@@ -266,6 +268,7 @@ public class BeeMutation implements IBeeMutation
|
||||
this.requiredBlockMeta = OreDictionary.WILDCARD_VALUE;
|
||||
this.requiredBlockOreDictEntry = null;
|
||||
this.requiredBiomeType = null;
|
||||
this.requiredBlockName = null;
|
||||
|
||||
BeeManager.beeRoot.registerMutation(this);
|
||||
}
|
||||
@@ -320,8 +323,18 @@ public class BeeMutation implements IBeeMutation
|
||||
|
||||
if (this.requiresBlock)
|
||||
{
|
||||
int blockId = housing.getWorld().getBlockId(housing.getXCoord(), housing.getYCoord() - 1, housing.getZCoord());
|
||||
int blockMeta = housing.getWorld().getBlockMetadata(housing.getXCoord(), housing.getYCoord() - 1, housing.getZCoord());
|
||||
Block blockBelow;
|
||||
int blockId;
|
||||
int blockMeta;
|
||||
int i = 1;
|
||||
do
|
||||
{
|
||||
blockId = housing.getWorld().getBlockId(housing.getXCoord(), housing.getYCoord() - i, housing.getZCoord());
|
||||
blockMeta = housing.getWorld().getBlockMetadata(housing.getXCoord(), housing.getYCoord() - i, housing.getZCoord());
|
||||
blockBelow = Block.blocksList[blockId];
|
||||
++i;
|
||||
}
|
||||
while (blockBelow != null && !(blockBelow instanceof IBeeHousing));
|
||||
|
||||
if (this.requiredBlockOreDictEntry != null)
|
||||
{
|
||||
@@ -444,7 +457,12 @@ public class BeeMutation implements IBeeMutation
|
||||
}
|
||||
if (this.requiresBlock)
|
||||
{
|
||||
if (this.requiredBlockOreDictEntry != null)
|
||||
if (this.requiredBlockName != null)
|
||||
{
|
||||
conditions.add(String.format(LocalizationManager.getLocalizedString("research.requiresBlock"),
|
||||
LocalizationManager.getLocalizedString(this.requiredBlockName)));
|
||||
}
|
||||
else if (this.requiredBlockOreDictEntry != null)
|
||||
{
|
||||
ArrayList<ItemStack> ores = OreDictionary.getOres(this.requiredBlockOreDictEntry);
|
||||
if (ores.size() > 0)
|
||||
@@ -454,6 +472,11 @@ public class BeeMutation implements IBeeMutation
|
||||
}
|
||||
else
|
||||
{
|
||||
int meta = 0;
|
||||
if (this.requiredBlockMeta != OreDictionary.WILDCARD_VALUE)
|
||||
{
|
||||
meta = this.requiredBlockMeta;
|
||||
}
|
||||
conditions.add(String.format(LocalizationManager.getLocalizedString("research.requiresBlock"),
|
||||
new ItemStack(this.requiredBlockId, 1, this.requiredBlockMeta).getDisplayName()));
|
||||
}
|
||||
@@ -533,6 +556,13 @@ public class BeeMutation implements IBeeMutation
|
||||
return this;
|
||||
}
|
||||
|
||||
public BeeMutation setBlockRequiredNameOverride(String blockName)
|
||||
{
|
||||
this.requiredBlockName = blockName;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public BeeMutation setMoonPhaseRestricted(MoonPhase begin, MoonPhase end)
|
||||
{
|
||||
this.isMoonRestricted = true;
|
||||
|
||||
@@ -122,15 +122,15 @@ public enum BeeSpecies implements IAlleleBeeSpecies, IIconProvider
|
||||
BeeClassification.ABOMINABLE, 0x5B5B5B, 0x960F00, EnumTemperature.HELLISH, EnumHumidity.NORMAL, true, false),
|
||||
|
||||
OBLIVION("Oblivion", "oblivioni",
|
||||
BeeClassification.ABOMINABLE, 0xD5C3E5, 0xF696FF, EnumTemperature.COLD, EnumHumidity.NORMAL, false, false),
|
||||
BeeClassification.EXTRINSIC, 0xD5C3E5, 0xF696FF, EnumTemperature.COLD, EnumHumidity.NORMAL, false, false),
|
||||
NAMELESS("Nameless", "sine nomine",
|
||||
BeeClassification.ABOMINABLE, 0x8ca7cb, 0xF696FF, EnumTemperature.COLD, EnumHumidity.NORMAL, false, true),
|
||||
BeeClassification.EXTRINSIC, 0x8ca7cb, 0xF696FF, EnumTemperature.COLD, EnumHumidity.NORMAL, false, true),
|
||||
ABANDONED("Abandoned", "reliquit",
|
||||
BeeClassification.ABOMINABLE, 0xc5cb8c, 0xF696FF, EnumTemperature.COLD, EnumHumidity.NORMAL, false, true),
|
||||
BeeClassification.EXTRINSIC, 0xc5cb8c, 0xF696FF, EnumTemperature.COLD, EnumHumidity.NORMAL, false, true),
|
||||
FORLORN("Forlorn", "perditus",
|
||||
BeeClassification.ABOMINABLE, 0xcba88c, 0xF696FF, EnumTemperature.COLD, EnumHumidity.NORMAL, true, false),
|
||||
BeeClassification.EXTRINSIC, 0xcba88c, 0xF696FF, EnumTemperature.COLD, EnumHumidity.NORMAL, true, false),
|
||||
DRACONIC("Draconic", "draconic",
|
||||
BeeClassification.ABOMINABLE, 0x9f56ad, 0x5a3b62, EnumTemperature.COLD, EnumHumidity.NORMAL, true, false),
|
||||
BeeClassification.EXTRINSIC, 0x9f56ad, 0x5a3b62, EnumTemperature.COLD, EnumHumidity.NORMAL, true, false),
|
||||
|
||||
IRON("Iron", "ferrus",
|
||||
BeeClassification.METALLIC, 0x686868, 0xE9E9E9, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||
@@ -1007,7 +1007,8 @@ public enum BeeSpecies implements IAlleleBeeSpecies, IIconProvider
|
||||
continue;
|
||||
|
||||
icons[i][0] = itemMap.registerIcon(root + EnumBeeType.values()[i].toString().toLowerCase(Locale.ENGLISH) + ".outline");
|
||||
icons[i][1] = body1;
|
||||
icons[i][1] = (EnumBeeType.values()[i] != EnumBeeType.LARVAE) ? body1 :
|
||||
itemMap.registerIcon(root + EnumBeeType.values()[i].toString().toLowerCase(Locale.ENGLISH) + ".body");
|
||||
icons[i][2] = itemMap.registerIcon(root + EnumBeeType.values()[i].toString().toLowerCase(Locale.ENGLISH) + ".body2");
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package magicbees.main.render;
|
||||
package magicbees.client.render;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -18,7 +18,7 @@ import net.minecraftforge.client.ForgeHooksClient;
|
||||
public class BeeRenderEffect extends EntityFX
|
||||
{
|
||||
public int blendmode = 1;
|
||||
private static final String texture = "forestry:particles/swarm_bee";
|
||||
private static String texture = "/mods/forestry/textures/items/particles/swarm_bee";
|
||||
|
||||
public BeeRenderEffect(World world, double x, double y, double z, float motionScaleX, float motionScaleY, float motionScaleZ, int color)
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
package magicbees.main;
|
||||
|
||||
import magicbees.client.render.BeeRenderEffect;
|
||||
import magicbees.client.render.EffectJarRenderer;
|
||||
import magicbees.main.render.BeeRenderEffect;
|
||||
import magicbees.tileentity.TileEntityEffectJar;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
@@ -205,4 +205,10 @@ public class EffectJarHousing implements IBeeHousing
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onEggLaid(IBee queen)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import java.util.Random;
|
||||
|
||||
import magicbees.block.types.HiveType;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.MagicBees;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
@@ -255,7 +256,7 @@ public class FeatureHive
|
||||
int max = (int)(biome.maxHeight * 64);
|
||||
// sanity
|
||||
min = (min > 1) ? min : 1;
|
||||
max = (max > 5) ? max : 5;
|
||||
max = (max > 10) ? max : 10;
|
||||
return min + random.nextInt(max);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user