mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 11:49:37 +00:00
Starting on more API nonsense.
This commit is contained in:
1 parent
d58a7c365e
commit
c94ee326ee
3 files changed
+43
-2
No files matched your search
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. 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 @ [Aug 30, 2014, 4:22:15 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.api.item;
|
||||
|
||||
/**
|
||||
* Base Interface for the Petal Apothecary block. Can
|
||||
* be safely casted to TileEntity.
|
||||
*/
|
||||
public interface IPetalApothecary {
|
||||
|
||||
/**
|
||||
* Sets if the the apothecary has water or not.
|
||||
*/
|
||||
public void setWater(boolean water);
|
||||
|
||||
/**
|
||||
* Does the apothecary have water in it?
|
||||
*/
|
||||
public boolean hasWater();
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
@API(owner = "Botania", apiVersion = "9", provides = "BotaniaAPI")
|
||||
@API(owner = "Botania", apiVersion = "10", provides = "BotaniaAPI")
|
||||
package vazkii.botania.api;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
@@ -24,12 +24,13 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.item.IPetalApothecary;
|
||||
import vazkii.botania.api.recipe.IFlowerComponent;
|
||||
import vazkii.botania.api.recipe.RecipePetals;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
|
||||
public class TileAltar extends TileSimpleInventory implements ISidedInventory {
|
||||
public class TileAltar extends TileSimpleInventory implements ISidedInventory, IPetalApothecary {
|
||||
|
||||
private static final Pattern SEED_PATTERN = Pattern.compile("(?:(?:(?:[A-Z-_.:]|^)seed)|(?:(?:[a-z-_.:]|^)Seed))(?:[sA-Z-_.:]|$)");
|
||||
|
||||
@@ -203,4 +204,14 @@ public class TileAltar extends TileSimpleInventory implements ISidedInventory {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWater(boolean water) {
|
||||
hasWater = water;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasWater() {
|
||||
return hasWater;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user