2013-02-18 03:46:16 +01:00
|
|
|
package StevenDimDoors.mod_pocketDim;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
2013-04-07 06:37:13 +02:00
|
|
|
import java.util.HashMap;
|
2013-02-18 03:46:16 +01:00
|
|
|
|
|
|
|
import net.minecraft.block.Block;
|
|
|
|
import net.minecraft.block.material.Material;
|
2013-05-21 01:07:13 +02:00
|
|
|
import net.minecraft.entity.EntityEggInfo;
|
|
|
|
import net.minecraft.entity.EntityList;
|
2013-02-18 03:46:16 +01:00
|
|
|
import net.minecraft.entity.item.EntityItem;
|
|
|
|
import net.minecraft.item.Item;
|
|
|
|
import net.minecraft.item.ItemStack;
|
2013-05-10 22:05:11 +02:00
|
|
|
import net.minecraft.world.biome.BiomeGenBase;
|
2013-02-18 03:46:16 +01:00
|
|
|
import net.minecraftforge.common.DimensionManager;
|
|
|
|
import net.minecraftforge.common.MinecraftForge;
|
2013-04-17 02:48:49 +02:00
|
|
|
import StevenDimDoors.mod_pocketDim.blocks.BlockDimWall;
|
|
|
|
import StevenDimDoors.mod_pocketDim.blocks.BlockDimWallPerm;
|
|
|
|
import StevenDimDoors.mod_pocketDim.blocks.BlockLimbo;
|
|
|
|
import StevenDimDoors.mod_pocketDim.blocks.BlockRift;
|
2013-06-02 03:43:56 +02:00
|
|
|
import StevenDimDoors.mod_pocketDim.blocks.ChaosDoor;
|
2013-04-17 02:48:49 +02:00
|
|
|
import StevenDimDoors.mod_pocketDim.blocks.ExitDoor;
|
|
|
|
import StevenDimDoors.mod_pocketDim.blocks.dimDoor;
|
|
|
|
import StevenDimDoors.mod_pocketDim.blocks.dimHatch;
|
2013-06-18 16:23:31 +02:00
|
|
|
import StevenDimDoors.mod_pocketDim.commands.CommandCreateDungeonRift;
|
2013-03-23 07:29:20 +01:00
|
|
|
import StevenDimDoors.mod_pocketDim.commands.CommandDeleteAllLinks;
|
2013-06-18 16:23:31 +02:00
|
|
|
import StevenDimDoors.mod_pocketDim.commands.CommandDeleteDimensionData;
|
2013-03-23 06:25:50 +01:00
|
|
|
import StevenDimDoors.mod_pocketDim.commands.CommandDeleteRifts;
|
2013-06-02 03:43:56 +02:00
|
|
|
import StevenDimDoors.mod_pocketDim.commands.CommandEndDungeonCreation;
|
2013-06-18 16:23:31 +02:00
|
|
|
import StevenDimDoors.mod_pocketDim.commands.CommandPrintDimensionData;
|
|
|
|
import StevenDimDoors.mod_pocketDim.commands.CommandPruneDimensions;
|
2013-06-02 03:43:56 +02:00
|
|
|
import StevenDimDoors.mod_pocketDim.commands.CommandStartDungeonCreation;
|
2013-06-10 23:03:52 +02:00
|
|
|
import StevenDimDoors.mod_pocketDim.helpers.DungeonHelper;
|
|
|
|
import StevenDimDoors.mod_pocketDim.helpers.dimHelper;
|
2013-04-17 02:48:49 +02:00
|
|
|
import StevenDimDoors.mod_pocketDim.items.ItemChaosDoor;
|
|
|
|
import StevenDimDoors.mod_pocketDim.items.ItemRiftBlade;
|
|
|
|
import StevenDimDoors.mod_pocketDim.items.ItemStabilizedRiftSignature;
|
|
|
|
import StevenDimDoors.mod_pocketDim.items.ItemStableFabric;
|
|
|
|
import StevenDimDoors.mod_pocketDim.items.itemDimDoor;
|
|
|
|
import StevenDimDoors.mod_pocketDim.items.itemExitDoor;
|
|
|
|
import StevenDimDoors.mod_pocketDim.items.itemLinkSignature;
|
|
|
|
import StevenDimDoors.mod_pocketDim.items.itemRiftRemover;
|
2013-05-21 01:07:13 +02:00
|
|
|
import StevenDimDoors.mod_pocketDim.ticking.MobObelisk;
|
2013-06-02 03:43:56 +02:00
|
|
|
import StevenDimDoors.mod_pocketDim.world.BiomeGenLimbo;
|
|
|
|
import StevenDimDoors.mod_pocketDim.world.BiomeGenPocket;
|
|
|
|
import StevenDimDoors.mod_pocketDim.world.LimboProvider;
|
|
|
|
import StevenDimDoors.mod_pocketDim.world.pocketProvider;
|
2013-06-12 09:08:34 +02:00
|
|
|
import StevenDimDoors.mod_pocketDimClient.ClientPacketHandler;
|
|
|
|
import StevenDimDoors.mod_pocketDimClient.ClientTickHandler;
|
|
|
|
import cpw.mods.fml.common.Mod;
|
|
|
|
import cpw.mods.fml.common.Mod.Init;
|
|
|
|
import cpw.mods.fml.common.Mod.Instance;
|
|
|
|
import cpw.mods.fml.common.Mod.PostInit;
|
|
|
|
import cpw.mods.fml.common.Mod.PreInit;
|
|
|
|
import cpw.mods.fml.common.Mod.ServerStarting;
|
|
|
|
import cpw.mods.fml.common.Mod.ServerStopping;
|
|
|
|
import cpw.mods.fml.common.SidedProxy;
|
|
|
|
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
|
|
|
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
|
|
|
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
|
|
|
import cpw.mods.fml.common.event.FMLServerStartingEvent;
|
|
|
|
import cpw.mods.fml.common.event.FMLServerStoppingEvent;
|
|
|
|
import cpw.mods.fml.common.network.NetworkMod;
|
|
|
|
import cpw.mods.fml.common.network.NetworkMod.SidedPacketHandler;
|
|
|
|
import cpw.mods.fml.common.registry.EntityRegistry;
|
|
|
|
import cpw.mods.fml.common.registry.GameRegistry;
|
|
|
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
|
|
|
import cpw.mods.fml.common.registry.TickRegistry;
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
2013-02-18 03:46:16 +01:00
|
|
|
|
2013-04-01 10:04:59 +02:00
|
|
|
|
2013-03-29 23:19:27 +01:00
|
|
|
@Mod(modid = mod_pocketDim.modid, name = "Dimensional Doors", version = mod_pocketDim.version)
|
2013-02-18 03:46:16 +01:00
|
|
|
|
|
|
|
|
|
|
|
@NetworkMod(clientSideRequired = true, serverSideRequired = false,
|
2013-06-13 05:30:13 +02:00
|
|
|
clientPacketHandlerSpec =
|
|
|
|
@SidedPacketHandler(channels = {"pocketDim" }, packetHandler = ClientPacketHandler.class),
|
|
|
|
serverPacketHandlerSpec =
|
|
|
|
@SidedPacketHandler(channels = {"pocketDim" }, packetHandler = ServerPacketHandler.class),
|
|
|
|
channels={"DimDoorPackets"}, packetHandler = PacketHandler.class, connectionHandler=ConnectionHandler.class)
|
2013-02-18 03:46:16 +01:00
|
|
|
|
|
|
|
public class mod_pocketDim
|
|
|
|
{
|
2013-06-14 09:17:23 +02:00
|
|
|
public static final String version = "1.5.2R1.4.0RC1";
|
2013-05-31 08:17:05 +02:00
|
|
|
public static final String modid = "DimDoors";
|
2013-04-01 10:04:59 +02:00
|
|
|
|
2013-02-18 03:46:16 +01:00
|
|
|
//need to clean up
|
2013-06-13 05:30:13 +02:00
|
|
|
@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();
|
2013-06-14 01:01:54 +02:00
|
|
|
|
|
|
|
public static SchematicLoader loader;
|
|
|
|
public static pocketTeleporter teleporter;
|
|
|
|
|
2013-06-13 05:30:13 +02:00
|
|
|
public static Block transientDoor;
|
|
|
|
public static Block ExitDoor;
|
|
|
|
public static Block chaosDoor;
|
|
|
|
public static Block blockRift;
|
|
|
|
public static Block blockLimbo;
|
2013-06-14 01:01:54 +02:00
|
|
|
public static Block dimDoor;
|
|
|
|
public static Block blockDimWall;
|
|
|
|
public static Block dimHatch;
|
2013-06-13 05:30:13 +02:00
|
|
|
public static Block blockDimWallPerm;
|
2013-02-18 03:46:16 +01:00
|
|
|
|
2013-06-14 01:01:54 +02:00
|
|
|
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;
|
|
|
|
|
2013-06-13 05:30:13 +02:00
|
|
|
public static BiomeGenBase limboBiome;
|
|
|
|
public static BiomeGenBase pocketBiome;
|
|
|
|
|
2013-06-14 01:01:54 +02:00
|
|
|
public static PlayerRespawnTracker tracker;
|
2013-06-13 05:30:13 +02:00
|
|
|
|
2013-06-14 01:01:54 +02:00
|
|
|
public static HashMap<String,ArrayList<EntityItem>> limboSpawnInventory = new HashMap<String,ArrayList<EntityItem>>();
|
2013-06-13 05:30:13 +02:00
|
|
|
|
2013-06-14 01:01:54 +02:00
|
|
|
public static ArrayList<Integer> blocksImmuneToRift = new ArrayList<Integer>();
|
2013-02-18 03:46:16 +01:00
|
|
|
|
2013-06-14 01:01:54 +02:00
|
|
|
public static boolean hasInitDims = false;
|
|
|
|
public static boolean isPlayerWearingGoogles = false;
|
2013-02-18 03:46:16 +01:00
|
|
|
|
2013-06-14 01:01:54 +02:00
|
|
|
private static DDProperties properties;
|
|
|
|
public static RiftGenerator riftGen;
|
2013-06-13 05:30:13 +02:00
|
|
|
|
|
|
|
public static long genTime;
|
2013-06-14 01:01:54 +02:00
|
|
|
public static int teleTimer = 0;
|
2013-02-18 03:46:16 +01:00
|
|
|
|
2013-06-13 05:30:13 +02:00
|
|
|
@PreInit
|
|
|
|
public void PreInit(FMLPreInitializationEvent event)
|
|
|
|
{
|
2013-06-14 01:01:54 +02:00
|
|
|
//This should be the FIRST thing that gets done.
|
2013-06-16 18:06:21 +02:00
|
|
|
properties = DDProperties.initialize(event.getSuggestedConfigurationFile());
|
2013-06-13 05:30:13 +02:00
|
|
|
|
2013-06-14 01:01:54 +02:00
|
|
|
//Now do other stuff
|
2013-06-13 05:30:13 +02:00
|
|
|
MinecraftForge.EVENT_BUS.register(new EventHookContainer());
|
2013-06-14 01:01:54 +02:00
|
|
|
|
|
|
|
//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();
|
|
|
|
tracker = new PlayerRespawnTracker();
|
|
|
|
riftGen = new RiftGenerator();
|
2013-06-13 05:30:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Init
|
|
|
|
public void Init(FMLInitializationEvent event)
|
|
|
|
{
|
|
|
|
|
2013-06-14 01:01:54 +02:00
|
|
|
transientDoor = (new TransientDoor(properties.TransientDoorID, Material.iron)).setHardness(1.0F) .setUnlocalizedName("transientDoor");
|
2013-06-13 05:30:13 +02:00
|
|
|
|
2013-06-14 01:01:54 +02:00
|
|
|
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");
|
2013-06-13 05:30:13 +02:00
|
|
|
// dimRail = (new DimRail(dimRailID, 88, false)).setHardness(.5F) .setUnlocalizedName("dimRail");
|
|
|
|
|
2013-06-14 01:01:54 +02:00
|
|
|
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");
|
2013-06-13 05:30:13 +02:00
|
|
|
|
2013-06-14 01:01:54 +02:00
|
|
|
mod_pocketDim.limboBiome= (new BiomeGenLimbo(properties.LimboBiomeID));
|
|
|
|
mod_pocketDim.pocketBiome= (new BiomeGenPocket(properties.PocketBiomeID));
|
2013-06-13 05:30:13 +02:00
|
|
|
|
2013-06-14 01:01:54 +02:00
|
|
|
GameRegistry.registerWorldGenerator(mod_pocketDim.riftGen);
|
2013-06-13 05:30:13 +02:00
|
|
|
|
|
|
|
GameRegistry.registerBlock(chaosDoor, "Unstable Door");
|
|
|
|
GameRegistry.registerBlock(ExitDoor, "Warp Door");
|
|
|
|
GameRegistry.registerBlock(blockRift, "Rift");
|
|
|
|
GameRegistry.registerBlock(blockLimbo, "Unraveled Fabric");
|
|
|
|
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);
|
|
|
|
|
2013-06-14 01:01:54 +02:00
|
|
|
DimensionManager.registerProviderType(properties.PocketProviderID, pocketProvider.class, false);
|
|
|
|
DimensionManager.registerProviderType(properties.LimboProviderID, LimboProvider.class, false);
|
|
|
|
DimensionManager.registerDimension(properties.LimboDimensionID, properties.LimboProviderID);
|
2013-06-13 05:30:13 +02:00
|
|
|
|
|
|
|
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(blockDimWall , "Fabric of Reality");
|
|
|
|
LanguageRegistry.addName(blockDimWallPerm , "Fabric of Reality");
|
|
|
|
LanguageRegistry.addName(dimDoor, "Dimensional Door");
|
|
|
|
LanguageRegistry.addName(dimHatch, "Transdimensional Trapdoor");
|
|
|
|
|
2013-06-14 01:01:54 +02:00
|
|
|
LanguageRegistry.addName(itemExitDoor, "Warp Door");
|
2013-06-13 05:30:13 +02:00
|
|
|
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");
|
|
|
|
|
2013-06-14 01:01:54 +02:00
|
|
|
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));
|
2013-06-13 05:30:13 +02:00
|
|
|
LanguageRegistry.instance().addStringLocalization("entity.DimDoors.Obelisk.name", "Monolith");
|
|
|
|
|
|
|
|
//GameRegistry.addBiome(this.limboBiome);
|
|
|
|
//GameRegistry.addBiome(this.pocketBiome);
|
|
|
|
|
2013-06-14 01:01:54 +02:00
|
|
|
if (properties.CraftingDimensionaDoorAllowed)
|
2013-06-13 05:30:13 +02:00
|
|
|
{
|
|
|
|
GameRegistry.addRecipe(new ItemStack(itemDimDoor, 1), new Object[]
|
|
|
|
{
|
|
|
|
" ", "yxy", " ", 'x', Item.enderPearl, 'y', Item.doorIron
|
|
|
|
});
|
|
|
|
|
|
|
|
GameRegistry.addRecipe(new ItemStack(itemDimDoor, 1), new Object[]
|
|
|
|
{
|
2013-06-14 01:01:54 +02:00
|
|
|
" ", "yxy", " ", 'x', mod_pocketDim.itemStableFabric, 'y', Item.doorIron
|
2013-06-13 05:30:13 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2013-03-10 05:04:20 +01:00
|
|
|
if(this.enableDimRail)
|
|
|
|
{
|
|
|
|
GameRegistry.addRecipe(new ItemStack(dimRail, 1), new Object[]
|
|
|
|
{
|
|
|
|
" ", "yxy", " ", 'x', this.itemDimDoor, 'y', Block.rail
|
|
|
|
});
|
2013-06-13 05:30:13 +02:00
|
|
|
|
2013-03-10 05:04:20 +01:00
|
|
|
GameRegistry.addRecipe(new ItemStack(dimRail, 1), new Object[]
|
|
|
|
{
|
|
|
|
" ", "yxy", " ", 'x', this.itemExitDoor, 'y', Block.rail
|
|
|
|
});
|
|
|
|
}
|
2013-06-13 05:30:13 +02:00
|
|
|
**/
|
2013-02-18 03:46:16 +01:00
|
|
|
|
2013-06-14 01:01:54 +02:00
|
|
|
if(properties.CraftingUnstableDoorAllowed)
|
2013-06-13 05:30:13 +02:00
|
|
|
{
|
|
|
|
GameRegistry.addRecipe(new ItemStack(itemChaosDoor, 1), new Object[]
|
|
|
|
{
|
2013-06-14 01:01:54 +02:00
|
|
|
" ", "yxy", " ", 'x', Item.eyeOfEnder, 'y', mod_pocketDim.itemDimDoor
|
2013-06-13 05:30:13 +02:00
|
|
|
});
|
|
|
|
}
|
2013-06-14 01:01:54 +02:00
|
|
|
if(properties.CraftingWarpDoorAllowed)
|
2013-06-13 05:30:13 +02:00
|
|
|
{
|
|
|
|
GameRegistry.addRecipe(new ItemStack(itemExitDoor, 1), new Object[]
|
|
|
|
{
|
|
|
|
" ", "yxy", " ", 'x', Item.enderPearl, 'y', Item.doorWood
|
|
|
|
});
|
|
|
|
|
|
|
|
GameRegistry.addRecipe(new ItemStack(itemExitDoor, 1), new Object[]
|
|
|
|
{
|
2013-06-14 01:01:54 +02:00
|
|
|
" ", "yxy", " ", 'x', mod_pocketDim.itemStableFabric, 'y', Item.doorWood
|
2013-06-13 05:30:13 +02:00
|
|
|
});
|
|
|
|
}
|
2013-06-14 01:01:54 +02:00
|
|
|
if(properties.CraftingTransTrapdoorAllowed)
|
2013-06-13 05:30:13 +02:00
|
|
|
{
|
|
|
|
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[]
|
|
|
|
{
|
2013-06-14 01:01:54 +02:00
|
|
|
" y ", " x ", " y ", 'x', mod_pocketDim.itemStableFabric, 'y', Block.trapdoor
|
2013-06-13 05:30:13 +02:00
|
|
|
});
|
|
|
|
}
|
2013-06-14 01:01:54 +02:00
|
|
|
if(properties.CraftingRiftSignatureAllowed)
|
2013-05-27 14:10:07 +02:00
|
|
|
{
|
2013-06-13 05:30:13 +02:00
|
|
|
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[]
|
|
|
|
{
|
2013-06-14 01:01:54 +02:00
|
|
|
" y ", "yxy", " y ", 'x', mod_pocketDim.itemStableFabric, 'y', Item.ingotIron
|
2013-06-13 05:30:13 +02:00
|
|
|
});
|
|
|
|
}
|
2013-06-14 01:01:54 +02:00
|
|
|
|
|
|
|
if(properties.CraftingRiftRemoverAllowed)
|
2013-06-13 05:30:13 +02:00
|
|
|
{
|
|
|
|
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[]
|
|
|
|
{
|
2013-06-14 01:01:54 +02:00
|
|
|
"yyy", "yxy", "yyy", 'x', mod_pocketDim.itemStableFabric, 'y', Item.ingotGold
|
2013-06-13 05:30:13 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2013-06-14 01:01:54 +02:00
|
|
|
if (properties.CraftingRiftBladeAllowed)
|
2013-06-13 05:30:13 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
GameRegistry.addRecipe(new ItemStack(itemRiftBlade, 1), new Object[]
|
|
|
|
{
|
2013-06-14 01:01:54 +02:00
|
|
|
" x ", " x ", " y ", 'x', Item.enderPearl, 'y',mod_pocketDim.itemRiftRemover
|
2013-06-13 05:30:13 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2013-06-14 01:01:54 +02:00
|
|
|
if (properties.CraftingStableFabricAllowed)
|
2013-06-13 05:30:13 +02:00
|
|
|
{
|
2013-06-14 01:01:54 +02:00
|
|
|
GameRegistry.addRecipe(new ItemStack(itemStableFabric, 4), new Object[]
|
2013-06-13 05:30:13 +02:00
|
|
|
{
|
2013-06-14 01:01:54 +02:00
|
|
|
" 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
|
2013-06-13 05:30:13 +02:00
|
|
|
});
|
2013-05-27 14:10:07 +02:00
|
|
|
}
|
2013-06-13 05:30:13 +02:00
|
|
|
|
2013-06-14 01:01:54 +02:00
|
|
|
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);
|
2013-06-13 05:30:13 +02:00
|
|
|
|
2013-06-16 18:06:21 +02:00
|
|
|
DungeonHelper.initialize();
|
2013-06-16 07:00:05 +02:00
|
|
|
|
2013-06-13 05:30:13 +02:00
|
|
|
proxy.loadTextures();
|
|
|
|
proxy.registerRenderers();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@PostInit
|
|
|
|
public void PostInit(FMLPostInitializationEvent event)
|
2013-06-15 07:58:53 +02:00
|
|
|
{
|
|
|
|
//Register loot chests
|
|
|
|
DDLoot.registerInfo();
|
2013-06-13 05:30:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@ServerStopping
|
|
|
|
public void serverStopping(FMLServerStoppingEvent event)
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
dimHelper.instance.save();
|
|
|
|
dimHelper.instance.unregsisterDims();
|
|
|
|
dimHelper.dimList.clear();
|
|
|
|
dimHelper.blocksToDecay.clear();
|
|
|
|
dimHelper.instance.interDimLinkList.clear();
|
2013-06-14 01:01:54 +02:00
|
|
|
mod_pocketDim.hasInitDims=false;
|
2013-06-13 05:30:13 +02:00
|
|
|
}
|
|
|
|
catch(Exception e)
|
|
|
|
{
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ServerStarting
|
|
|
|
public void serverStarting(FMLServerStartingEvent event)
|
|
|
|
{
|
2013-06-18 16:23:31 +02:00
|
|
|
CommandCreateDungeonRift.instance().register(event);
|
|
|
|
CommandDeleteAllLinks.instance().register(event);
|
|
|
|
CommandDeleteDimensionData.instance().register(event);
|
|
|
|
CommandDeleteRifts.instance().register(event);
|
|
|
|
CommandEndDungeonCreation.instance().register(event);
|
|
|
|
CommandPrintDimensionData.instance().register(event);
|
|
|
|
CommandPruneDimensions.instance().register(event);
|
|
|
|
CommandStartDungeonCreation.instance().register(event);
|
2013-06-13 05:30:13 +02:00
|
|
|
|
|
|
|
dimHelper.instance.load();
|
2013-06-14 01:01:54 +02:00
|
|
|
if(!dimHelper.dimList.containsKey(properties.LimboDimensionID))
|
2013-06-13 05:30:13 +02:00
|
|
|
{
|
2013-06-14 01:01:54 +02:00
|
|
|
dimHelper.dimList.put(properties.LimboDimensionID, new DimData( properties.LimboDimensionID, false, 0, new LinkData()));
|
2013-06-13 05:30:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2013-02-18 03:46:16 +01:00
|
|
|
}
|