mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-12 00:08:01 +00:00
[ci skip] spotlessApply with the new settings
This commit is contained in:
1 parent
32411450d3
commit
f1069a91f1
148 files changed
+2268
-3179
No files matched your search
@@ -3,6 +3,7 @@ package magicbees.api;
|
||||
import magicbees.api.bees.ITransmutationEffectController;
|
||||
|
||||
public class MagicBeesAPI {
|
||||
|
||||
// Use this object during or after the Mod.Init phase to add your logic to the Transmutation bee effect.
|
||||
public static ITransmutationEffectController transmutationEffectController;
|
||||
|
||||
|
||||
@@ -3,6 +3,5 @@ package magicbees.api.bees;
|
||||
public enum AuraChargeType {
|
||||
MUTATION,
|
||||
DEATH,
|
||||
PRODUCTION,
|
||||
;
|
||||
PRODUCTION,;
|
||||
}
|
||||
@@ -1,44 +1,40 @@
|
||||
package magicbees.api.bees;
|
||||
|
||||
/**
|
||||
* Allows a tile entity to provide a Magic Apiary with 'aura' to boost bee production, mutation rate,
|
||||
* or decrease bee lifespan.
|
||||
* Allows a tile entity to provide a Magic Apiary with 'aura' to boost bee production, mutation rate, or decrease bee
|
||||
* lifespan.
|
||||
*
|
||||
* @author MysteriousAges
|
||||
*/
|
||||
public interface IMagicApiaryAuraProvider {
|
||||
|
||||
/**
|
||||
* Requests a mutation charge from the aura provider. If true is returned, the
|
||||
* aura provider should decrement its internal charge by one. If there are no
|
||||
* charges remaining, it should return false.
|
||||
* Requests a mutation charge from the aura provider. If true is returned, the aura provider should decrement its
|
||||
* internal charge by one. If there are no charges remaining, it should return false.
|
||||
*
|
||||
* @return True if a charge is given; false otherwise.
|
||||
*/
|
||||
boolean getMutationCharge();
|
||||
|
||||
/**
|
||||
* Requests a mutation charge from the aura provider. If true is returned, the
|
||||
* aura provider should decrement its internal charge by one. If there are no
|
||||
* charges remaining, it should return false.
|
||||
* Requests a mutation charge from the aura provider. If true is returned, the aura provider should decrement its
|
||||
* internal charge by one. If there are no charges remaining, it should return false.
|
||||
*
|
||||
* @return True if a charge is given; false otherwise.
|
||||
*/
|
||||
boolean getDeathRateCharge();
|
||||
|
||||
/**
|
||||
* Requests a mutation charge from the aura provider. If true is returned, the
|
||||
* aura provider should decrement its internal charge by one. If there are no
|
||||
* charges remaining, it should return false.
|
||||
* Requests a mutation charge from the aura provider. If true is returned, the aura provider should decrement its
|
||||
* internal charge by one. If there are no charges remaining, it should return false.
|
||||
*
|
||||
* @return True if a charge is given; false otherwise.
|
||||
*/
|
||||
boolean getProductionCharge();
|
||||
|
||||
/**
|
||||
* Requests a mutation charge from the aura provider. If true is returned, the
|
||||
* aura provider should decrement its internal charge by one. If there are no
|
||||
* charges remaining, it should return false.
|
||||
* Requests a mutation charge from the aura provider. If true is returned, the aura provider should decrement its
|
||||
* internal charge by one. If there are no charges remaining, it should return false.
|
||||
*
|
||||
* @return True if a charge is given; false otherwise.
|
||||
*/
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package magicbees.api.bees;
|
||||
|
||||
/**
|
||||
* Manages adding custom ITransmutationEffectLogic instances into the bee effect
|
||||
* system.
|
||||
* Manages adding custom ITransmutationEffectLogic instances into the bee effect system.
|
||||
*
|
||||
* @author MysteriousAges
|
||||
*
|
||||
*/
|
||||
public interface ITransmutationEffectController {
|
||||
|
||||
public void addEffectLogic(ITransmutationEffectLogic logic);
|
||||
}
|
||||
@@ -5,27 +5,26 @@ import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
||||
/**
|
||||
* Class to control plugin logic for the Transmutation bee effect. Turns blocks
|
||||
* into other blocks based on biome, time of day, or whatever is deemed
|
||||
* appropriate at the time.
|
||||
* Class to control plugin logic for the Transmutation bee effect. Turns blocks into other blocks based on biome, time
|
||||
* of day, or whatever is deemed appropriate at the time.
|
||||
*
|
||||
* @author MysteriousAges
|
||||
*
|
||||
*/
|
||||
public interface ITransmutationEffectLogic {
|
||||
|
||||
/**
|
||||
* Allows an external mod to add transmutation logic to the Transmuting bee effect.
|
||||
* Called from a list of ITransmutationEffectLogic until one returns true. You can
|
||||
* implement more than one transmutation effect in a single implementation of the
|
||||
* interface. Function checks for a series of conditions based on block ID/meta, or
|
||||
* Allows an external mod to add transmutation logic to the Transmuting bee effect. Called from a list of
|
||||
* ITransmutationEffectLogic until one returns true. You can implement more than one transmutation effect in a
|
||||
* single implementation of the interface. Function checks for a series of conditions based on block ID/meta, or
|
||||
* biome information, or world information.
|
||||
*
|
||||
* @param world World object
|
||||
* @param biome Biome information for current coordinates
|
||||
* @param world World object
|
||||
* @param biome Biome information for current coordinates
|
||||
* @param sourceBlock ItemStack representing the block at current coordinates
|
||||
* @param x Current X coordinate to attempt a transmute
|
||||
* @param y Current Y coordinate to attempt a transmute
|
||||
* @param z Current Z coordinate to attempt a transmute
|
||||
* @param x Current X coordinate to attempt a transmute
|
||||
* @param y Current Y coordinate to attempt a transmute
|
||||
* @param z Current Z coordinate to attempt a transmute
|
||||
* @return true if a block was changed.
|
||||
*/
|
||||
public boolean tryTransmutation(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z);
|
||||
|
||||
@@ -1,15 +1,5 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import forestry.api.apiculture.EnumBeeChromosome;
|
||||
import forestry.api.apiculture.IAlleleBeeEffect;
|
||||
import forestry.api.apiculture.IAlleleBeeSpecies;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IAlleleEffect;
|
||||
import forestry.api.genetics.IAlleleFlowers;
|
||||
import forestry.api.genetics.IAlleleRegistry;
|
||||
import forestry.api.genetics.IChromosomeType;
|
||||
import forestry.api.genetics.IFlowerProvider;
|
||||
import magicbees.api.MagicBeesAPI;
|
||||
import magicbees.bees.allele.effect.AlleleEffectCrumbling;
|
||||
import magicbees.bees.allele.effect.AlleleEffectCure;
|
||||
@@ -37,8 +27,20 @@ import magicbees.main.utils.compat.ArsMagicaHelper;
|
||||
import magicbees.main.utils.compat.BotaniaHelper;
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
import magicbees.main.utils.compat.ThermalModsHelper;
|
||||
|
||||
import net.minecraft.potion.Potion;
|
||||
|
||||
import thaumcraft.api.nodes.NodeType;
|
||||
import forestry.api.apiculture.EnumBeeChromosome;
|
||||
import forestry.api.apiculture.IAlleleBeeEffect;
|
||||
import forestry.api.apiculture.IAlleleBeeSpecies;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IAlleleEffect;
|
||||
import forestry.api.genetics.IAlleleFlowers;
|
||||
import forestry.api.genetics.IAlleleRegistry;
|
||||
import forestry.api.genetics.IChromosomeType;
|
||||
import forestry.api.genetics.IFlowerProvider;
|
||||
|
||||
public class Allele implements IAllele {
|
||||
|
||||
@@ -120,50 +122,35 @@ public class Allele implements IAllele {
|
||||
effectSlowSpeed = new AlleleEffectPotion("SlowSpeed", Potion.moveSlowdown, 3, false).setMalicious();
|
||||
effectWithering = new AlleleEffectPotion("Withering", Potion.wither, 10, false).setMalicious();
|
||||
|
||||
TransmutationEffectController controller =
|
||||
new TransmutationEffectController(new TransmutationEffectRailcraft(), new TransmutationEffectVanilla());
|
||||
TransmutationEffectController controller = new TransmutationEffectController(
|
||||
new TransmutationEffectRailcraft(),
|
||||
new TransmutationEffectVanilla());
|
||||
MagicBeesAPI.transmutationEffectController = controller;
|
||||
effectTransmuting = new AlleleEffectTransmuting("Transmuting", true, controller, 200);
|
||||
effectCrumbling = new AlleleEffectCrumbling("Crumbling", true);
|
||||
|
||||
effectInvisibility = new AlleleEffectPotion("Invisibility", Potion.invisibility, 10, false);
|
||||
|
||||
spawnGhast = new AlleleEffectSpawnMob("Ghastly", false, "Ghast", "mob.ghast.moan")
|
||||
.setThrottle(2060)
|
||||
.setChanceToSpawn(10)
|
||||
.setMaxMobsInSpawnZone(1);
|
||||
spawnSpider = new AlleleEffectSpawnMob("Spidery", false, "Spider", "mob.spider.step")
|
||||
.setThrottle(400)
|
||||
.setChanceToSpawn(70)
|
||||
spawnGhast = new AlleleEffectSpawnMob("Ghastly", false, "Ghast", "mob.ghast.moan").setThrottle(2060)
|
||||
.setChanceToSpawn(10).setMaxMobsInSpawnZone(1);
|
||||
spawnSpider = new AlleleEffectSpawnMob("Spidery", false, "Spider", "mob.spider.step").setThrottle(400)
|
||||
.setChanceToSpawn(70).setMaxMobsInSpawnZone(4);
|
||||
spawnBlaze = new AlleleEffectSpawnMob("Ablaze", false, "Blaze", "mob.blaze.breathe").setThrottle(800)
|
||||
.setChanceToSpawn(60).setMaxMobsInSpawnZone(2);
|
||||
spawnWolf = new AlleleEffectSpawnMob("Canine", false, "Wolf", "mob.wolf.panting").setThrottle(650)
|
||||
.setChanceToSpawn(40).setMaxMobsInSpawnZone(2);
|
||||
spawnPig = new AlleleEffectSpawnMob("Porcine", true, "Pig", "mob.pig.say").setThrottle(350)
|
||||
.setMaxMobsInSpawnZone(4);
|
||||
spawnBlaze = new AlleleEffectSpawnMob("Ablaze", false, "Blaze", "mob.blaze.breathe")
|
||||
.setThrottle(800)
|
||||
.setChanceToSpawn(60)
|
||||
.setMaxMobsInSpawnZone(2);
|
||||
spawnWolf = new AlleleEffectSpawnMob("Canine", false, "Wolf", "mob.wolf.panting")
|
||||
.setThrottle(650)
|
||||
.setChanceToSpawn(40)
|
||||
.setMaxMobsInSpawnZone(2);
|
||||
spawnPig = new AlleleEffectSpawnMob("Porcine", true, "Pig", "mob.pig.say")
|
||||
.setThrottle(350)
|
||||
.setMaxMobsInSpawnZone(4);
|
||||
spawnCow = new AlleleEffectSpawnMob("Bovine", true, "Cow", "mob.cow.say")
|
||||
.setThrottle(640)
|
||||
spawnCow = new AlleleEffectSpawnMob("Bovine", true, "Cow", "mob.cow.say").setThrottle(640)
|
||||
.setMaxMobsInSpawnZone(3);
|
||||
spawnChicken = new AlleleEffectSpawnMob("Chicken", true, "Chicken", "mob.chicken.hurt")
|
||||
.setThrottle(20)
|
||||
spawnChicken = new AlleleEffectSpawnMob("Chicken", true, "Chicken", "mob.chicken.hurt").setThrottle(20)
|
||||
.setMaxMobsInSpawnZone(20);
|
||||
spawnSheep = new AlleleEffectSpawnMob("Sheep", false, "Sheep", "mob.sheep.say")
|
||||
.setThrottle(450)
|
||||
spawnSheep = new AlleleEffectSpawnMob("Sheep", false, "Sheep", "mob.sheep.say").setThrottle(450)
|
||||
.setMaxMobsInSpawnZone(5);
|
||||
spawnCat = new AlleleEffectSpawnMob("Catty", false, "Ozelot", "mob.cat.meow")
|
||||
.setThrottle(702)
|
||||
.setChanceToSpawn(60)
|
||||
.setMaxMobsInSpawnZone(2);
|
||||
spawnHorse = new AlleleEffectSpawnMob("Horse", false, "EntityHorse", "mob.horse.idle")
|
||||
.setThrottle(450)
|
||||
.setChanceToSpawn(59)
|
||||
.setMaxMobsInSpawnZone(2);
|
||||
spawnCat = new AlleleEffectSpawnMob("Catty", false, "Ozelot", "mob.cat.meow").setThrottle(702)
|
||||
.setChanceToSpawn(60).setMaxMobsInSpawnZone(2);
|
||||
spawnHorse = new AlleleEffectSpawnMob("Horse", false, "EntityHorse", "mob.horse.idle").setThrottle(450)
|
||||
.setChanceToSpawn(59).setMaxMobsInSpawnZone(2);
|
||||
|
||||
if (ThaumcraftHelper.isActive()) {
|
||||
flowerThaumcraft = new AlleleFlower(FLOWERS_THAUMCRAFT_PLANT, new FlowerProviderThaumcraftFlower(), false);
|
||||
@@ -172,27 +159,32 @@ public class Allele implements IAllele {
|
||||
effectVisRecharge = new AlleleEffectRecharge(EFFECT_VIS_RECHARGE, false);
|
||||
effectNodeEmpower = new AlleleEffectEmpowering(EFFECT_NODE_EMPOWER, false);
|
||||
effectNodeRepair = new AlleleEffectNodeRepair(EFFECT_NODE_REPAIR, false);
|
||||
effectNodeConversionTaint =
|
||||
new AlleleEffectNodeConversion(EFFECT_NODE_TAINTING, NodeType.TAINTED, false, 250);
|
||||
effectNodeConversionTaint = new AlleleEffectNodeConversion(
|
||||
EFFECT_NODE_TAINTING,
|
||||
NodeType.TAINTED,
|
||||
false,
|
||||
250);
|
||||
effectNodeConversionPure = new AlleleEffectNodeConversion(EFFECT_NODE_PURIFYING, NodeType.PURE, false, 250);
|
||||
effectNodeConversionHungry =
|
||||
new AlleleEffectNodeConversion(EFFECT_NODE_RAVENING, NodeType.HUNGRY, false, 2);
|
||||
effectNodeConversionHungry = new AlleleEffectNodeConversion(
|
||||
EFFECT_NODE_RAVENING,
|
||||
NodeType.HUNGRY,
|
||||
false,
|
||||
2);
|
||||
|
||||
spawnBrainyZombie = new AlleleEffectSpawnMob(
|
||||
EFFECT_BRAINY, false, ThaumcraftHelper.Entity.BRAINY_ZOMBIE.entityID)
|
||||
.setAggrosPlayerOnSpawn()
|
||||
.setThrottle(800)
|
||||
.setSpawnsOnPlayerNear(null)
|
||||
.setMaxMobsInSpawnZone(2);
|
||||
EFFECT_BRAINY,
|
||||
false,
|
||||
ThaumcraftHelper.Entity.BRAINY_ZOMBIE.entityID).setAggrosPlayerOnSpawn().setThrottle(800)
|
||||
.setSpawnsOnPlayerNear(null).setMaxMobsInSpawnZone(2);
|
||||
|
||||
spawnBats = new AlleleEffectSpawnMob(EFFECT_BATTY, false, ThaumcraftHelper.Entity.FIREBAT.entityID)
|
||||
.setThrottle(300)
|
||||
.setSpawnsOnPlayerNear("Bat");
|
||||
.setThrottle(300).setSpawnsOnPlayerNear("Bat");
|
||||
|
||||
spawnWisp = new AlleleEffectSpawnWisp(
|
||||
EFFECT_WISPY, false, ThaumcraftHelper.Entity.WISP.entityID, "thaumcraft.wisplive")
|
||||
.setThrottle(1800)
|
||||
.setChanceToSpawn(79);
|
||||
EFFECT_WISPY,
|
||||
false,
|
||||
ThaumcraftHelper.Entity.WISP.entityID,
|
||||
"thaumcraft.wisplive").setThrottle(1800).setChanceToSpawn(79);
|
||||
} else {
|
||||
spawnBats = new AlleleEffectSpawnMob(EFFECT_BATTY, false, "Bat").setThrottle(150);
|
||||
|
||||
@@ -226,15 +218,15 @@ public class Allele implements IAllele {
|
||||
EFFECT_MANA_DRAIN,
|
||||
true,
|
||||
20,
|
||||
new String[] {ArsMagicaHelper.Name + ".MobManaCreeper", ArsMagicaHelper.Name + ".ManaVortex"},
|
||||
new int[] {60, 2});
|
||||
new String[] { ArsMagicaHelper.Name + ".MobManaCreeper", ArsMagicaHelper.Name + ".ManaVortex" },
|
||||
new int[] { 60, 2 });
|
||||
|
||||
spawnWispOrHecate = new AlleleEffectSpawnMobWeighted(
|
||||
EFFECT_AM_WISP,
|
||||
true,
|
||||
20,
|
||||
new String[] {ArsMagicaHelper.Name + ".MobWisp", ArsMagicaHelper.Name + ".MobHecate"},
|
||||
new int[] {40, 3});
|
||||
new String[] { ArsMagicaHelper.Name + ".MobWisp", ArsMagicaHelper.Name + ".MobHecate" },
|
||||
new int[] { 40, 3 });
|
||||
} else {
|
||||
flowerArsMagica = new AlleleFlower(FLOWER_ARS_MAGICA_PLANT, vanillaFlowers, false);
|
||||
spawnManaDrainer = new AlleleEffectPlaceholder(EFFECT_MANA_DRAIN, true);
|
||||
@@ -244,26 +236,20 @@ public class Allele implements IAllele {
|
||||
// TODO TE spawning
|
||||
if (ThermalModsHelper.isActive()) {
|
||||
spawnBlizz = new AlleleEffectSpawnMob(
|
||||
EFFECT_TE_BLIZZY,
|
||||
true,
|
||||
ThermalModsHelper.Entity.BLIZZ.entityID,
|
||||
ThermalModsHelper.Entity.BLIZZ.soundName)
|
||||
.setThrottle(100)
|
||||
.setChanceToSpawn(80);
|
||||
EFFECT_TE_BLIZZY,
|
||||
true,
|
||||
ThermalModsHelper.Entity.BLIZZ.entityID,
|
||||
ThermalModsHelper.Entity.BLIZZ.soundName).setThrottle(100).setChanceToSpawn(80);
|
||||
spawnBlitz = new AlleleEffectSpawnMob(
|
||||
EFFECT_TE_BLITZ,
|
||||
true,
|
||||
ThermalModsHelper.Entity.BLITZ.entityID,
|
||||
ThermalModsHelper.Entity.BLITZ.soundName)
|
||||
.setThrottle(100)
|
||||
.setChanceToSpawn(80);
|
||||
EFFECT_TE_BLITZ,
|
||||
true,
|
||||
ThermalModsHelper.Entity.BLITZ.entityID,
|
||||
ThermalModsHelper.Entity.BLITZ.soundName).setThrottle(100).setChanceToSpawn(80);
|
||||
spawnBasalz = new AlleleEffectSpawnMob(
|
||||
EFFECT_TE_BASALZ,
|
||||
true,
|
||||
ThermalModsHelper.Entity.BASALZ.entityID,
|
||||
ThermalModsHelper.Entity.BASALZ.soundName)
|
||||
.setThrottle(100)
|
||||
.setChanceToSpawn(80);
|
||||
EFFECT_TE_BASALZ,
|
||||
true,
|
||||
ThermalModsHelper.Entity.BASALZ.entityID,
|
||||
ThermalModsHelper.Entity.BASALZ.soundName).setThrottle(100).setChanceToSpawn(80);
|
||||
} else {
|
||||
spawnBlizz = new AlleleEffectPlaceholder(EFFECT_TE_BLIZZY, true);
|
||||
spawnBlitz = new AlleleEffectPlaceholder(EFFECT_TE_BLITZ, true);
|
||||
@@ -279,23 +265,24 @@ public class Allele implements IAllele {
|
||||
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodeFlux", effectNodeConversionTaint);
|
||||
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodeCharge", effectNodeEmpower);
|
||||
registry.registerDeprecatedAlleleReplacement(
|
||||
"magicbees.speciesTCAttractive", BeeSpecies.TC_EMPOWERING.getSpecies());
|
||||
"magicbees.speciesTCAttractive",
|
||||
BeeSpecies.TC_EMPOWERING.getSpecies());
|
||||
registry.registerDeprecatedAlleleReplacement(
|
||||
"magicbees.speciesBMBloodyBMBloody", BeeSpecies.EARTHY.getSpecies());
|
||||
"magicbees.speciesBMBloodyBMBloody",
|
||||
BeeSpecies.EARTHY.getSpecies());
|
||||
registry.registerDeprecatedAlleleReplacement(
|
||||
"magicbees.speciesBMBloodyBMBound", BeeSpecies.ARCANE.getSpecies());
|
||||
"magicbees.speciesBMBloodyBMBound",
|
||||
BeeSpecies.ARCANE.getSpecies());
|
||||
}
|
||||
|
||||
public static IAlleleBeeSpecies getBaseSpecies(String name) {
|
||||
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele(
|
||||
(new StringBuilder()).append("forestry.species").append(name).toString());
|
||||
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry
|
||||
.getAllele((new StringBuilder()).append("forestry.species").append(name).toString());
|
||||
}
|
||||
|
||||
public static IAlleleBeeSpecies getExtraSpecies(String name) {
|
||||
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder())
|
||||
.append("extrabees.species.")
|
||||
.append(name.toLowerCase())
|
||||
.toString());
|
||||
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry
|
||||
.getAllele((new StringBuilder()).append("extrabees.species.").append(name.toLowerCase()).toString());
|
||||
}
|
||||
|
||||
public static IAllele getBaseAllele(String name) {
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
|
||||
import forestry.api.apiculture.EnumBeeChromosome;
|
||||
import forestry.api.apiculture.IAlleleBeeEffect;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import java.util.List;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
|
||||
public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect {
|
||||
|
||||
protected int throttle;
|
||||
protected boolean combinable;
|
||||
|
||||
@@ -58,8 +61,8 @@ public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected <T extends Entity> List<T> getEntitiesWithinRange(
|
||||
IBeeGenome genome, IBeeHousing housing, Class<T> entityClass) {
|
||||
protected <T extends Entity> List<T> getEntitiesWithinRange(IBeeGenome genome, IBeeHousing housing,
|
||||
Class<T> entityClass) {
|
||||
// Get the size of the affected area
|
||||
int[] area = genome.getTerritory();
|
||||
ChunkCoordinates coords = housing.getCoordinates();
|
||||
|
||||
@@ -4,6 +4,7 @@ import forestry.api.genetics.IAlleleFloat;
|
||||
import forestry.api.genetics.IChromosomeType;
|
||||
|
||||
public class AlleleFloat extends Allele implements IAlleleFloat {
|
||||
|
||||
private float value;
|
||||
|
||||
public AlleleFloat(String id, float val, boolean isDominant, IChromosomeType... chromosomeTypes) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import forestry.api.genetics.IAlleleFlowers;
|
||||
import forestry.api.genetics.IFlowerProvider;
|
||||
|
||||
public class AlleleFlower extends Allele implements IAlleleFlowers {
|
||||
|
||||
private IFlowerProvider provider;
|
||||
|
||||
public AlleleFlower(String uid, IFlowerProvider flowerProvider, boolean isDominant) {
|
||||
|
||||
@@ -3,10 +3,10 @@ package magicbees.bees;
|
||||
import magicbees.api.bees.AuraChargeType;
|
||||
|
||||
public enum AuraCharge {
|
||||
|
||||
MUTATION(AuraChargeType.MUTATION, 850, 11),
|
||||
DEATH(AuraChargeType.DEATH, 400, 5),
|
||||
PRODUCTION(AuraChargeType.PRODUCTION, 300, 3),
|
||||
;
|
||||
PRODUCTION(AuraChargeType.PRODUCTION, 300, 3),;
|
||||
|
||||
public final AuraChargeType type;
|
||||
public final int duration;
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import forestry.api.genetics.IClassification;
|
||||
import java.util.ArrayList;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
|
||||
public enum BeeClassification implements IClassification {
|
||||
|
||||
VEILED("Veiled", "Velatapis"),
|
||||
ARCANE("Arcane", "Arcanapis"),
|
||||
SUPERNATURAL("Supernatural", "Occultapis"),
|
||||
@@ -35,8 +37,7 @@ public enum BeeClassification implements IClassification {
|
||||
|
||||
BLOODY("Bloody", "Sanguis"),
|
||||
|
||||
BOTANICAL("Botanical", "Botanica"),
|
||||
;
|
||||
BOTANICAL("Botanical", "Botanica"),;
|
||||
|
||||
private String uID;
|
||||
private String latin;
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
import magicbees.main.utils.compat.ExtraBeesHelper;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
|
||||
import forestry.api.apiculture.EnumBeeChromosome;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
import magicbees.main.utils.compat.ExtraBeesHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
|
||||
/**
|
||||
* Simply a class to hold all the functions to manage species' default genomes.
|
||||
@@ -15,6 +17,7 @@ import net.minecraft.nbt.NBTTagList;
|
||||
* @author MysteriousAges
|
||||
*/
|
||||
public class BeeGenomeManager {
|
||||
|
||||
// Basic genome for All thaumic bees.
|
||||
private static IAllele[] getTemplateModBase() {
|
||||
IAllele[] genome = new IAllele[EnumBeeChromosome.values().length];
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import forestry.api.apiculture.IBeeIconColourProvider;
|
||||
import java.awt.Color;
|
||||
|
||||
import forestry.api.apiculture.IBeeIconColourProvider;
|
||||
|
||||
public enum BeeIconColourProvider implements IBeeIconColourProvider {
|
||||
RAINBOW {
|
||||
|
||||
@Override
|
||||
public int getIconColour(int renderPass) {
|
||||
if (renderPass == 0) {
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import magicbees.main.CommonProxy;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import forestry.api.apiculture.IBeeIconProvider;
|
||||
import java.util.Locale;
|
||||
import magicbees.main.CommonProxy;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public enum BeeIconProvider implements IBeeIconProvider {
|
||||
|
||||
SKULKING(CommonProxy.DOMAIN + ":bees/skulking/"),
|
||||
DOCTORAL(CommonProxy.DOMAIN + ":bees/doctoral/");
|
||||
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import magicbees.block.types.HiveType;
|
||||
import magicbees.item.types.DropType;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.Tuple;
|
||||
import magicbees.main.utils.compat.ExtraBeesHelper;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import forestry.api.apiculture.IAlleleBeeSpecies;
|
||||
import forestry.api.apiculture.IBee;
|
||||
@@ -7,22 +20,12 @@ import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeRoot;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import magicbees.block.types.HiveType;
|
||||
import magicbees.item.types.DropType;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.Tuple;
|
||||
import magicbees.main.utils.compat.ExtraBeesHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BeeManager {
|
||||
|
||||
public static IBeeRoot beeRoot;
|
||||
|
||||
private static List<Tuple<IAlleleBeeSpecies, Double>> worldgenSpeciesWeights =
|
||||
new ArrayList<Tuple<IAlleleBeeSpecies, Double>>();
|
||||
private static List<Tuple<IAlleleBeeSpecies, Double>> worldgenSpeciesWeights = new ArrayList<Tuple<IAlleleBeeSpecies, Double>>();
|
||||
private static double worldgenSpeciesWeightsTotal = 0;
|
||||
|
||||
public static void getBeeRoot() {
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -19,6 +19,7 @@ import magicbees.main.utils.compat.ForestryHelper;
|
||||
import magicbees.main.utils.compat.RedstoneArsenalHelper;
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
import magicbees.main.utils.compat.ThermalModsHelper;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -40,8 +41,7 @@ public class BeeProductHelper {
|
||||
|
||||
CHARMED.addProduct(Config.combs.getStackForType(CombType.OTHERWORLDLY), 0.18f);
|
||||
ENCHANTED.addProduct(Config.combs.getStackForType(CombType.OTHERWORLDLY), 0.20f);
|
||||
SUPERNATURAL
|
||||
.addProduct(Config.combs.getStackForType(CombType.OTHERWORLDLY), 0.25f)
|
||||
SUPERNATURAL.addProduct(Config.combs.getStackForType(CombType.OTHERWORLDLY), 0.25f)
|
||||
.addSpecialty(Config.pollen.getStackForType(PollenType.UNUSUAL), 0.08f);
|
||||
|
||||
ETHEREAL.addProduct(Config.combs.getStackForType(CombType.OCCULT), 0.10f)
|
||||
@@ -67,33 +67,27 @@ public class BeeProductHelper {
|
||||
GHASTLY.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.08f)
|
||||
.addSpecialty(new ItemStack(Items.ghast_tear), 0.099f);
|
||||
SPIDERY.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.13f)
|
||||
.addProduct(new ItemStack(Items.string), 0.08f)
|
||||
.addSpecialty(new ItemStack(Items.spider_eye), 0.08f);
|
||||
SMOULDERING
|
||||
.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f)
|
||||
.addProduct(new ItemStack(Items.string), 0.08f).addSpecialty(new ItemStack(Items.spider_eye), 0.08f);
|
||||
SMOULDERING.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f)
|
||||
.addProduct(Config.combs.getStackForType(CombType.MOLTEN), 0.10f)
|
||||
.addSpecialty(new ItemStack(Items.blaze_rod), 0.05f);
|
||||
BRAINY.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f)
|
||||
.addProduct(new ItemStack(Items.rotten_flesh), 0.06f);
|
||||
BIGBAD.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.18f)
|
||||
.addProduct(new ItemStack(Items.beef), 0.12f)
|
||||
.addProduct(new ItemStack(Items.chicken), 0.12f)
|
||||
.addProduct(new ItemStack(Items.beef), 0.12f).addProduct(new ItemStack(Items.chicken), 0.12f)
|
||||
.addSpecialty(new ItemStack(Items.melon), 0.20f);
|
||||
BATTY.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f)
|
||||
.addSpecialty(new ItemStack(Items.string), 0.20f);
|
||||
CHICKEN.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.23f)
|
||||
.addSpecialty(new ItemStack(Items.feather), 0.08f)
|
||||
.addSpecialty(new ItemStack(Items.egg), 0.08f);
|
||||
.addSpecialty(new ItemStack(Items.feather), 0.08f).addSpecialty(new ItemStack(Items.egg), 0.08f);
|
||||
BEEF.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.25f)
|
||||
.addSpecialty(new ItemStack(Items.leather), 0.165f);
|
||||
PORK.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f)
|
||||
.addSpecialty(new ItemStack(Items.carrot), 0.165f);
|
||||
SHEEPISH.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.25f)
|
||||
.addSpecialty(new ItemStack(Blocks.wool), 0.16f)
|
||||
.addSpecialty(new ItemStack(Items.wheat), 0.24f);
|
||||
.addSpecialty(new ItemStack(Blocks.wool), 0.16f).addSpecialty(new ItemStack(Items.wheat), 0.24f);
|
||||
HORSE.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.25f)
|
||||
.addSpecialty(new ItemStack(Items.leather), 0.24f)
|
||||
.addSpecialty(new ItemStack(Items.apple), 0.38f);
|
||||
.addSpecialty(new ItemStack(Items.leather), 0.24f).addSpecialty(new ItemStack(Items.apple), 0.38f);
|
||||
CATTY.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.25f)
|
||||
.addSpecialty(new ItemStack(Items.fish), 0.24f);
|
||||
|
||||
@@ -129,13 +123,11 @@ public class BeeProductHelper {
|
||||
|
||||
MUTABLE.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.PARCHED.ordinal()), 0.30f)
|
||||
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.10f);
|
||||
TRANSMUTING
|
||||
.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.PARCHED.ordinal()), 0.10f)
|
||||
TRANSMUTING.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.PARCHED.ordinal()), 0.10f)
|
||||
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.30f)
|
||||
.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.SILKY.ordinal()), 0.05f)
|
||||
.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.SIMMERING.ordinal()), 0.05f);
|
||||
CRUMBLING
|
||||
.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.PARCHED.ordinal()), 0.10f)
|
||||
CRUMBLING.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.PARCHED.ordinal()), 0.10f)
|
||||
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.30f)
|
||||
.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.POWDERY.ordinal()), 0.10f)
|
||||
.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.COCOA.ordinal()), 0.15f);
|
||||
@@ -166,16 +158,14 @@ public class BeeProductHelper {
|
||||
}
|
||||
|
||||
TE_PLATINUM.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||
if (OreDictionary.getOres("nuggetPlatinum").size() > 0
|
||||
&& OreDictionary.getOres("ingotPlatinum").size() > 0) {
|
||||
if (OreDictionary.getOres("nuggetPlatinum").size() > 0 && OreDictionary.getOres("ingotPlatinum").size() > 0) {
|
||||
TE_PLATINUM.addSpecialty(OreDictionary.getOres("nuggetPlatinum").get(0), 0.18f);
|
||||
} else {
|
||||
TE_PLATINUM.setInactive();
|
||||
}
|
||||
|
||||
TE_NICKEL.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||
if (OreDictionary.getOres("nuggetNickel").size() > 0
|
||||
&& OreDictionary.getOres("ingotNickel").size() > 0) {
|
||||
if (OreDictionary.getOres("nuggetNickel").size() > 0 && OreDictionary.getOres("ingotNickel").size() > 0) {
|
||||
TE_NICKEL.addSpecialty(OreDictionary.getOres("nuggetNickel").get(0), 0.18f);
|
||||
} else {
|
||||
TE_NICKEL.setInactive();
|
||||
@@ -200,24 +190,21 @@ public class BeeProductHelper {
|
||||
}
|
||||
|
||||
TE_BRONZE.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||
if (OreDictionary.getOres("nuggetBronze").size() > 0
|
||||
&& OreDictionary.getOres("ingotBronze").size() > 0) {
|
||||
if (OreDictionary.getOres("nuggetBronze").size() > 0 && OreDictionary.getOres("ingotBronze").size() > 0) {
|
||||
TE_BRONZE.addSpecialty(OreDictionary.getOres("nuggetBronze").get(0), 0.18f);
|
||||
} else {
|
||||
TE_BRONZE.setInactive();
|
||||
}
|
||||
|
||||
TE_INVAR.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||
if (OreDictionary.getOres("nuggetInvar").size() > 0
|
||||
&& OreDictionary.getOres("ingotInvar").size() > 0) {
|
||||
if (OreDictionary.getOres("nuggetInvar").size() > 0 && OreDictionary.getOres("ingotInvar").size() > 0) {
|
||||
TE_INVAR.addSpecialty(OreDictionary.getOres("nuggetInvar").get(0), 0.18f);
|
||||
} else {
|
||||
TE_INVAR.setInactive();
|
||||
}
|
||||
|
||||
TE_ELECTRUM.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||
if (OreDictionary.getOres("nuggetElectrum").size() > 0
|
||||
&& OreDictionary.getOres("ingotElectrum").size() > 0) {
|
||||
if (OreDictionary.getOres("nuggetElectrum").size() > 0 && OreDictionary.getOres("ingotElectrum").size() > 0) {
|
||||
TE_ELECTRUM.addSpecialty(OreDictionary.getOres("nuggetElectrum").get(0), 0.18f);
|
||||
} else {
|
||||
TE_ELECTRUM.setInactive();
|
||||
@@ -271,14 +258,17 @@ public class BeeProductHelper {
|
||||
TC_REJUVENATING.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 0.18f);
|
||||
TC_EMPOWERING.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 0.14f);
|
||||
TC_EMPOWERING.addSpecialty(
|
||||
new ItemStack(ForestryHelper.pollen, 1, ForestryHelper.Pollen.CRYSTALLINE.ordinal()), 0.02f);
|
||||
new ItemStack(ForestryHelper.pollen, 1, ForestryHelper.Pollen.CRYSTALLINE.ordinal()),
|
||||
0.02f);
|
||||
TC_NEXUS.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 0.25f);
|
||||
TC_NEXUS.addProduct(Config.combs.getStackForType(CombType.TEMPORAL), 0.12f);
|
||||
TC_NEXUS.addSpecialty(
|
||||
new ItemStack(ForestryHelper.pollen, 1, ForestryHelper.Pollen.CRYSTALLINE.ordinal()), 0.02f);
|
||||
new ItemStack(ForestryHelper.pollen, 1, ForestryHelper.Pollen.CRYSTALLINE.ordinal()),
|
||||
0.02f);
|
||||
TC_TAINT.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 0.18f);
|
||||
TC_TAINT.addProduct(
|
||||
new ItemStack(ForestryHelper.craftingResource, 1, ForestryHelper.Propolis.STICKY.ordinal()), 0.213f);
|
||||
new ItemStack(ForestryHelper.craftingResource, 1, ForestryHelper.Propolis.STICKY.ordinal()),
|
||||
0.213f);
|
||||
TC_PURE.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 0.16f);
|
||||
TC_PURE.addSpecialty(Config.combs.getStackForType(CombType.SOUL), 0.19f);
|
||||
TC_HUNGRY.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 0.28f);
|
||||
@@ -340,29 +330,42 @@ public class BeeProductHelper {
|
||||
if (ArsMagicaHelper.isActive()) {
|
||||
AM_QUINTESSENCE.addSpecialty(
|
||||
new ItemStack(
|
||||
ArsMagicaHelper.itemResource, 1, ArsMagicaHelper.ResourceType.ARCANE_COMPOUND.ordinal()),
|
||||
ArsMagicaHelper.itemResource,
|
||||
1,
|
||||
ArsMagicaHelper.ResourceType.ARCANE_COMPOUND.ordinal()),
|
||||
0.05f);
|
||||
AM_EARTH.addSpecialty(
|
||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.EARTH.ordinal()), 0.07f);
|
||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.EARTH.ordinal()),
|
||||
0.07f);
|
||||
AM_AIR.addSpecialty(
|
||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.AIR.ordinal()), 0.07f);
|
||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.AIR.ordinal()),
|
||||
0.07f);
|
||||
AM_FIRE.addSpecialty(
|
||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.FIRE.ordinal()), 0.07f);
|
||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.FIRE.ordinal()),
|
||||
0.07f);
|
||||
AM_WATER.addSpecialty(
|
||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.WATER.ordinal()), 0.07f);
|
||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.WATER.ordinal()),
|
||||
0.07f);
|
||||
AM_LIGHTNING.addSpecialty(
|
||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.LIGHTNING.ordinal()), 0.07f);
|
||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.LIGHTNING.ordinal()),
|
||||
0.07f);
|
||||
AM_PLANT.addSpecialty(
|
||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.PLANT.ordinal()), 0.07f);
|
||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.PLANT.ordinal()),
|
||||
0.07f);
|
||||
AM_ICE.addSpecialty(
|
||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.ICE.ordinal()), 0.07f);
|
||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.ICE.ordinal()),
|
||||
0.07f);
|
||||
AM_ARCANE.addSpecialty(
|
||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.ARCANE.ordinal()), 0.11f);
|
||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.ARCANE.ordinal()),
|
||||
0.11f);
|
||||
AM_VORTEX.addSpecialty(
|
||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.EARTH.ordinal()), 0.15f);
|
||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.EARTH.ordinal()),
|
||||
0.15f);
|
||||
AM_WIGHT.addSpecialty(
|
||||
new ItemStack(
|
||||
ArsMagicaHelper.itemResource, 1, ArsMagicaHelper.ResourceType.ARCANE_COMPOUND.ordinal()),
|
||||
ArsMagicaHelper.itemResource,
|
||||
1,
|
||||
ArsMagicaHelper.ResourceType.ARCANE_COMPOUND.ordinal()),
|
||||
0.11f);
|
||||
}
|
||||
}
|
||||
@@ -374,15 +377,13 @@ public class BeeProductHelper {
|
||||
TE_PYRO.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f)
|
||||
.addProduct(Config.combs.getStackForType(CombType.MOLTEN), 0.10f)
|
||||
.addSpecialty(new ItemStack(Items.blaze_powder), 0.05f);
|
||||
TE_DESTABILIZED
|
||||
.addProduct(Config.combs.getStackForType(CombType.TE_DESTABILIZED), 0.10f)
|
||||
TE_DESTABILIZED.addProduct(Config.combs.getStackForType(CombType.TE_DESTABILIZED), 0.10f)
|
||||
.addProduct(Config.combs.getStackForType(CombType.OCCULT), 0.10f)
|
||||
.addSpecialty(new ItemStack(Items.redstone), 0.05f);
|
||||
TE_LUX.addProduct(Config.combs.getStackForType(CombType.TE_LUX), 0.10f)
|
||||
.addProduct(Config.combs.getStackForType(CombType.OCCULT), 0.10f)
|
||||
.addSpecialty(new ItemStack(Items.glowstone_dust), 0.05f);
|
||||
TE_WINSOME
|
||||
.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f)
|
||||
TE_WINSOME.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f)
|
||||
.addProduct(Config.combs.getStackForType(CombType.TE_ENDEARING), 0.05f)
|
||||
.addSpecialty(new ItemStack(Items.ender_pearl), 0.05f);
|
||||
TE_ENDEARING
|
||||
@@ -398,11 +399,9 @@ public class BeeProductHelper {
|
||||
TE_GROUNDED.addProduct(Config.combs.getStackForType(CombType.EARTHY), 0.16f);
|
||||
TE_ROCKING.addProduct(Config.combs.getStackForType(CombType.EARTHY), 0.29f);
|
||||
|
||||
TE_SIGNALUS
|
||||
.addProduct(Config.combs.getStackForType(CombType.TE_DESTABILIZED), 0.10f)
|
||||
TE_SIGNALUS.addProduct(Config.combs.getStackForType(CombType.TE_DESTABILIZED), 0.10f)
|
||||
.addProduct(Config.combs.getStackForType(CombType.OCCULT), 0.10f);
|
||||
TE_LUMIUS
|
||||
.addProduct(Config.combs.getStackForType(CombType.TE_LUX), 0.10f)
|
||||
TE_LUMIUS.addProduct(Config.combs.getStackForType(CombType.TE_LUX), 0.10f)
|
||||
.addProduct(Config.combs.getStackForType(CombType.OCCULT), 0.10f);
|
||||
|
||||
if (ThermalModsHelper.isActive()) {
|
||||
@@ -432,26 +431,19 @@ public class BeeProductHelper {
|
||||
|
||||
public static void initBotaniaProducts() {
|
||||
BOT_ROOTED.addProduct(Config.combs.getStackForType(CombType.MUNDANE), 0.10f);
|
||||
BOT_BOTANIC
|
||||
.addProduct(Config.combs.getStackForType(CombType.MUNDANE), 0.10f)
|
||||
BOT_BOTANIC.addProduct(Config.combs.getStackForType(CombType.MUNDANE), 0.10f)
|
||||
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.05f);
|
||||
BOT_BLOSSOM
|
||||
.addProduct(Config.combs.getStackForType(CombType.MUNDANE), 0.20f)
|
||||
BOT_BLOSSOM.addProduct(Config.combs.getStackForType(CombType.MUNDANE), 0.20f)
|
||||
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.05f);
|
||||
BOT_FLORAL
|
||||
.addProduct(Config.combs.getStackForType(CombType.MUNDANE), 0.25f)
|
||||
BOT_FLORAL.addProduct(Config.combs.getStackForType(CombType.MUNDANE), 0.25f)
|
||||
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.05f);
|
||||
BOT_VAZBEE
|
||||
.addProduct(Config.combs.getStackForType(CombType.SOUL), 0.05f)
|
||||
.addProduct(new ItemStack(Items.dye, 1, 9), 0.20f)
|
||||
.addProduct(new ItemStack(Blocks.wool, 1, 9), 0.02f)
|
||||
BOT_VAZBEE.addProduct(Config.combs.getStackForType(CombType.SOUL), 0.05f)
|
||||
.addProduct(new ItemStack(Items.dye, 1, 9), 0.20f).addProduct(new ItemStack(Blocks.wool, 1, 9), 0.02f)
|
||||
.addProduct(new ItemStack(Blocks.red_flower, 1, 7), 0.06f)
|
||||
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.15f);
|
||||
BOT_SOMNOLENT
|
||||
.addProduct(Config.combs.getStackForType(CombType.WATERY), 0.08f)
|
||||
BOT_SOMNOLENT.addProduct(Config.combs.getStackForType(CombType.WATERY), 0.08f)
|
||||
.addProduct(Config.combs.getStackForType(CombType.SOUL), 0.15f);
|
||||
BOT_DREAMING
|
||||
.addProduct(Config.combs.getStackForType(CombType.WATERY), 0.16f)
|
||||
BOT_DREAMING.addProduct(Config.combs.getStackForType(CombType.WATERY), 0.16f)
|
||||
.addProduct(Config.combs.getStackForType(CombType.SOUL), 0.33f);
|
||||
BOT_ALFHEIM.addProduct(Config.combs.getStackForType(CombType.OTHERWORLDLY), 0.28f);
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,14 +1,10 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import forestry.api.apiculture.hives.HiveManager;
|
||||
import forestry.api.apiculture.hives.IHiveDescription;
|
||||
import forestry.api.apiculture.hives.IHiveGen;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
import magicbees.block.types.HiveType;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.BlockUtil;
|
||||
@@ -17,47 +13,32 @@ import magicbees.world.feature.FeatureOreVein;
|
||||
import magicbees.world.feature.HiveGenNether;
|
||||
import magicbees.world.feature.HiveGenOblivion;
|
||||
import magicbees.world.feature.HiveGenUnderground;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
|
||||
import forestry.api.apiculture.hives.HiveManager;
|
||||
import forestry.api.apiculture.hives.IHiveDescription;
|
||||
import forestry.api.apiculture.hives.IHiveGen;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
|
||||
public enum HiveDescription implements IHiveDescription {
|
||||
CURIOUS(
|
||||
HiveType.CURIOUS,
|
||||
3.0f,
|
||||
HiveManager.genHelper.tree(),
|
||||
false,
|
||||
BiomeDictionary.Type.FOREST,
|
||||
BiomeDictionary.Type.PLAINS,
|
||||
BiomeDictionary.Type.HILLS),
|
||||
UNUSUAL(
|
||||
HiveType.UNUSUAL,
|
||||
1.0f,
|
||||
HiveManager.genHelper.ground(Blocks.dirt, Blocks.grass),
|
||||
false,
|
||||
BiomeDictionary.Type.PLAINS,
|
||||
BiomeDictionary.Type.MOUNTAIN,
|
||||
BiomeDictionary.Type.HILLS,
|
||||
|
||||
CURIOUS(HiveType.CURIOUS, 3.0f, HiveManager.genHelper.tree(), false, BiomeDictionary.Type.FOREST,
|
||||
BiomeDictionary.Type.PLAINS, BiomeDictionary.Type.HILLS),
|
||||
UNUSUAL(HiveType.UNUSUAL, 1.0f, HiveManager.genHelper.ground(Blocks.dirt, Blocks.grass), false,
|
||||
BiomeDictionary.Type.PLAINS, BiomeDictionary.Type.MOUNTAIN, BiomeDictionary.Type.HILLS,
|
||||
BiomeDictionary.Type.RIVER),
|
||||
RESONANT(
|
||||
HiveType.RESONANT,
|
||||
0.9f,
|
||||
HiveManager.genHelper.ground(Blocks.sand, Blocks.sandstone),
|
||||
false,
|
||||
BiomeDictionary.Type.SANDY,
|
||||
BiomeDictionary.Type.MESA,
|
||||
BiomeDictionary.Type.HOT,
|
||||
RESONANT(HiveType.RESONANT, 0.9f, HiveManager.genHelper.ground(Blocks.sand, Blocks.sandstone), false,
|
||||
BiomeDictionary.Type.SANDY, BiomeDictionary.Type.MESA, BiomeDictionary.Type.HOT,
|
||||
BiomeDictionary.Type.MAGICAL),
|
||||
DEEP(
|
||||
HiveType.DEEP,
|
||||
5.0f,
|
||||
new HiveGenUnderground(10, 15, 5),
|
||||
true,
|
||||
BiomeDictionary.Type.HILLS,
|
||||
BiomeDictionary.Type.MOUNTAIN,
|
||||
BiomeDictionary.Type.MAGICAL) {
|
||||
DEEP(HiveType.DEEP, 5.0f, new HiveGenUnderground(10, 15, 5), true, BiomeDictionary.Type.HILLS,
|
||||
BiomeDictionary.Type.MOUNTAIN, BiomeDictionary.Type.MAGICAL) {
|
||||
|
||||
@Override
|
||||
public void postGen(World world, int x, int y, int z) {
|
||||
super.postGen(world, x, y, z);
|
||||
@@ -71,6 +52,7 @@ public enum HiveDescription implements IHiveDescription {
|
||||
}
|
||||
},
|
||||
INFERNAL(HiveType.INFERNAL, 50.0f, new HiveGenNether(0, 175, 6), true, BiomeDictionary.Type.NETHER) {
|
||||
|
||||
@Override
|
||||
public void postGen(World world, int x, int y, int z) {
|
||||
super.postGen(world, x, y, z);
|
||||
@@ -83,13 +65,9 @@ public enum HiveDescription implements IHiveDescription {
|
||||
FeatureOreVein.netherQuartzGen.generateVein(world, random, x, y, z - 1, 4);
|
||||
}
|
||||
},
|
||||
INFERNAL_OVERWORLD(
|
||||
HiveType.INFERNAL,
|
||||
0.95f,
|
||||
new HiveGenUnderground(5, 13, 6),
|
||||
true,
|
||||
BiomeDictionary.Type.MAGICAL,
|
||||
INFERNAL_OVERWORLD(HiveType.INFERNAL, 0.95f, new HiveGenUnderground(5, 13, 6), true, BiomeDictionary.Type.MAGICAL,
|
||||
BiomeDictionary.Type.HOT) {
|
||||
|
||||
@Override
|
||||
public void postGen(World world, int x, int y, int z) {
|
||||
super.postGen(world, x, y, z);
|
||||
@@ -110,6 +88,7 @@ public enum HiveDescription implements IHiveDescription {
|
||||
}
|
||||
},
|
||||
OBLIVION(HiveType.OBLIVION, 20.0f, new HiveGenOblivion(), true, BiomeDictionary.Type.END) {
|
||||
|
||||
@Override
|
||||
public void postGen(World world, int x, int y, int z) {
|
||||
super.postGen(world, x, y, z);
|
||||
@@ -120,13 +99,9 @@ public enum HiveDescription implements IHiveDescription {
|
||||
}
|
||||
}
|
||||
},
|
||||
OBLIVION_OVERWORLD(
|
||||
HiveType.OBLIVION,
|
||||
0.87f,
|
||||
new HiveGenUnderground(5, 5, 5),
|
||||
true,
|
||||
BiomeDictionary.Type.MAGICAL,
|
||||
OBLIVION_OVERWORLD(HiveType.OBLIVION, 0.87f, new HiveGenUnderground(5, 5, 5), true, BiomeDictionary.Type.MAGICAL,
|
||||
BiomeDictionary.Type.COLD) {
|
||||
|
||||
@Override
|
||||
public void postGen(World world, int x, int y, int z) {
|
||||
super.postGen(world, x, y, z);
|
||||
@@ -149,11 +124,7 @@ public enum HiveDescription implements IHiveDescription {
|
||||
private final IHiveGen hiveGen;
|
||||
private final boolean spawnsIgnoreClimate;
|
||||
|
||||
private HiveDescription(
|
||||
HiveType type,
|
||||
float chance,
|
||||
IHiveGen genType,
|
||||
boolean ignoreClimate,
|
||||
private HiveDescription(HiveType type, float chance, IHiveGen genType, boolean ignoreClimate,
|
||||
BiomeDictionary.Type... goodBiomeTypes) {
|
||||
hiveType = type;
|
||||
genChance = chance;
|
||||
@@ -209,8 +180,9 @@ public enum HiveDescription implements IHiveDescription {
|
||||
@Override
|
||||
public void postGen(World world, int x, int y, int z) {
|
||||
if (logSpawns) {
|
||||
LogHelper.info("Spawned " + this.toString().toLowerCase(Locale.ENGLISH) + " hive at: X " + x + ", Y: " + y
|
||||
+ ", Z: " + z);
|
||||
LogHelper.info(
|
||||
"Spawned " + this.toString()
|
||||
.toLowerCase(Locale.ENGLISH) + " hive at: X " + x + ", Y: " + y + ", Z: " + z);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,18 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import forestry.api.apiculture.IBee;
|
||||
import forestry.api.apiculture.IHiveDrop;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class HiveDrop implements IHiveDrop {
|
||||
|
||||
private IAllele[] template;
|
||||
private int chance;
|
||||
private ItemStack[] bonus;
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.MoonPhase;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.core.IClimateProvider;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IGenome;
|
||||
import forestry.api.genetics.IMutationCondition;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.MoonPhase;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
// There is a bonus to this mutation during moon phases...
|
||||
public class MoonPhaseMutationBonus implements IMutationCondition {
|
||||
|
||||
private final MoonPhase moonPhaseStart;
|
||||
private final MoonPhase moonPhaseEnd;
|
||||
private final float mutationBonus;
|
||||
@@ -27,16 +30,8 @@ public class MoonPhaseMutationBonus implements IMutationCondition {
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getChance(
|
||||
World world,
|
||||
int x,
|
||||
int y,
|
||||
int z,
|
||||
IAllele allele0,
|
||||
IAllele allele1,
|
||||
IGenome genome0,
|
||||
IGenome genome1,
|
||||
IClimateProvider climate) {
|
||||
public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0,
|
||||
IGenome genome1, IClimateProvider climate) {
|
||||
if (MoonPhase.getMoonPhase(world).isBetween(this.moonPhaseStart, this.moonPhaseEnd)) {
|
||||
return this.mutationBonus;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.MoonPhase;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.core.IClimateProvider;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IGenome;
|
||||
import forestry.api.genetics.IMutationCondition;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.MoonPhase;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class MoonPhaseMutationRestriction implements IMutationCondition {
|
||||
|
||||
private final MoonPhase moonPhaseStart;
|
||||
private final MoonPhase moonPhaseEnd;
|
||||
|
||||
@@ -23,16 +26,8 @@ public class MoonPhaseMutationRestriction implements IMutationCondition {
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getChance(
|
||||
World world,
|
||||
int x,
|
||||
int y,
|
||||
int z,
|
||||
IAllele allele0,
|
||||
IAllele allele1,
|
||||
IGenome genome0,
|
||||
IGenome genome1,
|
||||
IClimateProvider climate) {
|
||||
public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0,
|
||||
IGenome genome1, IClimateProvider climate) {
|
||||
if (MoonPhase.getMoonPhase(world).isBetween(this.moonPhaseStart, this.moonPhaseEnd)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
package magicbees.bees.allele.effect;
|
||||
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import java.util.HashMap;
|
||||
|
||||
import magicbees.bees.AlleleEffect;
|
||||
import magicbees.bees.BeeManager;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -14,7 +12,13 @@ import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class AlleleEffectCrumbling extends AlleleEffect {
|
||||
|
||||
private static HashMap<ItemStack, ItemStack> crumbleMap = new HashMap<ItemStack, ItemStack>();
|
||||
|
||||
public static void addPairToMap(ItemStack source, ItemStack target) {
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
package magicbees.bees.allele.effect;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import magicbees.bees.AlleleEffect;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import java.util.List;
|
||||
import magicbees.bees.AlleleEffect;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class AlleleEffectCure extends AlleleEffect {
|
||||
|
||||
|
||||
@@ -3,25 +3,28 @@ package magicbees.bees.allele.effect;
|
||||
import static magicbees.main.utils.compat.thaumcraft.NodeHelper.getWeightedRandomAspect;
|
||||
import static magicbees.main.utils.compat.thaumcraft.NodeHelper.updateNode;
|
||||
|
||||
import forestry.api.apiculture.IAlleleBeeAcceleratableEffect;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import magicbees.bees.AlleleEffect;
|
||||
import magicbees.bees.BeeManager;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.BlockUtil;
|
||||
import magicbees.main.utils.compat.thaumcraft.NodeHelper;
|
||||
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.nodes.INode;
|
||||
import forestry.api.apiculture.IAlleleBeeAcceleratableEffect;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class AlleleEffectEmpowering extends AlleleEffect implements IAlleleBeeAcceleratableEffect {
|
||||
|
||||
@@ -43,8 +46,8 @@ public class AlleleEffectEmpowering extends AlleleEffect implements IAlleleBeeAc
|
||||
World world = housing.getWorld();
|
||||
ChunkCoordinates coords = housing.getCoordinates();
|
||||
IBeeModifier beeModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
|
||||
int range =
|
||||
Math.max((int) Math.ceil(genome.getTerritory()[0] * beeModifier.getTerritoryModifier(genome, 1f)), 1);
|
||||
int range = Math
|
||||
.max((int) Math.ceil(genome.getTerritory()[0] * beeModifier.getTerritoryModifier(genome, 1f)), 1);
|
||||
List<Chunk> chunks = BlockUtil.getChunksInSearchRange(world, coords.posX, coords.posZ, range);
|
||||
|
||||
if (NodeHelper.growNodeInRange(chunks, world, coords.posX, coords.posY, coords.posZ, range)) {
|
||||
@@ -60,8 +63,8 @@ public class AlleleEffectEmpowering extends AlleleEffect implements IAlleleBeeAc
|
||||
World world = housing.getWorld();
|
||||
ChunkCoordinates coords = housing.getCoordinates();
|
||||
IBeeModifier beeModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
|
||||
int range =
|
||||
Math.max((int) Math.ceil(genome.getTerritory()[0] * beeModifier.getTerritoryModifier(genome, 1f)), 1);
|
||||
int range = Math
|
||||
.max((int) Math.ceil(genome.getTerritory()[0] * beeModifier.getTerritoryModifier(genome, 1f)), 1);
|
||||
List<Chunk> chunks = BlockUtil.getChunksInSearchRange(world, coords.posX, coords.posZ, range);
|
||||
|
||||
int idid = (int) did;
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
package magicbees.bees.allele.effect;
|
||||
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import java.util.List;
|
||||
|
||||
import magicbees.bees.AlleleEffect;
|
||||
import magicbees.bees.BeeManager;
|
||||
import magicbees.main.utils.BlockUtil;
|
||||
import magicbees.main.utils.compat.thaumcraft.NodeHelper;
|
||||
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
import thaumcraft.api.nodes.NodeType;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class AlleleEffectNodeConversion extends AlleleEffect {
|
||||
|
||||
@@ -39,8 +42,8 @@ public class AlleleEffectNodeConversion extends AlleleEffect {
|
||||
int range = (int) Math.ceil(genome.getTerritory()[0] * beeModifier.getTerritoryModifier(genome, 1f));
|
||||
List<Chunk> chunks = BlockUtil.getChunksInSearchRange(world, coords.posX, coords.posZ, range);
|
||||
|
||||
if (NodeHelper.convertNodeInRangeToType(
|
||||
chunks, world, coords.posX, coords.posY, coords.posZ, range, targetType)) {
|
||||
if (NodeHelper
|
||||
.convertNodeInRangeToType(chunks, world, coords.posX, coords.posY, coords.posZ, range, targetType)) {
|
||||
storedData.setInteger(0, storedData.getInteger(0) - throttle);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
package magicbees.bees.allele.effect;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import magicbees.bees.AlleleEffect;
|
||||
import magicbees.bees.BeeManager;
|
||||
import magicbees.main.utils.BlockUtil;
|
||||
import magicbees.main.utils.compat.thaumcraft.NodeHelper;
|
||||
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import java.util.List;
|
||||
import magicbees.bees.AlleleEffect;
|
||||
import magicbees.bees.BeeManager;
|
||||
import magicbees.main.utils.BlockUtil;
|
||||
import magicbees.main.utils.compat.thaumcraft.NodeHelper;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
public class AlleleEffectNodeRepair extends AlleleEffect {
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package magicbees.bees.allele.effect;
|
||||
|
||||
import magicbees.bees.AlleleEffect;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import magicbees.bees.AlleleEffect;
|
||||
|
||||
public class AlleleEffectPlaceholder extends AlleleEffect {
|
||||
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
package magicbees.bees.allele.effect;
|
||||
|
||||
import forestry.api.apiculture.BeeManager;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import java.util.List;
|
||||
|
||||
import magicbees.bees.AlleleEffect;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
|
||||
import forestry.api.apiculture.BeeManager;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class AlleleEffectPotion extends AlleleEffect {
|
||||
|
||||
private int potionId;
|
||||
private int duration;
|
||||
private boolean isMalicious;
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
package magicbees.bees.allele.effect;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import magicbees.bees.AlleleEffect;
|
||||
import magicbees.bees.BeeManager;
|
||||
import magicbees.main.utils.BlockUtil;
|
||||
import magicbees.main.utils.compat.thaumcraft.NodeHelper;
|
||||
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import java.util.List;
|
||||
import magicbees.bees.AlleleEffect;
|
||||
import magicbees.bees.BeeManager;
|
||||
import magicbees.main.utils.BlockUtil;
|
||||
import magicbees.main.utils.compat.thaumcraft.NodeHelper;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
public class AlleleEffectRecharge extends AlleleEffect {
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
package magicbees.bees.allele.effect;
|
||||
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import java.util.List;
|
||||
|
||||
import magicbees.bees.AlleleEffect;
|
||||
import magicbees.bees.BeeManager;
|
||||
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -15,7 +13,13 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class AlleleEffectSpawnMob extends AlleleEffect {
|
||||
|
||||
protected boolean aggosOnPlayer;
|
||||
protected boolean spawnsWhilePlayerNear;
|
||||
protected String alternateMob;
|
||||
@@ -111,8 +115,8 @@ public class AlleleEffectSpawnMob extends AlleleEffect {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected boolean spawnMob(
|
||||
IBeeGenome bee, EntityPlayer player, World world, IBeeHousing housing, boolean spawnAlternate) {
|
||||
protected boolean spawnMob(IBeeGenome bee, EntityPlayer player, World world, IBeeHousing housing,
|
||||
boolean spawnAlternate) {
|
||||
boolean spawnedFlag = false;
|
||||
|
||||
EntityLiving mob;
|
||||
@@ -126,15 +130,14 @@ public class AlleleEffectSpawnMob extends AlleleEffect {
|
||||
double pos[] = this.randomMobSpawnCoords(world, bee, housing);
|
||||
|
||||
int entitiesCount = world.getEntitiesWithinAABB(
|
||||
mob.getClass(),
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
(int) pos[0],
|
||||
(int) pos[1],
|
||||
(int) pos[2],
|
||||
(int) pos[0] + 1,
|
||||
(int) pos[1] + 1,
|
||||
(int) pos[2] + 1)
|
||||
.expand(8.0D, 4.0D, 8.0D))
|
||||
mob.getClass(),
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
(int) pos[0],
|
||||
(int) pos[1],
|
||||
(int) pos[2],
|
||||
(int) pos[0] + 1,
|
||||
(int) pos[1] + 1,
|
||||
(int) pos[2] + 1).expand(8.0D, 4.0D, 8.0D))
|
||||
.size();
|
||||
|
||||
mob.setPositionAndRotation(pos[0], pos[1], pos[2], world.rand.nextFloat() * 360f, 0f);
|
||||
@@ -142,9 +145,8 @@ public class AlleleEffectSpawnMob extends AlleleEffect {
|
||||
if (entitiesCount < maxMobsInArea && mob.getCanSpawnHere()) {
|
||||
spawnedFlag = world.spawnEntityInWorld(mob);
|
||||
if (aggosOnPlayer && player != null) {
|
||||
if (forestry.api.apiculture.BeeManager.armorApiaristHelper.wearsItems(
|
||||
(EntityLivingBase) player, getUID(), true)
|
||||
< 4) {
|
||||
if (forestry.api.apiculture.BeeManager.armorApiaristHelper
|
||||
.wearsItems((EntityLivingBase) player, getUID(), true) < 4) {
|
||||
// Protect fully suited player from initial murder intent.
|
||||
mob.setAttackTarget(player);
|
||||
}
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
package magicbees.bees.allele.effect;
|
||||
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import magicbees.bees.AlleleEffect;
|
||||
import magicbees.bees.BeeManager;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class AlleleEffectSpawnMobWeighted extends AlleleEffect {
|
||||
|
||||
private String[] entityNames;
|
||||
private int[] spawnChance;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package magicbees.bees.allele.effect;
|
||||
|
||||
import forestry.api.apiculture.BeeManager;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -12,20 +11,22 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.apiculture.BeeManager;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
|
||||
public class AlleleEffectSpawnWisp extends AlleleEffectSpawnMob {
|
||||
|
||||
private byte[] wispTypes = {
|
||||
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47
|
||||
};
|
||||
private byte[] wispTypes = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25,
|
||||
26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47 };
|
||||
|
||||
public AlleleEffectSpawnWisp(String id, boolean isDominant, String mobToSpawn, String soundToPlay) {
|
||||
super(id, isDominant, mobToSpawn, soundToPlay);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean spawnMob(
|
||||
IBeeGenome bee, EntityPlayer player, World world, IBeeHousing housing, boolean spawnAlternate) {
|
||||
protected boolean spawnMob(IBeeGenome bee, EntityPlayer player, World world, IBeeHousing housing,
|
||||
boolean spawnAlternate) {
|
||||
boolean spawnedFlag = false;
|
||||
|
||||
EntityLiving mob;
|
||||
@@ -39,15 +40,14 @@ public class AlleleEffectSpawnWisp extends AlleleEffectSpawnMob {
|
||||
double pos[] = this.randomMobSpawnCoords(world, bee, housing);
|
||||
|
||||
int entitiesCount = world.getEntitiesWithinAABB(
|
||||
mob.getClass(),
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
(int) pos[0],
|
||||
(int) pos[1],
|
||||
(int) pos[2],
|
||||
(int) pos[0] + 1,
|
||||
(int) pos[1] + 1,
|
||||
(int) pos[2] + 1)
|
||||
.expand(8.0D, 4.0D, 8.0D))
|
||||
mob.getClass(),
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
(int) pos[0],
|
||||
(int) pos[1],
|
||||
(int) pos[2],
|
||||
(int) pos[0] + 1,
|
||||
(int) pos[1] + 1,
|
||||
(int) pos[2] + 1).expand(8.0D, 4.0D, 8.0D))
|
||||
.size();
|
||||
|
||||
mob.setPositionAndRotation(pos[0], pos[1], pos[2], world.rand.nextFloat() * 360f, 0f);
|
||||
@@ -60,8 +60,7 @@ public class AlleleEffectSpawnWisp extends AlleleEffectSpawnMob {
|
||||
type.setByte(mob, wispTypes[world.rand.nextInt(wispTypes.length)]);
|
||||
} catch (Exception e) {
|
||||
/*
|
||||
* Last time I had a request to post
|
||||
* error messages, I regretted it.
|
||||
* Last time I had a request to post error messages, I regretted it.
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
package magicbees.bees.allele.effect;
|
||||
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import magicbees.bees.AlleleEffect;
|
||||
import magicbees.bees.BeeManager;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class AlleleEffectTransmuting extends AlleleEffect {
|
||||
|
||||
private TransmutationEffectController transmutationController;
|
||||
|
||||
public AlleleEffectTransmuting(
|
||||
String id, boolean isDominant, TransmutationEffectController effectController, int timeoutBeeTicks) {
|
||||
public AlleleEffectTransmuting(String id, boolean isDominant, TransmutationEffectController effectController,
|
||||
int timeoutBeeTicks) {
|
||||
super(id, isDominant, timeoutBeeTicks);
|
||||
this.transmutationController = effectController;
|
||||
}
|
||||
@@ -49,7 +51,9 @@ public class AlleleEffectTransmuting extends AlleleEffect {
|
||||
world,
|
||||
biome,
|
||||
new ItemStack(
|
||||
world.getBlock(xCoord, yCoord, zCoord), 1, world.getBlockMetadata(xCoord, yCoord, zCoord)),
|
||||
world.getBlock(xCoord, yCoord, zCoord),
|
||||
1,
|
||||
world.getBlockMetadata(xCoord, yCoord, zCoord)),
|
||||
xCoord,
|
||||
yCoord,
|
||||
zCoord);
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package magicbees.bees.allele.effect;
|
||||
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class EffectData implements IEffectData {
|
||||
|
||||
private int[] intData;
|
||||
private boolean[] boolData;
|
||||
private float[] floatData;
|
||||
|
||||
@@ -3,14 +3,17 @@ package magicbees.bees.allele.effect;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import magicbees.api.bees.ITransmutationEffectController;
|
||||
import magicbees.api.bees.ITransmutationEffectLogic;
|
||||
import magicbees.main.utils.LogHelper;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
||||
public class TransmutationEffectController implements ITransmutationEffectController {
|
||||
|
||||
private List<ITransmutationEffectLogic> logicObjects;
|
||||
|
||||
public TransmutationEffectController(ITransmutationEffectLogic... effectLogic) {
|
||||
@@ -28,9 +31,10 @@ public class TransmutationEffectController implements ITransmutationEffectContro
|
||||
break;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogHelper.warn(String.format(
|
||||
"Magic Bees encountered an issue with an ITransmutationEffectLogic provider %s. Debug information follows.",
|
||||
logic.getClass().getName()));
|
||||
LogHelper.warn(
|
||||
String.format(
|
||||
"Magic Bees encountered an issue with an ITransmutationEffectLogic provider %s. Debug information follows.",
|
||||
logic.getClass().getName()));
|
||||
LogHelper.info(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package magicbees.bees.allele.effect;
|
||||
|
||||
import magicbees.api.bees.ITransmutationEffectLogic;
|
||||
import magicbees.main.utils.compat.BotaniaHelper;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package magicbees.bees.allele.effect;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import java.util.Locale;
|
||||
|
||||
import magicbees.api.bees.ITransmutationEffectLogic;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -11,7 +12,10 @@ import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class TransmutationEffectRailcraft implements ITransmutationEffectLogic {
|
||||
|
||||
@Override
|
||||
public boolean tryTransmutation(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z) {
|
||||
boolean flag = false;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package magicbees.bees.allele.effect;
|
||||
|
||||
import magicbees.api.bees.ITransmutationEffectLogic;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
@@ -9,6 +10,7 @@ import net.minecraftforge.common.BiomeDictionary;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class TransmutationEffectVanilla implements ITransmutationEffectLogic {
|
||||
|
||||
@Override
|
||||
public boolean tryTransmutation(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z) {
|
||||
return trySpawnSandstone(world, biome, sourceBlock, x, y, z);
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package magicbees.bees.allele.flowerProvider;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
import forestry.api.apiculture.FlowerManager;
|
||||
import forestry.api.genetics.IFlower;
|
||||
import forestry.api.genetics.IFlowerGrowthRule;
|
||||
import forestry.api.genetics.IFlowerProvider;
|
||||
import java.util.Set;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public abstract class FlowerProvider implements IFlowerProvider {
|
||||
|
||||
|
||||
+10
-8
@@ -1,16 +1,18 @@
|
||||
package magicbees.bees.allele.flowerProvider;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.compat.ArsMagicaHelper;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.genetics.IFlowerGrowthHelper;
|
||||
import forestry.api.genetics.IFlowerGrowthRule;
|
||||
import forestry.api.genetics.IFlowerRegistry;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.genetics.IPollinatable;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.compat.ArsMagicaHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class FlowerProviderArsMagicaFlower extends FlowerProvider implements IFlowerGrowthRule {
|
||||
|
||||
@@ -56,8 +58,8 @@ public class FlowerProviderArsMagicaFlower extends FlowerProvider implements IFl
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean growFlower(
|
||||
IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y, int z) {
|
||||
public boolean growFlower(IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y,
|
||||
int z) {
|
||||
return growFlower(world, x, y, z);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package magicbees.bees.allele.flowerProvider;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.genetics.IPollinatable;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class FlowerProviderAuraNode extends FlowerProvider {
|
||||
|
||||
@@ -45,8 +47,7 @@ public class FlowerProviderAuraNode extends FlowerProvider {
|
||||
if (stack.getItem() == itemStack.getItem() && stack.getItemDamage() == itemStack.getItemDamage()) {
|
||||
if (stack.stackSize < stack.getItem().getItemStackLimit(stack)) {
|
||||
stack.stackSize += itemStack.stackSize;
|
||||
itemStack.stackSize =
|
||||
Math.max(stack.stackSize - stack.getItem().getItemStackLimit(stack), 0);
|
||||
itemStack.stackSize = Math.max(stack.stackSize - stack.getItem().getItemStackLimit(stack), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
package magicbees.bees.allele.flowerProvider;
|
||||
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.genetics.IPollinatable;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.genetics.IPollinatable;
|
||||
|
||||
public class FlowerProviderBookshelf extends FlowerProvider {
|
||||
|
||||
public FlowerProviderBookshelf() {
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
package magicbees.bees.allele.flowerProvider;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.compat.BotaniaHelper;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import forestry.api.genetics.IFlowerGrowthHelper;
|
||||
import forestry.api.genetics.IFlowerGrowthRule;
|
||||
import forestry.api.genetics.IFlowerRegistry;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.genetics.IPollinatable;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.compat.BotaniaHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class FlowerProviderBotania extends FlowerProvider implements IFlowerGrowthRule {
|
||||
|
||||
@@ -31,8 +33,8 @@ public class FlowerProviderBotania extends FlowerProvider implements IFlowerGrow
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean growFlower(
|
||||
IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y, int z) {
|
||||
public boolean growFlower(IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y,
|
||||
int z) {
|
||||
return growFlower(world, x, y, z);
|
||||
}
|
||||
|
||||
|
||||
+10
-8
@@ -1,16 +1,18 @@
|
||||
package magicbees.bees.allele.flowerProvider;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.genetics.IFlowerGrowthHelper;
|
||||
import forestry.api.genetics.IFlowerGrowthRule;
|
||||
import forestry.api.genetics.IFlowerRegistry;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.genetics.IPollinatable;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class FlowerProviderThaumcraftFlower extends FlowerProvider implements IFlowerGrowthRule {
|
||||
|
||||
@@ -53,8 +55,8 @@ public class FlowerProviderThaumcraftFlower extends FlowerProvider implements IF
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean growFlower(
|
||||
IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y, int z) {
|
||||
public boolean growFlower(IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y,
|
||||
int z) {
|
||||
return growFlower(world, x, y, z);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
package magicbees.block;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.client.gui.UIScreens;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.MagicBees;
|
||||
import magicbees.main.utils.TabMagicBees;
|
||||
import magicbees.tileentity.TileEntityEffectJar;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
@@ -18,7 +17,11 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockEffectJar extends BlockContainer {
|
||||
|
||||
public BlockEffectJar() {
|
||||
super(Material.glass);
|
||||
this.setCreativeTab(TabMagicBees.tabMagicBees);
|
||||
@@ -29,8 +32,8 @@ public class BlockEffectJar extends BlockContainer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(
|
||||
World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
|
||||
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()) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package magicbees.block;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.Random;
|
||||
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.utils.TabMagicBees;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -14,6 +14,9 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockEnchantedEarth extends Block {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -53,8 +56,8 @@ public class BlockEnchantedEarth extends Block {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSustainPlant(
|
||||
IBlockAccess world, int x, int y, int z, ForgeDirection direction, IPlantable plantable) {
|
||||
public boolean canSustainPlant(IBlockAccess world, int x, int y, int z, ForgeDirection direction,
|
||||
IPlantable plantable) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
package magicbees.block;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import magicbees.block.types.HiveType;
|
||||
import magicbees.main.Config;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@@ -18,7 +17,12 @@ import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
|
||||
public class BlockHive extends Block {
|
||||
|
||||
public BlockHive() {
|
||||
super(new MaterialHive());
|
||||
this.setLightLevel(0.8f);
|
||||
@@ -47,7 +51,7 @@ public class BlockHive extends Block {
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List itemsList) {
|
||||
// Java bitches about raw types & types not being checked. Sorry, but the API sucks.
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
package magicbees.block;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.client.gui.UIScreens;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.MagicBees;
|
||||
import magicbees.main.utils.TabMagicBees;
|
||||
import magicbees.tileentity.TileEntityMagicApiary;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
@@ -19,7 +18,11 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockMagicApiary extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] icons;
|
||||
|
||||
@@ -33,8 +36,8 @@ public class BlockMagicApiary extends BlockContainer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(
|
||||
World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
|
||||
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()) {
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package magicbees.block;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.utils.TabMagicBees;
|
||||
import magicbees.tileentity.TileEntityManaAuraProvider;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.block.material.Material;
|
||||
@@ -13,6 +12,9 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockManaAuraProvider extends Block implements ITileEntityProvider {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package magicbees.block;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.utils.TabMagicBees;
|
||||
import magicbees.tileentity.TileEntityVisAuraProvider;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -12,6 +11,9 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockVisAuraProvider extends BlockContainer {
|
||||
|
||||
public BlockVisAuraProvider() {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
package magicbees.block.types;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.apiculture.IHiveDrop;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
||||
import magicbees.bees.BeeGenomeManager;
|
||||
import magicbees.bees.BeeSpecies;
|
||||
import magicbees.bees.HiveDrop;
|
||||
@@ -12,20 +10,25 @@ import magicbees.item.types.CombType;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.compat.ForestryHelper;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.apiculture.IHiveDrop;
|
||||
|
||||
public enum HiveType {
|
||||
|
||||
CURIOUS("curious", BeeSpecies.MYSTICAL, 12, true),
|
||||
UNUSUAL("unusual", BeeSpecies.UNUSUAL, 12, true),
|
||||
RESONANT("resonant", BeeSpecies.SORCEROUS, 12, true),
|
||||
DEEP("deep", BeeSpecies.ATTUNED, 4, false),
|
||||
INFERNAL("infernal", BeeSpecies.INFERNAL, 15, false),
|
||||
OBLIVION("oblivion", BeeSpecies.OBLIVION, 7, false),
|
||||
;
|
||||
OBLIVION("oblivion", BeeSpecies.OBLIVION, 7, false),;
|
||||
|
||||
private static String[] nameList;
|
||||
|
||||
@@ -49,9 +52,11 @@ public enum HiveType {
|
||||
}
|
||||
|
||||
public static void initHiveData() {
|
||||
ItemStack[] combs = new ItemStack[] {Config.combs.getStackForType(CombType.MUNDANE)};
|
||||
ItemStack[] combs = new ItemStack[] { Config.combs.getStackForType(CombType.MUNDANE) };
|
||||
HiveDrop valiantDrop = new HiveDrop(
|
||||
BeeGenomeManager.addRainResist(ForestryHelper.getTemplateForestryForSpecies("Valiant")), combs, 5);
|
||||
BeeGenomeManager.addRainResist(ForestryHelper.getTemplateForestryForSpecies("Valiant")),
|
||||
combs,
|
||||
5);
|
||||
|
||||
CURIOUS.drops.add(new HiveDrop(BeeSpecies.MYSTICAL.getGenome(), combs, 80).setIgnoblePercentage(0.7f));
|
||||
CURIOUS.drops.add(new HiveDrop(BeeGenomeManager.addRainResist(BeeSpecies.MYSTICAL.getGenome()), combs, 15));
|
||||
@@ -69,12 +74,14 @@ public enum HiveType {
|
||||
DEEP.drops.add(new HiveDrop(BeeGenomeManager.addRainResist(BeeSpecies.ATTUNED.getGenome()), combs, 20));
|
||||
DEEP.drops.add(valiantDrop);
|
||||
|
||||
combs = new ItemStack[] {Config.combs.getStackForType(CombType.MOLTEN), new ItemStack(Items.glowstone_dust, 6)};
|
||||
combs = new ItemStack[] { Config.combs.getStackForType(CombType.MOLTEN),
|
||||
new ItemStack(Items.glowstone_dust, 6) };
|
||||
|
||||
INFERNAL.drops.add(new HiveDrop(BeeSpecies.INFERNAL.getGenome(), combs, 80).setIgnoblePercentage(0.5f));
|
||||
INFERNAL.drops.add(new HiveDrop(ForestryHelper.getTemplateForestryForSpecies("Steadfast"), combs, 3));
|
||||
|
||||
combs = new ItemStack[] {Config.combs.getStackForType(CombType.FORGOTTEN), new ItemStack(Items.ender_pearl, 1)};
|
||||
combs = new ItemStack[] { Config.combs.getStackForType(CombType.FORGOTTEN),
|
||||
new ItemStack(Items.ender_pearl, 1) };
|
||||
|
||||
OBLIVION.drops.add(new HiveDrop(BeeSpecies.OBLIVION.getGenome(), combs, 80));
|
||||
OBLIVION.drops.add(new HiveDrop(ForestryHelper.getTemplateForestryForSpecies("Steadfast"), combs, 9));
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package magicbees.block.types;
|
||||
|
||||
public enum PlankType {
|
||||
|
||||
GREATWOOD("greatwood", 48),
|
||||
SILVERWOOD("silverwood", 49),
|
||||
;
|
||||
SILVERWOOD("silverwood", 49),;
|
||||
|
||||
public String name;
|
||||
public int textureIdx;
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
package magicbees.client.gui;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.tileentity.TileEntityEffectJar;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ContainerEffectJar extends Container {
|
||||
|
||||
public TileEntityEffectJar jar;
|
||||
|
||||
public int lastBeeHealth = 0;
|
||||
|
||||
@@ -6,6 +6,7 @@ import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
|
||||
public class ContainerMB extends Container {
|
||||
|
||||
protected final int PLAYER_INVENTORY_ROWS = 3;
|
||||
protected final int PLAYER_INVENTORY_COLUMNS = 9;
|
||||
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
package magicbees.client.gui;
|
||||
|
||||
import forestry.api.apiculture.IHiveFrame;
|
||||
import magicbees.bees.BeeManager;
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
import magicbees.tileentity.TileEntityMagicApiary;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.apiculture.IHiveFrame;
|
||||
|
||||
public class ContainerMagicApiary extends ContainerMB {
|
||||
|
||||
public TileEntityMagicApiary apiary;
|
||||
@@ -27,13 +29,14 @@ public class ContainerMagicApiary extends ContainerMB {
|
||||
this.apiary = thaumicApiary;
|
||||
|
||||
// Queen/Princess slot
|
||||
addSlotToContainer(new SlotCustomItems(
|
||||
this.apiary,
|
||||
0,
|
||||
29,
|
||||
39,
|
||||
ItemInterface.getItemStack("Forestry", "beeQueenGE", 1),
|
||||
ItemInterface.getItemStack("Forestry", "beePrincessGE", 1)));
|
||||
addSlotToContainer(
|
||||
new SlotCustomItems(
|
||||
this.apiary,
|
||||
0,
|
||||
29,
|
||||
39,
|
||||
ItemInterface.getItemStack("Forestry", "beeQueenGE", 1),
|
||||
ItemInterface.getItemStack("Forestry", "beePrincessGE", 1)));
|
||||
// Drone slot
|
||||
addSlotToContainer(
|
||||
new SlotCustomItems(this.apiary, 1, 29, 65, ItemInterface.getItemStack("Forestry", "beeDroneGE", 64)));
|
||||
@@ -91,8 +94,8 @@ public class ContainerMagicApiary extends ContainerMB {
|
||||
}
|
||||
}
|
||||
} else if (srcStack.getItem() instanceof IHiveFrame) {
|
||||
clearSlot = this.mergeItemStack(
|
||||
srcStack, SLOT_FRAME_START, SLOT_FRAME_START + SLOT_FRAME_COUNT, false);
|
||||
clearSlot = this
|
||||
.mergeItemStack(srcStack, SLOT_FRAME_START, SLOT_FRAME_START + SLOT_FRAME_COUNT, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,15 +2,19 @@ package magicbees.client.gui;
|
||||
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.tileentity.TileEntityEffectJar;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GUIEffectJar extends GuiContainer {
|
||||
|
||||
public static final String BACKGROUND_FILE = "jarScreen.png";
|
||||
public static final ResourceLocation BACKGROUND_LOCATION =
|
||||
new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.GUI_TEXTURE + "jarScreen.png");
|
||||
public static final ResourceLocation BACKGROUND_LOCATION = new ResourceLocation(
|
||||
CommonProxy.DOMAIN,
|
||||
CommonProxy.GUI_TEXTURE + "jarScreen.png");
|
||||
|
||||
private static final int WIDTH = 176;
|
||||
private static final int HEIGHT = 156;
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package magicbees.client.gui;
|
||||
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import magicbees.tileentity.TileEntityEffectJar;
|
||||
import magicbees.tileentity.TileEntityMagicApiary;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
|
||||
public class GUIHandler implements IGuiHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package magicbees.client.gui;
|
||||
|
||||
import cpw.mods.fml.client.IModGuiFactory;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
import cpw.mods.fml.client.IModGuiFactory;
|
||||
|
||||
public class GuiFactory implements IModGuiFactory {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,19 +1,24 @@
|
||||
package magicbees.client.gui;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.tileentity.TileEntityMagicApiary;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiMagicApiary extends GuiContainer {
|
||||
public static final ResourceLocation BACKGROUND_LOCATION =
|
||||
new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.GUI_TEXTURE + "apiary.png");
|
||||
|
||||
public static final ResourceLocation BACKGROUND_LOCATION = new ResourceLocation(
|
||||
CommonProxy.DOMAIN,
|
||||
CommonProxy.GUI_TEXTURE + "apiary.png");
|
||||
|
||||
private static final int WIDTH = 176;
|
||||
private static final int HEIGHT = 190;
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
package magicbees.client.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.VersionInfo;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraftforge.common.config.ConfigElement;
|
||||
|
||||
import cpw.mods.fml.client.config.DummyConfigElement;
|
||||
import cpw.mods.fml.client.config.GuiConfig;
|
||||
import cpw.mods.fml.client.config.IConfigElement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.VersionInfo;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraftforge.common.config.ConfigElement;
|
||||
|
||||
public class ModGuiConfig extends GuiConfig {
|
||||
|
||||
public ModGuiConfig(GuiScreen guiScreen) {
|
||||
super(
|
||||
guiScreen,
|
||||
@@ -34,6 +38,8 @@ public class ModGuiConfig extends GuiConfig {
|
||||
|
||||
private static IConfigElement categoryElement(String category, String name, String tooltip_key) {
|
||||
return new DummyConfigElement.DummyCategoryElement(
|
||||
name, tooltip_key, new ConfigElement(Config.configuration.getCategory(category)).getChildElements());
|
||||
name,
|
||||
tooltip_key,
|
||||
new ConfigElement(Config.configuration.getCategory(category)).getChildElements());
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package magicbees.client.gui;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -12,6 +13,7 @@ import net.minecraftforge.oredict.OreDictionary;
|
||||
* @author MysteriousAges
|
||||
*/
|
||||
public class SlotCustomItems extends Slot {
|
||||
|
||||
private List<ItemStack> items;
|
||||
|
||||
public SlotCustomItems(IInventory inventory, int slotIndex, int xPos, int yPos, ItemStack... items) {
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package magicbees.client.gui;
|
||||
|
||||
import forestry.api.apiculture.IHiveFrame;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.apiculture.IHiveFrame;
|
||||
|
||||
public class SlotFrame extends SlotCustomItems {
|
||||
|
||||
public SlotFrame(IInventory inventory, int slotIndex, int xPos, int yPos) {
|
||||
super(inventory, slotIndex, xPos, yPos);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,5 @@ package magicbees.client.gui;
|
||||
|
||||
public enum UIScreens {
|
||||
EFFECT_JAR,
|
||||
THAUMIC_APIARY,
|
||||
;
|
||||
THAUMIC_APIARY,;
|
||||
}
|
||||
@@ -1,19 +1,25 @@
|
||||
package magicbees.client.model;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.main.CommonProxy;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ModelEffectJar {
|
||||
public static final ResourceLocation objFile =
|
||||
new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.MODEL + "effectJar.obj");
|
||||
public static final ResourceLocation textureLocation =
|
||||
new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.MODEL + "jarTexture.png");
|
||||
|
||||
public static final ResourceLocation objFile = new ResourceLocation(
|
||||
CommonProxy.DOMAIN,
|
||||
CommonProxy.MODEL + "effectJar.obj");
|
||||
public static final ResourceLocation textureLocation = new ResourceLocation(
|
||||
CommonProxy.DOMAIN,
|
||||
CommonProxy.MODEL + "jarTexture.png");
|
||||
|
||||
public static final ModelEffectJar model = new ModelEffectJar();
|
||||
|
||||
|
||||
@@ -1,19 +1,25 @@
|
||||
package magicbees.client.model;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.main.CommonProxy;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ModelVisAuraProvider {
|
||||
public static final ResourceLocation objFile =
|
||||
new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.MODEL + "visAuraConverter.obj");
|
||||
public static final ResourceLocation textureLocation =
|
||||
new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.MODEL + "visAuraProvider.png");
|
||||
|
||||
public static final ResourceLocation objFile = new ResourceLocation(
|
||||
CommonProxy.DOMAIN,
|
||||
CommonProxy.MODEL + "visAuraConverter.obj");
|
||||
public static final ResourceLocation textureLocation = new ResourceLocation(
|
||||
CommonProxy.DOMAIN,
|
||||
CommonProxy.MODEL + "visAuraProvider.png");
|
||||
|
||||
public static final ModelVisAuraProvider model = new ModelVisAuraProvider();
|
||||
|
||||
@@ -28,7 +34,9 @@ public class ModelVisAuraProvider {
|
||||
GL11.glRotated(Math.sin(tick * Math.PI * 2 / 80) * 0.7, 0, 1, 0);
|
||||
GL11.glRotated(Math.sin((tick + 25) * Math.PI * 2 / 150) * 0.75, 0.5, 0, 0.5);
|
||||
GL11.glTranslated(
|
||||
Math.sin(tick * Math.PI * 2 / 1000) * 0.025, 0, Math.sin((tick + 30) * Math.PI * 2 / 650) * 0.03);
|
||||
Math.sin(tick * Math.PI * 2 / 1000) * 0.025,
|
||||
0,
|
||||
Math.sin((tick + 30) * Math.PI * 2 / 650) * 0.03);
|
||||
float red = (float) (Math.sin(tick * Math.PI * 2 / 130) * 0.2 + 0.8);
|
||||
float green = (float) (Math.cos((tick + 2) * Math.PI * 2 / 140) * 0.2 + 0.8);
|
||||
float blue = (float) (Math.sin((tick + 5) * Math.PI * 2 / 99) * 0.2 + 0.8);
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
package magicbees.client.render;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import magicbees.client.model.ModelEffectJar;
|
||||
import magicbees.tileentity.TileEntityEffectJar;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class RendererEffectJar extends TileEntitySpecialRenderer implements IItemRenderer {
|
||||
|
||||
public static RendererEffectJar instance = new RendererEffectJar();
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
package magicbees.client.render;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import magicbees.client.model.ModelVisAuraProvider;
|
||||
import magicbees.tileentity.TileEntityVisAuraProvider;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class RendererVisAuraProvider extends TileEntitySpecialRenderer implements IItemRenderer {
|
||||
|
||||
public static RendererVisAuraProvider instance = new RendererVisAuraProvider();
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
package magicbees.item;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
|
||||
import magicbees.item.types.CapsuleType;
|
||||
import magicbees.item.types.FluidType;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.utils.TabMagicBees;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemCapsule extends Item {
|
||||
|
||||
private CapsuleType capsuleType;
|
||||
|
||||
public ItemCapsule(CapsuleType type, int maxStackSize) {
|
||||
@@ -34,14 +38,15 @@ public class ItemCapsule extends Item {
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack itemStack) {
|
||||
return String.format(
|
||||
this.capsuleType.getLocalizedName(), FluidType.values()[itemStack.getItemDamage()].getDisplayName());
|
||||
this.capsuleType.getLocalizedName(),
|
||||
FluidType.values()[itemStack.getItemDamage()].getDisplayName());
|
||||
}
|
||||
|
||||
public ItemStack getCapsuleForLiquid(FluidType l) {
|
||||
return new ItemStack(this, 1, l.ordinal());
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tab, List itemList) {
|
||||
@@ -60,9 +65,10 @@ public class ItemCapsule extends Item {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon(CommonProxy.DOMAIN + ":capsule"
|
||||
+ this.capsuleType.getName().substring(0, 1).toUpperCase()
|
||||
+ this.capsuleType.getName().substring(1));
|
||||
this.itemIcon = iconRegister.registerIcon(
|
||||
CommonProxy.DOMAIN + ":capsule"
|
||||
+ this.capsuleType.getName().substring(0, 1).toUpperCase()
|
||||
+ this.capsuleType.getName().substring(1));
|
||||
for (FluidType t : FluidType.values()) {
|
||||
if (t != FluidType.EMPTY) {
|
||||
t.liquidIcon = iconRegister.registerIcon(CommonProxy.DOMAIN + ":liquids/" + t.liquidID);
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
package magicbees.item;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
import java.util.List;
|
||||
|
||||
import magicbees.item.types.CombType;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.compat.ForestryHelper;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
|
||||
public class ItemComb extends Item {
|
||||
|
||||
public ItemComb() {
|
||||
super();
|
||||
this.setCreativeTab(Tabs.tabApiculture);
|
||||
@@ -31,7 +35,7 @@ public class ItemComb extends Item {
|
||||
return new ItemStack(this, count, type.ordinal());
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
package magicbees.item;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
import java.util.List;
|
||||
|
||||
import magicbees.item.types.DropType;
|
||||
import magicbees.main.utils.compat.ForestryHelper;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
|
||||
public class ItemDrop extends Item {
|
||||
|
||||
public ItemDrop() {
|
||||
super();
|
||||
this.setCreativeTab(Tabs.tabApiculture);
|
||||
@@ -32,7 +36,7 @@ public class ItemDrop extends Item {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||
for (DropType type : DropType.values()) {
|
||||
list.add(this.getStackForType(type));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package magicbees.item;
|
||||
|
||||
import forestry.api.arboriculture.IToolGrafter;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
@@ -11,6 +11,8 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.arboriculture.IToolGrafter;
|
||||
|
||||
public class ItemGrafter extends Item implements IToolGrafter {
|
||||
|
||||
public ItemGrafter() {
|
||||
@@ -26,8 +28,8 @@ public class ItemGrafter extends Item implements IToolGrafter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(
|
||||
ItemStack itemstack, World world, Block block, int x, int y, int z, EntityLivingBase entityLiving) {
|
||||
public boolean onBlockDestroyed(ItemStack itemstack, World world, Block block, int x, int y, int z,
|
||||
EntityLivingBase entityLiving) {
|
||||
int damage = 1;
|
||||
if (ThaumcraftHelper.isActive()) {
|
||||
if (block == ThaumcraftHelper.leaf) {
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
package magicbees.item;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.block.types.HiveType;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Created by Allen on 7/29/2014.
|
||||
*/
|
||||
public class ItemMagicHive extends ItemBlock {
|
||||
|
||||
public ItemMagicHive(Block block) {
|
||||
super(block);
|
||||
setMaxDamage(0);
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
package magicbees.item;
|
||||
|
||||
import magicbees.item.types.HiveFrameType;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.utils.TabMagicBees;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -7,14 +15,9 @@ import forestry.api.apiculture.IBee;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.api.apiculture.IHiveFrame;
|
||||
import magicbees.item.types.HiveFrameType;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.utils.TabMagicBees;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemMagicHiveFrame extends Item implements IHiveFrame {
|
||||
|
||||
private HiveFrameType type;
|
||||
|
||||
public ItemMagicHiveFrame(HiveFrameType frameType) {
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
package magicbees.item;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.utils.compat.BotaniaHelper;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.mana.IManaUsingItem;
|
||||
|
||||
@Optional.InterfaceList({
|
||||
@Optional.Interface(iface = "vazkii.botania.api.mana.IManaUsingItem", modid = BotaniaHelper.Name, striprefs = true)
|
||||
})
|
||||
import vazkii.botania.api.mana.IManaUsingItem;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@Optional.InterfaceList({ @Optional.Interface(
|
||||
iface = "vazkii.botania.api.mana.IManaUsingItem",
|
||||
modid = BotaniaHelper.Name,
|
||||
striprefs = true) })
|
||||
public class ItemManasteelGrafter extends ItemGrafter implements IManaUsingItem {
|
||||
|
||||
public static final int MANA_PER_DAMAGE = 90;
|
||||
@@ -29,7 +32,7 @@ public class ItemManasteelGrafter extends ItemGrafter implements IManaUsingItem
|
||||
@Optional.Method(modid = BotaniaHelper.Name)
|
||||
public boolean getIsRepairable(ItemStack toolStack, ItemStack material) {
|
||||
return (material.getItem() == BotaniaHelper.itemManaResource
|
||||
&& material.getItemDamage() == BotaniaHelper.ManaResource.MANASTEEL.ordinal())
|
||||
&& material.getItemDamage() == BotaniaHelper.ManaResource.MANASTEEL.ordinal())
|
||||
|| super.getIsRepairable(toolStack, material);
|
||||
}
|
||||
|
||||
@@ -43,7 +46,7 @@ public class ItemManasteelGrafter extends ItemGrafter implements IManaUsingItem
|
||||
public void onUpdate(ItemStack stack, World world, Entity player, int par4, boolean par5) {
|
||||
// Unsure if the server-side exclusion is necessary, but boy it looks disconcerting on the client if it's in.
|
||||
if (
|
||||
/*!world.isRemote && */ stack.getItemDamage() > 0 && player instanceof EntityPlayer) {
|
||||
/* !world.isRemote && */ stack.getItemDamage() > 0 && player instanceof EntityPlayer) {
|
||||
if (BotaniaHelper.requestMana(stack, (EntityPlayer) player, MANA_PER_DAMAGE, 1)) {
|
||||
stack.setItemDamage(stack.getItemDamage() - 1);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
package magicbees.item;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.IToolScoop;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.utils.compat.BotaniaHelper;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -14,11 +11,17 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.mana.IManaUsingItem;
|
||||
|
||||
@Optional.InterfaceList({
|
||||
@Optional.Interface(iface = "vazkii.botania.api.mana.IManaUsingItem", modid = BotaniaHelper.Name, striprefs = true)
|
||||
})
|
||||
import vazkii.botania.api.mana.IManaUsingItem;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.IToolScoop;
|
||||
|
||||
@Optional.InterfaceList({ @Optional.Interface(
|
||||
iface = "vazkii.botania.api.mana.IManaUsingItem",
|
||||
modid = BotaniaHelper.Name,
|
||||
striprefs = true) })
|
||||
public class ItemManasteelScoop extends Item implements IManaUsingItem, IToolScoop {
|
||||
|
||||
public static final int MANA_PER_DAMAGE = 30;
|
||||
@@ -33,8 +36,8 @@ public class ItemManasteelScoop extends Item implements IManaUsingItem, IToolSco
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(
|
||||
ItemStack stack, World world, Block block, int x, int y, int z, EntityLivingBase player) {
|
||||
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int x, int y, int z,
|
||||
EntityLivingBase player) {
|
||||
stack.damageItem(1, player);
|
||||
return true;
|
||||
}
|
||||
@@ -48,7 +51,7 @@ public class ItemManasteelScoop extends Item implements IManaUsingItem, IToolSco
|
||||
@Optional.Method(modid = BotaniaHelper.Name)
|
||||
public boolean getIsRepairable(ItemStack toolStack, ItemStack material) {
|
||||
return (material.getItem() == BotaniaHelper.itemManaResource
|
||||
&& material.getItemDamage() == BotaniaHelper.ManaResource.MANASTEEL.ordinal())
|
||||
&& material.getItemDamage() == BotaniaHelper.ManaResource.MANASTEEL.ordinal())
|
||||
|| super.getIsRepairable(toolStack, material);
|
||||
}
|
||||
|
||||
@@ -62,7 +65,7 @@ public class ItemManasteelScoop extends Item implements IManaUsingItem, IToolSco
|
||||
public void onUpdate(ItemStack stack, World world, Entity player, int par4, boolean par5) {
|
||||
// Unsure if the server-side exclusion is necessary, but boy it looks disconcerting on the client if it's in.
|
||||
if (
|
||||
/*!world.isRemote && */ stack.getItemDamage() > 0 && player instanceof EntityPlayer) {
|
||||
/* !world.isRemote && */ stack.getItemDamage() > 0 && player instanceof EntityPlayer) {
|
||||
if (BotaniaHelper.requestMana(stack, (EntityPlayer) player, MANA_PER_DAMAGE, 1)) {
|
||||
stack.setItemDamage(stack.getItemDamage() - 1);
|
||||
}
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
package magicbees.item;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
|
||||
import magicbees.item.types.ResourceType;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.utils.TabMagicBees;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemMiscResources extends Item {
|
||||
|
||||
private IIcon[] icons = new IIcon[ResourceType.values().length];
|
||||
|
||||
public ItemMiscResources() {
|
||||
@@ -34,7 +38,7 @@ public class ItemMiscResources extends Item {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||
for (ResourceType type : ResourceType.values()) {
|
||||
if (type.showInList) {
|
||||
@@ -46,8 +50,8 @@ public class ItemMiscResources extends Item {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
for (int i = 0; i < ResourceType.values().length; i++) {
|
||||
this.icons[i] =
|
||||
par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":" + ResourceType.values()[i].getName());
|
||||
this.icons[i] = par1IconRegister
|
||||
.registerIcon(CommonProxy.DOMAIN + ":" + ResourceType.values()[i].getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
package magicbees.item;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.MoonPhase;
|
||||
import magicbees.main.utils.TabMagicBees;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemMoonDial extends Item {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] icons;
|
||||
|
||||
@@ -37,20 +41,18 @@ public class ItemMoonDial extends Item {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
|
||||
return this.icons[
|
||||
MoonPhase.getMoonPhaseFromTime(player.worldObj.getWorldTime()).ordinal()];
|
||||
return this.icons[MoonPhase.getMoonPhaseFromTime(player.worldObj.getWorldTime()).ordinal()];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List infoList, boolean par4) {
|
||||
if (Config.moonDialShowsPhaseInText
|
||||
&& entityPlayer.getCurrentEquippedItem() != null
|
||||
if (Config.moonDialShowsPhaseInText && entityPlayer.getCurrentEquippedItem() != null
|
||||
&& entityPlayer.getCurrentEquippedItem().getItem() == this) {
|
||||
infoList.add("\u00A77"
|
||||
+ MoonPhase.getMoonPhaseFromTime(entityPlayer.worldObj.getWorldTime())
|
||||
.getLocalizedName());
|
||||
infoList.add(
|
||||
"\u00A77"
|
||||
+ MoonPhase.getMoonPhaseFromTime(entityPlayer.worldObj.getWorldTime()).getLocalizedName());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,12 @@
|
||||
package magicbees.item;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.IBauble;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.TabMagicBees;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -25,6 +21,13 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.IBauble;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@Optional.Interface(modid = "Baubles", iface = "baubles.api.IBauble")
|
||||
public class ItemMysteriousMagnet extends Item implements IBauble {
|
||||
|
||||
@@ -43,7 +46,7 @@ public class ItemMysteriousMagnet extends Item implements IBauble {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean par4) {
|
||||
String s = LocalizationManager.getLocalizedString("misc.level", getMagnetLevel(itemStack));
|
||||
if (isMagnetActive(itemStack)) {
|
||||
@@ -62,7 +65,7 @@ public class ItemMysteriousMagnet extends Item implements IBauble {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||
for (int i = 0; i <= getMaximumLevel(); i++) {
|
||||
list.add(new ItemStack(this, 1, i * 2));
|
||||
@@ -169,7 +172,11 @@ public class ItemMysteriousMagnet extends Item implements IBauble {
|
||||
if ((arrow.canBePickedUp == 1 || world.rand.nextFloat() < 0.3f)
|
||||
&& arrow.shootingEntity != entity) {
|
||||
EntityItem replacement = new EntityItem(
|
||||
world, arrow.posX, arrow.posY, arrow.posZ, new ItemStack(Items.arrow));
|
||||
world,
|
||||
arrow.posX,
|
||||
arrow.posY,
|
||||
arrow.posZ,
|
||||
new ItemStack(Items.arrow));
|
||||
world.spawnEntityInWorld(replacement);
|
||||
}
|
||||
world.removeEntity(arrow);
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
package magicbees.item;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
|
||||
import magicbees.item.types.NuggetType;
|
||||
import magicbees.main.CommonProxy;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemNugget extends Item {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] icons;
|
||||
|
||||
@@ -32,7 +36,7 @@ public class ItemNugget extends Item {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
for (NuggetType type : NuggetType.values()) {
|
||||
if (type.isActive()) {
|
||||
@@ -45,9 +49,10 @@ public class ItemNugget extends Item {
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
this.icons = new IIcon[NuggetType.values().length];
|
||||
for (int i = 0; i < NuggetType.values().length; i++) {
|
||||
this.icons[i] = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":nugget"
|
||||
+ NuggetType.values()[i].name().substring(0, 1)
|
||||
+ NuggetType.values()[i].name().substring(1).toLowerCase());
|
||||
this.icons[i] = par1IconRegister.registerIcon(
|
||||
CommonProxy.DOMAIN + ":nugget"
|
||||
+ NuggetType.values()[i].name().substring(0, 1)
|
||||
+ NuggetType.values()[i].name().substring(1).toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
package magicbees.item;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
import java.util.List;
|
||||
|
||||
import magicbees.item.types.PollenType;
|
||||
import magicbees.main.utils.compat.ForestryHelper;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
|
||||
public class ItemPollen extends Item {
|
||||
|
||||
public ItemPollen() {
|
||||
super();
|
||||
this.setCreativeTab(Tabs.tabApiculture);
|
||||
@@ -32,7 +36,7 @@ public class ItemPollen extends Item {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||
for (PollenType type : PollenType.values()) {
|
||||
list.add(this.getStackForType(type));
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
package magicbees.item;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
import java.util.List;
|
||||
|
||||
import magicbees.item.types.PropolisType;
|
||||
import magicbees.main.utils.compat.ForestryHelper;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
|
||||
public class ItemPropolis extends Item {
|
||||
|
||||
public ItemPropolis() {
|
||||
super();
|
||||
this.setCreativeTab(Tabs.tabApiculture);
|
||||
@@ -31,7 +35,7 @@ public class ItemPropolis extends Item {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||
for (PropolisType type : PropolisType.values()) {
|
||||
list.add(this.getStackForType(type));
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
package magicbees.item;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -12,13 +10,19 @@ import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import thaumcraft.api.IRepairableExtended;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@Optional.InterfaceList({
|
||||
@Optional.Interface(iface = "thaumcraft.api.IRepairableExtended", modid = ThaumcraftHelper.Name, striprefs = true)
|
||||
})
|
||||
@Optional.InterfaceList({ @Optional.Interface(
|
||||
iface = "thaumcraft.api.IRepairableExtended",
|
||||
modid = ThaumcraftHelper.Name,
|
||||
striprefs = true) })
|
||||
public class ItemThaumiumGrafter extends ItemGrafter implements IRepairableExtended {
|
||||
|
||||
public ItemThaumiumGrafter() {
|
||||
super();
|
||||
this.setMaxDamage(15);
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
package magicbees.item;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.IToolScoop;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -15,13 +12,18 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.IToolScoop;
|
||||
|
||||
@Optional.InterfaceList({
|
||||
@Optional.Interface(iface = "thaumcraft.api.IRepairable", modid = ThaumcraftHelper.Name, striprefs = true)
|
||||
})
|
||||
@Optional.Interface(iface = "thaumcraft.api.IRepairable", modid = ThaumcraftHelper.Name, striprefs = true) })
|
||||
public class ItemThaumiumScoop extends Item implements IRepairable, IToolScoop {
|
||||
|
||||
public ItemThaumiumScoop() {
|
||||
super();
|
||||
this.setMaxStackSize(1);
|
||||
@@ -42,8 +44,8 @@ public class ItemThaumiumScoop extends Item implements IRepairable, IToolScoop {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(
|
||||
ItemStack itemstack, World world, Block block, int j, int k, int l, EntityLivingBase entityliving) {
|
||||
public boolean onBlockDestroyed(ItemStack itemstack, World world, Block block, int j, int k, int l,
|
||||
EntityLivingBase entityliving) {
|
||||
itemstack.damageItem(1, entityliving);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
package magicbees.item;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -18,15 +16,22 @@ import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import thaumcraft.api.IRepairableExtended;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@Optional.InterfaceList({
|
||||
@Optional.Interface(iface = "thaumcraft.api.IRepairableExtended", modid = ThaumcraftHelper.Name, striprefs = true),
|
||||
@Optional.Interface(iface = "thaumcraft.api.IWarpingGear", modid = ThaumcraftHelper.Name, striprefs = true)
|
||||
})
|
||||
@Optional.Interface(
|
||||
iface = "thaumcraft.api.IRepairableExtended",
|
||||
modid = ThaumcraftHelper.Name,
|
||||
striprefs = true),
|
||||
@Optional.Interface(iface = "thaumcraft.api.IWarpingGear", modid = ThaumcraftHelper.Name, striprefs = true) })
|
||||
public class ItemVoidGrafter extends ItemGrafter implements IRepairableExtended, IWarpingGear {
|
||||
|
||||
public ItemVoidGrafter() {
|
||||
super();
|
||||
this.setMaxDamage(10);
|
||||
@@ -90,8 +95,7 @@ public class ItemVoidGrafter extends ItemGrafter implements IRepairableExtended,
|
||||
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int p_77663_4_, boolean p_77663_5_) {
|
||||
super.onUpdate(stack, world, entity, p_77663_4_, p_77663_5_);
|
||||
if ((stack.isItemDamaged())
|
||||
&& (entity != null)
|
||||
if ((stack.isItemDamaged()) && (entity != null)
|
||||
&& (entity.ticksExisted % 20 == 0)
|
||||
&& ((entity instanceof EntityLivingBase))) {
|
||||
stack.damageItem(-1, (EntityLivingBase) entity);
|
||||
@@ -99,10 +103,8 @@ public class ItemVoidGrafter extends ItemGrafter implements IRepairableExtended,
|
||||
}
|
||||
|
||||
public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) {
|
||||
if ((!player.worldObj.isRemote)
|
||||
&& ((entity instanceof EntityLivingBase))
|
||||
&& ((!(entity instanceof EntityPlayer))
|
||||
|| (MinecraftServer.getServer().isPVPEnabled()))) {
|
||||
if ((!player.worldObj.isRemote) && ((entity instanceof EntityLivingBase))
|
||||
&& ((!(entity instanceof EntityPlayer)) || (MinecraftServer.getServer().isPVPEnabled()))) {
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.weakness.getId(), 80));
|
||||
}
|
||||
return super.onLeftClickEntity(stack, player, entity);
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
package magicbees.item;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.IToolScoop;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -20,15 +17,20 @@ import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.IToolScoop;
|
||||
|
||||
@Optional.InterfaceList({
|
||||
@Optional.Interface(iface = "thaumcraft.api.IRepairable", modid = ThaumcraftHelper.Name, striprefs = true),
|
||||
@Optional.Interface(iface = "thaumcraft.api.IWarpingGear", modid = ThaumcraftHelper.Name, striprefs = true)
|
||||
})
|
||||
@Optional.Interface(iface = "thaumcraft.api.IRepairable", modid = ThaumcraftHelper.Name, striprefs = true),
|
||||
@Optional.Interface(iface = "thaumcraft.api.IWarpingGear", modid = ThaumcraftHelper.Name, striprefs = true) })
|
||||
public class ItemVoidScoop extends Item implements IRepairable, IToolScoop, IWarpingGear {
|
||||
|
||||
public ItemVoidScoop() {
|
||||
super();
|
||||
this.setMaxStackSize(1);
|
||||
@@ -49,8 +51,8 @@ public class ItemVoidScoop extends Item implements IRepairable, IToolScoop, IWar
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(
|
||||
ItemStack itemstack, World world, Block block, int j, int k, int l, EntityLivingBase entityliving) {
|
||||
public boolean onBlockDestroyed(ItemStack itemstack, World world, Block block, int j, int k, int l,
|
||||
EntityLivingBase entityliving) {
|
||||
itemstack.damageItem(1, entityliving);
|
||||
return true;
|
||||
}
|
||||
@@ -92,8 +94,7 @@ public class ItemVoidScoop extends Item implements IRepairable, IToolScoop, IWar
|
||||
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int p_77663_4_, boolean p_77663_5_) {
|
||||
super.onUpdate(stack, world, entity, p_77663_4_, p_77663_5_);
|
||||
if ((stack.isItemDamaged())
|
||||
&& (entity != null)
|
||||
if ((stack.isItemDamaged()) && (entity != null)
|
||||
&& (entity.ticksExisted % 20 == 0)
|
||||
&& ((entity instanceof EntityLivingBase))) {
|
||||
stack.damageItem(-1, (EntityLivingBase) entity);
|
||||
@@ -101,10 +102,8 @@ public class ItemVoidScoop extends Item implements IRepairable, IToolScoop, IWar
|
||||
}
|
||||
|
||||
public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) {
|
||||
if ((!player.worldObj.isRemote)
|
||||
&& ((entity instanceof EntityLivingBase))
|
||||
&& ((!(entity instanceof EntityPlayer))
|
||||
|| (MinecraftServer.getServer().isPVPEnabled()))) {
|
||||
if ((!player.worldObj.isRemote) && ((entity instanceof EntityLivingBase))
|
||||
&& ((!(entity instanceof EntityPlayer)) || (MinecraftServer.getServer().isPVPEnabled()))) {
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.weakness.getId(), 80));
|
||||
}
|
||||
return super.onLeftClickEntity(stack, player, entity);
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
package magicbees.item;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
import java.util.List;
|
||||
|
||||
import magicbees.item.types.WaxType;
|
||||
import magicbees.main.CommonProxy;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
|
||||
public class ItemWax extends Item {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon secondaryIcon;
|
||||
|
||||
@@ -47,7 +51,7 @@ public class ItemWax extends Item {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||
for (WaxType type : WaxType.values()) {
|
||||
list.add(this.getStackForType(type));
|
||||
|
||||
@@ -3,9 +3,10 @@ package magicbees.item.types;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
|
||||
public enum CapsuleType {
|
||||
|
||||
MAGIC("magic", 2000, 0),
|
||||
VOID("void", 8000, 1),
|
||||
;
|
||||
VOID("void", 8000, 1),;
|
||||
|
||||
private String name;
|
||||
public int capacity;
|
||||
public int iconIdx;
|
||||
|
||||
@@ -37,38 +37,16 @@ public enum CombType {
|
||||
TE_DESTABILIZED("TEelectric", false),
|
||||
TE_CARBON("TEcarbon", false),
|
||||
TE_LUX("TElux", false),
|
||||
TE_ENDEARING("TEendearing", false),
|
||||
;
|
||||
TE_ENDEARING("TEendearing", false),;
|
||||
|
||||
private static int[][] colours = new int[][] {
|
||||
{0xFF9859, 0xFFC58E},
|
||||
{0xcc3333, 0x1E160E},
|
||||
{0x9872FF, 0x2D2D2D},
|
||||
{0x3EE0D8, 0x3A3820},
|
||||
{0xE5425D, 0x323291},
|
||||
{0xBCA664, 0x35332E},
|
||||
{0x7F7171, 0x876D53},
|
||||
{0xB7ACB7, 0x636363},
|
||||
{0x0092e9, 0x618fff},
|
||||
{0x2F9381, 0x773C31},
|
||||
{0xB191D8, 0x35443B},
|
||||
{0xffff7e, 0x606308},
|
||||
{0xff3C01, 0x5B0D10},
|
||||
{0x0090ff, 0x102F6B},
|
||||
{0x00a000, 0x043004},
|
||||
{0xFFDF14, 0x707019},
|
||||
{0xE21802, 0x3F0E12},
|
||||
{0x00B6FF, 0x0F373D},
|
||||
{0x28D328, 0x333004},
|
||||
{0xDDDDFF, 0x9D9DB5},
|
||||
{0x555577, 0x2D2D56},
|
||||
{0xCC8604, 0x41046F},
|
||||
{0xCCCC04, 0x41046F},
|
||||
{0xCC002C, 0x6B0118},
|
||||
{0x454545, 0x0F0F0F},
|
||||
{0xF5F3A4, 0xC9C87D},
|
||||
{0x12E3D9, 0x069E97},
|
||||
};
|
||||
private static int[][] colours = new int[][] { { 0xFF9859, 0xFFC58E }, { 0xcc3333, 0x1E160E },
|
||||
{ 0x9872FF, 0x2D2D2D }, { 0x3EE0D8, 0x3A3820 }, { 0xE5425D, 0x323291 }, { 0xBCA664, 0x35332E },
|
||||
{ 0x7F7171, 0x876D53 }, { 0xB7ACB7, 0x636363 }, { 0x0092e9, 0x618fff }, { 0x2F9381, 0x773C31 },
|
||||
{ 0xB191D8, 0x35443B }, { 0xffff7e, 0x606308 }, { 0xff3C01, 0x5B0D10 }, { 0x0090ff, 0x102F6B },
|
||||
{ 0x00a000, 0x043004 }, { 0xFFDF14, 0x707019 }, { 0xE21802, 0x3F0E12 }, { 0x00B6FF, 0x0F373D },
|
||||
{ 0x28D328, 0x333004 }, { 0xDDDDFF, 0x9D9DB5 }, { 0x555577, 0x2D2D56 }, { 0xCC8604, 0x41046F },
|
||||
{ 0xCCCC04, 0x41046F }, { 0xCC002C, 0x6B0118 }, { 0x454545, 0x0F0F0F }, { 0xF5F3A4, 0xC9C87D },
|
||||
{ 0x12E3D9, 0x069E97 }, };
|
||||
|
||||
private CombType(String pName, boolean show) {
|
||||
this.name = pName;
|
||||
|
||||
@@ -3,13 +3,13 @@ package magicbees.item.types;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
|
||||
public enum DropType {
|
||||
|
||||
ENCHANTED("enchanting", 0x6e1c6d, 0xff8fff),
|
||||
INTELLECT("intellect", 0x25914D, 0x18E072),
|
||||
DESTABILIZED("destabilized", 0xCC002C, 0x6B0118),
|
||||
CARBON("carbon", 0x454545, 0x0F0F0F),
|
||||
LUX("lux", 0xF5F3A4, 0xC9C87D),
|
||||
ENDEARING("endearing", 0x12E3D9, 0x069E97),
|
||||
;
|
||||
ENDEARING("endearing", 0x12E3D9, 0x069E97),;
|
||||
|
||||
private DropType(String pName, int colourA, int colourB) {
|
||||
this.name = pName;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package magicbees.item.types;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public enum FluidType {
|
||||
@@ -45,8 +46,8 @@ public enum FluidType {
|
||||
PYROTHEUM("pyrotheum"),
|
||||
CRYOTHEUM("cryotheum"),
|
||||
MANA("mana"),
|
||||
COAL("coal"),
|
||||
;
|
||||
COAL("coal"),;
|
||||
|
||||
public String liquidID;
|
||||
public int iconIdx;
|
||||
public boolean available = false;
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package magicbees.item.types;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
|
||||
public enum HiveFrameType implements IBeeModifier {
|
||||
|
||||
MAGIC("Magic", 240, 1f, 1f, 1f, 2f, 0.6f),
|
||||
RESILIENT("Resilient", 800, 1f, 1f, 1f, 2f, 0.5f),
|
||||
GENTLE("Gentle", 200, 1f, 0.7f, 1.5f, 1.4f, 0.01f),
|
||||
METABOLIC("Metabolic", 130, 1f, 1.8f, 1f, 1.2f, 1f),
|
||||
NECROTIC("Necrotic", 280, 1f, 1f, 0.3f, 0.75f, 1.2f),
|
||||
TEMPORAL("Temporal", 300, 1f, 1f, 2.5f, 1f, 0.8f),
|
||||
OBLIVION("Oblivion", 50, 1f, 1f, 0.0001f, 0f, 1f),
|
||||
;
|
||||
OBLIVION("Oblivion", 50, 1f, 1f, 0.0001f, 0f, 1f),;
|
||||
|
||||
private final String frameName;
|
||||
public final int maxDamage;
|
||||
@@ -28,30 +28,13 @@ public enum HiveFrameType implements IBeeModifier {
|
||||
private final boolean isSunlit;
|
||||
private final boolean isHellish;
|
||||
|
||||
HiveFrameType(
|
||||
String name,
|
||||
int damage,
|
||||
float territory,
|
||||
float mutation,
|
||||
float lifespan,
|
||||
float production,
|
||||
HiveFrameType(String name, int damage, float territory, float mutation, float lifespan, float production,
|
||||
float geneticDecay) {
|
||||
this(name, damage, territory, mutation, lifespan, production, 1f, geneticDecay, false, false, false, false);
|
||||
}
|
||||
|
||||
HiveFrameType(
|
||||
String name,
|
||||
int damage,
|
||||
float territory,
|
||||
float mutation,
|
||||
float lifespan,
|
||||
float production,
|
||||
float flowering,
|
||||
float geneticDecay,
|
||||
boolean sealed,
|
||||
boolean lit,
|
||||
boolean sunlit,
|
||||
boolean hellish) {
|
||||
HiveFrameType(String name, int damage, float territory, float mutation, float lifespan, float production,
|
||||
float flowering, float geneticDecay, boolean sealed, boolean lit, boolean sunlit, boolean hellish) {
|
||||
this.frameName = name;
|
||||
this.maxDamage = damage;
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package magicbees.item.types;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public enum NuggetType {
|
||||
|
||||
IRON,
|
||||
COPPER,
|
||||
TIN,
|
||||
@@ -11,8 +13,7 @@ public enum NuggetType {
|
||||
LEAD,
|
||||
DIAMOND,
|
||||
EMERALD,
|
||||
APATITE,
|
||||
;
|
||||
APATITE,;
|
||||
|
||||
private Item targetIngot;
|
||||
private boolean active;
|
||||
@@ -38,7 +39,6 @@ public enum NuggetType {
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return LocalizationManager.getLocalizedString(
|
||||
"nugget." + this.toString().toLowerCase());
|
||||
return LocalizationManager.getLocalizedString("nugget." + this.toString().toLowerCase());
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,9 @@ package magicbees.item.types;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
|
||||
public enum PollenType {
|
||||
|
||||
UNUSUAL("unusual", 0xD8417B, 0xA03059),
|
||||
PHASED("phased", 0x4974B4, 0x456BA5),
|
||||
;
|
||||
PHASED("phased", 0x4974B4, 0x456BA5),;
|
||||
|
||||
private PollenType(String pName, int colourA, int colourB) {
|
||||
this.name = pName;
|
||||
|
||||
@@ -3,6 +3,7 @@ package magicbees.item.types;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
|
||||
public enum PropolisType {
|
||||
|
||||
UNSTABLE("unstable", 0xEFB492),
|
||||
|
||||
AIR("air", 0xA19E10),
|
||||
@@ -10,8 +11,7 @@ public enum PropolisType {
|
||||
WATER("water", 0x1054A1),
|
||||
EARTH("earth", 0x00a000),
|
||||
ORDER("dull", 0xDDDDFF),
|
||||
CHAOS("magic", 0x555577),
|
||||
;
|
||||
CHAOS("magic", 0x555577),;
|
||||
|
||||
private PropolisType(String pName, int overlayColour) {
|
||||
this.name = pName;
|
||||
|
||||
@@ -3,6 +3,7 @@ package magicbees.item.types;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
|
||||
public enum ResourceType {
|
||||
|
||||
LORE_FRAGMENT("fragment", true),
|
||||
AROMATIC_LUMP("lump", true),
|
||||
EXTENDED_FERTILIZER("fertilizer", true),
|
||||
@@ -29,10 +30,9 @@ public enum ResourceType {
|
||||
TC_DUST_CHAOS("TCchaosDust", true),
|
||||
|
||||
// Dummy items for Thaumanomicon research icons.
|
||||
// These won't ever actually exist in-game, and so they can be moved around.
|
||||
// These won't ever actually exist in-game, and so they can be moved around.
|
||||
RESEARCH_STARTNODE("startNode", false),
|
||||
RESEARCH_BEEINFUSION("beeInfusion", false),
|
||||
;
|
||||
RESEARCH_BEEINFUSION("beeInfusion", false),;
|
||||
|
||||
private ResourceType(String n, boolean show) {
|
||||
this.name = n;
|
||||
|
||||
@@ -3,6 +3,7 @@ package magicbees.item.types;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
|
||||
public enum WaxType {
|
||||
|
||||
MAGIC("magic", true, 0xd242df),
|
||||
SOUL("soul", false, 0x967C63),
|
||||
AMNESIC("amnesic", true, 0x856DFF);
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
package magicbees.main;
|
||||
|
||||
import magicbees.client.render.RendererEffectJar;
|
||||
import magicbees.client.render.RendererVisAuraProvider;
|
||||
import magicbees.tileentity.TileEntityEffectJar;
|
||||
import magicbees.tileentity.TileEntityVisAuraProvider;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.client.render.RendererEffectJar;
|
||||
import magicbees.client.render.RendererVisAuraProvider;
|
||||
import magicbees.tileentity.TileEntityEffectJar;
|
||||
import magicbees.tileentity.TileEntityVisAuraProvider;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ClientProxy extends CommonProxy {
|
||||
|
||||
@Override
|
||||
public void registerRenderers() {
|
||||
super.registerRenderers();
|
||||
@@ -22,8 +25,8 @@ public class ClientProxy extends CommonProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEffectJar.class, RendererEffectJar.instance);
|
||||
|
||||
RenderIdVisAuraProvider = RenderingRegistry.getNextAvailableRenderId();
|
||||
MinecraftForgeClient.registerItemRenderer(
|
||||
Item.getItemFromBlock(Config.visAuraProvider), RendererVisAuraProvider.instance);
|
||||
MinecraftForgeClient
|
||||
.registerItemRenderer(Item.getItemFromBlock(Config.visAuraProvider), RendererVisAuraProvider.instance);
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityVisAuraProvider.class, RendererVisAuraProvider.instance);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package magicbees.main;
|
||||
|
||||
public class CommonProxy {
|
||||
|
||||
public static final String DOMAIN = "magicbees";
|
||||
public static final String TEXTURE = "textures/";
|
||||
public static final String GUI_TEXTURE = TEXTURE + "gui/";
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
package magicbees.main;
|
||||
|
||||
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import forestry.api.apiculture.BeeManager;
|
||||
import forestry.api.storage.BackpackManager;
|
||||
import forestry.api.storage.EnumBackpackType;
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import magicbees.block.BlockEffectJar;
|
||||
import magicbees.block.BlockEnchantedEarth;
|
||||
import magicbees.block.BlockHive;
|
||||
@@ -49,6 +43,7 @@ import magicbees.tileentity.TileEntityEffectJar;
|
||||
import magicbees.tileentity.TileEntityMagicApiary;
|
||||
import magicbees.tileentity.TileEntityManaAuraProvider;
|
||||
import magicbees.tileentity.TileEntityVisAuraProvider;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -59,12 +54,21 @@ import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import forestry.api.apiculture.BeeManager;
|
||||
import forestry.api.storage.BackpackManager;
|
||||
import forestry.api.storage.EnumBackpackType;
|
||||
|
||||
/**
|
||||
* A class to hold some data related to mod state & functions.
|
||||
*
|
||||
* @author MysteriousAges
|
||||
*/
|
||||
public class Config {
|
||||
|
||||
public static final String CATEGORY_GENERAL = "general";
|
||||
public static final String CATEGORY_CLIENT = "client";
|
||||
public static final String CATEGORY_DEBUG = "debug";
|
||||
@@ -291,8 +295,7 @@ public class Config {
|
||||
capsuleStackSizeMax = p.getInt();
|
||||
|
||||
p = configuration.get(CATEGORY_GENERAL, "disableVersionNotification", false);
|
||||
p.comment =
|
||||
"Set to true to stop Magic Bees from notifying you when new updates are available. (Does not supress critical updates)";
|
||||
p.comment = "Set to true to stop Magic Bees from notifying you when new updates are available. (Does not supress critical updates)";
|
||||
disableUpdateNotification = p.getBoolean(false);
|
||||
|
||||
p = configuration.get(CATEGORY_GENERAL, "areMagicPlanksFlammable", false);
|
||||
@@ -334,8 +337,7 @@ public class Config {
|
||||
magnetBaseRange = (float) p.getDouble(3.0);
|
||||
|
||||
p = configuration.get(CATEGORY_GENERAL, "magnetRangeMultiplier", 0.75);
|
||||
p.comment =
|
||||
"Range multiplier per level of the Mysterious Magnet. Total range = base range + level * multiplier";
|
||||
p.comment = "Range multiplier per level of the Mysterious Magnet. Total range = base range + level * multiplier";
|
||||
magnetLevelMultiplier = (float) p.getDouble(0.75);
|
||||
|
||||
p = configuration.get(CATEGORY_GENERAL, "magnetMaximumLevel", 8);
|
||||
@@ -343,8 +345,7 @@ public class Config {
|
||||
magnetMaxLevel = p.getInt();
|
||||
|
||||
p = configuration.get(CATEGORY_GENERAL, "aromaticLumpSwarmerRate", 95);
|
||||
p.comment =
|
||||
"Aromatic lump swarmer rate. Final value is X/1000. 0 will disable, values outside of [0,1000] will be clamped to range. Default: 95";
|
||||
p.comment = "Aromatic lump swarmer rate. Final value is X/1000. 0 will disable, values outside of [0,1000] will be clamped to range. Default: 95";
|
||||
aromaticLumpSwarmerRate = p.getInt();
|
||||
|
||||
p = configuration.get(CATEGORY_CLIENT, "disableMagnetSound", false);
|
||||
@@ -397,8 +398,7 @@ public class Config {
|
||||
|
||||
private void setupJellyBaby() {
|
||||
jellyBaby = new ItemFood(1, false).setAlwaysEdible().setPotionEffect(Potion.moveSpeed.id, 5, 1, 1f);
|
||||
jellyBaby
|
||||
.setUnlocalizedName(CommonProxy.DOMAIN + ":jellyBabies")
|
||||
jellyBaby.setUnlocalizedName(CommonProxy.DOMAIN + ":jellyBabies")
|
||||
.setTextureName(CommonProxy.DOMAIN + ":jellyBabies");
|
||||
GameRegistry.registerItem(jellyBaby, "jellyBabies");
|
||||
}
|
||||
|
||||
Loaded 100 of 148 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user