mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-18 19:39:06 +00:00
Deactivating TC3 integration.
Fixing bad animated textures.
This commit is contained in:
1 parent
a560085ac9
commit
6c567e247a
51 files changed
+126
-809
No files matched your search
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"animation":{
|
||||
"frametime":2
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
0*2
|
||||
1*2
|
||||
2*2
|
||||
3*2
|
||||
4*2
|
||||
5*2
|
||||
6*2
|
||||
7*2
|
||||
8*2
|
||||
9*2
|
||||
10*2
|
||||
11*2
|
||||
12*2
|
||||
13*2
|
||||
14*2
|
||||
15*2
|
||||
16*2
|
||||
17*2
|
||||
18*2
|
||||
19*2
|
||||
20*2
|
||||
21*2
|
||||
22*2
|
||||
23*2
|
||||
24*2
|
||||
25*2
|
||||
26*2
|
||||
27*2
|
||||
28*2
|
||||
29*2
|
||||
30*2
|
||||
31*2
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"animation":{
|
||||
"frametime":2
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
0*2
|
||||
1*2
|
||||
2*2
|
||||
3*2
|
||||
4*2
|
||||
5*2
|
||||
6*2
|
||||
7*2
|
||||
8*2
|
||||
9*2
|
||||
10*2
|
||||
11*2
|
||||
12*2
|
||||
13*2
|
||||
14*2
|
||||
15*2
|
||||
16*2
|
||||
17*2
|
||||
18*2
|
||||
19*2
|
||||
20*2
|
||||
21*2
|
||||
22*2
|
||||
23*2
|
||||
24*2
|
||||
25*2
|
||||
26*2
|
||||
27*2
|
||||
28*2
|
||||
29*2
|
||||
30*2
|
||||
31*2
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"animation":{
|
||||
"frametime":2
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
0*2
|
||||
1*2
|
||||
2*2
|
||||
3*2
|
||||
4*2
|
||||
5*2
|
||||
6*2
|
||||
7*2
|
||||
8*2
|
||||
9*2
|
||||
10*2
|
||||
11*2
|
||||
12*2
|
||||
13*2
|
||||
14*2
|
||||
15*2
|
||||
16*2
|
||||
17*2
|
||||
18*2
|
||||
19*2
|
||||
18*2
|
||||
17*2
|
||||
16*2
|
||||
15*2
|
||||
14*2
|
||||
13*2
|
||||
12*2
|
||||
11*2
|
||||
10*2
|
||||
9*2
|
||||
8*2
|
||||
7*2
|
||||
6*2
|
||||
5*2
|
||||
4*2
|
||||
3*2
|
||||
2*2
|
||||
1*2
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"animation":{
|
||||
"frametime":2
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
0*2
|
||||
1*2
|
||||
2*2
|
||||
3*2
|
||||
4*2
|
||||
5*2
|
||||
6*2
|
||||
7*2
|
||||
8*2
|
||||
9*2
|
||||
10*2
|
||||
11*2
|
||||
12*2
|
||||
13*2
|
||||
14*2
|
||||
15*2
|
||||
16*2
|
||||
17*2
|
||||
18*2
|
||||
19*2
|
||||
18*2
|
||||
17*2
|
||||
16*2
|
||||
15*2
|
||||
14*2
|
||||
13*2
|
||||
12*2
|
||||
11*2
|
||||
10*2
|
||||
9*2
|
||||
8*2
|
||||
7*2
|
||||
6*2
|
||||
5*2
|
||||
4*2
|
||||
3*2
|
||||
2*2
|
||||
1*2
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"animation":{
|
||||
"frametime":2
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
0*2
|
||||
1*2
|
||||
2*2
|
||||
3*2
|
||||
4*2
|
||||
5*2
|
||||
6*2
|
||||
7*2
|
||||
8*2
|
||||
9*2
|
||||
10*2
|
||||
11*2
|
||||
12*2
|
||||
13*2
|
||||
14*2
|
||||
15*2
|
||||
16*2
|
||||
17*2
|
||||
18*2
|
||||
19*2
|
||||
20*2
|
||||
21*2
|
||||
22*2
|
||||
23*2
|
||||
24*2
|
||||
25*2
|
||||
26*2
|
||||
27*2
|
||||
28*2
|
||||
29*2
|
||||
30*2
|
||||
31*2
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"animation":{
|
||||
"frametime":2
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
0*2
|
||||
1*2
|
||||
2*2
|
||||
3*2
|
||||
4*2
|
||||
5*2
|
||||
6*2
|
||||
7*2
|
||||
8*2
|
||||
9*2
|
||||
10*2
|
||||
11*2
|
||||
12*2
|
||||
13*2
|
||||
14*2
|
||||
15*2
|
||||
16*2
|
||||
17*2
|
||||
18*2
|
||||
19*2
|
||||
20*2
|
||||
21*2
|
||||
22*2
|
||||
23*2
|
||||
24*2
|
||||
25*2
|
||||
26*2
|
||||
27*2
|
||||
28*2
|
||||
29*2
|
||||
30*2
|
||||
31*2
|
||||
@@ -0,0 +1 @@
|
||||
{"animation":{"width":1,"height":5,"frametime":1,"frames":[{"index":0,"time":64},{"index":1,"time":2},{"index":2,"time":2},{"index":1,"time":2},{"index":0,"time":96},{"index":3,"time":4},{"index":0,"time":128},{"index":4,"time":2}]}}
|
||||
@@ -1,8 +0,0 @@
|
||||
0*64
|
||||
1*2
|
||||
2*2
|
||||
1*2
|
||||
0*96
|
||||
3*4
|
||||
0*128
|
||||
4*2
|
||||
@@ -0,0 +1 @@
|
||||
{"animation":{"width":1,"height":5,"frametime":1,"frames":[{"index":0,"time":64},{"index":1,"time":2},{"index":2,"time":2},{"index":1,"time":2},{"index":0,"time":96},{"index":3,"time":4},{"index":0,"time":128},{"index":4,"time":2}]}}
|
||||
@@ -1,8 +0,0 @@
|
||||
0*64
|
||||
1*2
|
||||
2*2
|
||||
1*2
|
||||
0*96
|
||||
3*4
|
||||
0*128
|
||||
4*2
|
||||
@@ -0,0 +1 @@
|
||||
{"animation":{"width":1,"height":2,"frametime":1,"frames":[{"index":0,"time":64},{"index":1,"time":2},{"index":0,"time":48},{"index":1,"time":2}]}}
|
||||
@@ -1,5 +0,0 @@
|
||||
0*64
|
||||
1*2
|
||||
0*48
|
||||
1*2
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"animation":{"width":1,"height":2,"frametime":1,"frames":[{"index":0,"time":64},{"index":1,"time":2},{"index":0,"time":48},{"index":1,"time":2}]}}
|
||||
@@ -1,5 +0,0 @@
|
||||
0*64
|
||||
1*2
|
||||
0*48
|
||||
1*2
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"animation":{"width":1,"height":2,"frametime":1,"frames":[{"index":0,"time":64},{"index":1,"time":2},{"index":0,"time":48},{"index":1,"time":2}]}}
|
||||
@@ -1,5 +0,0 @@
|
||||
0*64
|
||||
1*2
|
||||
0*48
|
||||
1*2
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"animation":{"width":1,"height":5,"frametime":1,"frames":[{"index":0,"time":128},{"index":3,"time":4},{"index":0,"time":96},{"index":1,"time":2},{"index":2,"time":2},{"index":1,"time":2},{"index":0,"time":64},{"index":4,"time":2}]}}
|
||||
@@ -1,8 +0,0 @@
|
||||
0*64
|
||||
1*2
|
||||
2*2
|
||||
1*2
|
||||
0*96
|
||||
3*4
|
||||
0*128
|
||||
4*2
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"animation":{"width":1,"height":5,"frametime":1,"frames":[{"index":0,"time":128},{"index":3,"time":4},{"index":0,"time":96},{"index":1,"time":2},{"index":2,"time":2},{"index":1,"time":2},{"index":0,"time":64},{"index":4,"time":2}]}}
|
||||
@@ -1,8 +0,0 @@
|
||||
0*64
|
||||
1*2
|
||||
2*2
|
||||
1*2
|
||||
0*96
|
||||
3*4
|
||||
0*128
|
||||
4*2
|
||||
@@ -0,0 +1 @@
|
||||
{"animation":{"width":1,"height":5,"frametime":1,"frames":[{"index":0,"time":96},{"index":3,"time":4},{"index":0,"time":64},{"index":4,"time":2},{"index":0,"time":128},{"index":1,"time":2},{"index":2,"time":2},{"index":1,"time":2}]}}
|
||||
@@ -1,8 +0,0 @@
|
||||
0*64
|
||||
1*2
|
||||
2*2
|
||||
1*2
|
||||
0*96
|
||||
3*4
|
||||
0*128
|
||||
4*2
|
||||
@@ -0,0 +1 @@
|
||||
{"animation":{"width":1,"height":5,"frametime":1,"frames":[{"index":0,"time":96},{"index":3,"time":4},{"index":0,"time":64},{"index":4,"time":2},{"index":0,"time":128},{"index":1,"time":2},{"index":2,"time":2},{"index":1,"time":2}]}}
|
||||
@@ -1,8 +0,0 @@
|
||||
0*64
|
||||
1*2
|
||||
2*2
|
||||
1*2
|
||||
0*96
|
||||
3*4
|
||||
0*128
|
||||
4*2
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"animation":{
|
||||
"width":1,
|
||||
"height":8,
|
||||
"frametime":2,
|
||||
"frames":[
|
||||
0, 1, 2, 3, 4, 5, 6, 7
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
0*3
|
||||
1*3
|
||||
2*3
|
||||
3*3
|
||||
4*3
|
||||
5*3
|
||||
6*3
|
||||
7*3
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<property name="mc.version" value="1.6.2"/>
|
||||
<property name="forge.version" value="9.10.0.828"/>
|
||||
<property name="magicbees.version" value="2.1.2"/>
|
||||
<property name="magicbees.version" value="2.1.3 1.6dev"/>
|
||||
|
||||
<!-- for local deployment only, not used by main -->
|
||||
<property name="deploy.type" value="previews" />
|
||||
|
||||
@@ -36,10 +36,10 @@ public class Allele implements IAllele
|
||||
public static IAlleleEffect spawnManaDrainer;
|
||||
public static IAlleleEffect spawnWispOrHecate;
|
||||
|
||||
public static IAlleleEffect effectNodeAttract;
|
||||
/*public static IAlleleEffect effectNodeAttract;
|
||||
public static IAlleleEffect effectNodePurify;
|
||||
public static IAlleleEffect effectNodeFlux;
|
||||
public static IAlleleEffect effectNodeCharge;
|
||||
public static IAlleleEffect effectNodeCharge;*/
|
||||
|
||||
public static void setupAdditionalAlleles()
|
||||
{
|
||||
@@ -85,10 +85,10 @@ public class Allele implements IAllele
|
||||
Allele.spawnManaDrainer = Allele.spawnWispOrHecate = (IAlleleEffect)Allele.getBaseAllele("effectNone");
|
||||
}
|
||||
|
||||
Allele.effectNodeAttract = new AlleleEffectAuraNodeAttract("NodeAttract", false, 400);
|
||||
/*Allele.effectNodeAttract = new AlleleEffectAuraNodeAttract("NodeAttract", false, 400);
|
||||
Allele.effectNodePurify = new AlleleEffectAuraNodePurify("NodePurify", false, 600, 150);
|
||||
Allele.effectNodeFlux = new AlleleEffectAuraNodeFlux("NodeFlux", true, 300, 300);
|
||||
Allele.effectNodeCharge = new AlleleEffectAuraNodeCharge("NodeCharge", true, 1200);
|
||||
Allele.effectNodeCharge = new AlleleEffectAuraNodeCharge("NodeCharge", true, 1200);*/
|
||||
|
||||
Allele.effectCleansing = new AlleleEffectCure("Curative", false);
|
||||
Allele.effectDigSpeed = new AlleleEffectPotion("DigSpeed", Potion.digSpeed, 15, false);
|
||||
@@ -113,10 +113,14 @@ public class Allele implements IAllele
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.fertilityHighDominant", Allele.getBaseAllele("fertilityHigh"));
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.flowerflowerBookshelf", flowerBookshelf);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speedBlinding", speedBlinding);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.effectNodeAttract", effectNodeAttract);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.effectNodePurify", effectNodePurify);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.effectNodeFlux", effectNodeFlux);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.effectNodeCharge", effectNodeCharge);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.effectNodeAttract", Allele.getBaseAllele("effectBeatific"));
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.effectNodePurify", Allele.getBaseAllele("effectBeatific"));
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.effectNodeFlux", Allele.getBaseAllele("effectBeatific"));
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.effectNodeCharge", Allele.getBaseAllele("effectBeatific"));
|
||||
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodeAttract", Allele.getBaseAllele("effectBeatific"));
|
||||
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodePurify", Allele.getBaseAllele("effectBeatific"));
|
||||
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodeFlux", Allele.getBaseAllele("effectBeatific"));
|
||||
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodeCharge", Allele.getBaseAllele("effectBeatific"));
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.effectCurative", effectCleansing);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.effecteffectDigSpeed", effectDigSpeed);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.effecteffectMoveSpeed", effectMoveSpeed);
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aura.AuraNode;
|
||||
import net.minecraft.world.World;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class AlleleEffectAuraNodeAttract extends AlleleEffect
|
||||
{
|
||||
|
||||
public AlleleEffectAuraNodeAttract(String id, boolean isDominant, int timeout)
|
||||
{
|
||||
super(id, isDominant, timeout);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEffectData validateStorage(IEffectData storedData)
|
||||
{
|
||||
if (storedData == null)
|
||||
{
|
||||
storedData = new EffectData(1, 0, 0);
|
||||
}
|
||||
return storedData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
storedData.setInteger(0, 0);
|
||||
|
||||
return storedData;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class AlleleEffectAuraNodeCharge extends AlleleEffect
|
||||
{
|
||||
|
||||
AlleleEffectAuraNodeCharge(String id, boolean dominant, int timeout)
|
||||
{
|
||||
super(id, dominant, timeout);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEffectData validateStorage(IEffectData storedData)
|
||||
{
|
||||
if (storedData == null)
|
||||
{
|
||||
storedData = new EffectData(1, 0, 0);
|
||||
}
|
||||
return storedData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
{
|
||||
World world = housing.getWorld();
|
||||
int x = housing.getXCoord();
|
||||
int y = housing.getYCoord();
|
||||
int z = housing.getZCoord();
|
||||
|
||||
if (world.rand.nextBoolean())
|
||||
{
|
||||
ThaumcraftApi.increaseLowestAura(world, x, y, z, 1);
|
||||
}
|
||||
storedData.setInteger(0, 0);
|
||||
|
||||
return storedData;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class AlleleEffectAuraNodeFlux extends AlleleEffect
|
||||
{
|
||||
private int nodeRange;
|
||||
|
||||
AlleleEffectAuraNodeFlux(String id, boolean dominant, int timeout, int range)
|
||||
{
|
||||
super(id, dominant, timeout);
|
||||
this.nodeRange = range;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEffectData validateStorage(IEffectData storedData)
|
||||
{
|
||||
if (storedData == null)
|
||||
{
|
||||
storedData = new EffectData(1, 0, 0);
|
||||
}
|
||||
return storedData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
{
|
||||
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);
|
||||
}
|
||||
storedData.setInteger(0, 0);
|
||||
|
||||
return storedData;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import magicbees.main.Config;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aura.AuraNode;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class AlleleEffectAuraNodePurify extends AlleleEffect
|
||||
{
|
||||
private int nodeRange;
|
||||
|
||||
public AlleleEffectAuraNodePurify(String id, boolean dominant, int timeout, int range)
|
||||
{
|
||||
super(id, dominant, timeout);
|
||||
this.nodeRange = range;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEffectData validateStorage(IEffectData storedData)
|
||||
{
|
||||
if (storedData == null)
|
||||
{
|
||||
storedData = new EffectData(1, 0, 0);
|
||||
}
|
||||
return storedData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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))
|
||||
{
|
||||
node.flux.remove(selectedTag, 1);
|
||||
ThaumcraftApi.queueNodeChanges(node.key, 0, 0, false, new ObjectTags().remove(selectedTag, 1), 0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
storedData.setInteger(0, 0);
|
||||
|
||||
return storedData;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -841,7 +841,7 @@ public class BeeGenomeManager
|
||||
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
|
||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
|
||||
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerAuraNode;
|
||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.effectNodeFlux;
|
||||
//genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.effectNodeFlux;
|
||||
|
||||
return genome;
|
||||
}
|
||||
@@ -852,7 +852,7 @@ public class BeeGenomeManager
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.TC_ATTRACT;
|
||||
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerAuraNode;
|
||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.effectNodeAttract;
|
||||
//genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.effectNodeAttract;
|
||||
|
||||
return genome;
|
||||
}
|
||||
@@ -866,7 +866,7 @@ public class BeeGenomeManager
|
||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
|
||||
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringAverage");
|
||||
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerAuraNode;
|
||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.effectNodePurify;
|
||||
//genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.effectNodePurify;
|
||||
|
||||
return genome;
|
||||
}
|
||||
@@ -876,7 +876,7 @@ public class BeeGenomeManager
|
||||
IAllele[] genome = getTemplateTCBaseVis();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.TC_REJUVENATING;
|
||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.effectNodeCharge;
|
||||
//genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.effectNodeCharge;
|
||||
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerAuraNode;
|
||||
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@ package magicbees.bees;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import thaumcraft.api.aura.EnumNodeType;
|
||||
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.MoonPhase;
|
||||
@@ -24,7 +22,6 @@ import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeeMutation;
|
||||
import forestry.api.apiculture.IBeeRoot;
|
||||
import forestry.api.core.BlockInterface;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IGenome;
|
||||
|
||||
@@ -203,7 +200,7 @@ public class BeeMutation implements IBeeMutation
|
||||
.setBlockAndMetaRequired(Config.tcCrystal, ThaumcraftHelper.ShardType.EARTH.ordinal());
|
||||
new BeeMutation(BeeSpecies.ETHEREAL, BeeSpecies.ETHEREAL, BeeSpecies.TC_MAGIC, 8)
|
||||
.setBlockAndMetaRequired(Config.tcCrystal, ThaumcraftHelper.ShardType.MAGIC.ordinal());
|
||||
|
||||
/*
|
||||
new BeeMutation(BeeSpecies.ELDRITCH, BeeSpecies.ETHEREAL, BeeSpecies.TC_VIS, 10)
|
||||
.setAuraNodeRequired(75);
|
||||
new BeeMutation(Allele.getBaseSpecies("Demonic"), BeeSpecies.TC_VIS, BeeSpecies.TC_FLUX, 8)
|
||||
@@ -216,7 +213,7 @@ public class BeeMutation implements IBeeMutation
|
||||
new BeeMutation(BeeSpecies.TC_VIS, BeeSpecies.TC_REJUVENATING, BeeSpecies.TC_PURE, 6)
|
||||
.setAuraNodeTypeRequired(10, thaumcraft.api.aura.EnumNodeType.PURE)
|
||||
.setMoonPhaseRestricted(MoonPhase.FULL, MoonPhase.FULL);
|
||||
|
||||
*/
|
||||
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)
|
||||
@@ -266,7 +263,7 @@ public class BeeMutation implements IBeeMutation
|
||||
private MoonPhase moonPhaseEnd;
|
||||
private float moonPhaseMutationBonus;
|
||||
private boolean nodeRequired;
|
||||
private thaumcraft.api.aura.EnumNodeType nodeType;
|
||||
//private thaumcraft.api.aura.EnumNodeType nodeType;
|
||||
private double nodeRange;
|
||||
private boolean requiresBlock;
|
||||
private int requiredBlockId;
|
||||
@@ -289,7 +286,7 @@ public class BeeMutation implements IBeeMutation
|
||||
this.isSecret = false;
|
||||
this.isMoonRestricted = false;
|
||||
this.moonPhaseMutationBonus = -1f;
|
||||
this.nodeType = null;
|
||||
//this.nodeType = null;
|
||||
this.requiresBlock = false;
|
||||
this.requiredBlockMeta = OreDictionary.WILDCARD_VALUE;
|
||||
this.requiredBlockOreDictEntry = null;
|
||||
@@ -325,7 +322,7 @@ public class BeeMutation implements IBeeMutation
|
||||
}
|
||||
}
|
||||
|
||||
if (this.nodeRequired)
|
||||
/*if (this.nodeRequired)
|
||||
{
|
||||
int nodeId = thaumcraft.api.ThaumcraftApi.getClosestAuraWithinRange(housing.getWorld(),
|
||||
housing.getXCoord(), housing.getYCoord(), housing.getZCoord(), this.nodeRange);
|
||||
@@ -345,7 +342,7 @@ public class BeeMutation implements IBeeMutation
|
||||
{
|
||||
chance = 0;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
if (this.requiresBlock)
|
||||
{
|
||||
@@ -470,7 +467,7 @@ public class BeeMutation implements IBeeMutation
|
||||
}
|
||||
}
|
||||
|
||||
if (this.nodeRequired)
|
||||
/*if (this.nodeRequired)
|
||||
{
|
||||
if (this.nodeType != null)
|
||||
{
|
||||
@@ -481,7 +478,7 @@ public class BeeMutation implements IBeeMutation
|
||||
{
|
||||
conditions.add(LocalizationManager.getLocalizedString("research.requiresNode"));
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
if (this.requiresBlock)
|
||||
{
|
||||
@@ -610,7 +607,7 @@ public class BeeMutation implements IBeeMutation
|
||||
return this;
|
||||
}
|
||||
|
||||
public BeeMutation setAuraNodeRequired(double range)
|
||||
/*public BeeMutation setAuraNodeRequired(double range)
|
||||
{
|
||||
this.nodeRequired = true;
|
||||
this.nodeRange = range;
|
||||
@@ -623,7 +620,7 @@ public class BeeMutation implements IBeeMutation
|
||||
this.nodeType = type;
|
||||
|
||||
return this.setAuraNodeRequired(range);
|
||||
}
|
||||
}*/
|
||||
|
||||
public BeeMutation setBiomeRequired(BiomeDictionary.Type biomeType)
|
||||
{
|
||||
|
||||
@@ -262,11 +262,6 @@ public enum BeeSpecies implements IAlleleBeeSpecies, IIconProvider
|
||||
TC_WATER.setInactive();
|
||||
TC_EARTH.setInactive();
|
||||
TC_MAGIC.setInactive();
|
||||
TC_VIS.setInactive();
|
||||
TC_FLUX.setInactive();
|
||||
TC_ATTRACT.setInactive();
|
||||
TC_PURE.setInactive();
|
||||
TC_REJUVENATING.setInactive();
|
||||
TC_BRAINY.setInactive();
|
||||
TC_WISPY.setInactive();
|
||||
TC_BATTY.setInactive();
|
||||
@@ -274,6 +269,12 @@ public enum BeeSpecies implements IAlleleBeeSpecies, IIconProvider
|
||||
TC_BEEF.setInactive();
|
||||
TC_PORK.setInactive();
|
||||
}
|
||||
// TODO: Temporary always off. Maybe.
|
||||
TC_VIS.setInactive();
|
||||
TC_FLUX.setInactive();
|
||||
TC_ATTRACT.setInactive();
|
||||
TC_PURE.setInactive();
|
||||
TC_REJUVENATING.setInactive();
|
||||
|
||||
if (EquivalentExchangeHelper.isActive())
|
||||
{
|
||||
|
||||
@@ -3,8 +3,6 @@ package magicbees.bees;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aura.AuraNode;
|
||||
import forestry.api.genetics.IFlowerProvider;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.genetics.IPollinatable;
|
||||
@@ -52,14 +50,14 @@ public class FlowerProviderAuraNode implements IFlowerProvider
|
||||
protected boolean isNodeWithinRange(World w, int x, int y, int z)
|
||||
{
|
||||
boolean nodeNearby = false;
|
||||
if (ThaumcraftApi.getClosestAuraWithinRange(w, x, y, z, this.nodeRange) >= 0)
|
||||
/*if (ThaumcraftApi.getClosestAuraWithinRange(w, x, y, z, this.nodeRange) >= 0)
|
||||
{
|
||||
nodeNearby = true;
|
||||
}
|
||||
}*/
|
||||
return nodeNearby;
|
||||
}
|
||||
|
||||
protected AuraNode getNodeWithinRange(World w, int x, int y, int z)
|
||||
/*protected AuraNode getNodeWithinRange(World w, int x, int y, int z)
|
||||
{
|
||||
AuraNode node = null;
|
||||
|
||||
@@ -70,7 +68,7 @@ public class FlowerProviderAuraNode implements IFlowerProvider
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
}*/
|
||||
|
||||
protected ItemStack[] addItemToProducts(ItemStack[] products, ItemStack itemStack)
|
||||
{
|
||||
|
||||
@@ -2,22 +2,16 @@ package magicbees.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.MagicBees;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.TabMagicBees;
|
||||
import magicbees.main.utils.VersionInfo;
|
||||
import magicbees.main.utils.compat.ForestryHelper;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemCrystalAspect extends Item
|
||||
{
|
||||
@@ -34,14 +28,14 @@ public class ItemCrystalAspect extends Item
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(int par1, CreativeTabs tab, List list)
|
||||
{
|
||||
for (EnumTag tag : EnumTag.values())
|
||||
/*for (EnumTag tag : EnumTag.values())
|
||||
{
|
||||
if (tag == EnumTag.UNKNOWN)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
list.add(new ItemStack(this.itemID, 1, tag.id));
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -54,12 +48,14 @@ public class ItemCrystalAspect extends Item
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack stack, int pass)
|
||||
{
|
||||
return EnumTag.get(stack.getItemDamage()).color;
|
||||
return 0;
|
||||
//return EnumTag.get(stack.getItemDamage()).color;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack stack)
|
||||
{
|
||||
return String.format(LocalizationManager.getLocalizedString("resource.crystalAspect"), EnumTag.get(stack.getItemDamage()).name);
|
||||
return LocalizationManager.getLocalizedString("resource.crystalAspect");
|
||||
//return String.format(LocalizationManager.getLocalizedString("resource.crystalAspect"), EnumTag.get(stack.getItemDamage()).name);
|
||||
}
|
||||
}
|
||||
@@ -2,19 +2,15 @@ package magicbees.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import magicbees.item.types.NuggetType;
|
||||
import magicbees.item.types.PollenType;
|
||||
import magicbees.item.types.ResourceType;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.utils.VersionInfo;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemNugget extends Item
|
||||
{
|
||||
|
||||
@@ -98,7 +98,7 @@ public class ItemThaumiumGrafter extends Item implements IVisRepairable, IToolGr
|
||||
return ThaumcraftApi.toolMatThaumium.getToolCraftingMaterial() == par2ItemStack.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
/*@Override
|
||||
public void doRepair(ItemStack stack, Entity e)
|
||||
{
|
||||
if (stack.getItemDamage() > 0)
|
||||
@@ -108,5 +108,5 @@ public class ItemThaumiumGrafter extends Item implements IVisRepairable, IToolGr
|
||||
stack.damageItem(-1, (EntityLiving)e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
@@ -68,7 +68,7 @@ public class ItemThaumiumScoop extends Item implements IVisRepairable, IToolScoo
|
||||
return ThaumcraftApi.toolMatThaumium.getToolCraftingMaterial() == par2ItemStack.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
/*@Override
|
||||
public void doRepair(ItemStack stack, Entity e)
|
||||
{
|
||||
if (stack.getItemDamage() > 0)
|
||||
@@ -78,5 +78,5 @@ public class ItemThaumiumScoop extends Item implements IVisRepairable, IToolScoo
|
||||
stack.damageItem(-1, (EntityLiving)e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
@@ -72,6 +72,8 @@ public class Config
|
||||
public int CapsuleStackSizeMax;
|
||||
public boolean DoHiveRetrogen;
|
||||
public boolean ForceHiveRegen;
|
||||
|
||||
public boolean EnableThaumcraftCompat;
|
||||
|
||||
public static BlockPlanks planksWood;
|
||||
public static BlockWoodSlab slabWoodHalf;
|
||||
@@ -311,7 +313,7 @@ public class Config
|
||||
|
||||
jellyBaby = new ItemFood(configuration.getItem("jellyBabies", itemIDBase++).getInt() - 256, 1, false).setAlwaysEdible()
|
||||
.setPotionEffect(Potion.moveSpeed.id, 5, 1, 1f);
|
||||
jellyBaby.setUnlocalizedName(VersionInfo.ModName.toLowerCase() + ":jellyBabies");
|
||||
jellyBaby.setUnlocalizedName(VersionInfo.ModName.toLowerCase() + ":jellyBabies").func_111206_d(VersionInfo.ModName.toLowerCase() + ":jellyBabies");
|
||||
GameRegistry.registerItem(jellyBaby, VersionInfo.ModName.toLowerCase() + ":jellyBabies");
|
||||
|
||||
|
||||
@@ -419,6 +421,11 @@ public class Config
|
||||
{
|
||||
FMLLog.info("Magic Bees will attempt to regenerate hives in chunks that were generated before the mod was added.");
|
||||
}
|
||||
|
||||
// DELETE THIS.
|
||||
p = configuration.get("DEBUG", "enableThaumcraftIntegration", true);
|
||||
p.comment = "If MB blows up because of Thaumcraft, switch this to false.";
|
||||
this.EnableThaumcraftCompat = p.getBoolean(true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,59 +1,6 @@
|
||||
package magicbees.main.utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ItemApi;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.api.research.ResearchList;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import forestry.api.apiculture.EnumBeeChromosome;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import forestry.api.core.BlockInterface;
|
||||
import forestry.api.core.ItemInterface;
|
||||
import forestry.api.storage.BackpackManager;
|
||||
|
||||
import magicbees.bees.Allele;
|
||||
import magicbees.bees.BeeGenomeManager;
|
||||
import magicbees.block.types.PlankType;
|
||||
import magicbees.item.ItemComb;
|
||||
import magicbees.item.ItemMiscResources;
|
||||
import magicbees.item.types.CombType;
|
||||
import magicbees.item.types.DropType;
|
||||
import magicbees.item.types.FluidType;
|
||||
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.MagicBees;
|
||||
import magicbees.main.utils.compat.ExtraBeesHelper;
|
||||
import magicbees.main.utils.compat.ForestryHelper;
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
import magicbees.main.utils.compat.ForestryHelper.CircuitBoard;
|
||||
import magicbees.main.utils.compat.ForestryHelper.Comb;
|
||||
import magicbees.main.utils.compat.ForestryHelper.CraftingMaterial;
|
||||
import magicbees.main.utils.compat.ForestryHelper.Pollen;
|
||||
import magicbees.main.utils.compat.ForestryHelper.Propolis;
|
||||
import magicbees.main.utils.compat.ForestryHelper.Tube;
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper.MiscResource;
|
||||
import magicbees.storage.BackpackDefinition;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.Property;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class CompatabilityManager
|
||||
{
|
||||
|
||||
@@ -21,7 +21,6 @@ import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import forestry.api.core.BlockInterface;
|
||||
import forestry.api.core.ItemInterface;
|
||||
@@ -362,7 +361,7 @@ public class CraftingManager
|
||||
});
|
||||
|
||||
// "bottling" Crystal aspects.
|
||||
for (EnumTag tag : EnumTag.values())
|
||||
/*for (EnumTag tag : EnumTag.values())
|
||||
{
|
||||
if (tag != EnumTag.UNKNOWN)
|
||||
{
|
||||
@@ -373,7 +372,7 @@ public class CraftingManager
|
||||
'x', Config.tcEssentiaBottle
|
||||
});
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
if (ArsMagicaHelper.isActive())
|
||||
|
||||
@@ -1,158 +0,0 @@
|
||||
package magicbees.main.utils.compat;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import forestry.api.apiculture.EnumBeeChromosome;
|
||||
import forestry.api.genetics.IAllele;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.crafting.ShapelessInfusionCraftingRecipes;
|
||||
import thaumcraft.api.research.ResearchList;
|
||||
|
||||
public class ShapelessBeeInfusionCraftingRecipe extends ShapelessInfusionCraftingRecipes
|
||||
{
|
||||
private String alleleId;
|
||||
private byte alleleSlot;
|
||||
|
||||
/**
|
||||
* Creates & adds a Crafting recipe to Thaumcraft for our Stark bee infusions.
|
||||
*/
|
||||
public static void createNewRecipe(String key, String researchKey, ItemStack output, Object[] input,
|
||||
int auraCost, ObjectTags tags, IAllele allele, EnumBeeChromosome slot)
|
||||
{
|
||||
ArrayList<ItemStack> inputList = new ArrayList(input.length);
|
||||
for (Object item : input)
|
||||
{
|
||||
if (item instanceof ItemStack)
|
||||
{
|
||||
inputList.add(((ItemStack) item).copy());
|
||||
}
|
||||
else if (item instanceof Item)
|
||||
{
|
||||
inputList.add(new ItemStack((Item)item));
|
||||
}
|
||||
else if (item instanceof Block)
|
||||
{
|
||||
inputList.add(new ItemStack((Block)item));
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new RuntimeException("Invalid shapeless crafting recipe!");
|
||||
}
|
||||
}
|
||||
ThaumcraftApi.getCraftingRecipes().add(
|
||||
new ShapelessBeeInfusionCraftingRecipe(key, output, inputList, auraCost, tags, allele, slot)
|
||||
);
|
||||
ResearchList.craftingRecipesForResearch.put(researchKey, Arrays.asList(ThaumcraftApi.getCraftingRecipes().size()-1));
|
||||
}
|
||||
|
||||
private ShapelessBeeInfusionCraftingRecipe(String key, ItemStack output, List<ItemStack> itemList, int cost, ObjectTags tags,
|
||||
IAllele allele, EnumBeeChromosome slot)
|
||||
{
|
||||
super(key, output, itemList, cost, tags);
|
||||
|
||||
this.alleleId = allele.getUID();
|
||||
this.alleleSlot = (byte)slot.ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean matches(IInventory craftingInventory, EntityPlayer player)
|
||||
{
|
||||
// We'll remove items from the list as they are found.
|
||||
ArrayList<ItemStack> recipeItemsList = new ArrayList(this.recipeItems);
|
||||
|
||||
boolean invalidItemFound = false;
|
||||
|
||||
if (key.length() == 0 || (key.length() > 0 && ThaumcraftApiHelper.isResearchComplete(player.username, key)))
|
||||
{
|
||||
|
||||
for (int i = 0; i < 3 && !invalidItemFound; ++i)
|
||||
{
|
||||
for (int j = 0; j < 3 && !invalidItemFound; ++j)
|
||||
{
|
||||
ItemStack itemStack = ThaumcraftApiHelper.getStackInRowAndColumn(craftingInventory, j, i);
|
||||
|
||||
if (itemStack != null)
|
||||
{
|
||||
Iterator<ItemStack> itr = recipeItemsList.iterator();
|
||||
boolean currentItemInRecipe = false;
|
||||
|
||||
while (itr.hasNext())
|
||||
{
|
||||
ItemStack recipeItem = itr.next();
|
||||
|
||||
if (itemStack.itemID == recipeItem.itemID && (recipeItem.getItemDamage() == -1 || itemStack.getItemDamage() == recipeItem.getItemDamage()))
|
||||
{
|
||||
if (recipeItem.hasTagCompound())
|
||||
{
|
||||
currentItemInRecipe = this.hasMatchingChromosome(itemStack);
|
||||
}
|
||||
else
|
||||
{
|
||||
currentItemInRecipe = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (currentItemInRecipe)
|
||||
{
|
||||
itr.remove();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!currentItemInRecipe)
|
||||
{
|
||||
invalidItemFound = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return recipeItemsList.isEmpty() && !invalidItemFound;
|
||||
}
|
||||
|
||||
private boolean hasMatchingChromosome(ItemStack itemStack)
|
||||
{
|
||||
boolean genesMatch = false;
|
||||
|
||||
NBTTagCompound compoundRoot = itemStack.getTagCompound();
|
||||
if (compoundRoot.hasKey("Genome"))
|
||||
{
|
||||
NBTTagCompound genome = compoundRoot.getCompoundTag("Genome");
|
||||
if (genome.hasKey("Chromosomes"))
|
||||
{
|
||||
NBTTagList chromosomes = genome.getTagList("Chromosomes");
|
||||
|
||||
for (int i = 0; i < chromosomes.tagCount() && !genesMatch; ++i)
|
||||
{
|
||||
NBTTagCompound genes = (NBTTagCompound)chromosomes.tagAt(i);
|
||||
if (genes.hasKey("Slot") && genes.getByte("Slot") == this.alleleSlot)
|
||||
{
|
||||
if (genes.getString("UID0").equals(this.alleleId) && genes.getString("UID1").equals(this.alleleId))
|
||||
{
|
||||
genesMatch = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return genesMatch;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,14 +1,9 @@
|
||||
package magicbees.main.utils.compat;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import magicbees.bees.BeeGenomeManager;
|
||||
import magicbees.bees.BeeSpecies;
|
||||
import magicbees.item.ItemThaumiumGrafter;
|
||||
import magicbees.item.ItemThaumiumScoop;
|
||||
import magicbees.item.types.CombType;
|
||||
import magicbees.item.types.DropType;
|
||||
import magicbees.item.types.HiveFrameType;
|
||||
import magicbees.item.types.FluidType;
|
||||
import magicbees.item.types.PollenType;
|
||||
import magicbees.item.types.PropolisType;
|
||||
@@ -20,13 +15,9 @@ import magicbees.main.MagicBees;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ItemApi;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.api.research.ResearchList;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import forestry.api.apiculture.EnumBeeChromosome;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
@@ -131,9 +122,10 @@ public class ThaumcraftHelper
|
||||
{
|
||||
if (cpw.mods.fml.common.Loader.isModLoaded(Name))
|
||||
{
|
||||
isThaumcraftPresent = true;
|
||||
|
||||
registerResearchXML();
|
||||
if (isThaumcraftPresent = true && MagicBees.object.getConfig().EnableThaumcraftCompat)
|
||||
{
|
||||
registerResearchXML();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -226,7 +218,7 @@ public class ThaumcraftHelper
|
||||
|
||||
private static void setupItemAspectsThaumicBees()
|
||||
{
|
||||
ObjectTags tags;
|
||||
/* ObjectTags tags;
|
||||
ItemStack itemStack;
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.WOOD, 1);
|
||||
@@ -299,12 +291,12 @@ public class ThaumcraftHelper
|
||||
}
|
||||
tags = new ObjectTags().add(tag, 1);
|
||||
ThaumcraftApi.registerObjectTag(Config.solidFlux.itemID, tag.id, tags);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
private static void setupItemAspectsForestry()
|
||||
{
|
||||
ObjectTags tags;
|
||||
/* ObjectTags tags;
|
||||
ItemStack itemStack;
|
||||
|
||||
itemStack = BlockInterface.getBlock("candle");
|
||||
@@ -506,12 +498,12 @@ public class ThaumcraftHelper
|
||||
tags = new ObjectTags(ItemInterface.getItem("apatite").itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.APATITE.ordinal(), tags);
|
||||
tags = new ObjectTags(Item.dyePowder.itemID, 4).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.LAPIS.ordinal(), tags);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.LAPIS.ordinal(), tags); */
|
||||
}
|
||||
|
||||
private static void setupItemAspectsExtraBees()
|
||||
{
|
||||
ItemStack itemStack;
|
||||
/*ItemStack itemStack;
|
||||
ObjectTags tags;
|
||||
|
||||
try // One try block suffices. If we can't get one item, it's probably safe to assume we can't get any others.
|
||||
@@ -537,14 +529,14 @@ public class ThaumcraftHelper
|
||||
tags = new ObjectTags().add(EnumTag.EXCHANGE, 2).add(EnumTag.LIFE, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
|
||||
}
|
||||
catch (NullPointerException e) { }
|
||||
catch (NullPointerException e) { }*/
|
||||
}
|
||||
|
||||
public static void setupResearch()
|
||||
{
|
||||
if (isActive())
|
||||
{
|
||||
ObjectTags tags;
|
||||
/*ObjectTags tags;
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.WOOD, 10).add(EnumTag.PLANT, 10).add(EnumTag.INSECT, 10);
|
||||
ResearchItem startNode = new ResearchItem("BEESTARTNODE", tags, 10, 1, Config.miscResources.getStackForType(ResourceType.RESEARCH_STARTNODE))
|
||||
@@ -604,7 +596,7 @@ public class ThaumcraftHelper
|
||||
tags = new ObjectTags().add(EnumTag.WOOD, 16).add(EnumTag.PLANT, 20).add(EnumTag.TOOL, 6).add(EnumTag.MAGIC, 6);
|
||||
ResearchItem grafter = new ResearchItem("THAUMIUMGRAFTER", tags, 0, -4, Config.thaumiumGrafter)
|
||||
.setParents(scoop)
|
||||
.registerResearchItem();
|
||||
.registerResearchItem();*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -612,13 +604,13 @@ public class ThaumcraftHelper
|
||||
{
|
||||
if (isActive())
|
||||
{
|
||||
ThaumcraftApi.registerResearchXML(CommonProxy.TCBEES_RESEARCH + "research.xml");
|
||||
//ThaumcraftApi.registerResearchXML(CommonProxy.TCBEES_RESEARCH + "research.xml");
|
||||
}
|
||||
}
|
||||
|
||||
public static void setupThaumcraftCrafting()
|
||||
{
|
||||
ItemStack input;
|
||||
/*ItemStack input;
|
||||
ItemStack output;
|
||||
|
||||
if (MagicBees.getConfig().UseImpregnatedStickInTools)
|
||||
@@ -752,6 +744,6 @@ public class ThaumcraftHelper
|
||||
100, tags, BeeSpecies.TC_STARK, EnumBeeChromosome.SPECIES);
|
||||
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION0", BeeSpecies.TC_MAGIC.getBeeItem(EnumBeeType.PRINCESS), new Object[]
|
||||
{ princess, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.MAGIC.ordinal()) },
|
||||
100, tags, BeeSpecies.TC_STARK, EnumBeeChromosome.SPECIES);
|
||||
100, tags, BeeSpecies.TC_STARK, EnumBeeChromosome.SPECIES);*/
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user