Overhauled configuration properties
Moved all configuration variables from mod_pocketDim to DDProperties (formerly DimDoorsConfig). Changed property names to be clearer in config file, modified some comments, and generally cleaned up the config file. Fixed some missing properties and variables that were reading from the wrong properties. Modified the order in which mod_pocketDim instantiated some of its static fields so that they would load after properties are read. Almost all classes load after properties are read. Fixed indentation across various files and replaced references to properties in mod_pocketDim with references to DDProperties.
This commit is contained in:
@@ -2,7 +2,6 @@ package StevenDimDoors.mod_pocketDim;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
@@ -15,7 +14,6 @@ import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import StevenDimDoors.mod_pocketDim.blocks.BlockDimWall;
|
||||
@@ -95,173 +93,85 @@ public class mod_pocketDim
|
||||
|
||||
@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 SchematicLoader loader;
|
||||
public static pocketTeleporter teleporter;
|
||||
public static DungeonHelper dungeonHelper;
|
||||
|
||||
public static ICommand printDimData;
|
||||
public static ICommand removeRiftsCommand;
|
||||
public static ICommand pruneDimsCommand;
|
||||
public static ICommand removeAllLinksCommand;
|
||||
public static ICommand deleteDimDataCommand;
|
||||
public static ICommand addDungeonRift;
|
||||
public static ICommand endDungeonCreation;
|
||||
public static ICommand startDungeonCreation;
|
||||
|
||||
|
||||
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 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 dimDoor;
|
||||
public static Block blockDimWall;
|
||||
public static Block dimHatch;
|
||||
public static Block blockDimWallPerm;
|
||||
public static Item itemRiftBlade;
|
||||
|
||||
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 Item itemRiftBlade;
|
||||
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 BiomeGenBase limboBiome;
|
||||
public static BiomeGenBase pocketBiome;
|
||||
|
||||
public static int limboBiomeID;
|
||||
public static int pocketBiomeID;
|
||||
public static PlayerRespawnTracker tracker;
|
||||
|
||||
public static PlayerRespawnTracker tracker= new PlayerRespawnTracker();
|
||||
public static HashMap<String,ArrayList<EntityItem>> limboSpawnInventory = new HashMap<String,ArrayList<EntityItem>>();
|
||||
|
||||
public static HashMap<String,ArrayList<EntityItem>> limboSpawnInventory=new HashMap<String,ArrayList<EntityItem>>();
|
||||
public static ArrayList<Integer> blocksImmuneToRift = new ArrayList<Integer>();
|
||||
|
||||
public static ArrayList<Integer> blocksImmuneToRift= new ArrayList<Integer>();
|
||||
public static boolean hasInitDims = false;
|
||||
public static boolean isPlayerWearingGoogles = false;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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 enableStabilizedRiftSignature;
|
||||
|
||||
public static boolean enableDoorOpenGL;
|
||||
|
||||
public static boolean hardcoreLimbo;
|
||||
|
||||
public static boolean returnInventory;
|
||||
|
||||
public static boolean hasInitDims=false;
|
||||
|
||||
public static boolean TNFREAKINGT;
|
||||
|
||||
public static boolean isPlayerWearingGoogles=false;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static RiftGenerator riftGen = new RiftGenerator();
|
||||
|
||||
|
||||
// public static World limbo= null;
|
||||
private static DDProperties properties;
|
||||
public static RiftGenerator riftGen;
|
||||
|
||||
public static long genTime;
|
||||
public static boolean enableRiftGrief;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//public Spells spells = null;
|
||||
|
||||
|
||||
public static int teleTimer = 0;
|
||||
|
||||
@PreInit
|
||||
public void PreInit(FMLPreInitializationEvent event)
|
||||
{
|
||||
//This should be the FIRST thing that gets done.
|
||||
properties = DDProperties.create(event.getSuggestedConfigurationFile());
|
||||
|
||||
|
||||
//Now do other stuff
|
||||
MinecraftForge.EVENT_BUS.register(new EventHookContainer());
|
||||
File configFile = event.getSuggestedConfigurationFile();
|
||||
|
||||
//These fields MUST be initialized after properties are loaded to prevent
|
||||
//instances from holding onto null references to the properties.
|
||||
|
||||
loader = new SchematicLoader();
|
||||
teleporter = new pocketTeleporter();
|
||||
dungeonHelper= new DungeonHelper();
|
||||
|
||||
Configuration config = new Configuration(configFile);
|
||||
|
||||
|
||||
DDProperties.loadConfig(configFile);
|
||||
|
||||
|
||||
String schematicDir = configFile.getParent()+"/DimDoors_Custom_schematics";
|
||||
this.schematicContainer=schematicDir;
|
||||
File file= new File(schematicDir);
|
||||
printDimData = new CommandPrintDimData();
|
||||
removeRiftsCommand = new CommandDeleteRifts();
|
||||
pruneDimsCommand = new CommandPruneDims();
|
||||
removeAllLinksCommand = new CommandDeleteAllLinks();
|
||||
deleteDimDataCommand = new CommandDeleteDimData();
|
||||
addDungeonRift = new CommandAddDungeonRift();
|
||||
endDungeonCreation = new CommandEndDungeonCreation();
|
||||
startDungeonCreation = new CommandStartDungeonCreation();
|
||||
tracker = new PlayerRespawnTracker();
|
||||
riftGen = new RiftGenerator();
|
||||
|
||||
File file= new File(properties.CustomSchematicDirectory);
|
||||
file.mkdir();
|
||||
|
||||
String helpFile = "/mods/DimDoors/How_to_add_dungeons.txt";
|
||||
@@ -270,70 +180,44 @@ public class mod_pocketDim
|
||||
copyfile.copyFile(helpFile, file+"/How_to_add_dungeons.txt");
|
||||
}
|
||||
|
||||
dungeonHelper.importCustomDungeons(schematicDir);
|
||||
dungeonHelper.importCustomDungeons(properties.CustomSchematicDirectory);
|
||||
dungeonHelper.registerBaseDungeons();
|
||||
dungeonHelper.registerDungeonTypeTags();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Init
|
||||
public void Init(FMLInitializationEvent event)
|
||||
{
|
||||
transientDoor = (new TransientDoor(properties.TransientDoorID, Material.iron)).setHardness(1.0F) .setUnlocalizedName("transientDoor");
|
||||
|
||||
|
||||
|
||||
|
||||
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");
|
||||
blockDimWall = (new BlockDimWall(properties.FabricBlockID, 0, Material.iron)).setLightValue(1.0F).setHardness(0.1F).setUnlocalizedName("blockDimWall");
|
||||
blockDimWallPerm = (new BlockDimWallPerm(properties.PermaFabricBlockID, 0, Material.iron)).setLightValue(1.0F).setBlockUnbreakable().setHardness(100000.0F).setUnlocalizedName("blockDimWallPerm");
|
||||
ExitDoor = (new ExitDoor(properties.WarpDoorID, Material.wood)).setHardness(1.0F) .setUnlocalizedName("dimDoorWarp");
|
||||
blockRift = (new BlockRift(properties.RiftBlockID, 0, Material.air).setHardness(1.0F) .setUnlocalizedName("rift"));
|
||||
blockLimbo = (new BlockLimbo(properties.LimboBlockID, 15, Material.iron).setHardness(.2F).setUnlocalizedName("BlockLimbo").setLightValue(.0F));
|
||||
chaosDoor = (new ChaosDoor(properties.UnstableDoorID, Material.iron).setHardness(.2F).setUnlocalizedName("chaosDoor").setLightValue(.0F) );
|
||||
dimDoor = (new dimDoor(properties.DimensionalDoorID, Material.iron)).setHardness(1.0F).setResistance(2000.0F) .setUnlocalizedName("dimDoor");
|
||||
dimHatch = (new dimHatch(properties.TransTrapdoorID, 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");
|
||||
itemDimDoor = (new itemDimDoor(properties.DimensionalDoorItemID, Material.iron)).setUnlocalizedName("itemDimDoor");
|
||||
itemExitDoor = (new itemExitDoor(properties.WarpDoorItemID, Material.wood)).setUnlocalizedName("itemDimDoorWarp");
|
||||
itemLinkSignature = (new itemLinkSignature(properties.RiftSignatureItemID)).setUnlocalizedName("itemLinkSignature");
|
||||
itemRiftRemover = (new itemRiftRemover(properties.RiftRemoverItemID, Material.wood)).setUnlocalizedName("itemRiftRemover");
|
||||
itemStableFabric = (new ItemStableFabric(properties.StableFabricItemID, 0)).setUnlocalizedName("itemStableFabric");
|
||||
itemChaosDoor = (new ItemChaosDoor(properties.UnstableDoorItemID, Material.iron)).setUnlocalizedName("itemChaosDoor");
|
||||
itemRiftBlade = (new ItemRiftBlade(properties.RiftBladeItemID, Material.iron)).setUnlocalizedName("ItemRiftBlade");
|
||||
itemStabilizedLinkSignature = (new ItemStabilizedRiftSignature(properties.StabilizedRiftSignatureItemID)).setUnlocalizedName("itemStabilizedRiftSig");
|
||||
|
||||
this.limboBiome= (new BiomeGenLimbo(this.limboBiomeID) );
|
||||
this.pocketBiome= (new BiomeGenPocket(this.pocketBiomeID));
|
||||
mod_pocketDim.limboBiome= (new BiomeGenLimbo(properties.LimboBiomeID));
|
||||
mod_pocketDim.pocketBiome= (new BiomeGenPocket(properties.PocketBiomeID));
|
||||
|
||||
GameRegistry.registerWorldGenerator(mod_pocketDim.riftGen);
|
||||
|
||||
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");
|
||||
@@ -342,28 +226,21 @@ public class mod_pocketDim
|
||||
|
||||
GameRegistry.registerPlayerTracker(tracker);
|
||||
|
||||
|
||||
|
||||
DimensionManager.registerProviderType(this.providerID, pocketProvider.class, false);
|
||||
DimensionManager.registerProviderType(this.limboProviderID, LimboProvider.class, false);
|
||||
|
||||
|
||||
|
||||
DimensionManager.registerDimension(this.limboDimID , this.limboProviderID);
|
||||
DimensionManager.registerProviderType(properties.PocketProviderID, pocketProvider.class, false);
|
||||
DimensionManager.registerProviderType(properties.LimboProviderID, LimboProvider.class, false);
|
||||
DimensionManager.registerDimension(properties.LimboDimensionID, properties.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(itemExitDoor, "Warp Door");
|
||||
LanguageRegistry.addName(itemLinkSignature , "Rift Signature");
|
||||
LanguageRegistry.addName(itemStabilizedLinkSignature, "Stabilized Rift Signature");
|
||||
LanguageRegistry.addName(itemRiftRemover , "Rift Remover");
|
||||
@@ -381,17 +258,15 @@ public class mod_pocketDim
|
||||
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));
|
||||
EntityRegistry.registerModEntity(MobObelisk.class, "Monolith", properties.MonolithEntityID, this, 70, 1, true);
|
||||
EntityList.IDtoClassMapping.put(properties.MonolithEntityID, MobObelisk.class);
|
||||
EntityList.entityEggs.put(properties.MonolithEntityID, new EntityEggInfo(properties.MonolithEntityID, 0, 0xffffff));
|
||||
LanguageRegistry.instance().addStringLocalization("entity.DimDoors.Obelisk.name", "Monolith");
|
||||
|
||||
|
||||
|
||||
//GameRegistry.addBiome(this.limboBiome);
|
||||
//GameRegistry.addBiome(this.pocketBiome);
|
||||
|
||||
if(this.enableIronDimDoor)
|
||||
if (properties.CraftingDimensionaDoorAllowed)
|
||||
{
|
||||
GameRegistry.addRecipe(new ItemStack(itemDimDoor, 1), new Object[]
|
||||
{
|
||||
@@ -400,7 +275,7 @@ public class mod_pocketDim
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(itemDimDoor, 1), new Object[]
|
||||
{
|
||||
" ", "yxy", " ", 'x', this.itemStableFabric, 'y', Item.doorIron
|
||||
" ", "yxy", " ", 'x', mod_pocketDim.itemStableFabric, 'y', Item.doorIron
|
||||
});
|
||||
}
|
||||
|
||||
@@ -419,14 +294,14 @@ public class mod_pocketDim
|
||||
}
|
||||
**/
|
||||
|
||||
if(this.enableUnstableDoor)
|
||||
if(properties.CraftingUnstableDoorAllowed)
|
||||
{
|
||||
GameRegistry.addRecipe(new ItemStack(itemChaosDoor, 1), new Object[]
|
||||
{
|
||||
" ", "yxy", " ", 'x', Item.eyeOfEnder, 'y', this.itemDimDoor
|
||||
" ", "yxy", " ", 'x', Item.eyeOfEnder, 'y', mod_pocketDim.itemDimDoor
|
||||
});
|
||||
}
|
||||
if(this.enableWoodenDimDoor)
|
||||
if(properties.CraftingWarpDoorAllowed)
|
||||
{
|
||||
GameRegistry.addRecipe(new ItemStack(itemExitDoor, 1), new Object[]
|
||||
{
|
||||
@@ -435,10 +310,10 @@ public class mod_pocketDim
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(itemExitDoor, 1), new Object[]
|
||||
{
|
||||
" ", "yxy", " ", 'x', this.itemStableFabric, 'y', Item.doorWood
|
||||
" ", "yxy", " ", 'x', mod_pocketDim.itemStableFabric, 'y', Item.doorWood
|
||||
});
|
||||
}
|
||||
if(this.enableDimTrapDoor)
|
||||
if(properties.CraftingTransTrapdoorAllowed)
|
||||
{
|
||||
GameRegistry.addRecipe(new ItemStack(dimHatch, 1), new Object[]
|
||||
{
|
||||
@@ -447,10 +322,10 @@ public class mod_pocketDim
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(dimHatch, 1), new Object[]
|
||||
{
|
||||
" y ", " x ", " y ", 'x', this.itemStableFabric, 'y', Block.trapdoor
|
||||
" y ", " x ", " y ", 'x', mod_pocketDim.itemStableFabric, 'y', Block.trapdoor
|
||||
});
|
||||
}
|
||||
if(this.enableRiftSignature)
|
||||
if(properties.CraftingRiftSignatureAllowed)
|
||||
{
|
||||
GameRegistry.addRecipe(new ItemStack(itemLinkSignature, 1), new Object[]
|
||||
{
|
||||
@@ -459,10 +334,11 @@ public class mod_pocketDim
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(itemLinkSignature, 1), new Object[]
|
||||
{
|
||||
" y ", "yxy", " y ", 'x', this.itemStableFabric, 'y', Item.ingotIron
|
||||
" y ", "yxy", " y ", 'x', mod_pocketDim.itemStableFabric, 'y', Item.ingotIron
|
||||
});
|
||||
}
|
||||
if(this.enableRiftRemover)
|
||||
|
||||
if(properties.CraftingRiftRemoverAllowed)
|
||||
{
|
||||
GameRegistry.addRecipe(new ItemStack(itemRiftRemover, 1), new Object[]
|
||||
{
|
||||
@@ -470,78 +346,54 @@ public class mod_pocketDim
|
||||
});
|
||||
GameRegistry.addRecipe(new ItemStack(itemRiftRemover, 1), new Object[]
|
||||
{
|
||||
"yyy", "yxy", "yyy", 'x', this.itemStableFabric, 'y', Item.ingotGold
|
||||
"yyy", "yxy", "yyy", 'x', mod_pocketDim.itemStableFabric, 'y', Item.ingotGold
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if(this.enableRiftBlade)
|
||||
if (properties.CraftingRiftBladeAllowed)
|
||||
{
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(itemRiftBlade, 1), new Object[]
|
||||
{
|
||||
" x ", " x ", " y ", 'x', Item.enderPearl, 'y',this.itemRiftRemover
|
||||
" x ", " x ", " y ", 'x', Item.enderPearl, 'y',mod_pocketDim.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)
|
||||
if (properties.CraftingStableFabricAllowed)
|
||||
{
|
||||
GameRegistry.addRecipe(new ItemStack(this.itemStabilizedLinkSignature,1), new Object[]
|
||||
GameRegistry.addRecipe(new ItemStack(itemStableFabric, 4), new Object[]
|
||||
{
|
||||
" y ", "yxy", " y ", 'x', this.itemLinkSignature, 'y', this.itemStableFabric
|
||||
" y ", "yxy", " y ", 'x', Item.enderPearl, 'y', mod_pocketDim.blockDimWall
|
||||
});
|
||||
}
|
||||
|
||||
if (properties.CraftingStabilizedRiftSignatureAllowed)
|
||||
{
|
||||
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemStabilizedLinkSignature,1), new Object[]
|
||||
{
|
||||
" y ", "yxy", " y ", 'x', mod_pocketDim.itemLinkSignature, 'y', mod_pocketDim.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);
|
||||
mod_pocketDim.blocksImmuneToRift.add(properties.FabricBlockID);
|
||||
mod_pocketDim.blocksImmuneToRift.add(properties.PermaFabricBlockID);
|
||||
mod_pocketDim.blocksImmuneToRift.add(properties.DimensionalDoorID);
|
||||
mod_pocketDim.blocksImmuneToRift.add(properties.WarpDoorID);
|
||||
mod_pocketDim.blocksImmuneToRift.add(properties.TransTrapdoorID);
|
||||
mod_pocketDim.blocksImmuneToRift.add(properties.UnstableDoorID);
|
||||
mod_pocketDim.blocksImmuneToRift.add(properties.RiftBlockID);
|
||||
mod_pocketDim.blocksImmuneToRift.add(properties.TransientDoorID);
|
||||
mod_pocketDim.blocksImmuneToRift.add(Block.blockIron.blockID);
|
||||
mod_pocketDim.blocksImmuneToRift.add(Block.blockDiamond.blockID);
|
||||
mod_pocketDim.blocksImmuneToRift.add(Block.blockEmerald.blockID);
|
||||
mod_pocketDim.blocksImmuneToRift.add(Block.blockGold.blockID);
|
||||
mod_pocketDim.blocksImmuneToRift.add(Block.blockLapis.blockID);
|
||||
mod_pocketDim.blocksImmuneToRift.add(Block.bedrock.blockID);
|
||||
|
||||
dungeonHelper.registerFlipBlocks();
|
||||
|
||||
/**
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
**/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
proxy.loadTextures();
|
||||
proxy.registerRenderers();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -555,13 +407,12 @@ public class mod_pocketDim
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
dimHelper.instance.save();
|
||||
dimHelper.instance.unregsisterDims();
|
||||
dimHelper.dimList.clear();
|
||||
dimHelper.blocksToDecay.clear();
|
||||
dimHelper.instance.interDimLinkList.clear();
|
||||
this.hasInitDims=false;
|
||||
mod_pocketDim.hasInitDims=false;
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
@@ -573,27 +424,21 @@ public class mod_pocketDim
|
||||
@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);
|
||||
event.registerServerCommand(mod_pocketDim.startDungeonCreation);
|
||||
event.registerServerCommand(mod_pocketDim.printDimData);
|
||||
event.registerServerCommand(mod_pocketDim.endDungeonCreation);
|
||||
|
||||
dimHelper.instance.load();
|
||||
if(!dimHelper.dimList.containsKey(this.limboDimID))
|
||||
if(!dimHelper.dimList.containsKey(properties.LimboDimensionID))
|
||||
{
|
||||
dimHelper.instance.dimList.put(mod_pocketDim.limboDimID, new DimData( mod_pocketDim.limboDimID, false, 0, new LinkData()));
|
||||
|
||||
dimHelper.dimList.put(properties.LimboDimensionID, new DimData( properties.LimboDimensionID, false, 0, new LinkData()));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static int teleTimer=0;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user