mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-25 14:34:44 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd82a0ef72 | ||
|
|
cbbf2558fd | ||
|
|
76f541bc3f | ||
|
|
7f95da0f6c | ||
|
|
3798f1f771 | ||
|
|
721a60c994 | ||
|
|
4a03a5f48c | ||
|
|
c6720b7417 | ||
|
|
575c799587 | ||
|
|
2c324174e4 | ||
|
|
28f5a15f0a | ||
|
|
8aaa24c3c1 | ||
|
|
596ae798ec |
No files matched your search
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<property name="mc.version" value="1.4.7"/>
|
<property name="mc.version" value="1.4.7"/>
|
||||||
<property name="forge.version" value="6.6.0.507"/>
|
<property name="forge.version" value="6.6.0.507"/>
|
||||||
<property name="thaumicbees.version" value="1.4.3"/>
|
<property name="thaumicbees.version" value="1.4.3c"/>
|
||||||
|
|
||||||
<!-- for local deployment only, not used by main -->
|
<!-- for local deployment only, not used by main -->
|
||||||
<property name="deploy.type" value="previews" />
|
<property name="deploy.type" value="previews" />
|
||||||
|
|||||||
@@ -1,3 +1,14 @@
|
|||||||
|
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.
|
||||||
|
Turns out I can't get the version crap to work properly. More fixes.
|
||||||
|
|
||||||
1.4.3a
|
1.4.3a
|
||||||
Changed Version info embedded in mod to match format supported by Version checking. Will need to make this more robust in the future.
|
Changed Version info embedded in mod to match format supported by Version checking. Will need to make this more robust in the future.
|
||||||
Fixed bug with Thaumium Grafter not being enchantable.
|
Fixed bug with Thaumium Grafter not being enchantable.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"modid": "ThaumicBees",
|
"modid": "ThaumicBees",
|
||||||
"version": "@VERSION@ - @BUILD_NUMBER",
|
"version": "@MODVERSION@",
|
||||||
"name": "ThaumicBees",
|
"name": "ThaumicBees",
|
||||||
"url": "http://bit.ly/XFDvLY",
|
"url": "http://bit.ly/XFDvLY",
|
||||||
"description": "Crossover mod for Forestry and Thaumcraft. Magic bees & more.",
|
"description": "Crossover mod for Forestry and Thaumcraft. Magic bees & more.",
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ public class Allele implements IAllele
|
|||||||
Allele.flowerNodeFluxify = new AlleleFlower("flowerAuraNodeFlux", new FlowerProviderAuraNodeFlux(), false);
|
Allele.flowerNodeFluxify = new AlleleFlower("flowerAuraNodeFlux", new FlowerProviderAuraNodeFlux(), false);
|
||||||
|
|
||||||
Allele.cleansingEffect = new AlleleEffectCure("effectCurative", false);
|
Allele.cleansingEffect = new AlleleEffectCure("effectCurative", false);
|
||||||
Allele.digSpeed = new AlleleEffectPotion("effectDigSpeed", Potion.digSpeed, 7, false);
|
Allele.digSpeed = new AlleleEffectPotion("effectDigSpeed", Potion.digSpeed, 15, false);
|
||||||
Allele.moveSpeed = new AlleleEffectPotion("effectMoveSpeed", Potion.moveSpeed, 5, false);
|
Allele.moveSpeed = new AlleleEffectPotion("effectMoveSpeed", Potion.moveSpeed, 10, false);
|
||||||
Allele.slowSpeed = new AlleleEffectPotion("effectSlowSpeed", Potion.moveSlowdown, 3, false);
|
Allele.slowSpeed = new AlleleEffectPotion("effectSlowSpeed", Potion.moveSlowdown, 3, false);
|
||||||
|
|
||||||
Allele.nodeGen = new AlleleEffectAuraNodeGrow("effectNodeGeneration", false, 400);
|
Allele.nodeGen = new AlleleEffectAuraNodeGrow("effectNodeGeneration", false, 400);
|
||||||
@@ -49,11 +49,11 @@ public class Allele implements IAllele
|
|||||||
Allele.spawnBats = new AlleleEffectSpawnMob("effectBatty", false, ThaumcraftHelper.Entity.FIREBAT.entityID);
|
Allele.spawnBats = new AlleleEffectSpawnMob("effectBatty", false, ThaumcraftHelper.Entity.FIREBAT.entityID);
|
||||||
Allele.spawnBats.setThrottle(300).setSpawnsOnPlayerNear("Bat");
|
Allele.spawnBats.setThrottle(300).setSpawnsOnPlayerNear("Bat");
|
||||||
|
|
||||||
Allele.spawnWisp = new AlleleEffectSpawnWisp("effectWispy", false, ThaumcraftHelper.Entity.WISP.entityID);
|
Allele.spawnWisp = new AlleleEffectSpawnWisp("effectWispy", false, ThaumcraftHelper.Entity.WISP.entityID, "thaumcraft.wisplive");
|
||||||
Allele.spawnWisp.setThrottle(1800);
|
Allele.spawnWisp.setThrottle(1800).setChanceToSpawn(79);
|
||||||
|
|
||||||
Allele.spawnGhast = new AlleleEffectSpawnMob("Ghast", false, "Ghast");
|
Allele.spawnGhast = new AlleleEffectSpawnMob("Ghast", false, "Ghast", "mob.ghast.moan");
|
||||||
Allele.spawnGhast.setThrottle(2000).setChanceToSpawn(20).setMaxMobsInSpawnZone(1);
|
Allele.spawnGhast.setThrottle(2060).setChanceToSpawn(10).setMaxMobsInSpawnZone(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String uid;
|
private String uid;
|
||||||
|
|||||||
@@ -21,11 +21,17 @@ public class AlleleEffectSpawnMob extends AlleleEffect
|
|||||||
protected boolean spawnsWhilePlayerNear;
|
protected boolean spawnsWhilePlayerNear;
|
||||||
protected String alternateMob;
|
protected String alternateMob;
|
||||||
protected String mobName;
|
protected String mobName;
|
||||||
|
protected String mobSound;
|
||||||
protected int throttle;
|
protected int throttle;
|
||||||
protected int chanceToSpawn;
|
protected int chanceToSpawn;
|
||||||
protected int maxMobsInArea;
|
protected int maxMobsInArea;
|
||||||
|
|
||||||
public AlleleEffectSpawnMob(String id, boolean isDominant, String mobToSpawn)
|
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);
|
super(id, isDominant);
|
||||||
this.aggosOnPlayer = false;
|
this.aggosOnPlayer = false;
|
||||||
@@ -33,6 +39,7 @@ public class AlleleEffectSpawnMob extends AlleleEffect
|
|||||||
this.throttle = 200;
|
this.throttle = 200;
|
||||||
this.chanceToSpawn = 100;
|
this.chanceToSpawn = 100;
|
||||||
this.maxMobsInArea = 6;
|
this.maxMobsInArea = 6;
|
||||||
|
this.mobSound = mobSoundFx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -109,6 +116,17 @@ public class AlleleEffectSpawnMob extends AlleleEffect
|
|||||||
}
|
}
|
||||||
else
|
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);
|
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 };
|
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
|
@Override
|
||||||
@@ -57,11 +57,7 @@ public class AlleleEffectSpawnWisp extends AlleleEffectSpawnMob
|
|||||||
Field type = wispEntity.getDeclaredField("type");
|
Field type = wispEntity.getDeclaredField("type");
|
||||||
type.setByte(mob, wispTypes[world.rand.nextInt(wispTypes.length)]);
|
type.setByte(mob, wispTypes[world.rand.nextInt(wispTypes.length)]);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e) { /*Last time I had a request to post error messages, I regretted it.*/ }
|
||||||
{
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
spawnedFlag = world.spawnEntityInWorld(mob);
|
spawnedFlag = world.spawnEntityInWorld(mob);
|
||||||
if (this.aggosOnPlayer && player != null)
|
if (this.aggosOnPlayer && player != null)
|
||||||
|
|||||||
@@ -0,0 +1,73 @@
|
|||||||
|
package thaumicbees.block;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import thaumicbees.main.CommonProxy;
|
||||||
|
import thaumicbees.block.TileEntityMagicApiary;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.entity.EntityLiving;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
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;
|
||||||
|
|
||||||
|
public class BlockMagicApiary extends Block
|
||||||
|
{
|
||||||
|
public BlockMagicApiary(int par1)
|
||||||
|
{
|
||||||
|
super(par1, Material.wood);
|
||||||
|
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||||
|
this.setBlockName("Magic Apiary");
|
||||||
|
this.blockIndexInTexture = 50;
|
||||||
|
this.setHardness(2f);
|
||||||
|
this.setResistance(5f);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public int getBlockTexture(IBlockAccess worldAccess, int x, int y, int z, int side)
|
||||||
|
{
|
||||||
|
int texture = 50;
|
||||||
|
if (side == 0)
|
||||||
|
{
|
||||||
|
texture = 51;
|
||||||
|
}
|
||||||
|
else if (side == 1)
|
||||||
|
{
|
||||||
|
TileEntityMagicApiary tileInfo = (TileEntityMagicApiary)worldAccess.getBlockTileEntity(x, y, z);
|
||||||
|
if (tileInfo != null && tileInfo.isMaster())
|
||||||
|
{
|
||||||
|
texture = 52;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
texture = 51;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return texture;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getBlockTextureFromSideAndMetadata(int side, int meta)
|
||||||
|
{
|
||||||
|
int texture = 50;
|
||||||
|
if (side == 0 || side == 1)
|
||||||
|
{
|
||||||
|
texture = 51;
|
||||||
|
}
|
||||||
|
return texture;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLiving entity)
|
||||||
|
{
|
||||||
|
super.onBlockPlacedBy(world, x, y, z, entity);
|
||||||
|
|
||||||
|
// Validate block arrangement
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,275 @@
|
|||||||
|
package thaumicbees.block;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.Queue;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.nbt.NBTTagList;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
|
import net.mysteriousages.utils.GenericInventory;
|
||||||
|
import forestry.api.apiculture.BeeManager;
|
||||||
|
import forestry.api.apiculture.IBee;
|
||||||
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
|
import forestry.api.apiculture.IBeekeepingLogic;
|
||||||
|
import forestry.api.apiculture.IHiveFrame;
|
||||||
|
import forestry.api.core.EnumHumidity;
|
||||||
|
import forestry.api.core.EnumTemperature;
|
||||||
|
import thaumicbees.main.utils.compat.ForestryHelper;
|
||||||
|
|
||||||
|
public class LogicMagicApiary implements IBeeHousing
|
||||||
|
{
|
||||||
|
private TileEntityMagicApiary parent;
|
||||||
|
private String ownerName;
|
||||||
|
private BiomeGenBase biome;
|
||||||
|
private IBeekeepingLogic beeLogic;
|
||||||
|
private GenericInventory tileInventory;
|
||||||
|
private LinkedList<ItemStack> inventoryOverflow;
|
||||||
|
|
||||||
|
private static final int SLOT_ID_QUEEN = 0;
|
||||||
|
private static final int SLOT_ID_DRONE = 1;
|
||||||
|
private static final int SLOT_ID_FRAME = 2;
|
||||||
|
private static final int SLOT_LENGTH_FRAME = 2;
|
||||||
|
private static final int SLOT_ID_PRODUCE = 4;
|
||||||
|
private static final int SLOT_LENGTH_PRODUCE = 6;
|
||||||
|
|
||||||
|
public LogicMagicApiary(TileEntityMagicApiary master)
|
||||||
|
{
|
||||||
|
this.parent = master;
|
||||||
|
this.beeLogic = BeeManager.breedingManager.createBeekeepingLogic(this);
|
||||||
|
this.tileInventory = new GenericInventory("MagicApiary", 11);
|
||||||
|
this.inventoryOverflow = new LinkedList<ItemStack>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public TileEntityMagicApiary getParent()
|
||||||
|
{
|
||||||
|
return parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOwner(EntityPlayer player)
|
||||||
|
{
|
||||||
|
this.ownerName = player.username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOwner()
|
||||||
|
{
|
||||||
|
return this.ownerName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void writeToNBT(NBTTagCompound tag)
|
||||||
|
{
|
||||||
|
NBTTagCompound beeTag = new NBTTagCompound();
|
||||||
|
this.beeLogic.writeToNBT(beeTag);
|
||||||
|
tag.setTag("BeeLogic", beeTag);
|
||||||
|
tag.setString("Owner", this.ownerName);
|
||||||
|
NBTTagCompound inventory = new NBTTagCompound();
|
||||||
|
this.tileInventory.writeToNBT(inventory);
|
||||||
|
tag.setTag("Inventory", inventory);
|
||||||
|
|
||||||
|
if (this.inventoryOverflow.size() > 0)
|
||||||
|
{
|
||||||
|
NBTTagList overflow = new NBTTagList();
|
||||||
|
for (int i = 0; i < this.inventoryOverflow.size(); ++i)
|
||||||
|
{
|
||||||
|
NBTTagCompound itemTag = new NBTTagCompound();
|
||||||
|
this.inventoryOverflow.get(i).writeToNBT(itemTag);
|
||||||
|
overflow.appendTag(itemTag);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void readFromNBT(NBTTagCompound tag)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getTerritoryModifier(IBeeGenome genome)
|
||||||
|
{
|
||||||
|
return 1f;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getMutationModifier(IBeeGenome genome, IBeeGenome mate)
|
||||||
|
{
|
||||||
|
return 1f;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate)
|
||||||
|
{
|
||||||
|
return 1f;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getProductionModifier(IBeeGenome genome)
|
||||||
|
{
|
||||||
|
return 2f;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getFloweringModifier(IBeeGenome genome)
|
||||||
|
{
|
||||||
|
return 1f;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSealed()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSelfLighted()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSunlightSimulated()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isHellish()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onQueenChange(ItemStack queen)
|
||||||
|
{
|
||||||
|
// TODO Requires Network shenanegans.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void wearOutEquipment(int amount)
|
||||||
|
{
|
||||||
|
for (int i = SLOT_ID_FRAME; i < SLOT_ID_FRAME + SLOT_LENGTH_FRAME; ++i)
|
||||||
|
{
|
||||||
|
ItemStack e = this.tileInventory.getStackInSlot(i);
|
||||||
|
if (e != null && e.getItem() instanceof IHiveFrame)
|
||||||
|
{
|
||||||
|
this.tileInventory.setInventorySlotContents(i,
|
||||||
|
((IHiveFrame) e.getItem()).frameUsed(this, e,
|
||||||
|
BeeManager.beeInterface.getBee(this.tileInventory.getStackInSlot(SLOT_ID_QUEEN)),
|
||||||
|
amount));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Does nothing in Forestry.
|
||||||
|
@Override
|
||||||
|
public void onQueenDeath(IBee queen) { }
|
||||||
|
|
||||||
|
// Does nothing in Forestry.
|
||||||
|
@Override
|
||||||
|
public void onPostQueenDeath(IBee queen) { }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getXCoord()
|
||||||
|
{
|
||||||
|
return parent.xCoord;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getYCoord()
|
||||||
|
{
|
||||||
|
return parent.yCoord;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getZCoord()
|
||||||
|
{
|
||||||
|
return parent.zCoord;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack getQueen()
|
||||||
|
{
|
||||||
|
return this.tileInventory.getStackInSlot(SLOT_ID_QUEEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack getDrone()
|
||||||
|
{
|
||||||
|
return this.tileInventory.getStackInSlot(SLOT_ID_DRONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setQueen(ItemStack itemStack)
|
||||||
|
{
|
||||||
|
this.tileInventory.setInventorySlotContents(SLOT_ID_QUEEN, itemStack);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setDrone(ItemStack itemStack)
|
||||||
|
{
|
||||||
|
this.tileInventory.setInventorySlotContents(SLOT_ID_DRONE, itemStack);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getBiomeId()
|
||||||
|
{
|
||||||
|
return this.biome.biomeID;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EnumTemperature getTemperature()
|
||||||
|
{
|
||||||
|
return ForestryHelper.getEnumTemperatureFromValue(this.biome.temperature);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EnumHumidity getHumidity()
|
||||||
|
{
|
||||||
|
return ForestryHelper.getEnumHumidityFromValue(this.biome.rainfall);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public World getWorld()
|
||||||
|
{
|
||||||
|
return this.getWorld();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getOwnerName()
|
||||||
|
{
|
||||||
|
return parent.getOwner();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setErrorState(int state)
|
||||||
|
{
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getErrorOrdinal()
|
||||||
|
{
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canBreed()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean addProduct(ItemStack product, boolean all)
|
||||||
|
{
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
package thaumicbees.block;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
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;
|
||||||
|
|
||||||
|
public class TileEntityMagicApiary extends TileEntity
|
||||||
|
{
|
||||||
|
private String owner;
|
||||||
|
private LogicMagicApiary logic;
|
||||||
|
private int masterX;
|
||||||
|
private int masterY;
|
||||||
|
private int masterZ;
|
||||||
|
|
||||||
|
public TileEntityMagicApiary(World w)
|
||||||
|
{
|
||||||
|
this.setWorldObj(w);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValid(TileEntityMagicApiary masterEntity)
|
||||||
|
{
|
||||||
|
this.logic = masterEntity.logic;
|
||||||
|
this.masterX = masterEntity.xCoord;
|
||||||
|
this.masterY = masterEntity.yCoord;
|
||||||
|
this.masterZ = masterEntity.zCoord;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOwner()
|
||||||
|
{
|
||||||
|
return this.owner;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isValidStructure()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isMaster()
|
||||||
|
{
|
||||||
|
boolean flag = false;
|
||||||
|
|
||||||
|
if (this.logic != null)
|
||||||
|
{
|
||||||
|
flag = this.logic.getParent() == this;
|
||||||
|
}
|
||||||
|
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LogicMagicApiary getLogic()
|
||||||
|
{
|
||||||
|
return this.logic;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readFromNBT(NBTTagCompound tagRoot)
|
||||||
|
{
|
||||||
|
super.readFromNBT(tagRoot);
|
||||||
|
this.owner = tagRoot.getString("Owner");
|
||||||
|
if (tagRoot.hasKey("Logic"))
|
||||||
|
{
|
||||||
|
this.logic = new LogicMagicApiary(this);
|
||||||
|
this.logic.readFromNBT(tagRoot.getCompoundTag("Logic"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.masterX = tagRoot.getInteger("MasterX");
|
||||||
|
this.masterY = tagRoot.getInteger("MasterY");
|
||||||
|
this.masterZ = tagRoot.getInteger("MasterZ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeToNBT(NBTTagCompound tagRoot)
|
||||||
|
{
|
||||||
|
super.writeToNBT(tagRoot);
|
||||||
|
tagRoot.setString("Owner", this.owner);
|
||||||
|
if (this.isMaster())
|
||||||
|
{
|
||||||
|
NBTTagCompound logicTag = new NBTTagCompound();
|
||||||
|
this.logic.writeToNBT(logicTag);
|
||||||
|
tagRoot.setTag("Logic", logicTag);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tagRoot.setInteger("MasterX", this.masterX);
|
||||||
|
tagRoot.setInteger("MasterY", this.masterY);
|
||||||
|
tagRoot.setInteger("MasterZ", this.masterZ);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,6 +9,7 @@ import forestry.api.arboriculture.IToolGrafter;
|
|||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLiving;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
@@ -47,7 +48,22 @@ public class ItemThaumiumGrafter extends Item implements IVisRepairable, IToolGr
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockDestroyed(ItemStack itemstack, World world, int id, int x, int y, int z, EntityLiving entityliving) {
|
public boolean onBlockDestroyed(ItemStack itemstack, World world, int id, int x, int y, int z, 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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,8 +96,13 @@ public class ItemThaumiumGrafter extends Item implements IVisRepairable, IToolGr
|
|||||||
{
|
{
|
||||||
if (stack.getItemDamage() > 0)
|
if (stack.getItemDamage() > 0)
|
||||||
{
|
{
|
||||||
if (ThaumcraftApi.decreaseClosestAura(e.worldObj, e.posX, e.posY, e.posZ, 1, true))
|
if (ThaumcraftApi.decreaseClosestAura(e.worldObj, e.posX, e.posY, e.posZ, 2, true))
|
||||||
{
|
{
|
||||||
|
if (e instanceof EntityPlayer)
|
||||||
|
{
|
||||||
|
EntityPlayer p = (EntityPlayer)e;
|
||||||
|
p.addExhaustion(0.19f);
|
||||||
|
}
|
||||||
stack.damageItem(-1, (EntityLiving)e);
|
stack.damageItem(-1, (EntityLiving)e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ public class ThaumicBees
|
|||||||
this.modConfig.registerTileEntities();
|
this.modConfig.registerTileEntities();
|
||||||
this.modConfig.setupItems();
|
this.modConfig.setupItems();
|
||||||
|
|
||||||
|
CompatabilityManager.setupBuildCraftFacades();
|
||||||
CompatabilityManager.setupBackpacks();
|
CompatabilityManager.setupBackpacks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import thaumicbees.item.ItemMiscResources;
|
|||||||
import thaumicbees.item.types.CombType;
|
import thaumicbees.item.types.CombType;
|
||||||
import thaumicbees.item.types.DropType;
|
import thaumicbees.item.types.DropType;
|
||||||
import thaumicbees.item.types.LiquidType;
|
import thaumicbees.item.types.LiquidType;
|
||||||
|
import thaumicbees.item.types.PlankType;
|
||||||
import thaumicbees.item.types.PollenType;
|
import thaumicbees.item.types.PollenType;
|
||||||
import thaumicbees.item.types.PropolisType;
|
import thaumicbees.item.types.PropolisType;
|
||||||
import thaumicbees.item.types.ResourceType;
|
import thaumicbees.item.types.ResourceType;
|
||||||
@@ -440,6 +441,12 @@ public class CompatabilityManager
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setupBuildCraftFacades()
|
||||||
|
{
|
||||||
|
FMLInterModComms.sendMessage("BuildCraft|Transport", "add-facade", ThaumicBees.getConfig().planksWood.blockID + "@" + PlankType.GREATWOOD.ordinal());
|
||||||
|
FMLInterModComms.sendMessage("BuildCraft|Transport", "add-facade", ThaumicBees.getConfig().planksWood.blockID + "@" + PlankType.SILVERWOOD.ordinal());
|
||||||
|
}
|
||||||
|
|
||||||
public static void setupResearch()
|
public static void setupResearch()
|
||||||
{
|
{
|
||||||
ObjectTags tags;
|
ObjectTags tags;
|
||||||
|
|||||||
@@ -99,4 +99,4 @@ public class TickHandlerVersion implements IScheduledTickHandler
|
|||||||
}
|
}
|
||||||
return 72000;
|
return 72000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -22,7 +22,7 @@ import cpw.mods.fml.relauncher.Side;
|
|||||||
public class VersionInfo
|
public class VersionInfo
|
||||||
{
|
{
|
||||||
|
|
||||||
public static final String Version = "1.4.3";
|
public static final String Version = "@VERSION@";
|
||||||
public static final String Build = "@BUILD_NUMBER@";
|
public static final String Build = "@BUILD_NUMBER@";
|
||||||
public static final String MCVersion = "@MCVERSION@";
|
public static final String MCVersion = "@MCVERSION@";
|
||||||
public static final String VersionURL = "http://bit.ly/thaumicbeeversion";
|
public static final String VersionURL = "http://bit.ly/thaumicbeeversion";
|
||||||
@@ -81,7 +81,7 @@ public class VersionInfo
|
|||||||
int[] versionTokens = parseVersion(version);
|
int[] versionTokens = parseVersion(version);
|
||||||
int[] targetTokens = parseVersion(target);
|
int[] targetTokens = parseVersion(target);
|
||||||
|
|
||||||
for (int i = 0; i < versionTokens.length; ++i)
|
for (int i = 0; i < versionTokens.length && i < targetTokens.length; ++i)
|
||||||
{
|
{
|
||||||
if (versionTokens[i] < targetTokens[i])
|
if (versionTokens[i] < targetTokens[i])
|
||||||
{
|
{
|
||||||
@@ -111,7 +111,7 @@ public class VersionInfo
|
|||||||
int[] versionTokens = parseVersion(version);
|
int[] versionTokens = parseVersion(version);
|
||||||
int[] targetTokens = parseVersion(target);
|
int[] targetTokens = parseVersion(target);
|
||||||
|
|
||||||
for (int i = 0; i < versionTokens.length; ++i)
|
for (int i = 0; i < versionTokens.length && i < targetTokens.length; ++i)
|
||||||
{
|
{
|
||||||
if (versionTokens[i] > targetTokens[i])
|
if (versionTokens[i] > targetTokens[i])
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user