This commit is contained in:
Lizbeth Rika committed 2015-01-18 17:16:58 +00:00
1 parent 0fcb96c50d
commit 9508b8889b
174 files changed
+808 -972

No files matched your search

@@ -60,7 +60,7 @@ public final class BotaniaAPI {
public static Map<String, KnowledgeType> knowledgeTypes = new HashMap<String, KnowledgeType>();
public static Map<String, Brew> brewMap = new LinkedHashMap<String, Brew>();
public static List<RecipePetals> petalRecipes = new ArrayList<RecipePetals>();
public static List<RecipeRuneAltar> runeAltarRecipes = new ArrayList<RecipeRuneAltar>();
public static List<RecipeManaInfusion> manaInfusionRecipes = new ArrayList<RecipeManaInfusion>();
@@ -96,9 +96,9 @@ public final class BotaniaAPI {
public static LexiconCategory categoryBaubles;
public static LexiconCategory categoryAlfhomancy;
public static LexiconCategory categoryMisc;
public static Brew fallbackBrew = new Brew("fallback", "botania.brew.fallback", 0, 0);
static {
registerSubTile("", DummySubTile.class);
@@ -202,7 +202,7 @@ public final class BotaniaAPI {
knowledgeTypes.put(id, type);
return type;
}
/**
* Registers a Brew and returns it.
*/
@@ -220,7 +220,7 @@ public final class BotaniaAPI {
return brewMap.get(key);
return fallbackBrew;
}
/**
* Registers a Petal Recipe.
* @param output The ItemStack to craft.
@@ -294,7 +294,7 @@ public final class BotaniaAPI {
elvenTradeRecipes.add(recipe);
return recipe;
}
/**
* Registers a Brew Recipe (for the Botanical Brewery).
* @param brew The brew in to be set in this recipe.
@@ -13,7 +13,6 @@ package vazkii.botania.api.boss;
import java.awt.Rectangle;
import net.minecraft.entity.boss.BossStatus;
import net.minecraft.entity.boss.IBossDisplayData;
import net.minecraft.util.ResourceLocation;
import cpw.mods.fml.relauncher.Side;
@@ -28,7 +27,7 @@ import cpw.mods.fml.relauncher.SideOnly;
* if that's not the case.
*/
public interface IBotaniaBoss extends IBossDisplayData {
/**
* The ResourceLocation to bind for this boss's boss bar.
* You can use BotaniaAPI.internalMethodHandler.getDefaultBossBarTexture() to get
@@ -36,7 +35,7 @@ public interface IBotaniaBoss extends IBossDisplayData {
*/
@SideOnly(Side.CLIENT)
public ResourceLocation getBossBarTexture();
/**
* A Rectangle instance delimiting the uv, width and height of this boss's
* boss bar texture. This is for the background, not the bar that shows
@@ -44,19 +43,19 @@ public interface IBotaniaBoss extends IBossDisplayData {
*/
@SideOnly(Side.CLIENT)
public Rectangle getBossBarTextureRect();
/**
* A Rectangle instance delimiting the uv, width and height of this boss's
* boss bar HP texture. This is for the foreground that shows how much
* HP the boss has. The width of the rectangle will be multiplied by the
* HP the boss has. The width of the rectangle will be multiplied by the
* faction of the boss's current HP by max HP.
*/
@SideOnly(Side.CLIENT)
public Rectangle getBossBarHPTextureRect();
/**
* A callback for when this boss's boss bar renders, you can do aditional rendering
* here if needed.
* here if needed.
*/
@SideOnly(Side.CLIENT)
public void bossBarRenderCallback();
@@ -29,15 +29,15 @@ public interface IBotaniaBossWithShader extends IBotaniaBoss {
* you don't want a shader to be used. You can use separate shaders
* for the background and foreground.
* @param background True if rendering the background of the boss bar,
* false if rendering the bar itself that shows the HP.
* false if rendering the bar itself that shows the HP.
*/
@SideOnly(Side.CLIENT)
public int getBossBarShaderProgram(boolean background);
/**
* A callback for the shader, used to pass in uniforms. Return null for no callback.
*/
@SideOnly(Side.CLIENT)
public ShaderCallback getBossBarShaderCallback(boolean background, int shader);
}
+14 -14
View File
@@ -29,7 +29,7 @@ public class Brew {
int cost;
List<PotionEffect> effects;
boolean canInfuseBloodPendant = true;
/**
* @param name The unlocalized name of this potion.
* @param color The color for the potion to be rendered in the bottle, note that it will get
@@ -44,7 +44,7 @@ public class Brew {
this.cost = cost;
this.effects = new ArrayList(Arrays.asList(effects));
}
/**
* Sets this brew to not be able to be infused onto the Tainted Blood Pendant.
*/
@@ -52,11 +52,11 @@ public class Brew {
canInfuseBloodPendant = false;
return this;
}
public boolean canInfuseBloodPendant() {
return canInfuseBloodPendant;
}
/**
* Returns the key for this brew, for it to be found in the map in the API.
* This should ALWAYS return the same result.
@@ -64,51 +64,51 @@ public class Brew {
public String getKey() {
return key;
}
/**
* Gets the insensitive unlocalized name. This is used for the lexicon.
*/
public String getUnlocalizedName() {
return name;
}
/**
* Gets the unlocalized name for the ItemStack passed in.
*/
public String getUnlocalizedName(ItemStack stack) {
return getUnlocalizedName();
}
/**
* Gets the display color for the ItemStack passed in. Note that for
* the lexicon, this passes in a botania Managlass Vial or an
* Gets the display color for the ItemStack passed in. Note that for
* the lexicon, this passes in a botania Managlass Vial or an
* Alfglass Flask at all times.
*/
public int getColor(ItemStack stack) {
return color;
}
/**
* Gets the insensitive unlocalized mana cost. This is used for the lexicon.
*/
public int getManaCost() {
return cost;
}
/**
* Gets the mana cost for the ItemStack passed in.
*/
public int getManaCost(ItemStack stack) {
return getManaCost();
}
/**
* Gets the list of potion effects for the ItemStack passed in.
* Note that for the lexicon, this passes in a botania Managlass
* Note that for the lexicon, this passes in a botania Managlass
* Vial or an Alfglass Flask at all times.
*/
public List<PotionEffect> getPotionEffects(ItemStack stack) {
return effects;
}
}
@@ -25,12 +25,12 @@ public interface IBrewContainer {
* passed in.
*/
public ItemStack getItemForBrew(Brew brew, ItemStack stack);
/**
* Gets the cost to add this brew onto this container. Return -1
* to not allow for the brew to be added. Normally you'd
* use brew.getManaCost(stack);
*/
public int getManaCost(Brew brew, ItemStack stack);
}
@@ -19,7 +19,7 @@ import net.minecraft.item.ItemStack;
* from going back into the brewery but other mods might use it for whatever.
*/
public interface IBrewItem {
public Brew getBrew(ItemStack brew);
}
@@ -43,7 +43,7 @@ public class DummyMethodHandler implements IInternalMethodHandler {
public LexiconPage elfPaperTextPage(String key) {
return dummyPage(key);
}
@Override
public LexiconPage imagePage(String key, String resource) {
return dummyPage(key);
@@ -98,7 +98,7 @@ public class DummyMethodHandler implements IInternalMethodHandler {
public LexiconPage elvenTradesPage(String key, RecipeElvenTrade recipe) {
return dummyPage(key);
}
@Override
public LexiconPage brewPage(String key, String bottomText, RecipeBrew recipe) {
return dummyPage(key);
@@ -112,7 +112,7 @@ public class DummyMethodHandler implements IInternalMethodHandler {
public ItemStack getSubTileAsStack(String subTile) {
return new ItemStack(Blocks.stone, 0, 0);
}
@Override
public ItemStack getSubTileAsFloatingFlowerStack(String subTile) {
return getSubTileAsStack(subTile);
@@ -43,7 +43,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public interface IInternalMethodHandler {
public LexiconPage textPage(String key);
public LexiconPage elfPaperTextPage(String key);
public LexiconPage imagePage(String key, String resource);
@@ -67,13 +67,13 @@ public interface IInternalMethodHandler {
public LexiconPage elvenTradePage(String key, List<RecipeElvenTrade> recipes);
public LexiconPage elvenTradesPage(String key, RecipeElvenTrade recipe);
public LexiconPage brewPage(String key, String bottomText, RecipeBrew recipe);
public IManaNetwork getManaNetworkInstance();
public ItemStack getSubTileAsStack(String subTile);
public ItemStack getSubTileAsFloatingFlowerStack(String subTile);
public IIcon getSubTileIconForName(String name);
@@ -94,12 +94,12 @@ public interface IInternalMethodHandler {
@SideOnly(Side.CLIENT)
public ResourceLocation getDefaultBossBarTexture();
@SideOnly(Side.CLIENT)
public void setBossStatus(IBotaniaBoss status);
public boolean isBuildcraftPipe(TileEntity tile);
public void sparkleFX(World world, double x, double y, double z, float r, float g, float b, float size, int m);
}
@@ -15,7 +15,7 @@ package vazkii.botania.api.internal;
* A Callback for when a shader is called. Used to define shader uniforms.
*/
public abstract class ShaderCallback {
public abstract void call(int shader);
}
@@ -33,7 +33,7 @@ public interface IBaubleRender {
* Called for the rendering of the bauble on the player. The player instance can be
* acquired through the event parameter. Transformations are already applied for
* the RenderType passed in. Make sure to check against the type parameter for
* rendering.
* rendering.
*/
@SideOnly(Side.CLIENT)
public void onPlayerBaubleRender(ItemStack stack, RenderPlayerEvent event, RenderType type);
@@ -51,7 +51,7 @@ public interface IBaubleRender {
public static void applySneakingRotation() {
GL11.glRotatef(28.64789F, 1.0F, 0.0F, 0.0F);
}
public static void translateToHeadLevel(EntityPlayer player) {
GL11.glTranslated(0, (player != Minecraft.getMinecraft().thePlayer ? 1.62F : 0F) - player.getDefaultEyeHeight() + (player.isSneaking() ? 0.0625 : 0), 0);
}
@@ -11,7 +11,6 @@
*/
package vazkii.botania.api.item;
import vazkii.botania.api.mana.IManaPool;
/**
* Used to define a Mana Pool that can be dyed through floral powder.
@@ -19,8 +18,8 @@ import vazkii.botania.api.mana.IManaPool;
public interface IDyablePool {
public int getColor();
public void setColor(int color);
}
@@ -1,22 +1,22 @@
/**
* This class was created by <SpitefulFox>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* File Created @ [? (GMT)]
*/
* This class was created by <SpitefulFox>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* File Created @ [? (GMT)]
*/
package vazkii.botania.api.item;
import net.minecraft.world.World;
/**
* A BiomeGenBase that implements this will not have Botania flowers generated.
*/
* A BiomeGenBase that implements this will not have Botania flowers generated.
*/
public interface IFlowerlessBiome {
/**
* @return Should this world be allowed to generate flowers?
*/
* @return Should this world be allowed to generate flowers?
*/
public boolean canGenerateFlowers(World world, int x, int z);
}
@@ -14,11 +14,11 @@ package vazkii.botania.api.item;
import net.minecraft.world.World;
/**
* A BlockBush can implement this to check if it can be broken
* A BlockBush can implement this to check if it can be broken
* by a Horn/Drum of the Wild or not.
*/
public interface IGrassHornExcempt {
public boolean canUproot(World world, int x, int y, int z);
}
@@ -26,5 +26,5 @@ public interface IManaDissolvable {
* size 0 the item is killed. This is called in both the server and client.
*/
public void onDissolveTick(IManaPool pool, ItemStack stack, EntityItem item);
}
@@ -18,7 +18,7 @@ package vazkii.botania.api.lexicon;
public interface ITwoNamedPage {
public void setSecondUnlocalizedName(String name);
public String getSecondUnlocalizedName();
}
@@ -19,7 +19,7 @@ import net.minecraft.util.ResourceLocation;
public class LexiconCategory implements Comparable<LexiconCategory> {
private static int count = 0;
public final String unlocalizedName;
public final List<LexiconEntry> entries = new ArrayList<LexiconEntry>();
private final int sortingId;
@@ -38,7 +38,7 @@ public class LexiconCategory implements Comparable<LexiconCategory> {
public String getUnlocalizedName() {
return unlocalizedName;
}
/**
* Sets the priority for this category for sorting. Higher numbers
* means they'll appear first in the book. The basics category
@@ -52,11 +52,11 @@ public class LexiconCategory implements Comparable<LexiconCategory> {
this.priority = priority;
return this;
}
public int getSortingPriority() {
return priority;
}
public final int getSortingId() {
return sortingId;
}
@@ -36,7 +36,7 @@ public interface ISparkAttachable extends IManaReceiver {
* Should NEVER return negative values. Make sure to check against that.
*/
public int getAvailableSpaceForMana();
/**
* Gets the Spark that is attached to this block. A common implementation is
* to check for Spark entities above:
@@ -28,7 +28,7 @@ public class RecipeBrew {
public RecipeBrew(Brew brew, Object... inputs) {
this.brew = brew;
List<Object> inputsToSet = new ArrayList();
for(Object obj : inputs) {
if(obj instanceof String || obj instanceof ItemStack)
@@ -49,7 +49,7 @@ public class RecipeBrew {
if(stack.getItem() instanceof IBrewContainer)
continue;
int stackIndex = -1, oredictIndex = -1;
for(int j = 0; j < inputsMissing.size(); j++) {
@@ -95,11 +95,11 @@ public class RecipeBrew {
public List<Object> getInputs() {
return new ArrayList(inputs);
}
public Brew getBrew() {
return brew;
}
public int getManaUsage() {
return brew.getManaCost();
}
@@ -108,7 +108,7 @@ public class RecipeBrew {
if(stack == null || !(stack.getItem() instanceof IBrewContainer))
return new ItemStack(Items.glass_bottle); // Fallback...
IBrewContainer container = (IBrewContainer) stack.getItem();
return container.getItemForBrew(brew, stack);
}
@@ -31,13 +31,13 @@ public class RecipeManaInfusion {
}
public boolean matches(ItemStack stack) {
if(input instanceof ItemStack) {
ItemStack inputCopy = ((ItemStack) input).copy();
if(inputCopy.getItemDamage() == Short.MAX_VALUE)
inputCopy.setItemDamage(stack.getItemDamage());
return stack.isItemEqual((ItemStack) inputCopy);
return stack.isItemEqual(inputCopy);
}
if(input instanceof String) {
@@ -11,8 +11,8 @@
*/
package vazkii.botania.api.subtile;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.ArrayList;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.entity.EntityLivingBase;
@@ -26,8 +26,8 @@ import net.minecraft.world.World;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.wand.IWandBindable;
import java.util.ArrayList;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
/**
* A Sub-TileEntity, this is used for the flower system. Make sure to map subclasses