-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
265 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
src/main/java/gregtech/integration/jei/basic/CoolantCategory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package gregtech.integration.jei.basic; | ||
|
||
import gregtech.api.gui.GuiTextures; | ||
import gregtech.common.metatileentities.MetaTileEntities; | ||
|
||
import mezz.jei.api.gui.IGuiFluidStackGroup; | ||
|
||
import net.minecraft.client.Minecraft; | ||
|
||
import mezz.jei.api.IGuiHelper; | ||
import mezz.jei.api.gui.IDrawable; | ||
import mezz.jei.api.gui.IGuiItemStackGroup; | ||
import mezz.jei.api.gui.IRecipeLayout; | ||
import mezz.jei.api.ingredients.IIngredients; | ||
import mezz.jei.api.recipe.IRecipeWrapper; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
public class CoolantCategory extends BasicRecipeCategory<CoolantInfo, CoolantInfo> { | ||
private final IDrawable icon; | ||
protected final IDrawable slot; | ||
private final IDrawable arrow; | ||
public CoolantCategory(IGuiHelper guiHelper) { | ||
super("coolant", "fission.coolant.name", guiHelper.createBlankDrawable(176, 50), guiHelper); | ||
|
||
this.icon = guiHelper.createDrawableIngredient(MetaTileEntities.FISSION_REACTOR.getStackForm()); | ||
this.slot = guiHelper.drawableBuilder(GuiTextures.SLOT.imageLocation, 0, 0, 18, 18).setTextureSize(18, 18).build(); | ||
this.arrow = guiHelper.drawableBuilder(GuiTextures.PROGRESS_BAR_ARROW.imageLocation, 0, 20, 20, 20).setTextureSize(20, 40).build(); | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public IDrawable getIcon() { | ||
return this.icon; | ||
} | ||
|
||
@Override | ||
public void setRecipe(IRecipeLayout recipeLayout, CoolantInfo recipeWrapper, IIngredients ingredients) { | ||
IGuiFluidStackGroup fluidStackGroup = recipeLayout.getFluidStacks(); | ||
|
||
fluidStackGroup.init(0, true, 55, 17); | ||
fluidStackGroup.set(0, recipeWrapper.coolant); | ||
fluidStackGroup.init(1, true, 105, 17); | ||
fluidStackGroup.set(1, recipeWrapper.hotCoolant); | ||
} | ||
|
||
@Override | ||
public void drawExtras(Minecraft minecraft) { | ||
slot.draw(minecraft, 54, 16); | ||
slot.draw(minecraft, 104, 16); | ||
arrow.draw(minecraft, 77, 14); | ||
} | ||
|
||
@Override | ||
public IRecipeWrapper getRecipeWrapper(CoolantInfo recipe) { | ||
return recipe; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/gregtech/integration/jei/basic/CoolantInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package gregtech.integration.jei.basic; | ||
|
||
import net.minecraft.item.ItemStack; | ||
|
||
import mezz.jei.api.ingredients.IIngredients; | ||
import mezz.jei.api.ingredients.VanillaTypes; | ||
import mezz.jei.api.recipe.IRecipeWrapper; | ||
|
||
import net.minecraftforge.fluids.Fluid; | ||
import net.minecraftforge.fluids.FluidStack; | ||
|
||
public class CoolantInfo implements IRecipeWrapper | ||
{ | ||
public FluidStack coolant; | ||
public FluidStack hotCoolant; | ||
|
||
public CoolantInfo(Fluid coolant, Fluid hotCoolant) { | ||
this.coolant = new FluidStack(coolant, 1000); | ||
this.hotCoolant = new FluidStack(hotCoolant, 1000); | ||
} | ||
@Override | ||
public void getIngredients(IIngredients ingredients) { | ||
ingredients.setInput(VanillaTypes.FLUID, coolant); | ||
ingredients.setOutput(VanillaTypes.FLUID, hotCoolant); | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
src/main/java/gregtech/integration/jei/basic/FissionFuelCategory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package gregtech.integration.jei.basic; | ||
|
||
import gregtech.GTInternalTags; | ||
import gregtech.api.GTValues; | ||
import gregtech.api.gui.GuiTextures; | ||
|
||
import gregtech.common.metatileentities.MetaTileEntities; | ||
|
||
import mezz.jei.api.IGuiHelper; | ||
import mezz.jei.api.gui.IDrawable; | ||
import mezz.jei.api.gui.IGuiItemStackGroup; | ||
import mezz.jei.api.gui.IRecipeLayout; | ||
import mezz.jei.api.ingredients.IIngredients; | ||
|
||
import mezz.jei.api.recipe.IRecipeCategory; | ||
|
||
import mezz.jei.api.recipe.IRecipeWrapper; | ||
|
||
import net.minecraft.client.Minecraft; | ||
|
||
import org.jetbrains.annotations.Nullable; | ||
|
||
public class FissionFuelCategory extends BasicRecipeCategory<FissionFuelInfo, FissionFuelInfo> { | ||
private final IDrawable icon; | ||
protected final IDrawable slot; | ||
private final IDrawable arrow; | ||
public FissionFuelCategory(IGuiHelper guiHelper) { | ||
super("fission_fuel", "fission.fuel.name", guiHelper.createBlankDrawable(176, 50), guiHelper); | ||
|
||
this.icon = guiHelper.createDrawableIngredient(MetaTileEntities.FISSION_REACTOR.getStackForm()); | ||
this.slot = guiHelper.drawableBuilder(GuiTextures.SLOT.imageLocation, 0, 0, 18, 18).setTextureSize(18, 18).build(); | ||
this.arrow = guiHelper.drawableBuilder(GuiTextures.PROGRESS_BAR_ARROW.imageLocation, 0, 20, 20, 20).setTextureSize(20, 40).build(); | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public IDrawable getIcon() { | ||
return this.icon; | ||
} | ||
|
||
@Override | ||
public void setRecipe(IRecipeLayout recipeLayout, FissionFuelInfo recipeWrapper, IIngredients ingredients) { | ||
IGuiItemStackGroup itemStackGroup = recipeLayout.getItemStacks(); | ||
|
||
itemStackGroup.init(0, true, 54, 16); | ||
itemStackGroup.set(0, recipeWrapper.rod); | ||
itemStackGroup.init(1, true, 104, 16); | ||
itemStackGroup.set(1, recipeWrapper.depletedRod); | ||
} | ||
|
||
@Override | ||
public void drawExtras(Minecraft minecraft) { | ||
slot.draw(minecraft, 54, 16); | ||
slot.draw(minecraft, 104, 16); | ||
arrow.draw(minecraft, 77, 14); | ||
} | ||
|
||
@Override | ||
public IRecipeWrapper getRecipeWrapper(FissionFuelInfo recipe) { | ||
return recipe; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/gregtech/integration/jei/basic/FissionFuelInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package gregtech.integration.jei.basic; | ||
|
||
import mezz.jei.api.ingredients.IIngredients; | ||
import mezz.jei.api.ingredients.VanillaTypes; | ||
|
||
import mezz.jei.api.recipe.IRecipeWrapper; | ||
|
||
import net.minecraft.item.ItemStack; | ||
|
||
public class FissionFuelInfo implements IRecipeWrapper | ||
{ | ||
public ItemStack rod; | ||
public ItemStack depletedRod; | ||
|
||
public FissionFuelInfo(ItemStack rod, ItemStack depletedRod) { | ||
this.rod = rod; | ||
this.depletedRod = depletedRod; | ||
} | ||
@Override | ||
public void getIngredients(IIngredients ingredients) { | ||
ingredients.setInput(VanillaTypes.ITEM, rod); | ||
ingredients.setOutput(VanillaTypes.ITEM, depletedRod); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 42 additions & 2 deletions
44
...ain/resources/assets/gregtech/textures/blocks/fluids/fluid.high_pressure_steam.png.mcmeta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,45 @@ | ||
{ | ||
"animation":{ | ||
"frametime":1 | ||
"frametime":1, | ||
"frames": [ | ||
0, | ||
1, | ||
2, | ||
3, | ||
4, | ||
5, | ||
6, | ||
7, | ||
8, | ||
9, | ||
10, | ||
11, | ||
12, | ||
13, | ||
14, | ||
15, | ||
16, | ||
17, | ||
18, | ||
19, | ||
18, | ||
17, | ||
16, | ||
15, | ||
14, | ||
13, | ||
12, | ||
11, | ||
10, | ||
9, | ||
8, | ||
7, | ||
6, | ||
5, | ||
4, | ||
3, | ||
2, | ||
1 | ||
] | ||
} | ||
} | ||
} |