mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-20 20:22:21 +00:00
Started work on Thaumic Apiary
Also some bugfixes
This commit is contained in:
1 parent
300a22efab
commit
a6c439c078
10 files changed
+316
-6
No files matched your search
@@ -377,7 +377,7 @@ public class BeeMutation implements IBeeMutation
|
||||
int[] dicId = OreDictionary.getOreIDs(new ItemStack(blockBelow, 1, blockMeta));
|
||||
if (dicId.length != 0)
|
||||
{
|
||||
if (!OreDictionary.getOreName(dicId[1]).equals(this.requiredBlockOreDictEntry))
|
||||
if (!OreDictionary.getOreName(dicId[0]).equals(this.requiredBlockOreDictEntry))
|
||||
{
|
||||
chance = 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package magicbees.block;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.client.gui.UIScreens;
|
||||
import magicbees.main.MagicBees;
|
||||
import magicbees.main.utils.TabMagicBees;
|
||||
import magicbees.tileentity.TileEntityThaumicApiary;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockThaumicApiary extends BlockContainer
|
||||
{
|
||||
public BlockThaumicApiary()
|
||||
{
|
||||
super(Material.wood);
|
||||
this.setCreativeTab(TabMagicBees.tabMagicBees);
|
||||
this.setBlockName("thaumicApiary");
|
||||
this.setHardness(1f);
|
||||
this.setResistance(1.5f);
|
||||
this.setHarvestLevel("axe", 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9 )
|
||||
{
|
||||
boolean activate = false;
|
||||
|
||||
if (!player.isSneaking())
|
||||
{
|
||||
player.openGui(MagicBees.object, UIScreens.THAUMIC_APIARY.ordinal(), world, x, y, z);
|
||||
activate = true;
|
||||
}
|
||||
|
||||
return activate;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister register)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityThaumicApiary();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package magicbees.client.gui;
|
||||
|
||||
import magicbees.tileentity.TileEntityEffectJar;
|
||||
import magicbees.tileentity.TileEntityThaumicApiary;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
@@ -17,6 +18,10 @@ public class GUIHandler implements IGuiHandler
|
||||
{
|
||||
value = new ContainerEffectJar((TileEntityEffectJar)world.getTileEntity(x, y, z), player);
|
||||
}
|
||||
else if (ID == UIScreens.THAUMIC_APIARY.ordinal())
|
||||
{
|
||||
//value = new Container((TileEntityThaumicApiary)world.getTileEntity(x, y, z), player);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@ package magicbees.client.gui;
|
||||
public enum UIScreens
|
||||
{
|
||||
EFFECT_JAR,
|
||||
THAUMIC_APIARY,
|
||||
;
|
||||
}
|
||||
@@ -31,7 +31,7 @@ public class ItemThaumiumGrafter extends Item implements IRepairableExtended, IT
|
||||
this.setMaxStackSize(1);
|
||||
this.setMaxDamage(15);
|
||||
this.setCreativeTab(forestry.api.core.Tabs.tabArboriculture);
|
||||
this.setUnlocalizedName(this.iconString = CommonProxy.DOMAIN + ":thaumiumGrafter");
|
||||
this.setUnlocalizedName("thaumiumGrafter");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -27,7 +27,7 @@ public class ItemThaumiumScoop extends Item implements IRepairable, IToolScoop
|
||||
this.setMaxStackSize(1);
|
||||
this.setMaxDamage(30);
|
||||
this.setCreativeTab(forestry.api.core.Tabs.tabApiculture);
|
||||
this.setUnlocalizedName(this.iconString = CommonProxy.DOMAIN + ":thaumiumScoop");
|
||||
this.setUnlocalizedName("thaumiumScoop");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -50,6 +50,7 @@ public class Config
|
||||
{
|
||||
public boolean DrawParticleEffects;
|
||||
public boolean BeeInfusionsAdded;
|
||||
public boolean ThaumaturgeBackpackActive;
|
||||
public boolean AddThaumcraftItemsToBackpacks;
|
||||
public boolean DisableUpdateNotification;
|
||||
public boolean AreMagicPlanksFlammable;
|
||||
@@ -292,7 +293,7 @@ public class Config
|
||||
BeeManager.inducers.put(miscResources.getStackForType(ResourceType.AROMATIC_LUMP), 95);
|
||||
|
||||
{
|
||||
if (ThaumcraftHelper.isActive())
|
||||
if (ThaumcraftHelper.isActive() && ThaumaturgeBackpackActive)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -301,8 +302,10 @@ public class Config
|
||||
BackpackDefinition def = new BackpackDefinition("thaumaturge", backpackName, 0x8700C6);
|
||||
thaumaturgeBackpackT1 = BackpackManager.backpackInterface.addBackpack(def, EnumBackpackType.T1);
|
||||
thaumaturgeBackpackT1.setUnlocalizedName("backpack.thaumaturgeT1");
|
||||
GameRegistry.registerItem(thaumaturgeBackpackT1, "backpack.thaumaturgeT1");
|
||||
thaumaturgeBackpackT2 = BackpackManager.backpackInterface.addBackpack(def, EnumBackpackType.T2);
|
||||
thaumaturgeBackpackT2.setUnlocalizedName("backpack.thaumaturgeT2");
|
||||
GameRegistry.registerItem(thaumaturgeBackpackT2, "backpack.thaumaturgeT2");
|
||||
// Add additional items from configs to backpack.
|
||||
if (MagicBees.getConfig().ThaumaturgeExtraItems.length() > 0)
|
||||
{
|
||||
@@ -428,7 +431,11 @@ public class Config
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
p = configuration.get("general", "backpack.thaumaturge.active", true);
|
||||
p.comment = "Set to false to disable the Thaumaturge backpack";
|
||||
this.ThaumaturgeBackpackActive = p.getBoolean(true);
|
||||
|
||||
p = configuration.get("general", "backpack.thaumaturge.additionalItems", "");
|
||||
p.comment = "Add additional items to the Thaumaturge's Backpack." +
|
||||
"\n Format is the same as Forestry's: id:meta;id;id:meta (etc)";
|
||||
|
||||
@@ -120,6 +120,7 @@ public class ThaumcraftHelper
|
||||
SILVERWOOD,
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
public static final String Name = "Thaumcraft";
|
||||
private static boolean isThaumcraftPresent = false;
|
||||
|
||||
@@ -0,0 +1,242 @@
|
||||
package magicbees.tileentity;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
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;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.apiculture.gadgets.TileBeehouse;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityThaumicApiary extends TileEntity implements IInventory, IBeeHousing {
|
||||
|
||||
private GameProfile ownerName;
|
||||
|
||||
public void setOwner(EntityPlayer player) { this.ownerName = player.getGameProfile(); }
|
||||
|
||||
@Override
|
||||
public ItemStack getQueen() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDrone() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setQueen(ItemStack itemstack) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDrone(ItemStack itemstack) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBreed() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onQueenChange(ItemStack queen) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wearOutEquipment(int amount) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onQueenDeath(IBee queen) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPostQueenDeath(IBee queen) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPollenRetrieved(IBee queen, IIndividual pollen, boolean isHandled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onEggLaid(IBee queen) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getTerritoryModifier(IBeeGenome genome, float currentModifier) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getProductionModifier(IBeeGenome genome, float currentModifier) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getFloweringModifier(IBeeGenome genome, float currentModifier) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getGeneticDecay(IBeeGenome genome, float currentModifier) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@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 GameProfile getOwnerName() {
|
||||
return this.ownerName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public World getWorld() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getXCoord() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getYCoord() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getZCoord() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBiomeId() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumTemperature getTemperature() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumHumidity getHumidity() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setErrorState(int state) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getErrorOrdinal() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addProduct(ItemStack product, boolean all) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int p_70301_1_) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int p_70304_1_) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer p_70300_1_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user