From 2ec8927bf9c86343d99c04c5c7e5b93b56d17e4b Mon Sep 17 00:00:00 2001 From: Amnet Date: Tue, 9 Apr 2013 17:25:04 +0200 Subject: [PATCH] Fixed a bug with Promised Lands not using the ID from the config file --- .../biomesop/blocks/BlockPromisedPortal.java | 27 +++++++------------ .../tdwp_ftw/biomesop/mod_BiomesOPlenty.java | 6 ++--- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPromisedPortal.java b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPromisedPortal.java index d2c31d9b7..dd3637419 100644 --- a/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPromisedPortal.java +++ b/src/minecraft/tdwp_ftw/biomesop/blocks/BlockPromisedPortal.java @@ -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 { diff --git a/src/minecraft/tdwp_ftw/biomesop/mod_BiomesOPlenty.java b/src/minecraft/tdwp_ftw/biomesop/mod_BiomesOPlenty.java index a8c536cc3..f30484dc4 100644 --- a/src/minecraft/tdwp_ftw/biomesop/mod_BiomesOPlenty.java +++ b/src/minecraft/tdwp_ftw/biomesop/mod_BiomesOPlenty.java @@ -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);