mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-12 08:17:29 +00:00
Merge branch 'machineDev'
Conflicts: thaumicbees_src/thaumicbees/main/Config.java Deleting block classes from this branch, because GO AWAY.
This commit is contained in:
commit
e32c05ab3e
7 files changed
+8
-458
No files matched your search
@@ -74,15 +74,19 @@
|
||||
<include name="thaumcraft/**" />
|
||||
</fileset>
|
||||
<fileset dir="${src.dir}/thaumicbees_src">
|
||||
<include name="**/net/mysteriousages/**">
|
||||
<include name="**/thaumicbees/**" />
|
||||
<include name="**/forestry/**" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="${clientsrc.dir}" overwrite="true" failonerror="true">
|
||||
<fileset dir="${src.dir}/thaumicbees_src">
|
||||
<fileset dir="${src.dir}/thaumicbees_src">
|
||||
<include name="**/VersionInfo.java" />
|
||||
</fileset>
|
||||
<fileset dir="${src.dir}/thaumicbees_res">
|
||||
<include name="**/mcmod.info" />
|
||||
</fileset>
|
||||
<filterset>
|
||||
<filter token="MCVERSION" value="${mc.version}" />
|
||||
<filter token="VERSION" value="${thaumicbees.version}" />
|
||||
@@ -120,6 +124,7 @@
|
||||
<fileset dir="${mcp.dir}/reobf/minecraft">
|
||||
<include name="**/thaumicbees/**" />
|
||||
<include name="**/forestry/plugins/**" />
|
||||
<include name="**/net/mysteriousages/**">
|
||||
|
||||
<exclude name="forestry/api/**" />
|
||||
<exclude name="thaumcraft/**" />
|
||||
@@ -134,12 +139,6 @@
|
||||
<exclude name="build.number"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<!-- Copy localizations (We have none yet.) -->
|
||||
<!--<copy todir="${classes.dir}/client">
|
||||
<fileset dir="${lang.dir}">
|
||||
<exclude name="README.md"/>
|
||||
</fileset>
|
||||
</copy>-->
|
||||
</target>
|
||||
|
||||
<!-- Package the jars -->
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
<entry key="tile.tb.slab.wood.greatwood.name">Greatwood Slab</entry>
|
||||
<entry key="tile.tb.planks.silverwood.name">Silverwood Planks</entry>
|
||||
<entry key="tile.tb.slab.wood.silverwood.name">Silverwood Slab</entry>
|
||||
<entry key="tile.tb.magicApiary.name">Magic Apiary</entry>
|
||||
|
||||
<!-- Comb names -->
|
||||
<entry key="tb.comb.occult">Occult Comb</entry>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[
|
||||
{
|
||||
"modid": "ThaumicBees",
|
||||
"version": @MODVERSION@
|
||||
"name": "ThaumicBees",
|
||||
"url": "http://bit.ly/XFDvLY",
|
||||
"description": "Crossover mod for Forestry and Thaumcraft. Magic bees & more.",
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -1,273 +0,0 @@
|
||||
package thaumicbees.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
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.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 ArrayList<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);
|
||||
}
|
||||
|
||||
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 Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wearOutEquipment(int amount)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onQueenDeath(IBee queen)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPostQueenDeath(IBee queen)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@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()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDrone()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setQueen(ItemStack itemstack)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDrone(ItemStack itemstack)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@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()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addProduct(ItemStack product, boolean all)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,8 @@ package thaumicbees.main;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import thaumicbees.block.BlockMagicApiary;
|
||||
import thaumicbees.block.BlockPlanks;
|
||||
import thaumicbees.block.BlockWoodSlab;
|
||||
import thaumicbees.block.TileEntityMagicApiary;
|
||||
import thaumicbees.item.ItemCapsule;
|
||||
import thaumicbees.item.ItemComb;
|
||||
import thaumicbees.item.ItemDrop;
|
||||
@@ -64,7 +62,6 @@ public class Config
|
||||
public static BlockPlanks planksWood;
|
||||
public static BlockWoodSlab slabWoodHalf;
|
||||
public static BlockWoodSlab slabWoodFull;
|
||||
public static BlockMagicApiary magicApiary;
|
||||
|
||||
public static ItemComb combs;
|
||||
public static ItemWax wax;
|
||||
@@ -162,14 +159,11 @@ public class Config
|
||||
OreDictionary.registerOre("slabWood", new ItemStack(slabWoodHalf, 1, -1));
|
||||
|
||||
blockIdBase++; // Stair
|
||||
|
||||
/*magicApiary = new BlockMagicApiary(tbConfig.getBlock("magicApiary", blockIdBase++).getInt());
|
||||
GameRegistry.registerBlock(magicApiary, "tb.magicApiary");*/
|
||||
}
|
||||
|
||||
public void registerTileEntities()
|
||||
{
|
||||
TileEntity.addMapping(TileEntityMagicApiary.class, "MagicApiary");
|
||||
|
||||
}
|
||||
|
||||
public void setupItems()
|
||||
|
||||
Reference in new issue
Block a user