mirror of
https://github.com/GTNewHorizons/ThaumicTinkerer.git
synced 2026-10-25 20:32:29 +00:00
Capitalize the ore name target once in addAspectLoot (#110)
Co-authored-by: VortexSo4 <kreker.maxim@mail.ru>
This commit is contained in:
1 parent
e4c8acdd4f
commit
5e12defde0
1 file changed
+2
-1
@@ -78,8 +78,9 @@ public class AspectCropLootManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void addAspectLoot(Aspect aspect, String target, int count) {
|
public static void addAspectLoot(Aspect aspect, String target, int count) {
|
||||||
|
String capitalized = WordUtils.capitalizeFully(target);
|
||||||
for (String ore : OreDictionary.getOreNames()) {
|
for (String ore : OreDictionary.getOreNames()) {
|
||||||
if (ore.contains(WordUtils.capitalizeFully(target)) || ore.contains(target)) {
|
if (ore.contains(capitalized) || ore.contains(target)) {
|
||||||
for (ItemStack stack : OreDictionary.getOres(ore)) {
|
for (ItemStack stack : OreDictionary.getOres(ore)) {
|
||||||
ItemStack newStack = stack.copy();
|
ItemStack newStack = stack.copy();
|
||||||
if (newStack.getItemDamage() == OreDictionary.WILDCARD_VALUE) {
|
if (newStack.getItemDamage() == OreDictionary.WILDCARD_VALUE) {
|
||||||
|
|||||||
Reference in new issue
Block a user