All Getter methods for lists/maps in registry now return new copies

This commit is contained in:
Nick 2016-02-18 09:49:12 -08:00
parent d997932306
commit 48622bf2e7
5 changed files with 40 additions and 13 deletions

View file

@ -3,7 +3,6 @@ package WayofTime.bloodmagic.api.registry;
import java.util.ArrayList;
import java.util.List;
import lombok.Getter;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
@ -11,7 +10,6 @@ import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe;
public class TartaricForgeRecipeRegistry
{
@Getter
private static List<TartaricForgeRecipe> recipeList = new ArrayList<TartaricForgeRecipe>();
public static void registerRecipe(TartaricForgeRecipe recipe)
@ -36,4 +34,8 @@ public class TartaricForgeRecipeRegistry
return null;
}
public static List<TartaricForgeRecipe> getRecipeList() {
return new ArrayList<TartaricForgeRecipe>(recipeList);
}
}