From 9db478fcc7fec949ba674375ecc4e115c513b723 Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Wed, 12 Jun 2013 03:28:57 -0400 Subject: [PATCH 1/4] silly commit for testing purposes silly commit for testing purposes --- StevenDimDoors/mod_pocketDim/mod_pocketDim.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/StevenDimDoors/mod_pocketDim/mod_pocketDim.java b/StevenDimDoors/mod_pocketDim/mod_pocketDim.java index c6842486..03071e89 100644 --- a/StevenDimDoors/mod_pocketDim/mod_pocketDim.java +++ b/StevenDimDoors/mod_pocketDim/mod_pocketDim.java @@ -86,8 +86,6 @@ import cpw.mods.fml.relauncher.Side; public class mod_pocketDim { - - public static final String version = "1.5.2R1.3.6RC1"; public static final String modid = "DimDoors"; From d54b7c287f8b509bd57942b0a69bdf0742535166 Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Wed, 12 Jun 2013 03:36:56 -0400 Subject: [PATCH 2/4] another silly commit another silly commit --- StevenDimDoors/mod_pocketDim/mod_pocketDim.java | 1 - 1 file changed, 1 deletion(-) diff --git a/StevenDimDoors/mod_pocketDim/mod_pocketDim.java b/StevenDimDoors/mod_pocketDim/mod_pocketDim.java index 03071e89..7c96a843 100644 --- a/StevenDimDoors/mod_pocketDim/mod_pocketDim.java +++ b/StevenDimDoors/mod_pocketDim/mod_pocketDim.java @@ -76,7 +76,6 @@ import cpw.mods.fml.relauncher.Side; @Mod(modid = mod_pocketDim.modid, name = "Dimensional Doors", version = mod_pocketDim.version) - @NetworkMod(clientSideRequired = true, serverSideRequired = false, clientPacketHandlerSpec = @SidedPacketHandler(channels = {"pocketDim" }, packetHandler = ClientPacketHandler.class), From e96cbac35c1921c997fab77080ce0132e8e61fa0 Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Wed, 12 Jun 2013 22:49:45 -0400 Subject: [PATCH 3/4] Changed property variable names, minor bug fix Changed the names of property variables in DimDoorsConfig to follow better variable naming conventions. Removed a duplicate config.save() call. Noticed that crafting Stabilized Rift Signatures can't be disabled in the config file, will be adding that option in the next commit. General note: we need a better way of handling item configuration. Metaprogramming in Java would be a godsend. --- .../mod_pocketDim/DimDoorsConfig.java | 370 ++++++++---------- 1 file changed, 173 insertions(+), 197 deletions(-) diff --git a/StevenDimDoors/mod_pocketDim/DimDoorsConfig.java b/StevenDimDoors/mod_pocketDim/DimDoorsConfig.java index 8aa493c0..beaa4e86 100644 --- a/StevenDimDoors/mod_pocketDim/DimDoorsConfig.java +++ b/StevenDimDoors/mod_pocketDim/DimDoorsConfig.java @@ -10,238 +10,214 @@ public class DimDoorsConfig /** * BlockIDs */ - - public static Property chaosDoor; - public static Property dimDoor; - public static Property exitDoor; - public static Property dimHatch; - public static Property transientDoor; - - public static Property blockFabric; - public static Property blockRift; - - + public static Property UnstableDoorID; + public static Property DimensionalDoorID; + public static Property WarpDoorID; + public static Property TransTrapdoorID; + public static Property TransientDoorID; + + public static Property FabricBlockID; + public static Property RiftBlockID; + /** * WorldGenBlockIDs */ - - public static Property blockLimbo; - public static Property blockFabricPerm; - - + public static Property LimboBlockID; + public static Property PermaFabricBlockID; + + /** * ItemIDs */ - - public static Property itemRiftBlade; - public static Property itemRiftSignature; - public static Property itemRiftRemover; - public static Property itemStableFabric; - public static Property itemStabilizedRiftSignature; - - public static Property itemDimDoor; - public static Property itemChaosDoor; - public static Property itemExitDoor; - - + + public static Property RiftBladeItemID; + public static Property RiftSignatureItemID; + public static Property RiftRemoverItemID; + public static Property StableFabricItemID; + public static Property StabilizedRiftSignatureItemID; + + public static Property DimensionalDoorItemID; + public static Property UnstableDoorItemID; + public static Property WarpDoorItemID; + /** * Other IDs */ - - public static Property limboBiomeID; - public static Property pocketBiomeID; - public static Property limboDimID; - public static Property limboProviderID; - public static Property pocketProviderID; - public static Property doorRenderID; - public static Property monolithID; - + public static Property LimboBiomeID; + public static Property PocketBiomeID; + public static Property LimboDimensionID; + public static Property limboProviderID; + public static Property PocketProviderID; + public static Property DoorRenderEntityID; + public static Property MonolithEntityID; + /** * CraftingFlags */ - public static Property bCraftDimDoor; - public static Property bCraftExitDoor; - public static Property bCraftRiftSig; - public static Property bCraftRiftRemover; - public static Property bCraftUnstableDoor; - public static Property bCraftRiftBlade; - public static Property bCraftDimHatch; - public static Property bCraftChaosDoor; + public static Property CraftingDimensionaDoorAllowed; + public static Property CraftingWarpDoorAllowed; + public static Property CraftingRiftSignatureAllowed; + public static Property CraftingRiftRemoverAllowed; + public static Property CraftingUnstableDoorAllowed; + public static Property CraftingRiftBladeAllowed; + public static Property CraftingTransTrapdoorAllowed; + public static Property CraftingStabilizedRiftSignatureAllowed; /** * OtherFlags */ - public static Property bWorldGenRifts; - public static Property bRiftSpread; - public static Property bRiftGreif; - public static Property bRiftsSpawnEndermen; - public static Property bLimboActive; - public static Property bHardcoreLimbo; - public static Property bLimboReturnInventory; - public static Property bEnableDoorRender; - public static Property bTNFREAKINGT; - - + + public static Property WorldRiftGenerationEnabled; + public static Property RiftSpreadEnabled; + public static Property RiftGriefingEnabled; + public static Property RiftsSpawnEndermenEnabled; + public static Property LimboEnabled; + public static Property LimboRespawningEnabled; + public static Property LimboReturnsInventoryEnabled; + public static Property DoorRenderingEnabled; + public static Property TNFREAKINGT_Enabled; + /** * Other */ - - public static Property HOWMUCHTNT; - public static Property riftSpreadModifier; - public static Property limboReturnRange; - - + public static Property NonTntRatio; + public static Property RiftSpreadModifier; + public static Property LimboReturnRange; + public static void loadConfig(File configFile) { Configuration config = new Configuration(configFile); - + config.load(); - - config.load(); - - bCraftDimHatch = config.get("Crafting control", "bCraftDimHatch", true); - - bCraftDimDoor = config.get("Crafting control", "bCraftDimDoor", true); - - bCraftRiftBlade = config.get("Crafting control", "bCraftRiftBlade", true); - - bCraftRiftRemover = config.get("Crafting control", "bCraftRiftRemover", true); - - bCraftRiftSig = config.get("Crafting control", "bCraftRiftSig", true); - - bCraftChaosDoor = config.get("Crafting control", "bCraftChaosDoor", true); - - bCraftExitDoor = config.get("Crafting control", "bCraftExitDoor", true); - - - - bHardcoreLimbo = config.get(Configuration.CATEGORY_GENERAL, "bHardcoreLimbo", false); - bHardcoreLimbo.comment = "True causes the player to respawn in limbo if they die in limbo"; - - - bTNFREAKINGT = config.get("Configuration.CATEGORY_GENERAL", "EXPLOSIONS!!???!!!?!?!!", false); - - bRiftGreif = config.get(Configuration.CATEGORY_GENERAL, "bRiftGreif", true); - bRiftGreif.comment = "toggles whether rifts eat blocks around them or not"; - - bEnableDoorRender = config.get(Configuration.CATEGORY_GENERAL, "bEnableDoorRender", true); - - bLimboReturnInventory = config.get(Configuration.CATEGORY_GENERAL, "bLimboReturnInventory", true); - bLimboReturnInventory.comment="Toggles whether or not your inventory is returned upon dying and respawning in limbo"; - - HOWMUCHTNT=config.get(Configuration.CATEGORY_GENERAL, "HOWMUCHTNT", 25); - HOWMUCHTNT.comment="Chance that a block will not be TNT. must be greater than 1. Explosions!?!?? must be set to true, and you figure out what it does. "; - - monolithID=config.get(Configuration.CATEGORY_GENERAL, "monolithID", 125); + CraftingDimensionaDoorAllowed = config.get("Crafting control", "bCraftDimDoor", true); + CraftingWarpDoorAllowed = config.get("Crafting control", "bCraftExitDoor", true); + CraftingUnstableDoorAllowed = config.get("Crafting control", "bCraftChaosDoor", true); + CraftingTransTrapdoorAllowed = config.get("Crafting control", "bCraftDimHatch", true); + CraftingRiftSignatureAllowed = config.get("Crafting control", "bCraftRiftSig", true); + CraftingRiftRemoverAllowed = config.get("Crafting control", "bCraftRiftRemover", true); + CraftingStabilizedRiftSignatureAllowed = config.get("Crafting control", "bCraftStabilizedRiftSig", true); + CraftingRiftBladeAllowed = config.get("Crafting control", "bCraftRiftBlade", true); - - // dimRailID = config.getBlock("Dimensional Rail", 1980).getInt(); + LimboRespawningEnabled = config.get(Configuration.CATEGORY_GENERAL, "bHardcoreLimbo", false); + LimboRespawningEnabled.comment = "True causes the player to respawn in limbo if they die in limbo"; - chaosDoor = config.getBlock("Chaos Door", 1978); - dimDoor = config.getBlock("Dimensional Door", 1970); - dimHatch = config.getBlock("Transdimensional Trapdoor", 1971); - blockFabric=config.getBlock("Fabric of Reality", 1973); - exitDoor = config.getBlock("Warp Door", 1975); - blockRift = config.getBlock("Rift", 1977); - transientDoor = config.getBlock("transientDoorID", 1979); + TNFREAKINGT_Enabled = config.get("Configuration.CATEGORY_GENERAL", "EXPLOSIONS!!???!!!?!?!!", false); - itemStabilizedRiftSignature=config.getItem("Stabilized Rift Signature", 5677); - itemRiftBlade=config.getItem("Rift Blade", 5676); - itemChaosDoor=config.getItem("Chaos Door", 5673); - itemRiftRemover=config.getItem("Rift Remover", 5671); - itemStableFabric=config.getItem("Stable Fabric", 5672); - itemExitDoor=config.getItem("Warp Door Item", 5673); - itemDimDoor=config.getItem("Dimensional Door Item", 5674); - itemRiftSignature=config.getItem("Rift Signature Item", 5675); - - bLimboActive=config.get(Configuration.CATEGORY_GENERAL, "bLimboActive", true); - - + RiftGriefingEnabled = config.get(Configuration.CATEGORY_GENERAL, "bRiftGreif", true); + RiftGriefingEnabled.comment = "toggles whether rifts eat blocks around them or not"; - blockLimbo=config.get("Worldgen Block IDs - must be less than 256", "blockLimbo", 217); - blockFabricPerm=config.get("Worldgen Block IDs - must be less than 256", "blockFabricPerm", 220); - - - limboDimID=config.get(Configuration.CATEGORY_GENERAL, "limboDimID", -23); - doorRenderID=config.get(Configuration.CATEGORY_GENERAL, "doorRenderID", 89); + DoorRenderingEnabled = config.get(Configuration.CATEGORY_GENERAL, "bEnableDoorRender", true); - limboReturnRange=config.get(Configuration.CATEGORY_GENERAL, "limboReturnRange", 500); - limboReturnRange.comment = "The farthest possible distance that limbo can send you upon return to the overworld."; - - pocketProviderID=config.get(Configuration.CATEGORY_GENERAL, "pocketProviderID", 24); - - limboProviderID=config.get(Configuration.CATEGORY_GENERAL, "limboProvider ID", 13); + LimboReturnsInventoryEnabled = config.get(Configuration.CATEGORY_GENERAL, "bLimboReturnInventory", true); + LimboReturnsInventoryEnabled.comment="Toggles whether or not your inventory is returned upon dying and respawning in limbo"; + + NonTntRatio=config.get(Configuration.CATEGORY_GENERAL, "HOWMUCHTNT", 25); + NonTntRatio.comment="Chance that a block will not be TNT. must be greater than 1. Explosions!?!?? must be set to true, and you figure out what it does. "; + + MonolithEntityID=config.get(Configuration.CATEGORY_GENERAL, "monolithID", 125); + + UnstableDoorID = config.getBlock("Chaos Door", 1978); + DimensionalDoorID = config.getBlock("Dimensional Door", 1970); + TransTrapdoorID = config.getBlock("Transdimensional Trapdoor", 1971); + FabricBlockID=config.getBlock("Fabric of Reality", 1973); + WarpDoorID = config.getBlock("Warp Door", 1975); + RiftBlockID = config.getBlock("Rift", 1977); + TransientDoorID = config.getBlock("transientDoorID", 1979); + + StabilizedRiftSignatureItemID=config.getItem("Stabilized Rift Signature", 5677); + RiftBladeItemID=config.getItem("Rift Blade", 5676); + UnstableDoorItemID=config.getItem("Chaos Door", 5673); + RiftRemoverItemID=config.getItem("Rift Remover", 5671); + StableFabricItemID=config.getItem("Stable Fabric", 5672); + WarpDoorItemID=config.getItem("Warp Door Item", 5673); + DimensionalDoorItemID=config.getItem("Dimensional Door Item", 5674); + RiftSignatureItemID=config.getItem("Rift Signature Item", 5675); + + LimboEnabled=config.get(Configuration.CATEGORY_GENERAL, "bLimboActive", true); + + + + LimboBlockID=config.get("Worldgen Block IDs - must be less than 256", "blockLimbo", 217); + PermaFabricBlockID=config.get("Worldgen Block IDs - must be less than 256", "blockFabricPerm", 220); + + + LimboDimensionID=config.get(Configuration.CATEGORY_GENERAL, "limboDimID", -23); + DoorRenderEntityID=config.get(Configuration.CATEGORY_GENERAL, "doorRenderID", 89); + + LimboReturnRange=config.get(Configuration.CATEGORY_GENERAL, "limboReturnRange", 500); + LimboReturnRange.comment = "The farthest possible distance that limbo can send you upon return to the overworld."; + + PocketProviderID=config.get(Configuration.CATEGORY_GENERAL, "pocketProviderID", 24); + + limboProviderID=config.get(Configuration.CATEGORY_GENERAL, "limboProvider ID", 13); + + + + WorldRiftGenerationEnabled = config.get(Configuration.CATEGORY_GENERAL, "bWorldGenRifts", true); + WorldRiftGenerationEnabled.comment = "Toggles the natrual generation of dungeon rifts in other dimensions"; + + LimboEnabled = config.get(Configuration.CATEGORY_GENERAL, "bLimboActive", true); + LimboEnabled.comment="Toggles if dying in a pocket dim respawns the player in limbo"; + + RiftSpreadModifier = config.get(Configuration.CATEGORY_GENERAL, "riftSpreadModifier", 3); + RiftSpreadModifier.comment = "How many times a rift can spread- 0 prevents rifts from spreading at all. I dont recommend putting it highter than 5, because its rather exponential. "; + + LimboBiomeID=config.get(Configuration.CATEGORY_GENERAL, "limboBiomeID", 251); + PocketBiomeID=config.get(Configuration.CATEGORY_GENERAL, "pocketBiomeID", 250); - - - bWorldGenRifts = config.get(Configuration.CATEGORY_GENERAL, "bWorldGenRifts", true); - bWorldGenRifts.comment = "Toggles the natrual generation of dungeon rifts in other dimensions"; - - bLimboActive = config.get(Configuration.CATEGORY_GENERAL, "bLimboActive", true); - bLimboActive.comment="Toggles if dying in a pocket dim respawns the player in limbo"; - riftSpreadModifier = config.get(Configuration.CATEGORY_GENERAL, "riftSpreadModifier", 3); - riftSpreadModifier.comment = "How many times a rift can spread- 0 prevents rifts from spreading at all. I dont recommend putting it highter than 5, because its rather exponential. "; - - limboBiomeID=config.get(Configuration.CATEGORY_GENERAL, "limboBiomeID", 251); - pocketBiomeID=config.get(Configuration.CATEGORY_GENERAL, "pocketBiomeID", 250); - - - config.save(); - - config.save(); - - mod_pocketDim.blockDimWallID=blockFabric.getInt(); - mod_pocketDim.blockDimWallPermID=blockFabricPerm.getInt(); - mod_pocketDim.blockLimboID=blockLimbo.getInt(); - mod_pocketDim.blockRiftID=blockLimbo.getInt(); - mod_pocketDim.dimDoorID=dimDoor.getInt(); - mod_pocketDim.chaosDoorID=chaosDoor.getInt(); - mod_pocketDim.transientDoorID=transientDoor.getInt(); - mod_pocketDim.dimHatchID=dimHatch.getInt(); - mod_pocketDim.ExitDoorID=exitDoor.getInt(); - mod_pocketDim.blockRiftID=blockRift.getInt(); - mod_pocketDim.DoorRenderID=doorRenderID.getInt(); - mod_pocketDim.hardcoreLimbo=bHardcoreLimbo.getBoolean(false); - mod_pocketDim.enableDimTrapDoor=bCraftDimHatch.getBoolean(true); - mod_pocketDim.enableDoorOpenGL=bEnableDoorRender.getBoolean(true); - mod_pocketDim.enableIronDimDoor=bCraftDimDoor.getBoolean(true); - mod_pocketDim.enableRiftBlade=bCraftRiftBlade.getBoolean(true); - mod_pocketDim.enableRiftRemover=bCraftRiftBlade.getBoolean(true); - mod_pocketDim.enableRiftSignature=bCraftRiftSig.getBoolean(true); - mod_pocketDim.enableUnstableDoor=bCraftRiftSig.getBoolean(true); - mod_pocketDim.enableWoodenDimDoor=bCraftExitDoor.getBoolean(true); - mod_pocketDim.itemChaosDoorID=itemChaosDoor.getInt(); - mod_pocketDim.itemDimDoorID=itemDimDoor.getInt(); - mod_pocketDim.itemExitDoorID=itemExitDoor.getInt(); - mod_pocketDim.itemLinkSignatureID=itemRiftSignature.getInt(); - mod_pocketDim.itemRiftBladeID=itemRiftBlade.getInt(); - mod_pocketDim.itemRiftRemoverID=itemRiftRemover.getInt(); - mod_pocketDim.itemStabilizedLinkSignatureID=itemStabilizedRiftSignature.getInt(); - mod_pocketDim.itemStableFabricID=itemStableFabric.getInt(); - mod_pocketDim.obeliskID=monolithID.getInt(); - mod_pocketDim.limboBiomeID=limboBiomeID.getInt(); - mod_pocketDim.pocketBiomeID=pocketBiomeID.getInt(); - mod_pocketDim.providerID=pocketProviderID.getInt(); + + mod_pocketDim.blockDimWallID=FabricBlockID.getInt(); + mod_pocketDim.blockDimWallPermID=PermaFabricBlockID.getInt(); + mod_pocketDim.blockLimboID=LimboBlockID.getInt(); + mod_pocketDim.blockRiftID=LimboBlockID.getInt(); + mod_pocketDim.dimDoorID=DimensionalDoorID.getInt(); + mod_pocketDim.chaosDoorID=UnstableDoorID.getInt(); + mod_pocketDim.transientDoorID=TransientDoorID.getInt(); + mod_pocketDim.dimHatchID=TransTrapdoorID.getInt(); + mod_pocketDim.ExitDoorID=WarpDoorID.getInt(); + mod_pocketDim.blockRiftID=RiftBlockID.getInt(); + mod_pocketDim.DoorRenderID=DoorRenderEntityID.getInt(); + mod_pocketDim.hardcoreLimbo=LimboRespawningEnabled.getBoolean(false); + mod_pocketDim.enableDimTrapDoor=CraftingTransTrapdoorAllowed.getBoolean(true); + mod_pocketDim.enableDoorOpenGL=DoorRenderingEnabled.getBoolean(true); + mod_pocketDim.enableIronDimDoor=CraftingDimensionaDoorAllowed.getBoolean(true); + mod_pocketDim.enableRiftBlade=CraftingRiftBladeAllowed.getBoolean(true); + mod_pocketDim.enableRiftRemover=CraftingRiftBladeAllowed.getBoolean(true); + mod_pocketDim.enableRiftSignature=CraftingRiftSignatureAllowed.getBoolean(true); + mod_pocketDim.enableUnstableDoor=CraftingRiftSignatureAllowed.getBoolean(true); + mod_pocketDim.enableWoodenDimDoor=CraftingWarpDoorAllowed.getBoolean(true); + mod_pocketDim.itemChaosDoorID=UnstableDoorItemID.getInt(); + mod_pocketDim.itemDimDoorID=DimensionalDoorItemID.getInt(); + mod_pocketDim.itemExitDoorID=WarpDoorItemID.getInt(); + mod_pocketDim.itemLinkSignatureID=RiftSignatureItemID.getInt(); + mod_pocketDim.itemRiftBladeID=RiftBladeItemID.getInt(); + mod_pocketDim.itemRiftRemoverID=RiftRemoverItemID.getInt(); + mod_pocketDim.itemStabilizedLinkSignatureID=StabilizedRiftSignatureItemID.getInt(); + mod_pocketDim.itemStableFabricID=StableFabricItemID.getInt(); + mod_pocketDim.obeliskID=MonolithEntityID.getInt(); + mod_pocketDim.limboBiomeID=LimboBiomeID.getInt(); + mod_pocketDim.pocketBiomeID=PocketBiomeID.getInt(); + mod_pocketDim.providerID=PocketProviderID.getInt(); mod_pocketDim.limboProviderID=limboProviderID.getInt(); - mod_pocketDim.limboExitRange=limboReturnRange.getInt(); - mod_pocketDim.TNFREAKINGT=bTNFREAKINGT.getBoolean(false); - mod_pocketDim.riftsInWorldGen=bWorldGenRifts.getBoolean(true); - mod_pocketDim.riftSpreadFactor=riftSpreadModifier.getInt(); - mod_pocketDim.returnInventory=bLimboReturnInventory.getBoolean(true); - mod_pocketDim.HOW_MUCH_TNT=HOWMUCHTNT.getInt(); - mod_pocketDim.limboDimID = limboDimID.getInt(); - mod_pocketDim.isLimboActive= bLimboActive.getBoolean(true); - - -} - - - + mod_pocketDim.limboExitRange=LimboReturnRange.getInt(); + mod_pocketDim.TNFREAKINGT=TNFREAKINGT_Enabled.getBoolean(false); + mod_pocketDim.riftsInWorldGen=WorldRiftGenerationEnabled.getBoolean(true); + mod_pocketDim.riftSpreadFactor=RiftSpreadModifier.getInt(); + mod_pocketDim.returnInventory=LimboReturnsInventoryEnabled.getBoolean(true); + mod_pocketDim.HOW_MUCH_TNT=NonTntRatio.getInt(); + mod_pocketDim.limboDimID = LimboDimensionID.getInt(); + mod_pocketDim.isLimboActive= LimboEnabled.getBoolean(true); + + + } + + + } \ No newline at end of file From e4c8b50dae4fa0a8504b8c7b6819c3d10959f636 Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Wed, 12 Jun 2013 23:30:13 -0400 Subject: [PATCH 4/4] Changed some configuration features Added flag for disabling whether Stabilized Rift Signatures are craftable. Autocorrected indentation in some areas. Renamed some property keys in the config file, but the naming is inconsistent. Will return soon to make all names consistent. Property values should be removed from mod_pocketDim and moved to a file, e.g. DDProperties. Configuration should either be loaded directly into the value variables or be kept as a separate file, e.g. DDConfiguration. I favor for integrating configuration reading into the same file as the values and not declaring Property variables at all. --- .../mod_pocketDim/DimDoorsConfig.java | 25 +- .../mod_pocketDim/mod_pocketDim.java | 891 +++++++++--------- 2 files changed, 461 insertions(+), 455 deletions(-) diff --git a/StevenDimDoors/mod_pocketDim/DimDoorsConfig.java b/StevenDimDoors/mod_pocketDim/DimDoorsConfig.java index beaa4e86..4a708e84 100644 --- a/StevenDimDoors/mod_pocketDim/DimDoorsConfig.java +++ b/StevenDimDoors/mod_pocketDim/DimDoorsConfig.java @@ -84,7 +84,7 @@ public class DimDoorsConfig * Other */ - public static Property NonTntRatio; + public static Property NonTntWeight; public static Property RiftSpreadModifier; public static Property LimboReturnRange; @@ -116,18 +116,18 @@ public class DimDoorsConfig LimboReturnsInventoryEnabled = config.get(Configuration.CATEGORY_GENERAL, "bLimboReturnInventory", true); LimboReturnsInventoryEnabled.comment="Toggles whether or not your inventory is returned upon dying and respawning in limbo"; - NonTntRatio=config.get(Configuration.CATEGORY_GENERAL, "HOWMUCHTNT", 25); - NonTntRatio.comment="Chance that a block will not be TNT. must be greater than 1. Explosions!?!?? must be set to true, and you figure out what it does. "; + NonTntWeight=config.get(Configuration.CATEGORY_GENERAL, "HOWMUCHTNT", 25); + NonTntWeight.comment="Chance that a block will not be TNT. must be greater than or equal to 0. Explosions!?!?? must be set to true, and you figure out what it does. "; MonolithEntityID=config.get(Configuration.CATEGORY_GENERAL, "monolithID", 125); - UnstableDoorID = config.getBlock("Chaos Door", 1978); - DimensionalDoorID = config.getBlock("Dimensional Door", 1970); - TransTrapdoorID = config.getBlock("Transdimensional Trapdoor", 1971); - FabricBlockID=config.getBlock("Fabric of Reality", 1973); - WarpDoorID = config.getBlock("Warp Door", 1975); - RiftBlockID = config.getBlock("Rift", 1977); - TransientDoorID = config.getBlock("transientDoorID", 1979); + DimensionalDoorID = config.getBlock("DimensionalDoorID", 1970); + WarpDoorID = config.getBlock("WarpDoorID", 1975); + UnstableDoorID = config.getBlock("UnstableDoorID", 1978); + TransTrapdoorID = config.getBlock("TransdimensionalTrapdoorID", 1971); + TransientDoorID = config.getBlock("TransientDoorID", 1979); + FabricBlockID =config.getBlock("FabricOfRealityBlockID", 1973); + RiftBlockID = config.getBlock("RiftBlockID", 1977); StabilizedRiftSignatureItemID=config.getItem("Stabilized Rift Signature", 5677); RiftBladeItemID=config.getItem("Rift Blade", 5676); @@ -191,8 +191,9 @@ public class DimDoorsConfig mod_pocketDim.enableRiftBlade=CraftingRiftBladeAllowed.getBoolean(true); mod_pocketDim.enableRiftRemover=CraftingRiftBladeAllowed.getBoolean(true); mod_pocketDim.enableRiftSignature=CraftingRiftSignatureAllowed.getBoolean(true); - mod_pocketDim.enableUnstableDoor=CraftingRiftSignatureAllowed.getBoolean(true); + mod_pocketDim.enableUnstableDoor=CraftingUnstableDoorAllowed.getBoolean(true); mod_pocketDim.enableWoodenDimDoor=CraftingWarpDoorAllowed.getBoolean(true); + mod_pocketDim.enableStabilizedRiftSignature=CraftingStabilizedRiftSignatureAllowed.getBoolean(true); mod_pocketDim.itemChaosDoorID=UnstableDoorItemID.getInt(); mod_pocketDim.itemDimDoorID=DimensionalDoorItemID.getInt(); mod_pocketDim.itemExitDoorID=WarpDoorItemID.getInt(); @@ -211,7 +212,7 @@ public class DimDoorsConfig mod_pocketDim.riftsInWorldGen=WorldRiftGenerationEnabled.getBoolean(true); mod_pocketDim.riftSpreadFactor=RiftSpreadModifier.getInt(); mod_pocketDim.returnInventory=LimboReturnsInventoryEnabled.getBoolean(true); - mod_pocketDim.HOW_MUCH_TNT=NonTntRatio.getInt(); + mod_pocketDim.HOW_MUCH_TNT=NonTntWeight.getInt() + 1; //workaround so the generator code doesn't have to be changed mod_pocketDim.limboDimID = LimboDimensionID.getInt(); mod_pocketDim.isLimboActive= LimboEnabled.getBoolean(true); diff --git a/StevenDimDoors/mod_pocketDim/mod_pocketDim.java b/StevenDimDoors/mod_pocketDim/mod_pocketDim.java index c9290b86..7a9d7421 100644 --- a/StevenDimDoors/mod_pocketDim/mod_pocketDim.java +++ b/StevenDimDoors/mod_pocketDim/mod_pocketDim.java @@ -78,11 +78,11 @@ import cpw.mods.fml.relauncher.Side; @NetworkMod(clientSideRequired = true, serverSideRequired = false, - clientPacketHandlerSpec = - @SidedPacketHandler(channels = {"pocketDim" }, packetHandler = ClientPacketHandler.class), - serverPacketHandlerSpec = - @SidedPacketHandler(channels = {"pocketDim" }, packetHandler = ServerPacketHandler.class), - channels={"DimDoorPackets"}, packetHandler = PacketHandler.class, connectionHandler=ConnectionHandler.class) +clientPacketHandlerSpec = +@SidedPacketHandler(channels = {"pocketDim" }, packetHandler = ClientPacketHandler.class), +serverPacketHandlerSpec = +@SidedPacketHandler(channels = {"pocketDim" }, packetHandler = ServerPacketHandler.class), +channels={"DimDoorPackets"}, packetHandler = PacketHandler.class, connectionHandler=ConnectionHandler.class) public class mod_pocketDim { @@ -90,505 +90,510 @@ public class mod_pocketDim public static final String modid = "DimDoors"; //need to clean up - @SidedProxy(clientSide = "StevenDimDoors.mod_pocketDimClient.ClientProxy", serverSide = "StevenDimDoors.mod_pocketDim.CommonProxy") - public static CommonProxy proxy; + @SidedProxy(clientSide = "StevenDimDoors.mod_pocketDimClient.ClientProxy", serverSide = "StevenDimDoors.mod_pocketDim.CommonProxy") + public static CommonProxy proxy; - @Instance("PocketDimensions") - public static mod_pocketDim instance = new mod_pocketDim(); - public static SchematicLoader loader = new SchematicLoader(); - public static pocketTeleporter teleporter = new pocketTeleporter(); - public static DungeonHelper dungeonHelper= new DungeonHelper(); - - - - public static final ICommand printDimData = new CommandPrintDimData(); - public static final ICommand removeRiftsCommand = new CommandDeleteRifts(); - public static final ICommand pruneDimsCommand = new CommandPruneDims(); - public static final ICommand removeAllLinksCommand = new CommandDeleteAllLinks(); - public static final ICommand deleteDimDataCommand = new CommandDeleteDimData(); - public static final ICommand addDungeonRift = new CommandAddDungeonRift(); - public static final ICommand endDungeonCreation = new CommandEndDungeonCreation(); - public static final ICommand startDungeonCreation = new CommandStartDungeonCreation(); + @Instance("PocketDimensions") + public static mod_pocketDim instance = new mod_pocketDim(); + public static SchematicLoader loader = new SchematicLoader(); + public static pocketTeleporter teleporter = new pocketTeleporter(); + public static DungeonHelper dungeonHelper= new DungeonHelper(); - - public static int providerID; - public static int dimDoorID; - public static int ExitDoorID; - // public static int linkExitDoorID; - public static int itemLinkSignatureID; - public static int blockRiftID; - public static int transientDoorID; - public static int itemRiftBladeID; - public static int limboExitRange; - // public static int railRenderID; - - public static String schematicContainer; - - public static int itemStableFabricID; - public static int itemStabilizedLinkSignatureID; - public static int itemExitDoorID; - public static int limboDimID; - public static int limboProviderID; - public static int itemChaosDoorID; - public static int chaosDoorID; + public static final ICommand printDimData = new CommandPrintDimData(); + public static final ICommand removeRiftsCommand = new CommandDeleteRifts(); + public static final ICommand pruneDimsCommand = new CommandPruneDims(); + public static final ICommand removeAllLinksCommand = new CommandDeleteAllLinks(); + public static final ICommand deleteDimDataCommand = new CommandDeleteDimData(); + public static final ICommand addDungeonRift = new CommandAddDungeonRift(); + public static final ICommand endDungeonCreation = new CommandEndDungeonCreation(); + public static final ICommand startDungeonCreation = new CommandStartDungeonCreation(); + + + + public static int providerID; + public static int dimDoorID; + public static int ExitDoorID; + // public static int linkExitDoorID; + public static int itemLinkSignatureID; + public static int blockRiftID; + public static int transientDoorID; + public static int itemRiftBladeID; + public static int limboExitRange; + // public static int railRenderID; + + public static String schematicContainer; + + public static int itemStableFabricID; + + public static int itemStabilizedLinkSignatureID; + public static int itemExitDoorID; + public static int limboDimID; + public static int limboProviderID; + public static int itemChaosDoorID; + public static int chaosDoorID; public static int blockLimboID; - public static int dimHatchID; - // public static int dimRailID; + public static int dimHatchID; + // public static int dimRailID; public static int riftSpreadFactor; public static int DoorRenderID=55; public static int HOW_MUCH_TNT; - - public static int itemDimDoorID; - ///public static int linkDimDoorID; - public static int blockDimWallID; - public static int itemRiftRemoverID; - public static int blockDimWallPermID; - public static int obeliskID; - //public static Block linkDimDoor; - public static Block transientDoor; - public static Block ExitDoor; - public static Block chaosDoor; - // public static Block linkExitDoor; - public static Block blockRift; - public static Block blockLimbo; - public static Block dimDoor; -// public static Block dimRail; - public static Block blockDimWall; - public static Block dimHatch; - public static Block blockDimWallPerm; - public static Item itemRiftBlade; + public static int itemDimDoorID; + ///public static int linkDimDoorID; + public static int blockDimWallID; + public static int itemRiftRemoverID; + public static int blockDimWallPermID; + public static int obeliskID; + //public static Block linkDimDoor; + public static Block transientDoor; + public static Block ExitDoor; + public static Block chaosDoor; + // public static Block linkExitDoor; + public static Block blockRift; + public static Block blockLimbo; + public static Block dimDoor; + // public static Block dimRail; - public static Item itemDimDoor; - public static Item itemExitDoor; - public static Item itemRiftRemover; - public static Item itemLinkSignature; - public static Item itemStableFabric; - public static Item itemChaosDoor; - public static Item itemStabilizedLinkSignature; + public static Block blockDimWall; + public static Block dimHatch; + public static Block blockDimWallPerm; + public static Item itemRiftBlade; - - public static BiomeGenBase limboBiome; - public static BiomeGenBase pocketBiome; + public static Item itemDimDoor; + public static Item itemExitDoor; + public static Item itemRiftRemover; + public static Item itemLinkSignature; + public static Item itemStableFabric; + public static Item itemChaosDoor; + public static Item itemStabilizedLinkSignature; - public static int limboBiomeID; - public static int pocketBiomeID; - - public static PlayerRespawnTracker tracker= new PlayerRespawnTracker(); - - public static HashMap> limboSpawnInventory=new HashMap>(); - - public static ArrayList blocksImmuneToRift= new ArrayList(); - + + public static BiomeGenBase limboBiome; + public static BiomeGenBase pocketBiome; + + public static int limboBiomeID; + public static int pocketBiomeID; + + public static PlayerRespawnTracker tracker= new PlayerRespawnTracker(); + + public static HashMap> limboSpawnInventory=new HashMap>(); + + public static ArrayList blocksImmuneToRift= new ArrayList(); - - - public static boolean riftsInWorldGen; - + + + + public static boolean riftsInWorldGen; + public static boolean isLimboActive; + + public static boolean enableIronDimDoor; + + public static boolean enableWoodenDimDoor; + + public static boolean enableRiftSignature; + + public static boolean enableRiftRemover; + + public static boolean enableUnstableDoor; + + public static boolean enableRiftBlade; + + // public static boolean enableDimRail; + + public static boolean enableDimTrapDoor; - public static boolean enableIronDimDoor; - - public static boolean enableWoodenDimDoor; - - public static boolean enableRiftSignature; - - public static boolean enableRiftRemover; - - public static boolean enableUnstableDoor; + public static boolean enableStabilizedRiftSignature; - public static boolean enableRiftBlade; - - // public static boolean enableDimRail; + public static boolean enableDoorOpenGL; - public static boolean enableDimTrapDoor; + public static boolean hardcoreLimbo; - public static boolean enableDoorOpenGL; - - public static boolean hardcoreLimbo; - - public static boolean returnInventory; + public static boolean returnInventory; public static boolean hasInitDims=false; - public static boolean TNFREAKINGT; + public static boolean TNFREAKINGT; public static boolean isPlayerWearingGoogles=false; - - - - public static RiftGenerator riftGen = new RiftGenerator(); - - - // public static World limbo= null; - public static long genTime; + + + public static RiftGenerator riftGen = new RiftGenerator(); + + + // public static World limbo= null; + + public static long genTime; public static boolean enableRiftGrief; - - + + //public Spells spells = null; - @PreInit - public void PreInit(FMLPreInitializationEvent event) - { - - - MinecraftForge.EVENT_BUS.register(new EventHookContainer()); - File configFile = event.getSuggestedConfigurationFile(); - - Configuration config = new Configuration(configFile); - - - DimDoorsConfig.loadConfig(configFile); - - - String schematicDir = configFile.getParent()+"/DimDoors_Custom_schematics"; - this.schematicContainer=schematicDir; - File file= new File(schematicDir); - file.mkdir(); - - String helpFile = "/mods/DimDoors/How_to_add_dungeons.txt"; - if(new File(helpFile).exists()) - { - copyfile.copyFile(helpFile, file+"/How_to_add_dungeons.txt"); - } - - dungeonHelper.importCustomDungeons(schematicDir); - dungeonHelper.registerBaseDungeons(); - dungeonHelper.registerDungeonTypeTags(); - - - - - - + @PreInit + public void PreInit(FMLPreInitializationEvent event) + { - - - + MinecraftForge.EVENT_BUS.register(new EventHookContainer()); + File configFile = event.getSuggestedConfigurationFile(); - - - - - } - - @Init - public void Init(FMLInitializationEvent event) - { - - - - - transientDoor = (new TransientDoor(transientDoorID, Material.iron)).setHardness(1.0F) .setUnlocalizedName("transientDoor"); - - // linkDimDoor = (new linkDimDoor(linkDimDoorID, Material.iron)).setHardness(1.0F) .setUnlocalizedName("dimDoorLink"); - blockDimWall = (new BlockDimWall(blockDimWallID, 0, Material.iron)).setLightValue(1.0F).setHardness(0.1F).setUnlocalizedName("blockDimWall"); - blockDimWallPerm = (new BlockDimWallPerm(blockDimWallPermID, 0, Material.iron)).setLightValue(1.0F).setBlockUnbreakable().setHardness(100000.0F).setUnlocalizedName("blockDimWallPerm"); - ExitDoor = (new ExitDoor(ExitDoorID, Material.wood)).setHardness(1.0F) .setUnlocalizedName("dimDoorWarp"); - // linkExitDoor = (new linkExitDoor(linkExitDoorID, Material.wood)).setHardness(1.0F) .setUnlocalizedName("dimDoorexitlink"); - blockRift = (new BlockRift(blockRiftID, 0, Material.air).setHardness(1.0F) .setUnlocalizedName("rift")); - blockLimbo = (new BlockLimbo(blockLimboID, 15, Material.iron).setHardness(.2F).setUnlocalizedName("BlockLimbo").setLightValue(.0F)); - chaosDoor = (new ChaosDoor(chaosDoorID, Material.iron).setHardness(.2F).setUnlocalizedName("chaosDoor").setLightValue(.0F) ); - dimDoor = (new dimDoor(dimDoorID, Material.iron)).setHardness(1.0F).setResistance(2000.0F) .setUnlocalizedName("dimDoor"); - dimHatch = (new dimHatch(dimHatchID, 84, Material.iron)).setHardness(1.0F) .setUnlocalizedName("dimHatch"); - // dimRail = (new DimRail(dimRailID, 88, false)).setHardness(.5F) .setUnlocalizedName("dimRail"); - - itemDimDoor = (new itemDimDoor(itemDimDoorID, Material.iron)).setUnlocalizedName("itemDimDoor"); - itemExitDoor = (new itemExitDoor(itemExitDoorID, Material.wood)).setUnlocalizedName("itemDimDoorWarp"); - itemLinkSignature = (new itemLinkSignature(itemLinkSignatureID )).setUnlocalizedName("itemLinkSignature"); - itemRiftRemover = (new itemRiftRemover(itemRiftRemoverID, Material.wood)).setUnlocalizedName("itemRiftRemover"); - itemStableFabric = (new ItemStableFabric(itemStableFabricID, 0)).setUnlocalizedName("itemStableFabric"); - itemChaosDoor = (new ItemChaosDoor(itemChaosDoorID, Material.iron)).setUnlocalizedName("itemChaosDoor"); - itemRiftBlade = (new ItemRiftBlade(itemRiftBladeID, Material.iron)).setUnlocalizedName("ItemRiftBlade"); - itemStabilizedLinkSignature = (new ItemStabilizedRiftSignature(itemStabilizedLinkSignatureID)).setUnlocalizedName("itemStabilizedRiftSig"); - - this.limboBiome= (new BiomeGenLimbo(this.limboBiomeID) ); - this.pocketBiome= (new BiomeGenPocket(this.pocketBiomeID)); - - - GameRegistry.registerWorldGenerator(this.riftGen); - - //GameRegistry.registerBlock(dimRail, "Dimensional Rail"); - GameRegistry.registerBlock(chaosDoor, "Unstable Door"); - GameRegistry.registerBlock(ExitDoor, "Warp Door"); - //GameRegistry.registerBlock(linkExitDoor, "Warp Door link"); - GameRegistry.registerBlock(blockRift, "Rift"); - GameRegistry.registerBlock(blockLimbo, "Unraveled Fabric"); - //GameRegistry.registerBlock(linkDimDoor, "Dimensional Door link"); - GameRegistry.registerBlock(dimDoor, "Dimensional Door"); - GameRegistry.registerBlock(dimHatch,"Transdimensional Trapdoor"); - GameRegistry.registerBlock(blockDimWall, "Fabric of Reality"); - GameRegistry.registerBlock(blockDimWallPerm, "Fabric of RealityPerm"); - GameRegistry.registerBlock(transientDoor, "transientDoor"); - - GameRegistry.registerPlayerTracker(tracker); - - - - DimensionManager.registerProviderType(this.providerID, pocketProvider.class, false); - DimensionManager.registerProviderType(this.limboProviderID, LimboProvider.class, false); - - - - DimensionManager.registerDimension(this.limboDimID , this.limboProviderID); - - LanguageRegistry.addName(transientDoor , "transientDoor"); - - LanguageRegistry.addName(blockRift , "Rift"); - LanguageRegistry.addName(blockLimbo , "Unraveled Fabric"); - LanguageRegistry.addName(ExitDoor , "Warp Door"); - LanguageRegistry.addName(chaosDoor , "Unstable Door"); - //LanguageRegistry.addName(linkDimDoor, "Dimensional Door"); - LanguageRegistry.addName(blockDimWall , "Fabric of Reality"); - LanguageRegistry.addName(blockDimWallPerm , "Fabric of Reality"); - LanguageRegistry.addName(dimDoor, "Dimensional Door"); - LanguageRegistry.addName(dimHatch, "Transdimensional Trapdoor"); - - LanguageRegistry.addName(itemExitDoor , "Warp Door"); - LanguageRegistry.addName(itemLinkSignature , "Rift Signature"); - LanguageRegistry.addName(itemStabilizedLinkSignature, "Stabilized Rift Signature"); - LanguageRegistry.addName(itemRiftRemover , "Rift Remover"); - LanguageRegistry.addName(itemStableFabric , "Stable Fabric"); - LanguageRegistry.addName(itemChaosDoor , "Unstable Door"); - LanguageRegistry.addName(itemDimDoor, "Dimensional Door"); - LanguageRegistry.addName(itemRiftBlade , "Rift Blade"); + Configuration config = new Configuration(configFile); - TickRegistry.registerTickHandler(new ClientTickHandler(), Side.CLIENT); - TickRegistry.registerTickHandler(new CommonTickHandler(), Side.SERVER); - - //GameRegistry.registerTileEntity(TileEntityDimDoor.class, "TileEntityDimRail"); - - GameRegistry.registerTileEntity(TileEntityDimDoor.class, "TileEntityDimDoor"); - GameRegistry.registerTileEntity(TileEntityRift.class, "TileEntityRift"); - - EntityRegistry.registerModEntity(MobObelisk.class, "Obelisk", this.obeliskID, this,70, 1, true); - EntityList.IDtoClassMapping.put(this.obeliskID, MobObelisk.class); - EntityList.entityEggs.put(this.obeliskID, new EntityEggInfo(this.obeliskID, 0, 0xffffff)); - LanguageRegistry.instance().addStringLocalization("entity.DimDoors.Obelisk.name", "Monolith"); + DimDoorsConfig.loadConfig(configFile); - - //GameRegistry.addBiome(this.limboBiome); - //GameRegistry.addBiome(this.pocketBiome); + String schematicDir = configFile.getParent()+"/DimDoors_Custom_schematics"; + this.schematicContainer=schematicDir; + File file= new File(schematicDir); + file.mkdir(); - if(this.enableIronDimDoor) - { - GameRegistry.addRecipe(new ItemStack(itemDimDoor, 1), new Object[] - { - " ", "yxy", " ", 'x', Item.enderPearl, 'y', Item.doorIron - }); - - GameRegistry.addRecipe(new ItemStack(itemDimDoor, 1), new Object[] - { - " ", "yxy", " ", 'x', this.itemStableFabric, 'y', Item.doorIron - }); - } - - /** + String helpFile = "/mods/DimDoors/How_to_add_dungeons.txt"; + if(new File(helpFile).exists()) + { + copyfile.copyFile(helpFile, file+"/How_to_add_dungeons.txt"); + } + + dungeonHelper.importCustomDungeons(schematicDir); + dungeonHelper.registerBaseDungeons(); + dungeonHelper.registerDungeonTypeTags(); + + + + + + + + + + + + + + + + + } + + @Init + public void Init(FMLInitializationEvent event) + { + + + + + transientDoor = (new TransientDoor(transientDoorID, Material.iron)).setHardness(1.0F) .setUnlocalizedName("transientDoor"); + + // linkDimDoor = (new linkDimDoor(linkDimDoorID, Material.iron)).setHardness(1.0F) .setUnlocalizedName("dimDoorLink"); + blockDimWall = (new BlockDimWall(blockDimWallID, 0, Material.iron)).setLightValue(1.0F).setHardness(0.1F).setUnlocalizedName("blockDimWall"); + blockDimWallPerm = (new BlockDimWallPerm(blockDimWallPermID, 0, Material.iron)).setLightValue(1.0F).setBlockUnbreakable().setHardness(100000.0F).setUnlocalizedName("blockDimWallPerm"); + ExitDoor = (new ExitDoor(ExitDoorID, Material.wood)).setHardness(1.0F) .setUnlocalizedName("dimDoorWarp"); + // linkExitDoor = (new linkExitDoor(linkExitDoorID, Material.wood)).setHardness(1.0F) .setUnlocalizedName("dimDoorexitlink"); + blockRift = (new BlockRift(blockRiftID, 0, Material.air).setHardness(1.0F) .setUnlocalizedName("rift")); + blockLimbo = (new BlockLimbo(blockLimboID, 15, Material.iron).setHardness(.2F).setUnlocalizedName("BlockLimbo").setLightValue(.0F)); + chaosDoor = (new ChaosDoor(chaosDoorID, Material.iron).setHardness(.2F).setUnlocalizedName("chaosDoor").setLightValue(.0F) ); + dimDoor = (new dimDoor(dimDoorID, Material.iron)).setHardness(1.0F).setResistance(2000.0F) .setUnlocalizedName("dimDoor"); + dimHatch = (new dimHatch(dimHatchID, 84, Material.iron)).setHardness(1.0F) .setUnlocalizedName("dimHatch"); + // dimRail = (new DimRail(dimRailID, 88, false)).setHardness(.5F) .setUnlocalizedName("dimRail"); + + itemDimDoor = (new itemDimDoor(itemDimDoorID, Material.iron)).setUnlocalizedName("itemDimDoor"); + itemExitDoor = (new itemExitDoor(itemExitDoorID, Material.wood)).setUnlocalizedName("itemDimDoorWarp"); + itemLinkSignature = (new itemLinkSignature(itemLinkSignatureID )).setUnlocalizedName("itemLinkSignature"); + itemRiftRemover = (new itemRiftRemover(itemRiftRemoverID, Material.wood)).setUnlocalizedName("itemRiftRemover"); + itemStableFabric = (new ItemStableFabric(itemStableFabricID, 0)).setUnlocalizedName("itemStableFabric"); + itemChaosDoor = (new ItemChaosDoor(itemChaosDoorID, Material.iron)).setUnlocalizedName("itemChaosDoor"); + itemRiftBlade = (new ItemRiftBlade(itemRiftBladeID, Material.iron)).setUnlocalizedName("ItemRiftBlade"); + itemStabilizedLinkSignature = (new ItemStabilizedRiftSignature(itemStabilizedLinkSignatureID)).setUnlocalizedName("itemStabilizedRiftSig"); + + this.limboBiome= (new BiomeGenLimbo(this.limboBiomeID) ); + this.pocketBiome= (new BiomeGenPocket(this.pocketBiomeID)); + + + GameRegistry.registerWorldGenerator(this.riftGen); + + //GameRegistry.registerBlock(dimRail, "Dimensional Rail"); + GameRegistry.registerBlock(chaosDoor, "Unstable Door"); + GameRegistry.registerBlock(ExitDoor, "Warp Door"); + //GameRegistry.registerBlock(linkExitDoor, "Warp Door link"); + GameRegistry.registerBlock(blockRift, "Rift"); + GameRegistry.registerBlock(blockLimbo, "Unraveled Fabric"); + //GameRegistry.registerBlock(linkDimDoor, "Dimensional Door link"); + GameRegistry.registerBlock(dimDoor, "Dimensional Door"); + GameRegistry.registerBlock(dimHatch,"Transdimensional Trapdoor"); + GameRegistry.registerBlock(blockDimWall, "Fabric of Reality"); + GameRegistry.registerBlock(blockDimWallPerm, "Fabric of RealityPerm"); + GameRegistry.registerBlock(transientDoor, "transientDoor"); + + GameRegistry.registerPlayerTracker(tracker); + + + + DimensionManager.registerProviderType(this.providerID, pocketProvider.class, false); + DimensionManager.registerProviderType(this.limboProviderID, LimboProvider.class, false); + + + + DimensionManager.registerDimension(this.limboDimID , this.limboProviderID); + + LanguageRegistry.addName(transientDoor , "transientDoor"); + + LanguageRegistry.addName(blockRift , "Rift"); + LanguageRegistry.addName(blockLimbo , "Unraveled Fabric"); + LanguageRegistry.addName(ExitDoor , "Warp Door"); + LanguageRegistry.addName(chaosDoor , "Unstable Door"); + //LanguageRegistry.addName(linkDimDoor, "Dimensional Door"); + LanguageRegistry.addName(blockDimWall , "Fabric of Reality"); + LanguageRegistry.addName(blockDimWallPerm , "Fabric of Reality"); + LanguageRegistry.addName(dimDoor, "Dimensional Door"); + LanguageRegistry.addName(dimHatch, "Transdimensional Trapdoor"); + + LanguageRegistry.addName(itemExitDoor , "Warp Door"); + LanguageRegistry.addName(itemLinkSignature , "Rift Signature"); + LanguageRegistry.addName(itemStabilizedLinkSignature, "Stabilized Rift Signature"); + LanguageRegistry.addName(itemRiftRemover , "Rift Remover"); + LanguageRegistry.addName(itemStableFabric , "Stable Fabric"); + LanguageRegistry.addName(itemChaosDoor , "Unstable Door"); + LanguageRegistry.addName(itemDimDoor, "Dimensional Door"); + LanguageRegistry.addName(itemRiftBlade , "Rift Blade"); + + + TickRegistry.registerTickHandler(new ClientTickHandler(), Side.CLIENT); + TickRegistry.registerTickHandler(new CommonTickHandler(), Side.SERVER); + + //GameRegistry.registerTileEntity(TileEntityDimDoor.class, "TileEntityDimRail"); + + GameRegistry.registerTileEntity(TileEntityDimDoor.class, "TileEntityDimDoor"); + GameRegistry.registerTileEntity(TileEntityRift.class, "TileEntityRift"); + + EntityRegistry.registerModEntity(MobObelisk.class, "Obelisk", this.obeliskID, this,70, 1, true); + EntityList.IDtoClassMapping.put(this.obeliskID, MobObelisk.class); + EntityList.entityEggs.put(this.obeliskID, new EntityEggInfo(this.obeliskID, 0, 0xffffff)); + LanguageRegistry.instance().addStringLocalization("entity.DimDoors.Obelisk.name", "Monolith"); + + + + //GameRegistry.addBiome(this.limboBiome); + //GameRegistry.addBiome(this.pocketBiome); + + if(this.enableIronDimDoor) + { + GameRegistry.addRecipe(new ItemStack(itemDimDoor, 1), new Object[] + { + " ", "yxy", " ", 'x', Item.enderPearl, 'y', Item.doorIron + }); + + GameRegistry.addRecipe(new ItemStack(itemDimDoor, 1), new Object[] + { + " ", "yxy", " ", 'x', this.itemStableFabric, 'y', Item.doorIron + }); + } + + /** if(this.enableDimRail) { GameRegistry.addRecipe(new ItemStack(dimRail, 1), new Object[] { " ", "yxy", " ", 'x', this.itemDimDoor, 'y', Block.rail }); - + GameRegistry.addRecipe(new ItemStack(dimRail, 1), new Object[] { " ", "yxy", " ", 'x', this.itemExitDoor, 'y', Block.rail }); } - **/ - - if(this.enableUnstableDoor) - { - GameRegistry.addRecipe(new ItemStack(itemChaosDoor, 1), new Object[] - { - " ", "yxy", " ", 'x', Item.eyeOfEnder, 'y', this.itemDimDoor - }); - } - if(this.enableWoodenDimDoor) - { - GameRegistry.addRecipe(new ItemStack(itemExitDoor, 1), new Object[] - { - " ", "yxy", " ", 'x', Item.enderPearl, 'y', Item.doorWood - }); - - GameRegistry.addRecipe(new ItemStack(itemExitDoor, 1), new Object[] - { - " ", "yxy", " ", 'x', this.itemStableFabric, 'y', Item.doorWood - }); - } - if(this.enableDimTrapDoor) - { - GameRegistry.addRecipe(new ItemStack(dimHatch, 1), new Object[] - { - " y ", " x ", " y ", 'x', Item.enderPearl, 'y', Block.trapdoor - }); - - GameRegistry.addRecipe(new ItemStack(dimHatch, 1), new Object[] - { - " y ", " x ", " y ", 'x', this.itemStableFabric, 'y', Block.trapdoor - }); - } - if(this.enableRiftSignature) - { - GameRegistry.addRecipe(new ItemStack(itemLinkSignature, 1), new Object[] - { - " y ", "yxy", " y ", 'x', Item.enderPearl, 'y', Item.ingotIron - }); + **/ - GameRegistry.addRecipe(new ItemStack(itemLinkSignature, 1), new Object[] - { - " y ", "yxy", " y ", 'x', this.itemStableFabric, 'y', Item.ingotIron - }); - } - if(this.enableRiftRemover) - { - GameRegistry.addRecipe(new ItemStack(itemRiftRemover, 1), new Object[] - { - " y ", "yxy", " y ", 'x', Item.enderPearl, 'y', Item.ingotGold - }); - GameRegistry.addRecipe(new ItemStack(itemRiftRemover, 1), new Object[] - { - "yyy", "yxy", "yyy", 'x', this.itemStableFabric, 'y', Item.ingotGold - }); - } - - - - - if(this.enableRiftBlade) - { - - GameRegistry.addRecipe(new ItemStack(itemRiftBlade, 1), new Object[] - { - " x ", " x ", " y ", 'x', Item.enderPearl, 'y',this.itemRiftRemover - }); - } - - GameRegistry.addRecipe(new ItemStack(itemStableFabric, 4), new Object[] - { - " y ", "yxy", " y ", 'x', Item.enderPearl, 'y', this.blockDimWall - }); - - - GameRegistry.addRecipe(new ItemStack(itemStableFabric, 4), new Object[] - { - " y ", "yxy", " y ", 'x', Item.enderPearl, 'y', this.blockLimbo - }); - - GameRegistry.addRecipe(new ItemStack(this.itemStabilizedLinkSignature,1), new Object[] - { - " y ", "yxy", " y ", 'x', this.itemLinkSignature, 'y', this.itemStableFabric - }); - - this.blocksImmuneToRift.add(this.blockDimWallID); - this.blocksImmuneToRift.add(this.blockDimWallPermID); - this.blocksImmuneToRift.add(this.dimDoorID); - this.blocksImmuneToRift.add(this.ExitDoorID); - // this.blocksImmuneToRift.add(this.linkDimDoorID); - // this.blocksImmuneToRift.add(this.linkExitDoorID); - this.blocksImmuneToRift.add(this.dimHatchID); - this.blocksImmuneToRift.add(this.chaosDoorID); - this.blocksImmuneToRift.add(this.blockRiftID); - this.blocksImmuneToRift.add(this.transientDoorID); - this.blocksImmuneToRift.add(Block.blockIron.blockID); - this.blocksImmuneToRift.add(Block.blockDiamond.blockID); - this.blocksImmuneToRift.add(Block.blockEmerald.blockID); - this.blocksImmuneToRift.add(Block.blockGold.blockID); - this.blocksImmuneToRift.add(Block.blockLapis.blockID); - this.blocksImmuneToRift.add(Block.bedrock.blockID); - - dungeonHelper.registerFlipBlocks(); - -/** - - - - - - **/ - - - - - - - - proxy.loadTextures(); - proxy.registerRenderers(); - - - } - - - @PostInit - public void PostInit(FMLPostInitializationEvent event) - { - } - - @ServerStopping - public void serverStopping(FMLServerStoppingEvent event) - { - try - { - - dimHelper.instance.save(); - dimHelper.instance.unregsisterDims(); - dimHelper.dimList.clear(); - dimHelper.blocksToDecay.clear(); - dimHelper.instance.interDimLinkList.clear(); - this.hasInitDims=false; - } - catch(Exception e) - { - e.printStackTrace(); - } - } - - - @ServerStarting - public void serverStarting(FMLServerStartingEvent event) - { - - event.registerServerCommand(removeRiftsCommand); - event.registerServerCommand(pruneDimsCommand); - event.registerServerCommand(removeAllLinksCommand); - event.registerServerCommand(deleteDimDataCommand); - event.registerServerCommand(addDungeonRift); - event.registerServerCommand(this.startDungeonCreation); - event.registerServerCommand(this.printDimData); - event.registerServerCommand(this.endDungeonCreation); - - dimHelper.instance.load(); - if(!dimHelper.dimList.containsKey(this.limboDimID)) + if(this.enableUnstableDoor) { - dimHelper.instance.dimList.put(mod_pocketDim.limboDimID, new DimData( mod_pocketDim.limboDimID, false, 0, new LinkData())); + GameRegistry.addRecipe(new ItemStack(itemChaosDoor, 1), new Object[] + { + " ", "yxy", " ", 'x', Item.eyeOfEnder, 'y', this.itemDimDoor + }); + } + if(this.enableWoodenDimDoor) + { + GameRegistry.addRecipe(new ItemStack(itemExitDoor, 1), new Object[] + { + " ", "yxy", " ", 'x', Item.enderPearl, 'y', Item.doorWood + }); + + GameRegistry.addRecipe(new ItemStack(itemExitDoor, 1), new Object[] + { + " ", "yxy", " ", 'x', this.itemStableFabric, 'y', Item.doorWood + }); + } + if(this.enableDimTrapDoor) + { + GameRegistry.addRecipe(new ItemStack(dimHatch, 1), new Object[] + { + " y ", " x ", " y ", 'x', Item.enderPearl, 'y', Block.trapdoor + }); + + GameRegistry.addRecipe(new ItemStack(dimHatch, 1), new Object[] + { + " y ", " x ", " y ", 'x', this.itemStableFabric, 'y', Block.trapdoor + }); + } + if(this.enableRiftSignature) + { + GameRegistry.addRecipe(new ItemStack(itemLinkSignature, 1), new Object[] + { + " y ", "yxy", " y ", 'x', Item.enderPearl, 'y', Item.ingotIron + }); + + GameRegistry.addRecipe(new ItemStack(itemLinkSignature, 1), new Object[] + { + " y ", "yxy", " y ", 'x', this.itemStableFabric, 'y', Item.ingotIron + }); + } + if(this.enableRiftRemover) + { + GameRegistry.addRecipe(new ItemStack(itemRiftRemover, 1), new Object[] + { + " y ", "yxy", " y ", 'x', Item.enderPearl, 'y', Item.ingotGold + }); + GameRegistry.addRecipe(new ItemStack(itemRiftRemover, 1), new Object[] + { + "yyy", "yxy", "yyy", 'x', this.itemStableFabric, 'y', Item.ingotGold + }); + } + + + + + if(this.enableRiftBlade) + { + + GameRegistry.addRecipe(new ItemStack(itemRiftBlade, 1), new Object[] + { + " x ", " x ", " y ", 'x', Item.enderPearl, 'y',this.itemRiftRemover + }); + } + + GameRegistry.addRecipe(new ItemStack(itemStableFabric, 4), new Object[] + { + " y ", "yxy", " y ", 'x', Item.enderPearl, 'y', this.blockDimWall + }); + + + GameRegistry.addRecipe(new ItemStack(itemStableFabric, 4), new Object[] + { + " y ", "yxy", " y ", 'x', Item.enderPearl, 'y', this.blockLimbo + }); + + if (this.enableStabilizedRiftSignature) + { + GameRegistry.addRecipe(new ItemStack(this.itemStabilizedLinkSignature,1), new Object[] + { + " y ", "yxy", " y ", 'x', this.itemLinkSignature, 'y', this.itemStableFabric + }); + } + + this.blocksImmuneToRift.add(this.blockDimWallID); + this.blocksImmuneToRift.add(this.blockDimWallPermID); + this.blocksImmuneToRift.add(this.dimDoorID); + this.blocksImmuneToRift.add(this.ExitDoorID); + // this.blocksImmuneToRift.add(this.linkDimDoorID); + // this.blocksImmuneToRift.add(this.linkExitDoorID); + this.blocksImmuneToRift.add(this.dimHatchID); + this.blocksImmuneToRift.add(this.chaosDoorID); + this.blocksImmuneToRift.add(this.blockRiftID); + this.blocksImmuneToRift.add(this.transientDoorID); + this.blocksImmuneToRift.add(Block.blockIron.blockID); + this.blocksImmuneToRift.add(Block.blockDiamond.blockID); + this.blocksImmuneToRift.add(Block.blockEmerald.blockID); + this.blocksImmuneToRift.add(Block.blockGold.blockID); + this.blocksImmuneToRift.add(Block.blockLapis.blockID); + this.blocksImmuneToRift.add(Block.bedrock.blockID); + + dungeonHelper.registerFlipBlocks(); + + /** + + + + + + **/ + + + + + + + + proxy.loadTextures(); + proxy.registerRenderers(); + + + } + + + @PostInit + public void PostInit(FMLPostInitializationEvent event) + { + } + + @ServerStopping + public void serverStopping(FMLServerStoppingEvent event) + { + try + { + + dimHelper.instance.save(); + dimHelper.instance.unregsisterDims(); + dimHelper.dimList.clear(); + dimHelper.blocksToDecay.clear(); + dimHelper.instance.interDimLinkList.clear(); + this.hasInitDims=false; + } + catch(Exception e) + { + e.printStackTrace(); + } + } + + + @ServerStarting + public void serverStarting(FMLServerStartingEvent event) + { + + event.registerServerCommand(removeRiftsCommand); + event.registerServerCommand(pruneDimsCommand); + event.registerServerCommand(removeAllLinksCommand); + event.registerServerCommand(deleteDimDataCommand); + event.registerServerCommand(addDungeonRift); + event.registerServerCommand(this.startDungeonCreation); + event.registerServerCommand(this.printDimData); + event.registerServerCommand(this.endDungeonCreation); + + dimHelper.instance.load(); + if(!dimHelper.dimList.containsKey(this.limboDimID)) + { + dimHelper.instance.dimList.put(mod_pocketDim.limboDimID, new DimData( mod_pocketDim.limboDimID, false, 0, new LinkData())); } - - - } - - - public static int teleTimer=0; - + + + } + + + public static int teleTimer=0; + } \ No newline at end of file