mirror of
https://github.com/GTNewHorizons/NotEnoughEnergistics.git
synced 2026-11-27 23:33:13 +00:00
Fix NEI GTNH meta bug and added ru_RU.lang
Some default code refactor
This commit is contained in:
1 parent
7ccf1b0767
commit
ce5a76ee68
14 files changed
+96
-82
No files matched your search
@@ -36,6 +36,24 @@ public class GregTech5RecipeProcessor implements IRecipeProcessor {
|
||||
gtAssLineClz = gtAL;
|
||||
}
|
||||
|
||||
/**
|
||||
* For resolving NoSuchMethodError
|
||||
* Copied from GTNewHorizons/GT5-Unofficial.
|
||||
*/
|
||||
public static FluidStack getFluidFromDisplayStack(ItemStack aDisplayStack) {
|
||||
if (!isStackValid(aDisplayStack) ||
|
||||
aDisplayStack.getItem() != ItemList.Display_Fluid.getItem() ||
|
||||
!aDisplayStack.hasTagCompound()) {
|
||||
return null;
|
||||
}
|
||||
Fluid tFluid = FluidRegistry.getFluid(ItemList.Display_Fluid.getItem().getDamage(aDisplayStack));
|
||||
return new FluidStack(tFluid, (int) aDisplayStack.getTagCompound().getLong("mFluidDisplayAmount"));
|
||||
}
|
||||
|
||||
public static boolean isStackValid(Object aStack) {
|
||||
return (aStack instanceof ItemStack) && ((ItemStack) aStack).getItem() != null && ((ItemStack) aStack).stackSize >= 0;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Set<String> getAllOverlayIdentifier() {
|
||||
@@ -88,22 +106,4 @@ public class GregTech5RecipeProcessor implements IRecipeProcessor {
|
||||
return recipeOutputs;
|
||||
}
|
||||
|
||||
/**
|
||||
* For resolving NoSuchMethodError
|
||||
* Copied from GTNewHorizons/GT5-Unofficial.
|
||||
*/
|
||||
public static FluidStack getFluidFromDisplayStack(ItemStack aDisplayStack) {
|
||||
if (!isStackValid(aDisplayStack) ||
|
||||
aDisplayStack.getItem() != ItemList.Display_Fluid.getItem() ||
|
||||
!aDisplayStack.hasTagCompound()) {
|
||||
return null;
|
||||
}
|
||||
Fluid tFluid = FluidRegistry.getFluid(ItemList.Display_Fluid.getItem().getDamage(aDisplayStack));
|
||||
return new FluidStack(tFluid, (int) aDisplayStack.getTagCompound().getLong("mFluidDisplayAmount"));
|
||||
}
|
||||
|
||||
public static boolean isStackValid(Object aStack) {
|
||||
return (aStack instanceof ItemStack) && ((ItemStack) aStack).getItem() != null && ((ItemStack) aStack).stackSize >= 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,7 +14,7 @@ import java.util.Set;
|
||||
public interface IRecipeProcessor {
|
||||
|
||||
@Nonnull
|
||||
default Set<String> getAllOverlayIdentifier(){
|
||||
default Set<String> getAllOverlayIdentifier() {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user