BloodMagic/src/main/java/wayoftime/bloodmagic/api/impl/recipe/BloodMagicRecipe.java
WayofTime 9fa68e86ae Attempt to fix 1.16.3 branch's issues on the repository
Added the original 'wayoftime' folder back, so see if that fixed the multiple folder issue.
2020-10-29 15:50:03 -04:00

69 lines
1.4 KiB
Java

package wayoftime.bloodmagic.api.impl.recipe;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import wayoftime.bloodmagic.api.inventory.IgnoredIInventory;
public abstract class BloodMagicRecipe implements IRecipe<IgnoredIInventory>
{
private final ResourceLocation id;
protected BloodMagicRecipe(ResourceLocation id)
{
this.id = id;
}
/**
* Writes this recipe to a PacketBuffer.
*
* @param buffer The buffer to write to.
*/
public abstract void write(PacketBuffer buffer);
@Nonnull
@Override
public ResourceLocation getId()
{
return id;
}
@Override
public boolean matches(@Nonnull IgnoredIInventory inv, @Nonnull World world)
{
return true;
}
@Override
public boolean isDynamic()
{
// Note: If we make this non dynamic, we can make it show in vanilla's crafting
// book and also then obey the recipe locking.
// For now none of that works/makes sense in our concept so don't lock it
return true;
}
@Nonnull
@Override
public ItemStack getCraftingResult(@Nonnull IgnoredIInventory inv)
{
return ItemStack.EMPTY;
}
@Override
public boolean canFit(int width, int height)
{
return true;
}
@Nonnull
@Override
public ItemStack getRecipeOutput()
{
return ItemStack.EMPTY;
}
}