Fixed a bug with Promised Lands not using the ID from the config file

This commit is contained in:
Amnet 2013-04-09 17:25:04 +02:00
parent 518e3c19a7
commit 2ec8927bf9
2 changed files with 12 additions and 21 deletions

View file

@ -1,26 +1,17 @@
package tdwp_ftw.biomesop.blocks;
import java.util.Random;
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
import tdwp_ftw.biomesop.helpers.TeleporterPromised;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.Entity;
import net.minecraft.block.Block;
import net.minecraft.block.BlockPortal;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.StatList;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.util.AxisAlignedBB;
import tdwp_ftw.biomesop.declarations.BOPConfiguration;
import tdwp_ftw.biomesop.helpers.TeleporterPromised;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockPromisedPortal extends Block
{
@ -81,9 +72,9 @@ public class BlockPromisedPortal extends Block
if (par5Entity instanceof EntityPlayerMP)
{
EntityPlayerMP thePlayer = (EntityPlayerMP) par5Entity;
if (par5Entity.dimension != mod_BiomesOPlenty.promisedLandDim)
if (par5Entity.dimension != BOPConfiguration.promisedLandDimID)
{
thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, mod_BiomesOPlenty.promisedLandDim, new TeleporterPromised(thePlayer.mcServer.worldServerForDimension(mod_BiomesOPlenty.promisedLandDim)));
thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, BOPConfiguration.promisedLandDimID, new TeleporterPromised(thePlayer.mcServer.worldServerForDimension(BOPConfiguration.promisedLandDimID)));
}
else
{

View file

@ -60,7 +60,7 @@ public class mod_BiomesOPlenty
@SidedProxy(clientSide="tdwp_ftw.biomesop.ClientProxy", serverSide="tdwp_ftw.biomesop.CommonProxy")
public static CommonProxy proxy;
public static int promisedLandDim = 20;
// public static int promisedLandDim = 20;
@PreInit
public void preInit(FMLPreInitializationEvent event)
@ -175,9 +175,9 @@ public class mod_BiomesOPlenty
// Dispenser behavior for mud balls
BlockDispenser.dispenseBehaviorRegistry.putObject(BOPItems.mudBall, new DispenserBehaviorMudball());
DimensionManager.registerProviderType(promisedLandDim, WorldProviderPromised.class, false);
DimensionManager.registerProviderType(BOPConfiguration.promisedLandDimID, WorldProviderPromised.class, false);
DimensionManager.registerDimension(promisedLandDim, promisedLandDim);
DimensionManager.registerDimension(BOPConfiguration.promisedLandDimID, BOPConfiguration.promisedLandDimID);
dungeon = ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST);
mineshaft = ChestGenHooks.getInfo(ChestGenHooks.MINESHAFT_CORRIDOR);