Massive rework of configs, items and blocks.

I redone where the items/blocsks are stored and how the configs are
handled to clean up it and give space. You can change the config line to
AWWayofTime if you want to keep the compatibility with old configs. Now
you reference the blocks from the ModBlocks and Items from the ModItems.
This commit is contained in:
Fenn 2014-01-17 21:05:38 +00:00
parent 8601e9faff
commit e3644f2d2b
304 changed files with 3941 additions and 5108 deletions

View file

@ -4,7 +4,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public interface IScanEventHandler
{
public interface IScanEventHandler {
ScanResult scanPhenomena(ItemStack stack, World world, EntityPlayer player);
}

View file

@ -1,15 +1,14 @@
package thaumcraft.api.research;
import java.util.Collection;
import java.util.LinkedHashMap;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
public class ResearchCategories
{
import java.util.Collection;
import java.util.LinkedHashMap;
public class ResearchCategories {
//Research
public static LinkedHashMap <String, ResearchCategoryList> researchCategories = new LinkedHashMap <String, ResearchCategoryList>();
public static LinkedHashMap<String,ResearchCategoryList> researchCategories = new LinkedHashMap<String,ResearchCategoryList>();
/**
* @param key
@ -38,15 +37,15 @@ public class ResearchCategories
{
Collection rc = researchCategories.values();
for (Object cat: rc)
for (Object cat : rc)
{
Collection rl = ((ResearchCategoryList)cat).research.values();
Collection rl = ((ResearchCategoryList) cat).research.values();
for (Object ri: rl)
for (Object ri : rl)
{
if ((((ResearchItem)ri).key).equals(key))
if ((((ResearchItem) ri).key).equals(key))
{
return (ResearchItem)ri;
return (ResearchItem) ri;
}
}
}
@ -55,8 +54,8 @@ public class ResearchCategories
}
/**
* @param key the key used for this category
* @param icon the icon to be used for the research category tab
* @param key the key used for this category
* @param icon the icon to be used for the research category tab
* @param background the resource location of the background image to use for this category
* @return the name of the research linked to this key
*/

View file

@ -1,25 +1,34 @@
package thaumcraft.api.research;
import net.minecraft.util.ResourceLocation;
import java.util.HashMap;
import java.util.Map;
import net.minecraft.util.ResourceLocation;
public class ResearchCategoryList
{
/** Is the smallest column used on the GUI. */
public class ResearchCategoryList {
/**
* Is the smallest column used on the GUI.
*/
public int minDisplayColumn;
/** Is the smallest row used on the GUI. */
/**
* Is the smallest row used on the GUI.
*/
public int minDisplayRow;
/** Is the biggest column used on the GUI. */
/**
* Is the biggest column used on the GUI.
*/
public int maxDisplayColumn;
/** Is the biggest row used on the GUI. */
/**
* Is the biggest row used on the GUI.
*/
public int maxDisplayRow;
/** display variables **/
/**
* display variables *
*/
public ResourceLocation icon;
public ResourceLocation background;
@ -30,5 +39,5 @@ public class ResearchCategoryList
}
//Research
public Map<String, ResearchItem> research = new HashMap<String, ResearchItem>();
public Map<String,ResearchItem> research = new HashMap<String,ResearchItem>();
}

View file

@ -1,15 +1,14 @@
package thaumcraft.api.research;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ResearchItem
{
public class ResearchItem {
/**
* A short string used as a key for this research. Must be unique
*/
@ -322,13 +321,13 @@ public class ResearchItem
int highest = 0;
if (tags != null)
for (Aspect tag: tags.getAspects())
for (Aspect tag : tags.getAspects())
{
if (tags.getAmount(tag) > highest)
{
aspect = tag;
highest = tags.getAmount(tag);
};
} ;
}
return aspect;

View file

@ -1,7 +1,5 @@
package thaumcraft.api.research;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.ResourceLocation;
@ -12,10 +10,10 @@ import thaumcraft.api.crafting.IArcaneRecipe;
import thaumcraft.api.crafting.InfusionEnchantmentRecipe;
import thaumcraft.api.crafting.InfusionRecipe;
public class ResearchPage
{
public static enum PageType
{
import java.util.List;
public class ResearchPage {
public static enum PageType {
TEXT,
TEXT_CONCEALED,
IMAGE,
@ -48,7 +46,7 @@ public class ResearchPage
/**
* @param research this page will only be displayed if the player has discovered this research
* @param text this can (but does not have to) be a reference to a localization variable, not the actual text.
* @param text this can (but does not have to) be a reference to a localization variable, not the actual text.
*/
public ResearchPage(String research, String text)
{
@ -134,8 +132,7 @@ public class ResearchPage
if (recipe.recipeOutput instanceof ItemStack)
{
this.recipeOutput = (ItemStack) recipe.recipeOutput;
}
else
} else
{
this.recipeOutput = recipe.recipeInput;
}
@ -177,6 +174,7 @@ public class ResearchPage
/**
* returns a localized text of the text field (if one exists). Returns the text field itself otherwise.
*
* @return
*/
public String getTranslatedText()

View file

@ -2,8 +2,7 @@ package thaumcraft.api.research;
import net.minecraft.entity.Entity;
public class ScanResult
{
public class ScanResult {
public byte type = 0; //1=blocks,2=entities,3=phenomena
public int blockId;
public int blockMeta;