mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-26 06:52:58 +00:00
Merge branch 'capability' into MC18
This commit is contained in:
commit
0d9fe52f5d
48 files changed
+397
-612
No files matched your search
@@ -10,13 +10,19 @@
|
||||
*/
|
||||
package vazkii.botania.api.item;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import vazkii.botania.api.mana.IManaReceiver;
|
||||
|
||||
/**
|
||||
* A TileEntity that implements this is considered an Avatar.
|
||||
*/
|
||||
public interface IAvatarTile extends IInventory, IManaReceiver {
|
||||
public interface IAvatarTile extends IManaReceiver {
|
||||
|
||||
/**
|
||||
* Gets the avatar's inventory
|
||||
* @return An IItemhandler representing the avatar's inventory
|
||||
*/
|
||||
public IItemHandler getInventory();
|
||||
|
||||
/**
|
||||
* Gets the amount of ticks that have elapsed on this avatar while it's functional
|
||||
|
||||
@@ -10,15 +10,15 @@
|
||||
*/
|
||||
package vazkii.botania.api.recipe;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.api.item.IPetalApothecary;
|
||||
|
||||
/**
|
||||
* Have an Item implement this to allow it to be used in the Petal Apothecary.
|
||||
*/
|
||||
public interface IFlowerComponent {
|
||||
|
||||
public boolean canFit(ItemStack stack, IInventory apothecary);
|
||||
public boolean canFit(ItemStack stack, IPetalApothecary apothecary);
|
||||
|
||||
public int getParticleColor(ItemStack stack);
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.util.List;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import vazkii.botania.api.brew.Brew;
|
||||
import vazkii.botania.api.brew.IBrewContainer;
|
||||
@@ -38,10 +39,10 @@ public class RecipeBrew {
|
||||
this.inputs = inputsToSet;
|
||||
}
|
||||
|
||||
public boolean matches(IInventory inv) {
|
||||
public boolean matches(IItemHandler inv) {
|
||||
List<Object> inputsMissing = new ArrayList<>(inputs);
|
||||
|
||||
for(int i = 0; i < inv.getSizeInventory(); i++) {
|
||||
for(int i = 0; i < inv.getSlots(); i++) {
|
||||
ItemStack stack = inv.getStackInSlot(i);
|
||||
if(stack == null)
|
||||
break;
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class RecipePetals {
|
||||
@@ -35,10 +36,10 @@ public class RecipePetals {
|
||||
this.inputs = inputsToSet;
|
||||
}
|
||||
|
||||
public boolean matches(IInventory inv) {
|
||||
public boolean matches(IItemHandler inv) {
|
||||
List<Object> inputsMissing = new ArrayList<>(inputs);
|
||||
|
||||
for(int i = 0; i < inv.getSizeInventory(); i++) {
|
||||
for(int i = 0; i < inv.getSlots(); i++) {
|
||||
ItemStack stack = inv.getStackInSlot(i);
|
||||
if(stack == null)
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user