Moved potions to BOPCPotions. The API is once again completely separated from the mod itself.

This commit is contained in:
Adubbz 2014-06-04 21:30:09 +10:00
parent aedf304dbc
commit 4de4f81de4
14 changed files with 24 additions and 97 deletions

View file

@ -1,9 +1,7 @@
package biomesoplenty.api;
import net.minecraft.block.Block;
import biomesoplenty.common.utils.BOPModInfo;
import cpw.mods.fml.common.registry.GameData;
import cpw.mods.fml.common.registry.GameRegistry;
public class BOPBlockHelper
{

View file

@ -1,82 +1,6 @@
package biomesoplenty.api.content;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import biomesoplenty.api.BOPBlockHelper;
import biomesoplenty.common.blocks.BlockAsh;
import biomesoplenty.common.blocks.BlockBOPAppleLeaves;
import biomesoplenty.common.blocks.BlockBOPColorizedLeaves;
import biomesoplenty.common.blocks.BlockBOPColorizedSapling;
import biomesoplenty.common.blocks.BlockBOPCoral;
import biomesoplenty.common.blocks.BlockBOPFlower;
import biomesoplenty.common.blocks.BlockBOPFlower2;
import biomesoplenty.common.blocks.BlockBOPFoliage;
import biomesoplenty.common.blocks.BlockBOPGems;
import biomesoplenty.common.blocks.BlockBOPGeneric;
import biomesoplenty.common.blocks.BlockBOPGrass;
import biomesoplenty.common.blocks.BlockBOPLeaves;
import biomesoplenty.common.blocks.BlockBOPLog;
import biomesoplenty.common.blocks.BlockBOPMushroom;
import biomesoplenty.common.blocks.BlockBOPPersimmonLeaves;
import biomesoplenty.common.blocks.BlockBOPPetals;
import biomesoplenty.common.blocks.BlockBOPPlank;
import biomesoplenty.common.blocks.BlockBOPPlant;
import biomesoplenty.common.blocks.BlockBOPRocks;
import biomesoplenty.common.blocks.BlockBOPSapling;
import biomesoplenty.common.blocks.BlockBOPSlab;
import biomesoplenty.common.blocks.BlockBOPStairs;
import biomesoplenty.common.blocks.BlockBamboo;
import biomesoplenty.common.blocks.BlockBones;
import biomesoplenty.common.blocks.BlockFlesh;
import biomesoplenty.common.blocks.BlockFlowerVine;
import biomesoplenty.common.blocks.BlockGrave;
import biomesoplenty.common.blocks.BlockHive;
import biomesoplenty.common.blocks.BlockHoney;
import biomesoplenty.common.blocks.BlockIvy;
import biomesoplenty.common.blocks.BlockLongGrass;
import biomesoplenty.common.blocks.BlockMoss;
import biomesoplenty.common.blocks.BlockMud;
import biomesoplenty.common.blocks.BlockOriginGrass;
import biomesoplenty.common.blocks.BlockOvergrownNetherrack;
import biomesoplenty.common.blocks.BlockStoneFormations;
import biomesoplenty.common.blocks.BlockTreeMoss;
import biomesoplenty.common.blocks.BlockTurnip;
import biomesoplenty.common.blocks.BlockWillow;
import biomesoplenty.common.blocks.BlockBOPColorizedLeaves.ColourizedLeafCategory;
import biomesoplenty.common.blocks.BlockBOPCoral.CoralCategory;
import biomesoplenty.common.blocks.BlockBOPGeneric.BlockType;
import biomesoplenty.common.blocks.BlockBOPLeaves.LeafCategory;
import biomesoplenty.common.blocks.BlockBOPLog.LogCategory;
import biomesoplenty.common.blocks.BlockBOPSlab.SlabCategory;
import biomesoplenty.common.blocks.BlockBOPStairs.Category;
import biomesoplenty.common.itemblocks.ItemBlockAppleLeaves;
import biomesoplenty.common.itemblocks.ItemBlockBamboo;
import biomesoplenty.common.itemblocks.ItemBlockBones;
import biomesoplenty.common.itemblocks.ItemBlockColorizedLeaves;
import biomesoplenty.common.itemblocks.ItemBlockColorizedSapling;
import biomesoplenty.common.itemblocks.ItemBlockCoral;
import biomesoplenty.common.itemblocks.ItemBlockFlower;
import biomesoplenty.common.itemblocks.ItemBlockFlower2;
import biomesoplenty.common.itemblocks.ItemBlockFoliage;
import biomesoplenty.common.itemblocks.ItemBlockGems;
import biomesoplenty.common.itemblocks.ItemBlockGrass;
import biomesoplenty.common.itemblocks.ItemBlockGrave;
import biomesoplenty.common.itemblocks.ItemBlockHive;
import biomesoplenty.common.itemblocks.ItemBlockIvy;
import biomesoplenty.common.itemblocks.ItemBlockLeaves;
import biomesoplenty.common.itemblocks.ItemBlockLog;
import biomesoplenty.common.itemblocks.ItemBlockMoss;
import biomesoplenty.common.itemblocks.ItemBlockMud;
import biomesoplenty.common.itemblocks.ItemBlockMushroom;
import biomesoplenty.common.itemblocks.ItemBlockPersimmonLeaves;
import biomesoplenty.common.itemblocks.ItemBlockPetals;
import biomesoplenty.common.itemblocks.ItemBlockPlank;
import biomesoplenty.common.itemblocks.ItemBlockPlant;
import biomesoplenty.common.itemblocks.ItemBlockRocks;
import biomesoplenty.common.itemblocks.ItemBlockSapling;
import biomesoplenty.common.itemblocks.ItemBlockSlab;
import biomesoplenty.common.itemblocks.ItemBlockStoneFormations;
import biomesoplenty.common.itemblocks.ItemBlockWillow;
public class BOPCBlocks
{

View file

@ -0,0 +1,9 @@
package biomesoplenty.api.content;
import net.minecraft.potion.Potion;
public class BOPCPotions
{
public static Potion paralysis;
public static Potion possession;
}

View file

@ -1,7 +1,7 @@
package biomesoplenty.common.biomes;
import net.minecraft.world.biome.BiomeGenBase;
import biomesoplenty.api.BOPBiomeManager;
import biomesoplenty.common.world.BOPBiomeManager;
public abstract class BOPOceanBiome extends BOPSubBiome
{

View file

@ -11,8 +11,8 @@ import net.minecraftforge.common.config.Configuration;
import org.apache.logging.log4j.Level;
import biomesoplenty.api.BOPBiomeManager;
import biomesoplenty.api.content.BOPCBiomes;
import biomesoplenty.common.world.BOPBiomeManager;
import cpw.mods.fml.common.FMLLog;
public class BOPConfigurationStrongholds

View file

@ -11,8 +11,8 @@ import net.minecraftforge.common.config.Configuration;
import org.apache.logging.log4j.Level;
import biomesoplenty.api.BOPBiomeManager;
import biomesoplenty.api.content.BOPCBiomes;
import biomesoplenty.common.world.BOPBiomeManager;
import cpw.mods.fml.common.FMLLog;
public class BOPConfigurationVillages

View file

@ -14,8 +14,6 @@ import net.minecraftforge.common.BiomeManager.BiomeEntry;
import org.apache.logging.log4j.Level;
import biomesoplenty.api.BOPBiomeManager;
import biomesoplenty.api.BOPBiomeManager.TemperatureType;
import biomesoplenty.api.content.BOPCBiomes;
import biomesoplenty.common.biomes.nether.BiomeGenBoneyard;
import biomesoplenty.common.biomes.nether.BiomeGenCorruptedSands;
@ -98,7 +96,9 @@ import biomesoplenty.common.configuration.BOPConfigurationBiomeWeights;
import biomesoplenty.common.configuration.BOPConfigurationIDs;
import biomesoplenty.common.configuration.BOPConfigurationMisc;
import biomesoplenty.common.utils.BOPLogger;
import biomesoplenty.common.world.BOPBiomeManager;
import biomesoplenty.common.world.WorldTypeBOP;
import biomesoplenty.common.world.BOPBiomeManager.TemperatureType;
import biomesoplenty.common.world.decoration.BOPDecorationManager;
import cpw.mods.fml.common.registry.GameRegistry;

View file

@ -1,5 +1,7 @@
package biomesoplenty.common.core;
import static biomesoplenty.api.content.BOPCPotions.*;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
@ -37,17 +39,12 @@ public class BOPPotions
private static void intializePotions()
{
registerPotion(new PotionParalysis(getNextID(), true, 16767262).setPotionName("potion.paralysis"));
registerPotion(new PotionPossession(getNextID(), true, 1280).setPotionName("potion.possession"));
paralysis = new PotionParalysis(getNextID(), true, 16767262).setPotionName("potion.paralysis");
possession = new PotionPossession(getNextID(), true, 1280).setPotionName("potion.possession");
}
public static int getNextID()
{
return potionOffset++ - 1;
}
public static void registerPotion(Potion potion)
{
BOPPotionHelper.registerPotion(potion, potion.getName().replace("potion.", ""));
}
}

View file

@ -1,9 +1,8 @@
package biomesoplenty.api;
package biomesoplenty.common.world;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.util.WeightedRandom;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.BiomeManager.BiomeEntry;
import biomesoplenty.common.configuration.BOPConfigurationBiomeGen;

View file

@ -12,9 +12,9 @@ import net.minecraft.world.gen.layer.GenLayerBiome;
import net.minecraft.world.gen.layer.IntCache;
import net.minecraftforge.common.BiomeManager;
import net.minecraftforge.common.BiomeManager.BiomeEntry;
import biomesoplenty.api.BOPBiomeManager;
import biomesoplenty.common.configuration.BOPConfigurationBiomeGen;
import biomesoplenty.common.core.BOPBiomes;
import biomesoplenty.common.world.BOPBiomeManager;
public class GenLayerBiomeBOP extends GenLayerBiome
{

View file

@ -4,8 +4,8 @@ import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.layer.GenLayer;
import net.minecraft.world.gen.layer.GenLayerRiverMix;
import net.minecraft.world.gen.layer.IntCache;
import biomesoplenty.api.BOPBiomeManager;
import biomesoplenty.api.content.BOPCBiomes;
import biomesoplenty.common.world.BOPBiomeManager;
public class GenLayerRiverMixBOP extends GenLayerRiverMix
{

View file

@ -5,7 +5,7 @@ import net.minecraft.world.biome.BiomeGenJungle;
import net.minecraft.world.biome.BiomeGenMesa;
import net.minecraft.world.gen.layer.GenLayer;
import net.minecraft.world.gen.layer.IntCache;
import biomesoplenty.api.BOPBiomeManager;
import biomesoplenty.common.world.BOPBiomeManager;
public class GenLayerShoreBOP extends GenLayer
{

View file

@ -9,8 +9,8 @@ import net.minecraftforge.common.BiomeManager.BiomeEntry;
import org.apache.commons.lang3.tuple.Pair;
import biomesoplenty.api.BOPBiomeManager;
import biomesoplenty.common.biomes.BOPSubBiome;
import biomesoplenty.common.world.BOPBiomeManager;
import biomesoplenty.common.world.noise.SimplexNoise;
public class GenLayerSubBiome extends GenLayer

View file

@ -7,7 +7,7 @@ import net.minecraft.util.WeightedRandom;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.layer.IntCache;
import net.minecraftforge.common.BiomeManager.BiomeEntry;
import biomesoplenty.api.BOPBiomeManager;
import biomesoplenty.common.world.BOPBiomeManager;
public class BiomeLayerHellBiomes extends BiomeLayerHell
{