Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9729d75252 | ||
|
|
fc2f40d100 | ||
|
|
ce0424b468 | ||
|
|
940846d069 | ||
|
|
b2d18fbb64 | ||
|
|
96389b5329 | ||
|
|
61afb3a0bc |
No files matched your search
@@ -15,9 +15,9 @@
|
||||
|
||||
<property name="clientsrc.dir" value="${mcp.dir}/src/minecraft" />
|
||||
|
||||
<property name="mc.version" value="1.4.7"/>
|
||||
<property name="forge.version" value="6.6.0.507"/>
|
||||
<property name="thaumicbees.version" value="1.4.4"/>
|
||||
<property name="mc.version" value="1.5.1"/>
|
||||
<property name="forge.version" value="7.7.1.651"/>
|
||||
<property name="thaumicbees.version" value="1.4.5a"/>
|
||||
|
||||
<!-- for local deployment only, not used by main -->
|
||||
<property name="deploy.type" value="previews" />
|
||||
@@ -71,7 +71,7 @@
|
||||
<include name="forestry/api/**" />
|
||||
</fileset>
|
||||
<fileset dir="${thaumcraft.dir}/">
|
||||
<include name="thaumcraft/**" />
|
||||
<include name="thaumcraft/api/**" />
|
||||
</fileset>
|
||||
<fileset dir="${src.dir}/thaumicbees_src">
|
||||
<include name="**/net/mysteriousages/**" />
|
||||
@@ -108,11 +108,11 @@
|
||||
|
||||
<!-- Reobf -->
|
||||
<exec dir="${mcp.dir}" executable="cmd" osfamily="windows">
|
||||
<arg line="/c reobfuscate.bat"/>
|
||||
<arg line="/c reobfuscate_srg.bat"/>
|
||||
</exec>
|
||||
|
||||
<exec dir="${mcp.dir}" executable="sh" osfamily="unix">
|
||||
<arg value="reobfuscate.sh" />
|
||||
<arg value="reobfuscate.sh_srg" />
|
||||
</exec>
|
||||
|
||||
<!-- Copy classes -->
|
||||
|
||||
@@ -1,3 +1,19 @@
|
||||
1.4.5a
|
||||
Repaired Thaumcraft 3 integration for 3.0.4a.
|
||||
Fixed Biofuel capsules being shown as "Empty x Capsule"
|
||||
Fixed missing texture for oil & fuel capsules
|
||||
|
||||
1.4.5
|
||||
Added the Jade Moon Dial - tells you what moon phase it currently is for breeding purposes.
|
||||
Added a creative menu tab for certain Thaumic Bees items - misc resources, capsules, tools.
|
||||
|
||||
1.4.4b
|
||||
Ported to 1.5! Wooo!
|
||||
|
||||
1.4.4a
|
||||
Fixed an isuse that caused GregTech to crash.
|
||||
|
||||
1.4.4
|
||||
Made greatwood & silverwood planks fireproof by default - added a config option to toggle it.
|
||||
Added Nuggets - Iron, Copper, Tin, Silver, Lead. Should craft into 1st ore dictionary ingot of appropriate type.
|
||||
Added Shards - Diamond, Emerald.
|
||||
|
||||
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 53 KiB |
@@ -2,9 +2,10 @@
|
||||
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
|
||||
<properties version="1.0">
|
||||
<!-- Item names -->
|
||||
<entry key="item.jellyBabies.name">Handful of Jelly Babies</entry>
|
||||
<entry key="item.tb.thaumiumScoop.name">Thaumium Scoop</entry>
|
||||
<entry key="item.tb.thaumiumGrafter.name">Thaumium Grafter</entry>
|
||||
<entry key="item.thaumicbees:jellyBabies.name">Handful of Jelly Babies</entry>
|
||||
<entry key="item.thaumicbees:thaumiumScoop.name">Thaumium Scoop</entry>
|
||||
<entry key="item.thaumicbees:thaumiumGrafter.name">Thaumium Grafter</entry>
|
||||
<entry key="item.moonDial.name">Jade Moon Dial</entry>
|
||||
|
||||
<!-- Block names -->
|
||||
<entry key="tile.tb.planks.greatwood.name">Greatwood Planks</entry>
|
||||
@@ -59,16 +60,18 @@
|
||||
<entry key="tb.resource.fragment">Lore Fragment</entry>
|
||||
<entry key="tb.resource.lump">Aromatic Lump</entry>
|
||||
<entry key="tb.resource.fertilizer">Concentrated Compound</entry>
|
||||
<entry key="tb.resource.crystalFlux">Crystalized %s Aspect</entry>
|
||||
<entry key="tb.resource.startNode">Bees and Magic</entry>
|
||||
<entry key="tb.resource.beeEnchant">Stark Infusion</entry>
|
||||
<entry key="tb.resource.crystalAspect">Crystalized %s Aspect</entry>
|
||||
|
||||
<!-- Frames -->
|
||||
<entry key="tb.frame.magic">Magic Frame</entry>
|
||||
<entry key="tb.frame.resillient">Resilient Frame</entry>
|
||||
<entry key="tb.frame.gentle">Gentle Frame</entry>
|
||||
<entry key="tb.frame.metabolic">Metabolic Frame</entry>
|
||||
<entry key="tb.frame.necrotic">Necrotic Frame</entry>
|
||||
<entry key="tb.frame.temporal">Temporal Frame</entry>
|
||||
<entry key="tb.frame.oblivion">Oblivion Frame</entry>
|
||||
<entry key="item.frameMagic.name">Magic Frame</entry>
|
||||
<entry key="item.frameResilient.name">Resilient Frame</entry>
|
||||
<entry key="item.frameGentle.name">Gentle Frame</entry>
|
||||
<entry key="item.frameMetabolic.name">Metabolic Frame</entry>
|
||||
<entry key="item.frameNecrotic.name">Necrotic Frame</entry>
|
||||
<entry key="item.frameTemporal.name">Temporal Frame</entry>
|
||||
<entry key="item.frameOblivion.name">Oblivion Frame</entry>
|
||||
|
||||
<!-- Capsule names -->
|
||||
<entry key="tb.capsule.magic">Magic Capsule</entry>
|
||||
@@ -79,7 +82,7 @@
|
||||
<entry key="tb.liquid.water">Water</entry>
|
||||
<entry key="tb.liquid.lava">Lava</entry>
|
||||
<entry key="tb.liquid.biomass">Biomass</entry>
|
||||
<entry key="tb.liquid.biofuel">Empty</entry>
|
||||
<entry key="tb.liquid.biofuel">Biofuel</entry>
|
||||
<entry key="tb.liquid.Oil">Oil</entry>
|
||||
<entry key="tb.liquid.Fuel">Fuel</entry>
|
||||
<entry key="tb.liquid.seedoil">Seed Oil</entry>
|
||||
@@ -97,7 +100,7 @@
|
||||
<!-- Moon Phases -->
|
||||
<entry key="tb.moon.full">Full Moon</entry>
|
||||
<entry key="tb.moon.gibbousWaning">Waning Gibbous</entry>
|
||||
<entry key="tb.moon.gibousWaxing">Waxing Gibbous</entry>
|
||||
<entry key="tb.moon.gibbousWaxing">Waxing Gibbous</entry>
|
||||
<entry key="tb.moon.halfWaning">Waning Half</entry>
|
||||
<entry key="tb.moon.halfWaxing">Waxing Half</entry>
|
||||
<entry key="tb.moon.crescentWaning">Waning Crescent</entry>
|
||||
@@ -106,6 +109,7 @@
|
||||
|
||||
<!-- Miscellaneous names -->
|
||||
<entry key="tb.backpack.thaumaturge">Thaumaturge's Backpack</entry>
|
||||
<entry key="itemGroup.thaumicBees">Thaumic Bees</entry>
|
||||
|
||||
<!-- Species names -->
|
||||
<entry key="thaumicbees.speciesEsoteric">Esoteric</entry>
|
||||
@@ -177,17 +181,17 @@
|
||||
<entry key="thaumicbees.speciesIron">Iron</entry>
|
||||
<entry key="thaumicbees.speciesIron.description">Having absorbed some of the base metal, these bees can concentrate the essence of iron from the region.|Apinomicon</entry>
|
||||
<entry key="thaumicbees.speciesGold">Gold</entry>
|
||||
<entry key="thaumicbees.speciesGold.description"></entry>
|
||||
<entry key="thaumicbees.speciesGold.description">Not all that glitters is gold.|Ancient Aphorism</entry>
|
||||
<entry key="thaumicbees.speciesCopper">Copper</entry>
|
||||
<entry key="thaumicbees.speciesCopper.description"></entry>
|
||||
<entry key="thaumicbees.speciesCopper.description">A base metal common in many applications; these bees are helpful for resource-starved magicians.|Apinomicon</entry>
|
||||
<entry key="thaumicbees.speciesTin">Tin</entry>
|
||||
<entry key="thaumicbees.speciesTin.description"></entry>
|
||||
<entry key="thaumicbees.speciesTin.description">While metalic, these bees are suprisingly fragile.|Apinomicon</entry>
|
||||
<entry key="thaumicbees.speciesSilver">Silver</entry>
|
||||
<entry key="thaumicbees.speciesSilver.description"></entry>
|
||||
<entry key="thaumicbees.speciesSilver.description">While they do not recieve as much attention as Golden bees, they are nonetheless valuable.|Apinomicon</entry>
|
||||
<entry key="thaumicbees.speciesLead">Lead</entry>
|
||||
<entry key="thaumicbees.speciesLead.description"></entry>
|
||||
<entry key="thaumicbees.speciesLead.description">A favourite of amateur alchemists, they believe they can transform these bees into gold.|Apinomicon</entry>
|
||||
<entry key="thaumicbees.speciesDiamond">Diamond</entry>
|
||||
<entry key="thaumicbees.speciesDiamond.description"></entry>
|
||||
<entry key="thaumicbees.speciesDiamond.description">Crystalline, glittering, and harder than dragon's teeth. These bees are none of those.|Apinomicon</entry>
|
||||
<entry key="thaumicbees.speciesEmerald">Emerald</entry>
|
||||
<entry key="thaumicbees.speciesEmerald.description">It is said they have been to a land ruled by a Great Wizard, and have taken the aspect of his city.|Apinomicon</entry>
|
||||
<entry key="thaumicbees.speciesChicken">Poultry</entry>
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
"version": "@MODVERSION@",
|
||||
"name": "ThaumicBees",
|
||||
"url": "http://bit.ly/XFDvLY",
|
||||
"description": "Crossover mod for Forestry and Thaumcraft. Magic bees & more.",
|
||||
"description": "Magic bees & more. Supports Thaumcraft, Equivalent Exchange 3",
|
||||
"authors": [ "MysteriousAges" ],
|
||||
"credits": "SirSengir, Azanor, Binnie & the Forestry Dev peeps",
|
||||
"logoFile": "/gfx/thaumicbees/logo.png"
|
||||
"logoFile": "/mods/thaumicbees/textures/logo.png"
|
||||
}
|
||||
]
|
||||
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
@@ -194,6 +194,18 @@ public class GenericInventory implements IInventory
|
||||
|
||||
@Override
|
||||
public void closeChest() { }
|
||||
|
||||
@Override
|
||||
public boolean isInvNameLocalized() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -39,10 +39,11 @@ public class Allele implements IAllele
|
||||
Allele.flowerBookshelf = new AlleleFlower("flowerBookshelf", new FlowerProviderBookshelf(), true);
|
||||
if (ThaumcraftHelper.isActive())
|
||||
{
|
||||
FlowerProviderAuraNode provider = new FlowerProviderAuraNode();
|
||||
Allele.flowerThaumcraft = new AlleleFlower("flowerThaumcraftPlant", new FlowerProviderThaumcraftFlower(), false);
|
||||
Allele.flowerAuraNode = new AlleleFlower("flowerAuraNode", new FlowerProviderAuraNode(), true);
|
||||
Allele.flowerNodePurify = new AlleleFlower("flowerAuraNodePurify", new FlowerProviderAuraNode(), false);
|
||||
Allele.flowerNodeFluxify = new AlleleFlower("flowerAuraNodeFlux", new FlowerProviderAuraNode(), false);
|
||||
Allele.flowerAuraNode = new AlleleFlower("flowerAuraNode", provider, true);
|
||||
Allele.flowerNodePurify = new AlleleFlower("flowerAuraNodePurify", provider, false);
|
||||
Allele.flowerNodeFluxify = new AlleleFlower("flowerAuraNodeFlux", provider, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -45,14 +45,14 @@ public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
||||
public IEffectData doFX(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||
{
|
||||
int[] area = genome.getTerritory();
|
||||
float mod = housing.getTerritoryModifier(genome);
|
||||
float mod = housing.getTerritoryModifier(genome, 1f);
|
||||
// Check to make sure territory is at least 1 with housing modifications
|
||||
area[0] = Math.max((int)(area[0] * mod), 1);
|
||||
area[1] = Math.max((int)(area[1] * mod), 1);
|
||||
area[2] = Math.max((int)(area[2] * mod), 1);
|
||||
|
||||
ThaumicBees.proxy.drawBeeEffects(housing.getWorld(), housing.getXCoord(), housing.getYCoord(), housing.getZCoord(),
|
||||
genome.getPrimaryAsBee().getPrimaryColor(), area[0], area[1], area[2]);
|
||||
genome.getPrimaryAsBee().getIconColour(0), area[0], area[1], area[2]);
|
||||
return storedData;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
||||
min[2] = housing.getZCoord() - area[2] / 2;
|
||||
max[2] = housing.getZCoord() + area[2] / 2;
|
||||
|
||||
AxisAlignedBB bounds = AxisAlignedBB.getAABBPool().addOrModifyAABBInPool(min[0], min[1], min[2], max[0], max[1], max[2]);
|
||||
AxisAlignedBB bounds = AxisAlignedBB.getAABBPool().getAABB(min[0], min[1], min[2], max[0], max[1], max[2]);
|
||||
return housing.getWorld().getEntitiesWithinAABB(EntityPlayer.class, bounds);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,9 @@ package thaumicbees.bees;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import thaumcraft.api.AuraNode;
|
||||
import thaumcraft.api.EnumNodeType;
|
||||
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;
|
||||
|
||||
@@ -2,10 +2,10 @@ package thaumicbees.bees;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.AuraNode;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aura.AuraNode;
|
||||
import thaumicbees.main.Config;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
|
||||
@@ -218,9 +218,9 @@ public class AlleleEffectSpawnMob extends AlleleEffect
|
||||
protected double[] randomMobSpawnCoords(World world, IBeeGenome bee, IBeeHousing housing)
|
||||
{
|
||||
double pos[] = new double[3];
|
||||
pos[0] = housing.getXCoord() + (world.rand.nextDouble() * (bee.getTerritory()[0] * housing.getTerritoryModifier(bee)) - bee.getTerritory()[0] / 2);
|
||||
pos[0] = housing.getXCoord() + (world.rand.nextDouble() * (bee.getTerritory()[0] * housing.getTerritoryModifier(bee, 1f)) - bee.getTerritory()[0] / 2);
|
||||
pos[1] = housing.getYCoord() + world.rand.nextInt(3) - 1;
|
||||
pos[2] = housing.getZCoord() + (world.rand.nextDouble() * (bee.getTerritory()[2] * housing.getTerritoryModifier(bee)) - bee.getTerritory()[2] / 2);
|
||||
pos[2] = housing.getZCoord() + (world.rand.nextDouble() * (bee.getTerritory()[2] * housing.getTerritoryModifier(bee, 1f)) - bee.getTerritory()[2] / 2);
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
@@ -7,9 +7,9 @@ import java.util.ArrayList;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
|
||||
import thaumcraft.api.AuraNode;
|
||||
import thaumcraft.api.EnumNodeType;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aura.AuraNode;
|
||||
import thaumcraft.api.aura.EnumNodeType;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import thaumicbees.main.utils.MoonPhase;
|
||||
import thaumicbees.main.utils.compat.EquivalentExchangeHelper;
|
||||
@@ -39,6 +39,7 @@ public class BeeMutation implements IBeeMutation
|
||||
private static BeeMutation Flux;
|
||||
private static BeeMutation Node;
|
||||
private static BeeMutation Node1;
|
||||
private static BeeMutation Rejuvination;
|
||||
private static BeeMutation Skulking;
|
||||
private static BeeMutation Brainy;
|
||||
private static BeeMutation Gossamer;
|
||||
@@ -174,6 +175,10 @@ public class BeeMutation implements IBeeMutation
|
||||
.setAuraNodeRequired(4).setMoonPhaseRestricted(MoonPhase.WANING_HALF, MoonPhase.WANING_HALF);
|
||||
BeeMutation.Node1 = new BeeMutation(BeeSpecies.PURE, BeeSpecies.FLUX, BeeSpecies.NODE, 2)
|
||||
.setAuraNodeRequired(4).setMoonPhaseRestricted(MoonPhase.WAXING_HALF, MoonPhase.WAXING_HALF);
|
||||
|
||||
BeeMutation.Rejuvination = new BeeMutation(BeeSpecies.VIS, BeeSpecies.AWARE, BeeSpecies.REJUVENATING, 1)
|
||||
.setAuraNodeRequired(15).setMoonPhaseRestricted(MoonPhase.WAXING_HALF, MoonPhase.WANING_HALF)
|
||||
.setMoonPhaseBonus(MoonPhase.FULL, MoonPhase.FULL, 6);
|
||||
|
||||
if (ExtraBeesHelper.isActive())
|
||||
{
|
||||
@@ -244,9 +249,9 @@ public class BeeMutation implements IBeeMutation
|
||||
BeeManager.breedingManager.registerBeeMutation(this);
|
||||
}
|
||||
|
||||
public int getChance(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1)
|
||||
public float getChance(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1)
|
||||
{
|
||||
int finalChance = 0;
|
||||
float finalChance = 0f;
|
||||
float chance = this.baseChance * 1f;
|
||||
|
||||
if (this.arePartners(allele0, allele1))
|
||||
@@ -293,10 +298,10 @@ public class BeeMutation implements IBeeMutation
|
||||
|
||||
finalChance = Math.round(chance
|
||||
* housing.getMutationModifier((IBeeGenome) genome0,
|
||||
(IBeeGenome) genome1)
|
||||
(IBeeGenome) genome1, chance)
|
||||
* BeeManager.breedingManager.getBeekeepingMode(housing.getWorld())
|
||||
.getMutationModifier((IBeeGenome) genome0,
|
||||
(IBeeGenome) genome1));
|
||||
(IBeeGenome) genome1, chance));
|
||||
}
|
||||
|
||||
return finalChance;
|
||||
@@ -317,7 +322,7 @@ public class BeeMutation implements IBeeMutation
|
||||
return mutationTemplate;
|
||||
}
|
||||
|
||||
public int getBaseChance()
|
||||
public float getBaseChance()
|
||||
{
|
||||
return baseChance;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
package thaumicbees.bees;
|
||||
|
||||
import forestry.api.apiculture.*;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.core.ItemInterface;
|
||||
import forestry.api.genetics.*;
|
||||
import forestry.api.genetics.IClassification.EnumClassLevel;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import thaumicbees.item.types.CombType;
|
||||
import thaumicbees.item.types.DropType;
|
||||
import thaumicbees.item.types.NuggetType;
|
||||
@@ -21,15 +19,21 @@ import thaumicbees.main.utils.LocalizationManager;
|
||||
import thaumicbees.main.utils.compat.EquivalentExchangeHelper;
|
||||
import thaumicbees.main.utils.compat.ForestryHelper;
|
||||
import thaumicbees.main.utils.compat.ThaumcraftHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.apiculture.BeeManager;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import forestry.api.apiculture.IAlleleBeeSpecies;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.core.IIconProvider;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IClassification;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public enum BeeSpecies implements IAlleleBeeSpecies
|
||||
public enum BeeSpecies implements IAlleleBeeSpecies, IIconProvider
|
||||
{
|
||||
ESOTERIC("Esoteric", "secretiore",
|
||||
BeeClassification.ARCANE, 0x001099, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||
@@ -357,6 +361,9 @@ public enum BeeSpecies implements IAlleleBeeSpecies
|
||||
private String uid;
|
||||
private boolean dominant;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private Icon[][] icons;
|
||||
|
||||
private final static boolean defaultSecretSetting = true;
|
||||
|
||||
private BeeSpecies(String speciesName, String genusName, IClassification classification, int firstColour, EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesDominant)
|
||||
@@ -419,87 +426,84 @@ public enum BeeSpecies implements IAlleleBeeSpecies
|
||||
return BeeManager.beeInterface.getBeeStack(BeeManager.beeInterface.getBee(null, BeeManager.beeInterface.templateAsGenome(genomeTemplate)), beeType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return LocalizationManager.getLocalizedString(getUID());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription()
|
||||
{
|
||||
return LocalizationManager.getLocalizedString(getUID() + ".description");
|
||||
}
|
||||
|
||||
public int getBodyType()
|
||||
{
|
||||
return bodyType;
|
||||
}
|
||||
|
||||
public int getPrimaryColor()
|
||||
{
|
||||
return primaryColour;
|
||||
}
|
||||
|
||||
public int getSecondaryColor()
|
||||
{
|
||||
return secondaryColour;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumTemperature getTemperature()
|
||||
{
|
||||
return temperature;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumHumidity getHumidity()
|
||||
{
|
||||
return humidity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasEffect()
|
||||
{
|
||||
return hasEffect;
|
||||
}
|
||||
|
||||
|
||||
public BeeSpecies setInactive()
|
||||
{
|
||||
this.isActive = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public boolean isActive()
|
||||
{
|
||||
return this.isActive;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSecret()
|
||||
{
|
||||
return isSecret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCounted()
|
||||
{
|
||||
return isCounted;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBinomial()
|
||||
{
|
||||
return binomial;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAuthority()
|
||||
{
|
||||
return authority;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IClassification getBranch()
|
||||
{
|
||||
return this.branch;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap getProducts()
|
||||
{
|
||||
return products;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap getSpecialty()
|
||||
{
|
||||
return specialty;
|
||||
@@ -518,11 +522,11 @@ public enum BeeSpecies implements IAlleleBeeSpecies
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isJubilant(World world, int biomeid, int x, int y, int z)
|
||||
public boolean isJubilant(IBeeGenome genome, IBeeHousing housing)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private BeeSpecies register()
|
||||
{
|
||||
BeeManager.breedingManager.registerBeeTemplate(this.getGenome());
|
||||
@@ -533,12 +537,59 @@ public enum BeeSpecies implements IAlleleBeeSpecies
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Method getAchievement is deprecated
|
||||
*/
|
||||
@Override
|
||||
public int getIconColour(int renderPass)
|
||||
{
|
||||
int value = 0xffffff;
|
||||
if (renderPass == 0) {
|
||||
value = this.primaryColour;
|
||||
}
|
||||
else if (renderPass == 1) {
|
||||
value = this.secondaryColour;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
public Achievement getAchievement()
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIconProvider getIconProvider()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon(EnumBeeType type, int renderPass)
|
||||
{
|
||||
return icons[type.ordinal()][Math.min(renderPass, 2)];
|
||||
}
|
||||
|
||||
public void registerItemIcons(IconRegister itemMap)
|
||||
{
|
||||
this.icons = new Icon[EnumBeeType.values().length][3];
|
||||
Icon outline = itemMap.registerIcon(ForestryHelper.Name.toLowerCase() + ":bees/outline");
|
||||
Icon body1 = itemMap.registerIcon(ForestryHelper.Name.toLowerCase() + ":bees/outline");
|
||||
|
||||
for (int i = 0; i < EnumBeeType.values().length; i++) {
|
||||
if(EnumBeeType.values()[i] == EnumBeeType.NONE)
|
||||
continue;
|
||||
|
||||
icons[i][0] = outline;
|
||||
icons[i][1] = body1;
|
||||
icons[i][2] = itemMap.registerIcon(ForestryHelper.Name.toLowerCase() + ":bees/" + EnumBeeType.values()[i].toString().toLowerCase(Locale.ENGLISH) + ".body2");
|
||||
}
|
||||
}
|
||||
|
||||
/// --------- Unused Functions ---------------------------------------------
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon(short texUID)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerTerrainIcons(IconRegister terrainMap) { }
|
||||
}
|
||||
@@ -1,13 +1,12 @@
|
||||
package thaumicbees.bees;
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import thaumcraft.api.AuraNode;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumicbees.main.Config;
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aura.AuraNode;
|
||||
import thaumicbees.main.Config;
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IFlowerProvider;
|
||||
import forestry.api.genetics.IPollinatable;
|
||||
@@ -25,7 +24,7 @@ public class FlowerProviderAuraNode implements IFlowerProvider
|
||||
@Override
|
||||
public boolean isAcceptedPollinatable(World world, IPollinatable pollinatable)
|
||||
{
|
||||
return true;
|
||||
return pollinatable.getPlantType().size() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -36,7 +35,7 @@ public class FlowerProviderAuraNode implements IFlowerProvider
|
||||
if (world.isAirBlock(x, y, z) && (blockDown == Block.dirt.blockID || blockDown == Block.grass.blockID))
|
||||
{
|
||||
int rand = world.rand.nextInt(10);
|
||||
world.setBlockAndMetadataWithNotify(x, y, z, Config.tcPlant.blockID, (rand >= 5) ? 2 : 3);
|
||||
world.setBlockMetadataWithNotify(x, y, z, Config.tcPlant.blockID, (rand >= 5) ? 2 : 3);
|
||||
System.out.println(x + ", " + y + ", " + ", " + z + " set to flower.");
|
||||
flag = true;
|
||||
}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
package thaumicbees.bees;
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IFlowerProvider;
|
||||
import forestry.api.genetics.IPollinatable;
|
||||
|
||||
public class FlowerProviderAuraNodeFlux extends FlowerProviderAuraNode
|
||||
{
|
||||
@Override
|
||||
public ItemStack[] affectProducts(World world, IBeeGenome genome, int x, int y, int z, ItemStack[] products)
|
||||
{
|
||||
if (world.rand.nextInt(20) < 1)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
return products;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription()
|
||||
{
|
||||
return LocalizationManager.getLocalizedString("tb.bees.flower.nodeFlux");
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
package thaumicbees.bees;
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.AuraNode;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumicbees.main.Config;
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
|
||||
public class FlowerProviderAuraNodePurify extends FlowerProviderAuraNode
|
||||
{
|
||||
@Override
|
||||
public boolean growFlower(World world, IBeeGenome genome, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription()
|
||||
{
|
||||
return LocalizationManager.getLocalizedString("tb.bees.flower.nodePure");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] affectProducts(World world, IBeeGenome genome, int x, int y, int z, ItemStack[] products)
|
||||
{
|
||||
if (world.rand.nextInt(25) < 1)
|
||||
{
|
||||
AuraNode node = this.getNodeWithinRange(world, x, y, z);
|
||||
if (node != null && (1.0 * node.level) / node.baseLevel > 0.75)
|
||||
{
|
||||
int aspectCount = node.flux.tags.size();
|
||||
if (aspectCount > 0)
|
||||
{
|
||||
EnumTag selectedTag = node.flux.getAspectsSorted()[world.rand.nextInt(node.flux.tags.size())];
|
||||
if (selectedTag != null)
|
||||
{
|
||||
node.flux.remove(selectedTag, 1);
|
||||
ThaumcraftApi.queueNodeChanges(node.key, node.baseLevel / -16, 0, false, new ObjectTags().add(selectedTag, -1), 0, 0, 0);
|
||||
products = addItemToProducts(products, new ItemStack(Config.solidFlux, 1, selectedTag.id));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return products;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,13 @@
|
||||
package thaumicbees.bees;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IFlowerProvider;
|
||||
import forestry.api.genetics.IPollinatable;
|
||||
@@ -39,11 +42,11 @@ public class FlowerProviderBookshelf implements IFlowerProvider
|
||||
return new ItemStack[] { new ItemStack(Block.bookShelf) };
|
||||
}
|
||||
|
||||
//@Override
|
||||
@Override
|
||||
public boolean isAcceptedPollinatable(World world, IPollinatable pollinatable)
|
||||
{
|
||||
// No idea what this is supposed to do.
|
||||
return false;
|
||||
EnumSet<EnumPlantType> types = pollinatable.getPlantType();
|
||||
return types.size() > 0 && !types.contains(EnumPlantType.Nether) && !types.contains(EnumPlantType.Water) ;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package thaumicbees.bees;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import thaumicbees.main.Config;
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
@@ -7,6 +9,7 @@ import thaumicbees.main.utils.compat.ThaumcraftHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IFlowerProvider;
|
||||
import forestry.api.genetics.IPollinatable;
|
||||
@@ -39,12 +42,12 @@ public class FlowerProviderThaumcraftFlower implements IFlowerProvider
|
||||
{
|
||||
if (blockDown == Block.dirt.blockID || blockDown == Block.grass.blockID)
|
||||
{
|
||||
world.setBlockAndMetadataWithNotify(x, y, z, Config.tcPlant.blockID, ThaumcraftHelper.BlockPlant.SHIMMERLEAF.ordinal());
|
||||
world.setBlockMetadataWithNotify(x, y, z, Config.tcPlant.blockID, ThaumcraftHelper.BlockPlant.SHIMMERLEAF.ordinal());
|
||||
flag = true;
|
||||
}
|
||||
else if (blockDown == Block.sand.blockID)
|
||||
{
|
||||
world.setBlockAndMetadataWithNotify(x, y, z, Config.tcPlant.blockID, ThaumcraftHelper.BlockPlant.CINDERPEARL.ordinal());
|
||||
world.setBlockMetadataWithNotify(x, y, z, Config.tcPlant.blockID, ThaumcraftHelper.BlockPlant.CINDERPEARL.ordinal());
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
@@ -69,10 +72,10 @@ public class FlowerProviderThaumcraftFlower implements IFlowerProvider
|
||||
return this.flowers;
|
||||
}
|
||||
|
||||
//@Override
|
||||
@Override
|
||||
public boolean isAcceptedPollinatable(World world, IPollinatable pollinatable)
|
||||
{
|
||||
return false;
|
||||
return pollinatable.getPlantType().size() > 1;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,12 @@
|
||||
package thaumicbees.block;
|
||||
|
||||
import thaumicbees.gui.UIScreens;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import thaumicbees.main.utils.TabThaumicBees;
|
||||
import thaumicbees.tileentity.TileEntityEffectJar;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
@@ -16,6 +21,21 @@ public class BlockEffectJar extends BlockContainer
|
||||
public BlockEffectJar(int id)
|
||||
{
|
||||
super(id, Material.glass);
|
||||
this.setCreativeTab(TabThaumicBees.tabThaumicBees);
|
||||
}
|
||||
|
||||
@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(ThaumicBees.object, UIScreens.EFFECT_JAR.ordinal(), world, x, y, z);
|
||||
activate = true;
|
||||
}
|
||||
|
||||
return activate;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,44 +2,35 @@ package thaumicbees.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumicbees.item.types.PlankType;
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockWood;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import thaumicbees.item.types.PlankType;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import thaumicbees.main.utils.VersionInfo;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockPlanks extends Block
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
private Icon[] icons;
|
||||
|
||||
public BlockPlanks(int id)
|
||||
{
|
||||
super(id, Material.wood);
|
||||
this.setHardness(2.5f);
|
||||
this.setResistance(6.0f);
|
||||
this.setBlockName("tb.planks");
|
||||
this.setCreativeTab(CreativeTabs.tabBlock);
|
||||
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||
if (ThaumicBees.getConfig().AreMagicPlanksFlammable)
|
||||
{
|
||||
Block.setBurnProperties(id, 5, 20);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBlockTextureFromSideAndMetadata(int side, int meta)
|
||||
{
|
||||
int tx = 256;
|
||||
if (PlankType.getType(meta) != null)
|
||||
{
|
||||
tx = PlankType.getType(meta).textureIdx;
|
||||
}
|
||||
return tx;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int meta)
|
||||
{
|
||||
@@ -55,4 +46,21 @@ public class BlockPlanks extends Block
|
||||
itemsList.add(new ItemStack(this, 1, type.ordinal()));
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public Icon getIcon(int side, int meta)
|
||||
{
|
||||
return this.icons[Math.max(0, Math.min(meta & 7, icons.length-1))];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.icons = new Icon[PlankType.values().length];
|
||||
for (PlankType t : PlankType.values())
|
||||
{
|
||||
this.icons[t.ordinal()] = par1IconRegister.registerIcon(VersionInfo.ModName + ":" + t.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,29 +3,32 @@ package thaumicbees.block;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import thaumicbees.item.types.PlankType;
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import thaumicbees.main.Config;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockHalfSlab;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import thaumicbees.item.types.PlankType;
|
||||
import thaumicbees.main.Config;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import thaumicbees.main.utils.VersionInfo;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockWoodSlab extends BlockHalfSlab
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
private Icon[] icons;
|
||||
|
||||
public BlockWoodSlab(int id, boolean doubleSlab)
|
||||
{
|
||||
super(id, doubleSlab, Material.wood);
|
||||
this.setHardness(2.5f);
|
||||
this.setResistance(6.0f);
|
||||
this.setBlockName("tb.slab.wood");
|
||||
this.setUnlocalizedName("tb.slab.wood");
|
||||
this.setCreativeTab(CreativeTabs.tabBlock);
|
||||
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||
this.setLightOpacity(doubleSlab ? 255 : 0);
|
||||
if (ThaumicBees.getConfig().AreMagicPlanksFlammable)
|
||||
{
|
||||
@@ -33,17 +36,6 @@ public class BlockWoodSlab extends BlockHalfSlab
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBlockTextureFromSideAndMetadata(int side, int meta)
|
||||
{
|
||||
int tx = 256;
|
||||
if (PlankType.getType(meta & 7) != null)
|
||||
{
|
||||
tx = PlankType.getType(meta & 7).textureIdx;
|
||||
}
|
||||
return tx;
|
||||
}
|
||||
|
||||
public int idDropped(int id, Random rand, int par3)
|
||||
{
|
||||
return Config.slabWoodHalf.blockID;
|
||||
@@ -57,7 +49,7 @@ public class BlockWoodSlab extends BlockHalfSlab
|
||||
@Override
|
||||
public String getFullSlabName(int meta)
|
||||
{
|
||||
return this.getBlockName() + "." + PlankType.getType(meta).name;
|
||||
return this.getUnlocalizedName() + "." + PlankType.getType(meta).name;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -69,4 +61,21 @@ public class BlockWoodSlab extends BlockHalfSlab
|
||||
itemsList.add(new ItemStack(this, 1, type.ordinal()));
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public Icon getIcon(int side, int meta)
|
||||
{
|
||||
return this.icons[Math.max(0, Math.min(meta & 7, icons.length-1))];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.icons = new Icon[PlankType.values().length];
|
||||
for (PlankType t : PlankType.values())
|
||||
{
|
||||
this.icons[t.ordinal()] = par1IconRegister.registerIcon(VersionInfo.ModName + ":" + t.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package thaumicbees.block;
|
||||
|
||||
import thaumicbees.main.utils.EffectJarHousing;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityEffectJar extends TileEntity
|
||||
{
|
||||
private String ownerName;
|
||||
private EffectJarHousing housingLogic;
|
||||
|
||||
public TileEntityEffectJar()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public void setOwner(EntityPlayer player)
|
||||
{
|
||||
this.ownerName = player.username;
|
||||
}
|
||||
|
||||
public String getOwner()
|
||||
{
|
||||
return this.ownerName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package thaumicbees.gui;
|
||||
|
||||
import forestry.api.core.ItemInterface;
|
||||
import thaumicbees.tileentity.TileEntityEffectJar;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerEffectJar extends Container
|
||||
{
|
||||
private TileEntityEffectJar jar;
|
||||
|
||||
public ContainerEffectJar(TileEntityEffectJar tileEntityEffectJar, EntityPlayer player)
|
||||
{
|
||||
this.jar = tileEntityEffectJar;
|
||||
ItemStack drone = ItemInterface.getItem("beeDroneGE");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityplayer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package thaumicbees.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.inventory.Container;
|
||||
|
||||
public class GUIEffectJar extends GuiContainer
|
||||
{
|
||||
public static final String BACKGROUND_FILE = "jarScreen.png";
|
||||
|
||||
private static final int WIDTH = 176;
|
||||
private static final int HEIGHT = 156;
|
||||
|
||||
private static final int SLOT_JAR_X = 80;
|
||||
private static final int SLOT_JAR_Y = 22;
|
||||
private static final int SLOT_INVENTORY_X = 8;
|
||||
private static final int SLOT_INVENTORY_Y = 74;
|
||||
private static final int BAR_DEST_X = 117;
|
||||
private static final int BAR_DEST_Y = 10;
|
||||
|
||||
private static final int BAR_SRC_X = 176;
|
||||
private static final int BAR_SRC_Y = 0;
|
||||
|
||||
private static final int BAR_WIDTH = 10;
|
||||
private static final int BAR_HEIGHT = 40;
|
||||
|
||||
public GUIEffectJar(ContainerEffectJar container)
|
||||
{
|
||||
super(container);
|
||||
this.xSize = WIDTH;
|
||||
this.ySize = HEIGHT;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2)
|
||||
{
|
||||
fontRenderer.drawString("Inve", 9, 63, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int i, int j)
|
||||
{
|
||||
int texture = this.mc.renderEngine.getTexture(CommonProxy.TCBEES_GUI_PATH + BACKGROUND_FILE);
|
||||
|
||||
GL11.glColor4f(1f, 1f, 1f, 0.2f);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_SRC_ALPHA);
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture);
|
||||
|
||||
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
GL11.glColor4f(1f, 1f, 1f, 1f);
|
||||
|
||||
float percent = 0.0f;
|
||||
int value = BAR_HEIGHT - (int)(percent * BAR_HEIGHT);
|
||||
this.drawTexturedModalRect(this.guiLeft + BAR_DEST_X, this.guiTop + value + BAR_DEST_Y, BAR_SRC_X, BAR_SRC_Y, BAR_WIDTH, BAR_HEIGHT - value);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package thaumicbees.gui;
|
||||
|
||||
import thaumicbees.tileentity.TileEntityEffectJar;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
|
||||
public class GUIHandler implements IGuiHandler
|
||||
{
|
||||
|
||||
@Override
|
||||
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
|
||||
{
|
||||
Object value = null;
|
||||
|
||||
if (ID == UIScreens.EFFECT_JAR.ordinal())
|
||||
{
|
||||
value = new ContainerEffectJar((TileEntityEffectJar)(world.getBlockTileEntity(x, y, z)), player);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
|
||||
{
|
||||
Object value = null;
|
||||
|
||||
if (ID == UIScreens.EFFECT_JAR.ordinal())
|
||||
{
|
||||
value = new GUIEffectJar(new ContainerEffectJar((TileEntityEffectJar)(world.getBlockTileEntity(x, y, z)), player));
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package thaumicbees.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class SlotCustomItems extends Slot
|
||||
{
|
||||
private List<ItemStack> items;
|
||||
|
||||
public SlotCustomItems(IInventory inventory, int slotIndex, int xPos, int yPos)
|
||||
{
|
||||
this(inventory, slotIndex, xPos, yPos, new ItemStack[0]);
|
||||
}
|
||||
|
||||
public SlotCustomItems(IInventory inventory, int slotIndex, int xPos, int yPos, ItemStack... items)
|
||||
{
|
||||
super(inventory, slotIndex, xPos, yPos);
|
||||
this.items = new ArrayList<ItemStack>();
|
||||
|
||||
for (ItemStack i : items)
|
||||
{
|
||||
this.items.add(i);
|
||||
}
|
||||
}
|
||||
|
||||
public List<ItemStack> getValidItems()
|
||||
{
|
||||
return this.items;
|
||||
}
|
||||
|
||||
public void addValidItem(ItemStack newItem)
|
||||
{
|
||||
boolean contains = false;
|
||||
for (int i = 0; i < this.items.size(); ++i)
|
||||
{
|
||||
ItemStack s = this.items.get(i);
|
||||
if (s.itemID == newItem.itemID)
|
||||
{
|
||||
if (s.getItemDamage() == -1)
|
||||
{
|
||||
contains = true;
|
||||
break;
|
||||
}
|
||||
else if (s.getItemDamage() == newItem.getItemDamage())
|
||||
{
|
||||
contains = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!contains)
|
||||
{
|
||||
this.items.add(newItem);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param removeItem ItemStack to remove.
|
||||
*/
|
||||
public void removeValidItem(ItemStack removeItem)
|
||||
{
|
||||
for (int i = 0; i < this.items.size(); ++i)
|
||||
{
|
||||
ItemStack s = this.items.get(i);
|
||||
if (s.itemID == removeItem.itemID)
|
||||
{
|
||||
if (s.getItemDamage() == -1)
|
||||
{
|
||||
this.items.remove(i);
|
||||
break;
|
||||
}
|
||||
else if (s.getItemDamage() == removeItem.getItemDamage())
|
||||
{
|
||||
this.items.remove(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack itemStack)
|
||||
{
|
||||
boolean flag = false;
|
||||
for (int i = 0; i < this.items.size(); ++i)
|
||||
{
|
||||
if (this.items.get(i).itemID == itemStack.itemID)
|
||||
{
|
||||
if (this.items.get(i).getItemDamage() == itemStack.getItemDamage())
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
flag = this.items.get(i).getItemDamage() == -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package thaumicbees.gui;
|
||||
|
||||
public enum UIScreens
|
||||
{
|
||||
EFFECT_JAR,
|
||||
;
|
||||
}
|
||||
@@ -56,4 +56,10 @@ public class ItemArmorApiarist extends Item implements IArmorApiarist
|
||||
ItemStack armorItem = player.inventory.armorInventory[0];
|
||||
return armorItem != null && armorItem.getItem() instanceof IArmorApiarist;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean protectPlayer(EntityPlayer player, ItemStack armor, String cause, boolean doProtect)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -8,13 +8,19 @@ import forestry.api.core.Tabs;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import thaumicbees.item.types.CapsuleType;
|
||||
import thaumicbees.item.types.LiquidType;
|
||||
import thaumicbees.item.types.PlankType;
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import thaumicbees.main.utils.TabThaumicBees;
|
||||
import thaumicbees.main.utils.VersionInfo;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumMovingObjectType;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.liquids.LiquidContainerData;
|
||||
@@ -30,8 +36,7 @@ public class ItemCapsule extends Item
|
||||
{
|
||||
super(itemId);
|
||||
this.capsuleType = type;
|
||||
this.setTextureFile(CommonProxy.TCBEES_LIQUIDS_IMAGE);
|
||||
this.setCreativeTab(Tabs.tabApiculture);
|
||||
this.setCreativeTab(TabThaumicBees.tabThaumicBees);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxStackSize(maxStackSize);
|
||||
}
|
||||
@@ -44,7 +49,7 @@ public class ItemCapsule extends Item
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack itemStack)
|
||||
{
|
||||
return LiquidType.values()[itemStack.getItemDamage()].getDisplayName() + " " + this.capsuleType.getName();
|
||||
return LiquidType.values()[itemStack.getItemDamage()].getDisplayName() + " " + this.capsuleType.getLocalizedName();
|
||||
}
|
||||
|
||||
public ItemStack getCapsuleForLiquid(LiquidType l)
|
||||
@@ -71,26 +76,36 @@ public class ItemCapsule extends Item
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(VersionInfo.ModName.toLowerCase() + ":capsule" + this.capsuleType.getName().substring(0, 1).toUpperCase()
|
||||
+ this.capsuleType.getName().substring(1));
|
||||
for (LiquidType t : LiquidType.values())
|
||||
{
|
||||
if (t != LiquidType.EMPTY && t.liquidIcon == null)
|
||||
{
|
||||
t.liquidIcon = par1IconRegister.registerIcon(VersionInfo.ModName.toLowerCase() + ":liquids/" + t.liquidID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getIconFromDamageForRenderPass(int metadata, int pass)
|
||||
public Icon getIconFromDamageForRenderPass(int metadata, int pass)
|
||||
{
|
||||
int index = 0;
|
||||
if (pass == 0)
|
||||
Icon i = this.itemIcon;
|
||||
if (metadata != 0 && pass == 0)
|
||||
{
|
||||
index = LiquidType.values()[metadata].iconIdx;
|
||||
i = LiquidType.values()[Math.max(0, Math.min(metadata, LiquidType.values().length - 1))].liquidIcon;
|
||||
}
|
||||
else
|
||||
{
|
||||
index = capsuleType.iconIdx;
|
||||
}
|
||||
return index;
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderPasses(int metadata)
|
||||
{
|
||||
return 2;
|
||||
return (metadata == 0) ? 1 : 2;
|
||||
}
|
||||
}
|
||||
@@ -5,19 +5,22 @@ import java.util.List;
|
||||
import thaumicbees.item.types.CombType;
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import thaumicbees.main.utils.VersionInfo;
|
||||
import thaumicbees.main.utils.compat.ForestryHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
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;
|
||||
|
||||
public class ItemComb extends Item
|
||||
{
|
||||
public ItemComb(int itemID)
|
||||
{
|
||||
super(itemID);
|
||||
this.setTextureFile(CommonProxy.FORESTRY_GFX_ITEMS);
|
||||
this.setCreativeTab(Tabs.tabApiculture);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
@@ -55,20 +58,23 @@ public class ItemComb extends Item
|
||||
@Override
|
||||
public int getRenderPasses(int meta)
|
||||
{
|
||||
int passes = 2;
|
||||
return passes;
|
||||
return 2;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private Icon secondIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":beeCombs.0");
|
||||
this.secondIcon= par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":beeCombs.1");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconIndex(ItemStack stack, int pass)
|
||||
public Icon getIcon(ItemStack stack, int pass)
|
||||
{
|
||||
int idx = 107;
|
||||
// 107, 108 are the base forestry honeycomb textures.
|
||||
if (pass >= 1)
|
||||
{
|
||||
idx = 108;
|
||||
}
|
||||
return idx;
|
||||
return (pass == 0) ? itemIcon : secondIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,20 +8,24 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import thaumicbees.main.utils.TabThaumicBees;
|
||||
import thaumicbees.main.utils.VersionInfo;
|
||||
import thaumicbees.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;
|
||||
|
||||
public class ItemSolidFlux extends Item
|
||||
public class ItemCrystalAspect extends Item
|
||||
{
|
||||
public ItemSolidFlux(int itemId)
|
||||
public ItemCrystalAspect(int itemId)
|
||||
{
|
||||
super(itemId);
|
||||
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||
this.setIconIndex(18);
|
||||
this.setCreativeTab(Tabs.tabApiculture);
|
||||
this.setCreativeTab(TabThaumicBees.tabThaumicBees);
|
||||
this.setHasSubtypes(true);
|
||||
this.setUnlocalizedName("crystalAspect");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -37,12 +41,12 @@ public class ItemSolidFlux extends Item
|
||||
list.add(new ItemStack(this.itemID, 1, tag.id));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack stack)
|
||||
{
|
||||
return String.format(LocalizationManager.getLocalizedString("tb.resource.crystalFlux"), EnumTag.get(stack.getItemDamage()).name);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(VersionInfo.ModName.toLowerCase() + ":crystalAspect");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -51,4 +55,9 @@ public class ItemSolidFlux extends Item
|
||||
return EnumTag.get(stack.getItemDamage()).color;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack stack)
|
||||
{
|
||||
return String.format(LocalizationManager.getLocalizedString("tb.resource.crystalAspect"), EnumTag.get(stack.getItemDamage()).name);
|
||||
}
|
||||
}
|
||||
@@ -6,20 +6,22 @@ import thaumicbees.item.types.DropType;
|
||||
import thaumicbees.item.types.PropolisType;
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import thaumicbees.main.utils.compat.ForestryHelper;
|
||||
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 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;
|
||||
|
||||
public class ItemDrop extends Item
|
||||
{
|
||||
public ItemDrop(int itemID)
|
||||
{
|
||||
super(itemID);
|
||||
this.setTextureFile(CommonProxy.FORESTRY_GFX_ITEMS);
|
||||
this.setCreativeTab(Tabs.tabApiculture);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
@@ -56,17 +58,21 @@ public class ItemDrop extends Item
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private Icon secondIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":honeyDrop.0");
|
||||
this.secondIcon= par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":honeyDrop.1");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconIndex(ItemStack stack, int pass)
|
||||
public Icon getIcon(ItemStack stack, int pass)
|
||||
{
|
||||
int idx = 109;
|
||||
// 109, 110 are the base forestry drop textures.
|
||||
if (pass >= 1)
|
||||
{
|
||||
idx = 110;
|
||||
}
|
||||
return idx;
|
||||
return (pass == 0) ? this.itemIcon : this.secondIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,15 +2,20 @@ package thaumicbees.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import thaumcraft.api.AuraNode;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumicbees.item.types.HiveFrameType;
|
||||
import thaumicbees.item.types.LiquidType;
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import thaumicbees.main.utils.VersionInfo;
|
||||
import thaumicbees.main.utils.compat.ForestryHelper;
|
||||
import thaumicbees.main.utils.compat.ThaumcraftHelper;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -29,16 +34,15 @@ public class ItemMagicHiveFrame extends Item implements IHiveFrame
|
||||
super(itemID);
|
||||
this.type = frameType;
|
||||
this.setMaxDamage(this.type.maxDamage);
|
||||
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||
this.setIconIndex(this.type.iconIdx);
|
||||
this.setMaxStackSize(1);
|
||||
this.setUnlocalizedName("frame" + frameType.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack itemStack)
|
||||
{
|
||||
return this.type.getName();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(VersionInfo.ModName.toLowerCase() + ":frame" + type.getName());
|
||||
}
|
||||
|
||||
// --------- IHiveFrame functions -----------------------------------------
|
||||
|
||||
@@ -117,31 +121,31 @@ public class ItemMagicHiveFrame extends Item implements IHiveFrame
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getTerritoryModifier(IBeeGenome genome)
|
||||
public float getTerritoryModifier(IBeeGenome genome, float currentModifier)
|
||||
{
|
||||
return this.type.territoryMod;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMutationModifier(IBeeGenome genome, IBeeGenome mate)
|
||||
public float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier)
|
||||
{
|
||||
return this.type.mutationMod;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate)
|
||||
public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier)
|
||||
{
|
||||
return this.type.lifespanMod;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getProductionModifier(IBeeGenome genome)
|
||||
public float getProductionModifier(IBeeGenome genome, float currentModifier)
|
||||
{
|
||||
return this.type.productionMod;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getFloweringModifier(IBeeGenome genome)
|
||||
public float getFloweringModifier(IBeeGenome genome, float currentModifier)
|
||||
{
|
||||
return this.type.floweringMod;
|
||||
}
|
||||
|
||||
@@ -7,17 +7,25 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
import thaumicbees.item.types.ResourceType;
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import thaumicbees.main.utils.TabThaumicBees;
|
||||
import thaumicbees.main.utils.VersionInfo;
|
||||
import thaumicbees.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 net.minecraft.util.Icon;
|
||||
|
||||
public class ItemMiscResources extends Item
|
||||
{
|
||||
private Icon[] icons = new Icon[ResourceType.values().length];
|
||||
|
||||
public ItemMiscResources(int ID)
|
||||
{
|
||||
super(ID);
|
||||
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||
this.setCreativeTab(Tabs.tabApiculture);
|
||||
this.setUnlocalizedName("tb.miscResources");
|
||||
this.setCreativeTab(TabThaumicBees.tabThaumicBees);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -43,23 +51,27 @@ public class ItemMiscResources extends Item
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
for (int i = 0; i < ResourceType.values().length; i++)
|
||||
{
|
||||
this.icons[i] = par1IconRegister.registerIcon(VersionInfo.ModName.toLowerCase() + ":" + ResourceType.values()[i].getName());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getIconFromDamage(int meta)
|
||||
public Icon getIconFromDamage(int meta)
|
||||
{
|
||||
int iconIdx = 0;
|
||||
if (meta >= 0 && meta < ResourceType.values().length)
|
||||
{
|
||||
iconIdx = ResourceType.values()[meta].iconIdx;
|
||||
}
|
||||
return iconIdx;
|
||||
return icons[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack stack)
|
||||
{
|
||||
return ResourceType.values()[stack.getItemDamage()].getName();
|
||||
return ResourceType.values()[stack.getItemDamage()].getLocalizedName();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package thaumicbees.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumicbees.item.types.PollenType;
|
||||
import thaumicbees.main.Config;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import thaumicbees.main.utils.MoonPhase;
|
||||
import thaumicbees.main.utils.TabThaumicBees;
|
||||
import thaumicbees.main.utils.VersionInfo;
|
||||
import thaumicbees.main.utils.compat.ForestryHelper;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
public class ItemMoonDial extends Item
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
private Icon[] icons;
|
||||
|
||||
public ItemMoonDial(int id)
|
||||
{
|
||||
super(id);
|
||||
this.setCreativeTab(TabThaumicBees.tabThaumicBees);
|
||||
this.setUnlocalizedName("moonDial");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.icons = new Icon[MoonPhase.values().length];
|
||||
for (int i = 0; i < MoonPhase.values().length; ++i)
|
||||
{
|
||||
this.icons[i] = par1IconRegister.registerIcon(VersionInfo.ModName.toLowerCase() + ":moonDial." + i);
|
||||
}
|
||||
this.itemIcon = this.icons[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
|
||||
{
|
||||
return this.icons[MoonPhase.getMoonPhaseFromTime(player.worldObj.getWorldTime()).ordinal()];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List infoList, boolean par4)
|
||||
{
|
||||
if (ThaumicBees.getConfig().MoonDialShowsPhaseInText)
|
||||
{
|
||||
infoList.add("\u00A77" + MoonPhase.getMoonPhaseFromTime(entityPlayer.worldObj.getWorldTime()).getLocalizedName());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int damage)
|
||||
{
|
||||
return this.icons[5];
|
||||
}
|
||||
}
|
||||
@@ -9,18 +9,24 @@ import thaumicbees.item.types.NuggetType;
|
||||
import thaumicbees.item.types.PollenType;
|
||||
import thaumicbees.item.types.ResourceType;
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import thaumicbees.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;
|
||||
|
||||
public class ItemNugget extends Item
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
private Icon[] icons;
|
||||
|
||||
public ItemNugget(int itemID)
|
||||
{
|
||||
super(itemID);
|
||||
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||
this.setCreativeTab(CreativeTabs.tabMaterials);
|
||||
this.setHasSubtypes(true);
|
||||
this.setUnlocalizedName("beeNugget");
|
||||
}
|
||||
|
||||
public ItemStack getStackForType(NuggetType type)
|
||||
@@ -46,16 +52,23 @@ public class ItemNugget extends Item
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.icons = new Icon[NuggetType.values().length];
|
||||
for (int i = 0; i < NuggetType.values().length; i++)
|
||||
{
|
||||
this.icons[i] = par1IconRegister.registerIcon(VersionInfo.ModName.toLowerCase() + ":nugget"
|
||||
+ NuggetType.values()[i].name().substring(0, 1)
|
||||
+ NuggetType.values()[i].name().substring(1).toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getIconFromDamage(int meta)
|
||||
public Icon getIconFromDamage(int meta)
|
||||
{
|
||||
int iconIdx = 0;
|
||||
if (meta >= 0 && meta < NuggetType.values().length)
|
||||
{
|
||||
iconIdx = NuggetType.values()[meta].iconIdx;
|
||||
}
|
||||
return iconIdx;
|
||||
return icons[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,19 +5,21 @@ import java.util.List;
|
||||
import thaumicbees.item.types.PollenType;
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import thaumicbees.main.utils.compat.ForestryHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
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;
|
||||
|
||||
public class ItemPollen extends Item
|
||||
{
|
||||
public ItemPollen(int itemID)
|
||||
{
|
||||
super(itemID);
|
||||
this.setTextureFile(CommonProxy.FORESTRY_GFX_ITEMS);
|
||||
this.setCreativeTab(Tabs.tabApiculture);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
@@ -53,17 +55,21 @@ public class ItemPollen extends Item
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private Icon secondIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":pollen.0");
|
||||
this.secondIcon= par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":pollen.1");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconIndex(ItemStack stack, int pass)
|
||||
public Icon getIcon(ItemStack stack, int pass)
|
||||
{
|
||||
int idx = 45;
|
||||
// 45, 46 are the base forestry pollen textures.
|
||||
if (pass >= 1)
|
||||
{
|
||||
idx = 46;
|
||||
}
|
||||
return idx;
|
||||
return (pass == 0) ? this.itemIcon : this.secondIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -71,11 +77,11 @@ public class ItemPollen extends Item
|
||||
public int getColorFromItemStack(ItemStack stack, int pass)
|
||||
{
|
||||
int meta = Math.max(0, Math.min(PollenType.values().length - 1, stack.getItemDamage()));
|
||||
int colour = PollenType.values()[meta].combColour[0];
|
||||
int colour = PollenType.values()[meta].colour[0];
|
||||
|
||||
if (pass >= 1)
|
||||
{
|
||||
colour = PollenType.values()[meta].combColour[1];
|
||||
colour = PollenType.values()[meta].colour[1];
|
||||
}
|
||||
|
||||
return colour;
|
||||
|
||||
@@ -4,21 +4,22 @@ import java.util.List;
|
||||
|
||||
import thaumicbees.item.types.PropolisType;
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import thaumicbees.main.utils.compat.ForestryHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
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;
|
||||
|
||||
public class ItemPropolis extends Item
|
||||
{
|
||||
public ItemPropolis(int id)
|
||||
{
|
||||
super(id);
|
||||
this.setTextureFile(CommonProxy.FORESTRY_GFX_ITEMS);
|
||||
this.setCreativeTab(Tabs.tabApiculture);
|
||||
this.setIconIndex(98);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -42,6 +43,12 @@ public class ItemPropolis extends Item
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":propolis.0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColorFromItemStack(ItemStack stack, int pass)
|
||||
{
|
||||
|
||||
@@ -22,9 +22,7 @@ public class ItemThaumiumGrafter extends Item implements IVisRepairable, IToolGr
|
||||
super(id);
|
||||
this.setMaxStackSize(1);
|
||||
this.setMaxDamage(15);
|
||||
this.setIconIndex(21);
|
||||
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||
this.setItemName("tb.thaumiumGrafter");
|
||||
this.setUnlocalizedName("thaumicbees:thaumiumGrafter");
|
||||
this.setCreativeTab(forestry.api.core.Tabs.tabArboriculture);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,9 +19,7 @@ public class ItemThaumiumScoop extends Item implements IVisRepairable
|
||||
super(itemID);
|
||||
this.setMaxStackSize(1);
|
||||
this.setMaxDamage(30);
|
||||
this.setIconIndex(20);
|
||||
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||
this.setItemName("tb.thaumiumScoop");
|
||||
this.setUnlocalizedName("thaumicbees:thaumiumScoop");
|
||||
this.setCreativeTab(forestry.api.core.Tabs.tabApiculture);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,22 +2,28 @@ package thaumicbees.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import thaumicbees.item.types.ResourceType;
|
||||
import thaumicbees.item.types.WaxType;
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import thaumicbees.main.utils.VersionInfo;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
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;
|
||||
|
||||
public class ItemWax extends Item
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
private Icon secondaryIcon;
|
||||
|
||||
public ItemWax(int itemID)
|
||||
{
|
||||
super(itemID);
|
||||
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||
this.setCreativeTab(Tabs.tabApiculture);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
@@ -31,17 +37,19 @@ public class ItemWax extends Item
|
||||
{
|
||||
return new ItemStack(this, count, type.ordinal());
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(VersionInfo.ModName.toLowerCase() + ":wax.0");
|
||||
this.secondaryIcon = par1IconRegister.registerIcon(VersionInfo.ModName.toLowerCase() + ":wax.1");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconIndex(ItemStack stack, int pass)
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int meta)
|
||||
{
|
||||
int idx = 1;
|
||||
int meta = stack.getItemDamage();
|
||||
if (meta >= 0 && meta < WaxType.values().length)
|
||||
{
|
||||
idx = (WaxType.values()[meta].sparkly) ? 0 : 1;
|
||||
}
|
||||
return idx;
|
||||
return (WaxType.values()[meta].sparkly) ? this.secondaryIcon : this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||