mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-22 13:09:42 +00:00
Added Brew pages to the internal method handler.
This commit is contained in:
1 parent
e3d5fbc091
commit
55c837a053
4 files changed
+20
-3
No files matched your search
@@ -67,8 +67,9 @@ public class Brew {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the display color for the ItemStack passed in. Note that for
|
||||
* the lexicon, this passes in a botania Managlass Flask at all times.
|
||||
* 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;
|
||||
@@ -91,7 +92,7 @@ public class Brew {
|
||||
/**
|
||||
* Gets the list of potion effects for the ItemStack passed in.
|
||||
* Note that for the lexicon, this passes in a botania Managlass
|
||||
* Flask at all times.
|
||||
* Vial or an Alfglass Flask at all times.
|
||||
*/
|
||||
public List<PotionEffect> getPotionEffects(ItemStack stack) {
|
||||
return effects;
|
||||
|
||||
@@ -26,6 +26,7 @@ import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.boss.IBotaniaBoss;
|
||||
import vazkii.botania.api.lexicon.LexiconPage;
|
||||
import vazkii.botania.api.recipe.RecipeBrew;
|
||||
import vazkii.botania.api.recipe.RecipeElvenTrade;
|
||||
import vazkii.botania.api.recipe.RecipeManaInfusion;
|
||||
import vazkii.botania.api.recipe.RecipePetals;
|
||||
@@ -92,6 +93,11 @@ 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);
|
||||
}
|
||||
|
||||
private LexiconPage dummyPage(String key) {
|
||||
return new DummyPage(key);
|
||||
|
||||
@@ -25,6 +25,7 @@ import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.boss.IBotaniaBoss;
|
||||
import vazkii.botania.api.lexicon.LexiconPage;
|
||||
import vazkii.botania.api.recipe.RecipeBrew;
|
||||
import vazkii.botania.api.recipe.RecipeElvenTrade;
|
||||
import vazkii.botania.api.recipe.RecipeManaInfusion;
|
||||
import vazkii.botania.api.recipe.RecipePetals;
|
||||
@@ -64,6 +65,8 @@ 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();
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ import vazkii.botania.api.boss.IBotaniaBoss;
|
||||
import vazkii.botania.api.internal.DummyMethodHandler;
|
||||
import vazkii.botania.api.internal.IManaNetwork;
|
||||
import vazkii.botania.api.lexicon.LexiconPage;
|
||||
import vazkii.botania.api.recipe.RecipeBrew;
|
||||
import vazkii.botania.api.recipe.RecipeElvenTrade;
|
||||
import vazkii.botania.api.recipe.RecipeManaInfusion;
|
||||
import vazkii.botania.api.recipe.RecipePetals;
|
||||
@@ -40,6 +41,7 @@ import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.BlockModFlower;
|
||||
import vazkii.botania.common.block.BlockSpecialFlower;
|
||||
import vazkii.botania.common.item.block.ItemBlockSpecialFlower;
|
||||
import vazkii.botania.common.lexicon.page.PageBrew;
|
||||
import vazkii.botania.common.lexicon.page.PageCraftingRecipe;
|
||||
import vazkii.botania.common.lexicon.page.PageElvenRecipe;
|
||||
import vazkii.botania.common.lexicon.page.PageImage;
|
||||
@@ -125,6 +127,11 @@ public class InternalMethodHandler extends DummyMethodHandler {
|
||||
public LexiconPage elvenTradesPage(String key, RecipeElvenTrade recipe) {
|
||||
return new PageElvenRecipe(key, recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LexiconPage brewPage(String key, String bottomText, RecipeBrew recipe) {
|
||||
return new PageBrew(recipe, key, bottomText);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getSubTileAsStack(String subTile) {
|
||||
|
||||
Reference in new issue
Block a user