mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 08:48:34 +01:00
touch up jei handler
This commit is contained in:
parent
585777b9e0
commit
e95da124f1
2 changed files with 3 additions and 12 deletions
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
package de.ellpeck.actuallyadditions.mod.jei.compost;
|
package de.ellpeck.actuallyadditions.mod.jei.compost;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
|
||||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||||
|
@ -19,14 +18,11 @@ import mezz.jei.api.gui.IDrawable;
|
||||||
import mezz.jei.api.gui.IRecipeLayout;
|
import mezz.jei.api.gui.IRecipeLayout;
|
||||||
import mezz.jei.api.ingredients.IIngredients;
|
import mezz.jei.api.ingredients.IIngredients;
|
||||||
import mezz.jei.api.recipe.IRecipeCategory;
|
import mezz.jei.api.recipe.IRecipeCategory;
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
|
|
||||||
public class CompostRecipeCategory implements IRecipeCategory<CompostRecipeWrapper>{
|
public class CompostRecipeCategory implements IRecipeCategory<CompostRecipeWrapper>{
|
||||||
|
|
||||||
public static final String NAME = "actuallyadditions.compost";
|
public static final String NAME = "actuallyadditions.compost";
|
||||||
|
|
||||||
private static final ItemStack COMPOST = new ItemStack(InitBlocks.blockCompost);
|
|
||||||
private final IDrawable background;
|
private final IDrawable background;
|
||||||
|
|
||||||
public CompostRecipeCategory(IGuiHelper helper){
|
public CompostRecipeCategory(IGuiHelper helper){
|
||||||
|
@ -53,11 +49,6 @@ public class CompostRecipeCategory implements IRecipeCategory<CompostRecipeWrapp
|
||||||
return this.background;
|
return this.background;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void drawExtras(Minecraft minecraft){
|
|
||||||
AssetUtil.renderStackToGui(COMPOST, 1, 35, 1.5F);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setRecipe(IRecipeLayout recipeLayout, CompostRecipeWrapper wrapper, IIngredients ingredients){
|
public void setRecipe(IRecipeLayout recipeLayout, CompostRecipeWrapper wrapper, IIngredients ingredients){
|
||||||
recipeLayout.getItemStacks().init(0, true, 4, 18);
|
recipeLayout.getItemStacks().init(0, true, 4, 18);
|
||||||
|
|
|
@ -38,17 +38,17 @@ public class CompostRecipeWrapper extends RecipeWrapperWithButton{
|
||||||
public void drawInfo(Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY){
|
public void drawInfo(Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY){
|
||||||
int bake_time = TileEntityCompost.COMPOST_TIME_TICKS / 20;
|
int bake_time = TileEntityCompost.COMPOST_TIME_TICKS / 20;
|
||||||
minecraft.fontRenderer.drawString(bake_time + "s", 28, 3, 0xFFFFFF, true);
|
minecraft.fontRenderer.drawString(bake_time + "s", 28, 3, 0xFFFFFF, true);
|
||||||
super.drawInfo(minecraft, recipeWidth, recipeHeight, mouseX, mouseY);
|
//super.drawInfo(minecraft, recipeWidth, recipeHeight, mouseX, mouseY); Not sure the button needs to be here.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getButtonX(){
|
public int getButtonX(){
|
||||||
return 65;
|
return 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getButtonY(){
|
public int getButtonY(){
|
||||||
return 43;
|
return 35;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue