Cleaned up a lot of different inspections
This commit is contained in:
parent
0dd0854bd9
commit
70d98455b7
207 changed files with 603 additions and 731 deletions
|
@ -13,7 +13,7 @@ import java.util.UUID;
|
|||
public class BMWorldSavedData extends WorldSavedData {
|
||||
public static final String ID = "BloodMagic-SoulNetworks";
|
||||
|
||||
private Map<UUID, SoulNetwork> soulNetworks = new HashMap<UUID, SoulNetwork>();
|
||||
private Map<UUID, SoulNetwork> soulNetworks = new HashMap<>();
|
||||
|
||||
public BMWorldSavedData(String id) {
|
||||
super(id);
|
||||
|
|
|
@ -20,7 +20,7 @@ public class AlchemyArrayRecipeRegistry {
|
|||
public static final AlchemyCircleRenderer DEFAULT_RENDERER = new AlchemyCircleRenderer(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/BaseArray.png"));
|
||||
|
||||
private static BiMap<List<ItemStack>, AlchemyArrayRecipe> recipes = HashBiMap.create();
|
||||
private static HashMap<String, AlchemyArrayEffect> effectMap = new HashMap<String, AlchemyArrayEffect>();
|
||||
private static HashMap<String, AlchemyArrayEffect> effectMap = new HashMap<>();
|
||||
|
||||
/**
|
||||
* General case for creating an AlchemyArrayEffect for a given input.
|
||||
|
@ -120,7 +120,7 @@ public class AlchemyArrayRecipeRegistry {
|
|||
}
|
||||
|
||||
public static void registerCraftingRecipe(String inputOreDict, ItemStack catalystStack, ItemStack outputStack, ResourceLocation arrayResource) {
|
||||
registerRecipe(OreDictionary.doesOreNameExist(inputOreDict) && OreDictionary.getOres(inputOreDict).size() > 0 ? OreDictionary.getOres(inputOreDict) : Collections.<ItemStack>emptyList(), catalystStack, new AlchemyArrayEffectCrafting(outputStack), arrayResource);
|
||||
registerRecipe(OreDictionary.doesOreNameExist(inputOreDict) && OreDictionary.getOres(inputOreDict).size() > 0 ? OreDictionary.getOres(inputOreDict) : Collections.emptyList(), catalystStack, new AlchemyArrayEffectCrafting(outputStack), arrayResource);
|
||||
}
|
||||
|
||||
public static void registerCraftingRecipe(ItemStack input, ItemStack catalystStack, ItemStack outputStack) {
|
||||
|
@ -132,7 +132,7 @@ public class AlchemyArrayRecipeRegistry {
|
|||
}
|
||||
|
||||
public static void registerCraftingRecipe(String inputOreDict, ItemStack catalystStack, ItemStack outputStack) {
|
||||
registerRecipe(OreDictionary.doesOreNameExist(inputOreDict) && OreDictionary.getOres(inputOreDict).size() > 0 ? OreDictionary.getOres(inputOreDict) : Collections.<ItemStack>emptyList(), catalystStack, new AlchemyArrayEffectCrafting(outputStack));
|
||||
registerRecipe(OreDictionary.doesOreNameExist(inputOreDict) && OreDictionary.getOres(inputOreDict).size() > 0 ? OreDictionary.getOres(inputOreDict) : Collections.emptyList(), catalystStack, new AlchemyArrayEffectCrafting(outputStack));
|
||||
}
|
||||
|
||||
public static void registerRecipe(ItemStack inputStacks, ItemStack catalystStack, AlchemyArrayEffect arrayEffect, ResourceLocation arrayResource) {
|
||||
|
@ -151,7 +151,7 @@ public class AlchemyArrayRecipeRegistry {
|
|||
|
||||
public static void registerRecipe(String inputOreDict, ItemStack catalystStack, AlchemyArrayEffect arrayEffect, ResourceLocation arrayResource) {
|
||||
AlchemyCircleRenderer circleRenderer = arrayResource == null ? DEFAULT_RENDERER : new AlchemyCircleRenderer(arrayResource);
|
||||
registerRecipe(OreDictionary.doesOreNameExist(inputOreDict) && OreDictionary.getOres(inputOreDict).size() > 0 ? OreDictionary.getOres(inputOreDict) : Collections.<ItemStack>emptyList(), catalystStack, arrayEffect, circleRenderer);
|
||||
registerRecipe(OreDictionary.doesOreNameExist(inputOreDict) && OreDictionary.getOres(inputOreDict).size() > 0 ? OreDictionary.getOres(inputOreDict) : Collections.emptyList(), catalystStack, arrayEffect, circleRenderer);
|
||||
}
|
||||
|
||||
public static void registerRecipe(ItemStack input, ItemStack catalystStack, AlchemyArrayEffect arrayEffect) {
|
||||
|
@ -163,7 +163,7 @@ public class AlchemyArrayRecipeRegistry {
|
|||
}
|
||||
|
||||
public static void registerRecipe(String inputOreDict, ItemStack catalystStack, AlchemyArrayEffect arrayEffect) {
|
||||
registerRecipe(OreDictionary.doesOreNameExist(inputOreDict) && OreDictionary.getOres(inputOreDict).size() > 0 ? OreDictionary.getOres(inputOreDict) : Collections.<ItemStack>emptyList(), catalystStack, arrayEffect, (AlchemyCircleRenderer) null);
|
||||
registerRecipe(OreDictionary.doesOreNameExist(inputOreDict) && OreDictionary.getOres(inputOreDict).size() > 0 ? OreDictionary.getOres(inputOreDict) : Collections.emptyList(), catalystStack, arrayEffect, (AlchemyCircleRenderer) null);
|
||||
}
|
||||
|
||||
public static void replaceAlchemyCircle(List<ItemStack> input, AlchemyCircleRenderer circleRenderer) {
|
||||
|
@ -250,7 +250,7 @@ public class AlchemyArrayRecipeRegistry {
|
|||
}
|
||||
|
||||
public AlchemyArrayRecipe(String inputOreDict, ItemStack catalystStack, AlchemyArrayEffect arrayEffect, AlchemyCircleRenderer circleRenderer) {
|
||||
this(OreDictionary.doesOreNameExist(inputOreDict) && OreDictionary.getOres(inputOreDict).size() > 0 ? OreDictionary.getOres(inputOreDict) : Collections.<ItemStack>emptyList(), catalystStack, arrayEffect, circleRenderer, false);
|
||||
this(OreDictionary.doesOreNameExist(inputOreDict) && OreDictionary.getOres(inputOreDict).size() > 0 ? OreDictionary.getOres(inputOreDict) : Collections.emptyList(), catalystStack, arrayEffect, circleRenderer, false);
|
||||
}
|
||||
|
||||
public AlchemyArrayRecipe(List<ItemStack> inputStacks, ItemStack catalystStack, AlchemyArrayEffect arrayEffect, AlchemyCircleRenderer circleRenderer) {
|
||||
|
|
|
@ -9,7 +9,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
public class AlchemyTableRecipeRegistry {
|
||||
private static List<AlchemyTableRecipe> recipeList = new ArrayList<AlchemyTableRecipe>();
|
||||
private static List<AlchemyTableRecipe> recipeList = new ArrayList<>();
|
||||
|
||||
public static void registerRecipe(AlchemyTableRecipe recipe) {
|
||||
recipeList.add(recipe);
|
||||
|
@ -34,6 +34,6 @@ public class AlchemyTableRecipeRegistry {
|
|||
}
|
||||
|
||||
public static List<AlchemyTableRecipe> getRecipeList() {
|
||||
return new ArrayList<AlchemyTableRecipe>(recipeList);
|
||||
return new ArrayList<>(recipeList);
|
||||
}
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
package WayofTime.bloodmagic.core.registry;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.util.BMLog;
|
||||
import WayofTime.bloodmagic.util.ItemStackWrapper;
|
||||
import WayofTime.bloodmagic.altar.EnumAltarTier;
|
||||
|
@ -119,11 +118,11 @@ public class AltarRecipeRegistry {
|
|||
}
|
||||
|
||||
public AltarRecipe(String inputEntry, ItemStack output, EnumAltarTier minTier, int syphon, int consumeRate, int drainRate, boolean fillable) {
|
||||
this(OreDictionary.doesOreNameExist(inputEntry) && OreDictionary.getOres(inputEntry).size() > 0 ? OreDictionary.getOres(inputEntry) : Collections.<ItemStack>emptyList(), output, minTier, syphon, consumeRate, drainRate, fillable);
|
||||
this(OreDictionary.doesOreNameExist(inputEntry) && OreDictionary.getOres(inputEntry).size() > 0 ? OreDictionary.getOres(inputEntry) : Collections.emptyList(), output, minTier, syphon, consumeRate, drainRate, fillable);
|
||||
}
|
||||
|
||||
public AltarRecipe(String inputEntry, ItemStack output, EnumAltarTier minTier, int syphon, int consumeRate, int drainRate) {
|
||||
this(OreDictionary.doesOreNameExist(inputEntry) && OreDictionary.getOres(inputEntry).size() > 0 ? OreDictionary.getOres(inputEntry) : Collections.<ItemStack>emptyList(), output, minTier, syphon, consumeRate, drainRate, false);
|
||||
this(OreDictionary.doesOreNameExist(inputEntry) && OreDictionary.getOres(inputEntry).size() > 0 ? OreDictionary.getOres(inputEntry) : Collections.emptyList(), output, minTier, syphon, consumeRate, drainRate, false);
|
||||
}
|
||||
|
||||
public boolean doesRequiredItemMatch(ItemStack comparedStack, EnumAltarTier tierCheck) {
|
||||
|
|
|
@ -8,11 +8,11 @@ import net.minecraft.block.BlockStem;
|
|||
import java.util.*;
|
||||
|
||||
public class HarvestRegistry {
|
||||
private static List<IHarvestHandler> handlerList = new ArrayList<IHarvestHandler>();
|
||||
private static Map<Block, Integer> standardCrops = new HashMap<Block, Integer>();
|
||||
private static Set<BlockStack> tallCrops = new HashSet<BlockStack>();
|
||||
private static Map<BlockStack, BlockStack> stemCrops = new HashMap<BlockStack, BlockStack>();
|
||||
private static Map<BlockStack, Integer> amplifierMap = new HashMap<BlockStack, Integer>();
|
||||
private static List<IHarvestHandler> handlerList = new ArrayList<>();
|
||||
private static Map<Block, Integer> standardCrops = new HashMap<>();
|
||||
private static Set<BlockStack> tallCrops = new HashSet<>();
|
||||
private static Map<BlockStack, BlockStack> stemCrops = new HashMap<>();
|
||||
private static Map<BlockStack, Integer> amplifierMap = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Registers a handler for the Harvest Ritual to call.
|
||||
|
@ -81,22 +81,22 @@ public class HarvestRegistry {
|
|||
}
|
||||
|
||||
public static List<IHarvestHandler> getHandlerList() {
|
||||
return new ArrayList<IHarvestHandler>(handlerList);
|
||||
return new ArrayList<>(handlerList);
|
||||
}
|
||||
|
||||
public static Map<Block, Integer> getStandardCrops() {
|
||||
return new HashMap<Block, Integer>(standardCrops);
|
||||
return new HashMap<>(standardCrops);
|
||||
}
|
||||
|
||||
public static Set<BlockStack> getTallCrops() {
|
||||
return new HashSet<BlockStack>(tallCrops);
|
||||
return new HashSet<>(tallCrops);
|
||||
}
|
||||
|
||||
public static Map<BlockStack, BlockStack> getStemCrops() {
|
||||
return new HashMap<BlockStack, BlockStack>(stemCrops);
|
||||
return new HashMap<>(stemCrops);
|
||||
}
|
||||
|
||||
public static Map<BlockStack, Integer> getAmplifierMap() {
|
||||
return new HashMap<BlockStack, Integer>(amplifierMap);
|
||||
return new HashMap<>(amplifierMap);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package WayofTime.bloodmagic.core.registry;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.util.BMLog;
|
||||
import WayofTime.bloodmagic.util.BlockStack;
|
||||
import WayofTime.bloodmagic.ritual.data.imperfect.ImperfectRitual;
|
||||
|
@ -12,7 +11,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
public class ImperfectRitualRegistry {
|
||||
public static final Map<ImperfectRitual, Boolean> enabledRituals = new HashMap<ImperfectRitual, Boolean>();
|
||||
public static final Map<ImperfectRitual, Boolean> enabledRituals = new HashMap<>();
|
||||
private static final BiMap<String, ImperfectRitual> registry = HashBiMap.create();
|
||||
|
||||
/**
|
||||
|
@ -90,10 +89,10 @@ public class ImperfectRitualRegistry {
|
|||
}
|
||||
|
||||
public static ArrayList<String> getIds() {
|
||||
return new ArrayList<String>(registry.keySet());
|
||||
return new ArrayList<>(registry.keySet());
|
||||
}
|
||||
|
||||
public static ArrayList<ImperfectRitual> getRituals() {
|
||||
return new ArrayList<ImperfectRitual>(registry.values());
|
||||
return new ArrayList<>(registry.values());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,8 +15,8 @@ import java.util.Map;
|
|||
import java.util.Map.Entry;
|
||||
|
||||
public class LivingArmourDowngradeRecipeRegistry {
|
||||
private static List<LivingArmourDowngradeRecipe> recipeList = new ArrayList<LivingArmourDowngradeRecipe>();
|
||||
private static Map<ItemStack, Map<Integer, List<ITextComponent>>> dialogueMap = new HashMap<ItemStack, Map<Integer, List<ITextComponent>>>();
|
||||
private static List<LivingArmourDowngradeRecipe> recipeList = new ArrayList<>();
|
||||
private static Map<ItemStack, Map<Integer, List<ITextComponent>>> dialogueMap = new HashMap<>();
|
||||
|
||||
public static void registerRecipe(LivingArmourDowngradeRecipe recipe) {
|
||||
recipeList.add(recipe);
|
||||
|
@ -55,6 +55,6 @@ public class LivingArmourDowngradeRecipeRegistry {
|
|||
}
|
||||
|
||||
public static List<LivingArmourDowngradeRecipe> getRecipeList() {
|
||||
return new ArrayList<LivingArmourDowngradeRecipe>(recipeList);
|
||||
return new ArrayList<>(recipeList);
|
||||
}
|
||||
}
|
|
@ -21,7 +21,7 @@ public class OrbRegistry {
|
|||
@GameRegistry.ObjectHolder("bloodmagic:blood_orb")
|
||||
private static final Item ORB_ITEM = null;
|
||||
public static ArrayListMultimap<Integer, ItemStack> tierMap = ArrayListMultimap.create();
|
||||
private static List<BloodOrb> orbs = new ArrayList<BloodOrb>();
|
||||
private static List<BloodOrb> orbs = new ArrayList<>();
|
||||
|
||||
public static List<ItemStack> getOrbsForTier(int tier) {
|
||||
if (getTierMap().containsKey(tier))
|
||||
|
@ -31,7 +31,7 @@ public class OrbRegistry {
|
|||
}
|
||||
|
||||
public static List<ItemStack> getOrbsUpToTier(int tier) {
|
||||
List<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
List<ItemStack> ret = new ArrayList<>();
|
||||
|
||||
for (int i = 1; i <= tier; i++)
|
||||
ret.addAll(getOrbsForTier(i));
|
||||
|
@ -40,7 +40,7 @@ public class OrbRegistry {
|
|||
}
|
||||
|
||||
public static List<ItemStack> getOrbsDownToTier(int tier) {
|
||||
List<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
List<ItemStack> ret = new ArrayList<>();
|
||||
|
||||
for (int i = EnumAltarTier.MAXTIERS; i >= tier; i--)
|
||||
ret.addAll(getOrbsForTier(i));
|
||||
|
|
|
@ -9,14 +9,14 @@ import javax.annotation.Nullable;
|
|||
import java.util.*;
|
||||
|
||||
public class RitualRegistry {
|
||||
public static final Map<Ritual, Boolean> enabledRituals = new HashMap<Ritual, Boolean>();
|
||||
public static final Map<Ritual, Boolean> enabledRituals = new HashMap<>();
|
||||
private static final BiMap<String, Ritual> registry = HashBiMap.create();
|
||||
private static final List<String> lookupList = new ArrayList<String>();
|
||||
private static final List<String> lookupList = new ArrayList<>();
|
||||
/**
|
||||
* Ordered list for actions that depend on the order that the rituals were
|
||||
* registered in
|
||||
*/
|
||||
private static final ArrayList<String> orderedIdList = new ArrayList<String>();
|
||||
private static final ArrayList<String> orderedIdList = new ArrayList<>();
|
||||
|
||||
private static boolean locked;
|
||||
|
||||
|
@ -92,11 +92,11 @@ public class RitualRegistry {
|
|||
}
|
||||
|
||||
public static Map<Ritual, Boolean> getEnabledMap() {
|
||||
return new HashMap<Ritual, Boolean>(enabledRituals);
|
||||
return new HashMap<>(enabledRituals);
|
||||
}
|
||||
|
||||
public static ArrayList<String> getIds() {
|
||||
return new ArrayList<String>(lookupList);
|
||||
return new ArrayList<>(lookupList);
|
||||
}
|
||||
|
||||
public static ArrayList<String> getOrderedIds() {
|
||||
|
@ -104,14 +104,14 @@ public class RitualRegistry {
|
|||
}
|
||||
|
||||
public static ArrayList<Ritual> getRituals() {
|
||||
return new ArrayList<Ritual>(registry.values());
|
||||
return new ArrayList<>(registry.values());
|
||||
}
|
||||
|
||||
public static void orderLookupList() {
|
||||
locked = true; // Lock registry so no no rituals can be registered
|
||||
lookupList.clear(); // Make sure it's empty
|
||||
lookupList.addAll(registry.keySet());
|
||||
Collections.sort(lookupList, (o1, o2) -> {
|
||||
lookupList.sort((o1, o2) -> {
|
||||
Ritual ritual1 = registry.get(o1);
|
||||
Ritual ritual2 = registry.get(o2);
|
||||
return ritual1.getComponents().size() > ritual2.getComponents().size() ? -1 : 0; // Put earlier if bigger
|
||||
|
|
|
@ -9,7 +9,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
public class TartaricForgeRecipeRegistry {
|
||||
private static List<TartaricForgeRecipe> recipeList = new ArrayList<TartaricForgeRecipe>();
|
||||
private static List<TartaricForgeRecipe> recipeList = new ArrayList<>();
|
||||
|
||||
public static void registerRecipe(TartaricForgeRecipe recipe) {
|
||||
recipeList.add(recipe);
|
||||
|
@ -34,6 +34,6 @@ public class TartaricForgeRecipeRegistry {
|
|||
}
|
||||
|
||||
public static List<TartaricForgeRecipe> getRecipeList() {
|
||||
return new ArrayList<TartaricForgeRecipe>(recipeList);
|
||||
return new ArrayList<>(recipeList);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue