Fixing things, and adding balance to grafter.

This commit is contained in:
MysteriousAges committed 2013-03-24 13:34:17 -07:00
1 parent cbbf2558fd
commit fd82a0ef72
6 files changed
+49 -14

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@
<property name="mc.version" value="1.4.7"/>
<property name="forge.version" value="6.6.0.507"/>
<property name="thaumicbees.version" value="1.4.3b"/>
<property name="thaumicbees.version" value="1.4.3c"/>
<!-- for local deployment only, not used by main -->
<property name="deploy.type" value="previews" />
+6
View File
@@ -1,3 +1,9 @@
1.4.3c
Thaumium Grafter now doubles your chance to get Greatwood & Silverwood saplings.
Thaumium Grafter now takes extra damage when trying to break Greatwood & Silverwood leaves.
Thaumium Grafter now has a balancing feature when repairing.
Extra... uh. "Enhancements". =D
1.4.3b
Greatwood & Silverwood planks support BuildCraft facades.
Tweaking Aura cost for Repair on Thaumium Grafters and other balance.
+4 -4
View File
@@ -49,11 +49,11 @@ public class Allele implements IAllele
Allele.spawnBats = new AlleleEffectSpawnMob("effectBatty", false, ThaumcraftHelper.Entity.FIREBAT.entityID);
Allele.spawnBats.setThrottle(300).setSpawnsOnPlayerNear("Bat");
Allele.spawnWisp = new AlleleEffectSpawnWisp("effectWispy", false, ThaumcraftHelper.Entity.WISP.entityID);
Allele.spawnWisp.setThrottle(1800);
Allele.spawnWisp = new AlleleEffectSpawnWisp("effectWispy", false, ThaumcraftHelper.Entity.WISP.entityID, "thaumcraft.wisplive");
Allele.spawnWisp.setThrottle(1800).setChanceToSpawn(79);
Allele.spawnGhast = new AlleleEffectSpawnMob("Ghast", false, "Ghast");
Allele.spawnGhast.setThrottle(2000).setChanceToSpawn(20).setMaxMobsInSpawnZone(1);
Allele.spawnGhast = new AlleleEffectSpawnMob("Ghast", false, "Ghast", "mob.ghast.moan");
Allele.spawnGhast.setThrottle(2060).setChanceToSpawn(10).setMaxMobsInSpawnZone(1);
}
private String uid;
@@ -21,11 +21,17 @@ public class AlleleEffectSpawnMob extends AlleleEffect
protected boolean spawnsWhilePlayerNear;
protected String alternateMob;
protected String mobName;
protected String mobSound;
protected int throttle;
protected int chanceToSpawn;
protected int maxMobsInArea;
public AlleleEffectSpawnMob(String id, boolean isDominant, String mobToSpawn)
{
this(id, isDominant, mobToSpawn, null);
}
public AlleleEffectSpawnMob(String id, boolean isDominant, String mobToSpawn, String mobSoundFx)
{
super(id, isDominant);
this.aggosOnPlayer = false;
@@ -33,6 +39,7 @@ public class AlleleEffectSpawnMob extends AlleleEffect
this.throttle = 200;
this.chanceToSpawn = 100;
this.maxMobsInArea = 6;
this.mobSound = mobSoundFx;
}
@Override
@@ -109,6 +116,17 @@ public class AlleleEffectSpawnMob extends AlleleEffect
}
else
{
if (this.mobSound != null && w.rand.nextInt(100) < 35)
{
int range = genome.getTerritory()[0];
double x = housing.getXCoord() + w.rand.nextDouble() * (range * 2) - range;
range = genome.getTerritory()[1];
double y = housing.getYCoord() + w.rand.nextDouble() * (range * 2) - range;
range = genome.getTerritory()[2];
double z = housing.getZCoord() + w.rand.nextDouble() * (range * 2) - range;
w.playSoundEffect(x, y, z, this.mobSound, 0.5f,
(w.rand.nextFloat() - w.rand.nextFloat()) * 0.2f + 1.0f);
}
storedData.setBoolean(0, true);
}
}
@@ -18,9 +18,9 @@ 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 };
public AlleleEffectSpawnWisp(String id, boolean isDominant, String mobToSpawn)
public AlleleEffectSpawnWisp(String id, boolean isDominant, String mobToSpawn, String soundToPlay)
{
super(id, isDominant, mobToSpawn);
super(id, isDominant, mobToSpawn, soundToPlay);
}
@Override
@@ -57,11 +57,7 @@ public class AlleleEffectSpawnWisp extends AlleleEffectSpawnMob
Field type = wispEntity.getDeclaredField("type");
type.setByte(mob, wispTypes[world.rand.nextInt(wispTypes.length)]);
}
catch (Exception e)
{
FMLLog.info("ThaumicBees is using an invalid classname: " + ThaumcraftHelper.Entity.WISP.getClassName()
+ " Please report this error in the thread if you see it.", (Object[])null);
}
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)
@@ -48,7 +48,22 @@ public class ItemThaumiumGrafter extends Item implements IVisRepairable, IToolGr
@Override
public boolean onBlockDestroyed(ItemStack itemstack, World world, int id, int x, int y, int z, EntityLiving entityliving) {
itemstack.damageItem(1, entityliving);
int damage = 1;
if (id == Config.tcLeaf.blockID)
{
Block block = Block.blocksList[id];
int meta = world.getBlockMetadata(x, y, z) & 1;
block.dropBlockAsItemWithChance(world, x, y, z, meta, 0, 0);
if (meta == ThaumcraftHelper.TreeType.GREATWOOD.ordinal())
{
damage = 2;
}
else if (meta == ThaumcraftHelper.TreeType.SILVERWOOD.ordinal())
{
damage = 4;
}
}
itemstack.damageItem(damage, entityliving);
return true;
}
@@ -86,7 +101,7 @@ public class ItemThaumiumGrafter extends Item implements IVisRepairable, IToolGr
if (e instanceof EntityPlayer)
{
EntityPlayer p = (EntityPlayer)e;
p.addExhaustion(0.12f);
p.addExhaustion(0.19f);
}
stack.damageItem(-1, (EntityLiving)e);
}