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
132 changed files
with
3,472 additions
and
3,514 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,98 @@ | ||
package mezz.jei; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
import com.google.common.base.Preconditions; | ||
import mezz.jei.gui.recipes.IngredientLookupMemory; | ||
import mezz.jei.util.ModIdUtil; | ||
import mezz.jei.util.StackHelper; | ||
import mezz.jei.util.color.ColorNamer; | ||
|
||
/** | ||
* For JEI internal use only, these are normally accessed from the API. | ||
*/ | ||
public class Internal { | ||
|
||
private static final ModIdUtil modIdUtil = new ModIdUtil(); | ||
@Nullable | ||
private static StackHelper stackHelper; | ||
@Nullable | ||
private static JeiHelpers helpers; | ||
@Nullable | ||
private static JeiRuntime runtime; | ||
@Nullable | ||
private static IngredientRegistry ingredientRegistry; | ||
@Nullable | ||
private static ColorNamer colorNamer; | ||
@Nullable | ||
private static IngredientLookupMemory ingredientLookupMemory; | ||
|
||
private Internal() { | ||
|
||
} | ||
|
||
public static StackHelper getStackHelper() { | ||
Preconditions.checkState(stackHelper != null, "StackHelper has not been created yet."); | ||
return stackHelper; | ||
} | ||
|
||
public static void setStackHelper(StackHelper stackHelper) { | ||
Internal.stackHelper = stackHelper; | ||
} | ||
|
||
public static ModIdUtil getModIdUtil() { | ||
return modIdUtil; | ||
} | ||
|
||
public static JeiHelpers getHelpers() { | ||
Preconditions.checkState(helpers != null, "JeiHelpers has not been created yet."); | ||
return helpers; | ||
} | ||
|
||
public static void setHelpers(JeiHelpers helpers) { | ||
Internal.helpers = helpers; | ||
} | ||
|
||
@Nullable | ||
public static JeiRuntime getRuntime() { | ||
return runtime; | ||
} | ||
|
||
public static void setRuntime(JeiRuntime runtime) { | ||
JeiRuntime jeiRuntime = Internal.runtime; | ||
if (jeiRuntime != null) { | ||
jeiRuntime.close(); | ||
} | ||
Internal.runtime = runtime; | ||
} | ||
|
||
public static IngredientRegistry getIngredientRegistry() { | ||
Preconditions.checkState(ingredientRegistry != null, "Ingredient Registry has not been created yet."); | ||
return ingredientRegistry; | ||
} | ||
|
||
public static void setIngredientRegistry(IngredientRegistry ingredientRegistry) { | ||
Internal.ingredientRegistry = ingredientRegistry; | ||
} | ||
|
||
public static ColorNamer getColorNamer() { | ||
Preconditions.checkState(colorNamer != null, "Color Namer has not been created yet."); | ||
return colorNamer; | ||
} | ||
|
||
public static void setColorNamer(ColorNamer colorNamer) { | ||
Internal.colorNamer = colorNamer; | ||
} | ||
|
||
public static IngredientLookupMemory getIngredientLookupMemory() { | ||
Preconditions.checkState(ingredientLookupMemory != null, "Ingredient Lookup Memory has not been created yet."); | ||
return ingredientLookupMemory; | ||
} | ||
|
||
public static void setIngredientLookupMemory(IngredientLookupMemory ingredientLookupMemory) { | ||
Internal.ingredientLookupMemory = ingredientLookupMemory; | ||
} | ||
} | ||
package mezz.jei; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
import com.google.common.base.Preconditions; | ||
import mezz.jei.color.ColorNamer; | ||
import mezz.jei.gui.ingredients.IngredientLookupMemory; | ||
import mezz.jei.ingredients.IngredientRegistry; | ||
import mezz.jei.runtime.JeiHelpers; | ||
import mezz.jei.runtime.JeiRuntime; | ||
import mezz.jei.startup.ModIdHelper; | ||
import mezz.jei.startup.StackHelper; | ||
|
||
/** | ||
* For JEI internal use only, these are normally accessed from the API. | ||
*/ | ||
public final class Internal { | ||
|
||
private static final ModIdHelper MOD_ID_HELPER = new ModIdHelper(); | ||
@Nullable | ||
private static StackHelper stackHelper; | ||
@Nullable | ||
private static JeiHelpers helpers; | ||
@Nullable | ||
private static JeiRuntime runtime; | ||
@Nullable | ||
private static IngredientRegistry ingredientRegistry; | ||
@Nullable | ||
private static ColorNamer colorNamer; | ||
@Nullable | ||
private static IngredientLookupMemory ingredientLookupMemory; | ||
|
||
private Internal() { | ||
|
||
} | ||
|
||
public static StackHelper getStackHelper() { | ||
Preconditions.checkState(stackHelper != null, "StackHelper has not been created yet."); | ||
return stackHelper; | ||
} | ||
|
||
public static void setStackHelper(StackHelper stackHelper) { | ||
Internal.stackHelper = stackHelper; | ||
} | ||
|
||
public static ModIdHelper getModIdHelper() { | ||
return MOD_ID_HELPER; | ||
} | ||
|
||
public static JeiHelpers getHelpers() { | ||
Preconditions.checkState(helpers != null, "JeiHelpers has not been created yet."); | ||
return helpers; | ||
} | ||
|
||
public static void setHelpers(JeiHelpers helpers) { | ||
Internal.helpers = helpers; | ||
} | ||
|
||
@Nullable | ||
public static JeiRuntime getRuntime() { | ||
return runtime; | ||
} | ||
|
||
public static void setRuntime(JeiRuntime runtime) { | ||
JeiRuntime jeiRuntime = Internal.runtime; | ||
if (jeiRuntime != null) { | ||
jeiRuntime.close(); | ||
} | ||
Internal.runtime = runtime; | ||
} | ||
|
||
public static IngredientRegistry getIngredientRegistry() { | ||
Preconditions.checkState(ingredientRegistry != null, "Ingredient Registry has not been created yet."); | ||
return ingredientRegistry; | ||
} | ||
|
||
public static void setIngredientRegistry(IngredientRegistry ingredientRegistry) { | ||
Internal.ingredientRegistry = ingredientRegistry; | ||
} | ||
|
||
public static ColorNamer getColorNamer() { | ||
Preconditions.checkState(colorNamer != null, "Color Namer has not been created yet."); | ||
return colorNamer; | ||
} | ||
|
||
public static void setColorNamer(ColorNamer colorNamer) { | ||
Internal.colorNamer = colorNamer; | ||
} | ||
|
||
public static IngredientLookupMemory getIngredientLookupMemory() { | ||
Preconditions.checkState(ingredientLookupMemory != null, "Ingredient Lookup Memory has not been created yet."); | ||
return ingredientLookupMemory; | ||
} | ||
|
||
public static void setIngredientLookupMemory(IngredientLookupMemory ingredientLookupMemory) { | ||
Internal.ingredientLookupMemory = ingredientLookupMemory; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
2 changes: 1 addition & 1 deletion
2
.../java/mezz/jei/util/color/ColorNamer.java → src/main/java/mezz/jei/color/ColorNamer.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package mezz.jei.util.color; | ||
package mezz.jei.color; | ||
|
||
import javax.annotation.Nullable; | ||
import java.awt.Color; | ||
|
2 changes: 1 addition & 1 deletion
2
.../java/mezz/jei/util/color/ColorThief.java → src/main/java/mezz/jei/color/ColorThief.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package mezz.jei.util.color; | ||
package mezz.jei.color; | ||
|
||
/* | ||
* Java Color Thief | ||
|
4 changes: 2 additions & 2 deletions
4
...n/java/mezz/jei/util/color/ColorUtil.java → src/main/java/mezz/jei/color/ColorUtil.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
2 changes: 1 addition & 1 deletion
2
src/main/java/mezz/jei/util/color/MMCQ.java → src/main/java/mezz/jei/color/MMCQ.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package mezz.jei.util.color; | ||
package mezz.jei.color; | ||
|
||
/* | ||
* Java Color Thief | ||
|
2 changes: 1 addition & 1 deletion
2
...ava/mezz/jei/util/color/package-info.java → ...ain/java/mezz/jei/color/package-info.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
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
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
Oops, something went wrong.