Renames
This commit is contained in:
@@ -20,13 +20,13 @@ public class IntegrationJEI implements IModPlugin {
|
||||
|
||||
registry.getRecipeTransferRegistry().addRecipeTransferHandler(new RecipeTransferHandlerGrid());
|
||||
|
||||
registry.addRecipeCategories(new SoldererRecipeCategory(registry.getJeiHelpers().getGuiHelper()));
|
||||
registry.addRecipeCategories(new RecipeCategorySolderer(registry.getJeiHelpers().getGuiHelper()));
|
||||
|
||||
registry.addRecipeHandlers(new SoldererRecipeHandler());
|
||||
registry.addRecipeHandlers(new RecipeHandlerSolderer());
|
||||
|
||||
registry.addRecipes(SoldererRecipeMaker.getRecipes());
|
||||
registry.addRecipes(RecipeMakerSolderer.getRecipes());
|
||||
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(RefinedStorageBlocks.SOLDERER), SoldererRecipeCategory.ID);
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(RefinedStorageBlocks.SOLDERER), RecipeCategorySolderer.ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -11,12 +11,12 @@ import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class SoldererRecipeCategory implements IRecipeCategory {
|
||||
public class RecipeCategorySolderer implements IRecipeCategory {
|
||||
public static final String ID = "refinedstorage.solderer";
|
||||
|
||||
private IDrawable background;
|
||||
|
||||
public SoldererRecipeCategory(IGuiHelper helper) {
|
||||
public RecipeCategorySolderer(IGuiHelper helper) {
|
||||
background = helper.createDrawable(new ResourceLocation("refinedstorage", "textures/gui/solderer.png"), 8, 5, 162, 83);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public class SoldererRecipeCategory implements IRecipeCategory {
|
||||
|
||||
group.init(3, false, 127 - 9, 38 - 6);
|
||||
|
||||
if (recipeWrapper instanceof SoldererRecipeWrapper) {
|
||||
if (recipeWrapper instanceof RecipeWrapperSolderer) {
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
group.set(i, (ItemStack) recipeWrapper.getInputs().get(i));
|
||||
}
|
34
src/main/java/refinedstorage/integration/jei/RecipeHandlerSolderer.java
Executable file
34
src/main/java/refinedstorage/integration/jei/RecipeHandlerSolderer.java
Executable file
@@ -0,0 +1,34 @@
|
||||
package refinedstorage.integration.jei;
|
||||
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class RecipeHandlerSolderer implements IRecipeHandler<RecipeWrapperSolderer> {
|
||||
@Override
|
||||
public Class<RecipeWrapperSolderer> getRecipeClass() {
|
||||
return RecipeWrapperSolderer.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeCategoryUid() {
|
||||
return RecipeCategorySolderer.ID;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull RecipeWrapperSolderer recipe) {
|
||||
return RecipeCategorySolderer.ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(RecipeWrapperSolderer recipe) {
|
||||
return recipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRecipeValid(RecipeWrapperSolderer recipe) {
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -7,9 +7,9 @@ import refinedstorage.api.solderer.ISoldererRecipe;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SoldererRecipeMaker {
|
||||
public static List<SoldererRecipeWrapper> getRecipes() {
|
||||
List<SoldererRecipeWrapper> recipes = new ArrayList<SoldererRecipeWrapper>();
|
||||
public final class RecipeMakerSolderer {
|
||||
public static List<RecipeWrapperSolderer> getRecipes() {
|
||||
List<RecipeWrapperSolderer> recipes = new ArrayList<RecipeWrapperSolderer>();
|
||||
|
||||
for (ISoldererRecipe recipe : RefinedStorageAPI.SOLDERER_REGISTRY.getRecipes()) {
|
||||
List<ItemStack> inputs = new ArrayList<ItemStack>();
|
||||
@@ -20,7 +20,7 @@ public class SoldererRecipeMaker {
|
||||
|
||||
ItemStack output = recipe.getResult();
|
||||
|
||||
recipes.add(new SoldererRecipeWrapper(inputs, output));
|
||||
recipes.add(new RecipeWrapperSolderer(inputs, output));
|
||||
}
|
||||
|
||||
return recipes;
|
@@ -6,11 +6,11 @@ import net.minecraft.item.ItemStack;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class SoldererRecipeWrapper extends VanillaRecipeWrapper {
|
||||
public class RecipeWrapperSolderer extends VanillaRecipeWrapper {
|
||||
private List<ItemStack> inputs;
|
||||
private ItemStack output;
|
||||
|
||||
public SoldererRecipeWrapper(List<ItemStack> inputs, ItemStack output) {
|
||||
public RecipeWrapperSolderer(List<ItemStack> inputs, ItemStack output) {
|
||||
this.inputs = inputs;
|
||||
this.output = output;
|
||||
}
|
||||
@@ -27,11 +27,11 @@ public class SoldererRecipeWrapper extends VanillaRecipeWrapper {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (!(obj instanceof SoldererRecipeWrapper)) {
|
||||
if (!(obj instanceof RecipeWrapperSolderer)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
SoldererRecipeWrapper other = (SoldererRecipeWrapper) obj;
|
||||
RecipeWrapperSolderer other = (RecipeWrapperSolderer) obj;
|
||||
|
||||
for (int i = 0; i < inputs.size(); i++) {
|
||||
if (!ItemStack.areItemStacksEqual(inputs.get(i), other.inputs.get(i))) {
|
@@ -1,34 +0,0 @@
|
||||
package refinedstorage.integration.jei;
|
||||
|
||||
import mezz.jei.api.recipe.IRecipeHandler;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class SoldererRecipeHandler implements IRecipeHandler<SoldererRecipeWrapper> {
|
||||
@Override
|
||||
public Class<SoldererRecipeWrapper> getRecipeClass() {
|
||||
return SoldererRecipeWrapper.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeCategoryUid() {
|
||||
return SoldererRecipeCategory.ID;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull SoldererRecipeWrapper recipe) {
|
||||
return SoldererRecipeCategory.ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(SoldererRecipeWrapper recipe) {
|
||||
return recipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRecipeValid(SoldererRecipeWrapper recipe) {
|
||||
return true;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user