More work done
This commit is contained in:
parent
30a79a8423
commit
45d6de97d3
71 changed files with 494 additions and 600 deletions
|
@ -1,112 +1,55 @@
|
|||
package com.zixiken.dimdoors;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.zixiken.dimdoors.blocks.BaseDimDoor;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.tileentities.TileEntityDimDoor;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.CompressedStreamTools;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import net.minecraftforge.fml.common.network.IGuiHandler;
|
||||
|
||||
public class CommonProxy implements IGuiHandler
|
||||
{
|
||||
public class CommonProxy {
|
||||
public static String BLOCK_PNG = "/PocketBlockTextures.png";
|
||||
public static String ITEM_PNG = "/PocketItemTextures.png";
|
||||
public static String RIFT_PNG = "/RIFT.png";
|
||||
public static String RIFT2_PNG = "/RIFT2.png";
|
||||
public static String WARP_PNG = "/WARP.png";
|
||||
|
||||
public void registerRenderers()
|
||||
{
|
||||
}
|
||||
public void registerEntity(Class <? extends Entity > entity, String entityname, int id, Object mod, int trackingrange, int updateFreq, boolean updatevelo)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public void loadTextures()
|
||||
{
|
||||
}
|
||||
|
||||
public void writeNBTToFile(World world)
|
||||
{
|
||||
boolean flag = true;
|
||||
|
||||
try
|
||||
{
|
||||
File dataStore = world.getSaveHandler().getMapFileFromName("idcounts");
|
||||
String dirFolder = dataStore.getCanonicalPath();
|
||||
dirFolder = dirFolder.replace("idcounts.dat", "");
|
||||
|
||||
if (!flag)
|
||||
{
|
||||
dirFolder.replace("saves/", FMLCommonHandler.instance().getMinecraftServerInstance().getFolderName());
|
||||
}
|
||||
public void writeNBTToFile(World world) {
|
||||
try {
|
||||
String dirFolder = world.getSaveHandler().getMapFileFromName("idcounts")
|
||||
.getCanonicalPath().replace("idcounts.dat", "");
|
||||
|
||||
File file = new File(dirFolder, "GGMData.dat");
|
||||
|
||||
if (!file.exists())
|
||||
{
|
||||
file.createNewFile();
|
||||
}
|
||||
if (!file.exists()) file.createNewFile();
|
||||
|
||||
FileOutputStream fileoutputstream = new FileOutputStream(file);
|
||||
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||
|
||||
|
||||
|
||||
CompressedStreamTools.writeCompressed(nbttagcompound, fileoutputstream);
|
||||
fileoutputstream.close();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
// exception.printStackTrace();
|
||||
|
||||
if (!(exception instanceof NullPointerException))
|
||||
{
|
||||
}
|
||||
|
||||
flag = false;
|
||||
} catch (IOException e) {
|
||||
System.err.println("Could not write NBT data to file:\n" + e);
|
||||
}
|
||||
}
|
||||
|
||||
public void readNBTFromFile(World world)
|
||||
{
|
||||
boolean flag = true;
|
||||
|
||||
try
|
||||
{
|
||||
File dataStore = world.getSaveHandler().getMapFileFromName("idcounts");
|
||||
String dirFolder = dataStore.getCanonicalPath();
|
||||
dirFolder = dirFolder.replace("idcounts.dat", "");
|
||||
|
||||
if (!flag)
|
||||
{
|
||||
dirFolder.replace("saves/", FMLCommonHandler.instance().getMinecraftServerInstance().getFolderName());
|
||||
}
|
||||
public void readNBTFromFile(World world) {
|
||||
try {
|
||||
String dirFolder = world.getSaveHandler().getMapFileFromName("idcounts")
|
||||
.getCanonicalPath().replace("idcounts.dat", "");
|
||||
|
||||
File file = new File(dirFolder, "GGMData.dat");
|
||||
|
||||
if (!file.exists())
|
||||
{
|
||||
if (!file.exists()) {
|
||||
file.createNewFile();
|
||||
FileOutputStream fileoutputstream = new FileOutputStream(file);
|
||||
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||
|
@ -118,25 +61,14 @@ public class CommonProxy implements IGuiHandler
|
|||
/*FileInputStream fileinputstream = new FileInputStream(file);
|
||||
NBTTagCompound nbttagcompound = CompressedStreamTools.readCompressed(fileinputstream);
|
||||
fileinputstream.close();*/
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
// exception.printStackTrace();
|
||||
|
||||
if (!(exception instanceof NullPointerException))
|
||||
{
|
||||
}
|
||||
|
||||
flag = false;
|
||||
} catch (IOException e) {
|
||||
System.err.println("Could not read NBT data from file:\n" + e);
|
||||
}
|
||||
}
|
||||
|
||||
public void printStringClient(String string)
|
||||
{
|
||||
|
||||
}
|
||||
public void updateDoorTE(BaseDimDoor door, World world, int x, int y, int z)
|
||||
{
|
||||
public void printStringClient(String string) {}
|
||||
|
||||
public void updateDoorTE(BaseDimDoor door, World world, int x, int y, int z) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if (tile instanceof TileEntityDimDoor)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.zixiken.dimdoors;
|
||||
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.network.packets.ClientJoinPacket;
|
||||
import com.zixiken.dimdoors.network.DimDoorsNetwork;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
|
@ -24,7 +25,7 @@ public class ConnectionHandler
|
|||
FMLEmbeddedChannel channel = NetworkRegistry.INSTANCE.getChannel("FORGE", Side.SERVER);
|
||||
for (NewDimData data : PocketManager.getDimensions()) {
|
||||
try {
|
||||
if (data.isPocketDimension() || data.id() == mod_pocketDim.properties.LimboDimensionID) {
|
||||
if (data.isPocketDimension() || data.id() == DDProperties.instance().LimboDimensionID) {
|
||||
channel.writeOutbound(new ForgeMessage.DimensionRegisterMessage(data.id(), DimensionManager.getProviderType(data.id())));
|
||||
}
|
||||
|
||||
|
|
|
@ -25,97 +25,97 @@ public class CraftingManager
|
|||
switch (properties.WorldThreadRequirementLevel)
|
||||
{
|
||||
case 1:
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(mod_pocketDim.itemStableFabric, 1),
|
||||
Items.ender_pearl, mod_pocketDim.itemWorldThread);
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(DimDoors.itemStableFabric, 1),
|
||||
Items.ender_pearl, DimDoors.itemWorldThread);
|
||||
break;
|
||||
case 2:
|
||||
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemStableFabric, 1),
|
||||
"yxy", 'x', Items.ender_pearl, 'y', mod_pocketDim.itemWorldThread);
|
||||
GameRegistry.addRecipe(new ItemStack(DimDoors.itemStableFabric, 1),
|
||||
"yxy", 'x', Items.ender_pearl, 'y', DimDoors.itemWorldThread);
|
||||
break;
|
||||
case 3:
|
||||
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemStableFabric, 1),
|
||||
" y ", "yxy", " y ", 'x', Items.ender_pearl, 'y', mod_pocketDim.itemWorldThread);
|
||||
GameRegistry.addRecipe(new ItemStack(DimDoors.itemStableFabric, 1),
|
||||
" y ", "yxy", " y ", 'x', Items.ender_pearl, 'y', DimDoors.itemWorldThread);
|
||||
break;
|
||||
default:
|
||||
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemStableFabric, 1),
|
||||
"yyy", "yxy", "yyy", 'x', Items.ender_pearl, 'y', mod_pocketDim.itemWorldThread);
|
||||
GameRegistry.addRecipe(new ItemStack(DimDoors.itemStableFabric, 1),
|
||||
"yyy", "yxy", "yyy", 'x', Items.ender_pearl, 'y', DimDoors.itemWorldThread);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (properties.CraftingDimensionalDoorAllowed)
|
||||
{
|
||||
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemDimensionalDoor, 1),
|
||||
"yxy", 'x', mod_pocketDim.itemStableFabric, 'y', Items.iron_door);
|
||||
GameRegistry.addRecipe(new ItemStack(DimDoors.itemDimensionalDoor, 1),
|
||||
"yxy", 'x', DimDoors.itemStableFabric, 'y', Items.iron_door);
|
||||
}
|
||||
if (properties.CraftingUnstableDoorAllowed)
|
||||
{
|
||||
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemUnstableDoor, 1),
|
||||
"yxy", 'x', Items.ender_eye, 'y', mod_pocketDim.itemDimensionalDoor);
|
||||
GameRegistry.addRecipe(new ItemStack(DimDoors.itemUnstableDoor, 1),
|
||||
"yxy", 'x', Items.ender_eye, 'y', DimDoors.itemDimensionalDoor);
|
||||
}
|
||||
if (properties.CraftingWarpDoorAllowed)
|
||||
{
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemWarpDoor, 1),
|
||||
GameRegistry.addRecipe(new ItemStack(DimDoors.itemWarpDoor, 1),
|
||||
"yxy", 'x', Items.ender_pearl, 'y', Items.wooden_door);
|
||||
}
|
||||
if (properties.CraftingTransTrapdoorAllowed)
|
||||
{
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.transTrapdoor, 1),
|
||||
GameRegistry.addRecipe(new ItemStack(DimDoors.transTrapdoor, 1),
|
||||
"y", "x", "y", 'x', Items.ender_pearl, 'y', Blocks.trapdoor);
|
||||
}
|
||||
if (properties.CraftingRiftSignatureAllowed)
|
||||
{
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemRiftSignature, 1),
|
||||
GameRegistry.addRecipe(new ItemStack(DimDoors.itemRiftSignature, 1),
|
||||
" y ", "yxy", " y ", 'x', Items.ender_pearl, 'y', Items.iron_ingot);
|
||||
}
|
||||
if (properties.CraftingRiftRemoverAllowed)
|
||||
{
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemRiftRemover, 1),
|
||||
GameRegistry.addRecipe(new ItemStack(DimDoors.itemRiftRemover, 1),
|
||||
"yyy", "yxy", "yyy", 'x', Items.ender_pearl, 'y', Items.gold_ingot);
|
||||
}
|
||||
if (properties.CraftingRiftBladeAllowed)
|
||||
{
|
||||
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemRiftBlade, 1),
|
||||
"x", "x", "y", 'x', mod_pocketDim.itemStableFabric, 'y', Items.blaze_rod);
|
||||
GameRegistry.addRecipe(new ItemStack(DimDoors.itemRiftBlade, 1),
|
||||
"x", "x", "y", 'x', DimDoors.itemStableFabric, 'y', Items.blaze_rod);
|
||||
}
|
||||
if (properties.CraftingStabilizedRiftSignatureAllowed)
|
||||
{
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemStabilizedRiftSignature, 1),
|
||||
" y ", "yxy", " y ", 'x', mod_pocketDim.itemStableFabric, 'y', Items.iron_ingot);
|
||||
GameRegistry.addRecipe(new ItemStack(DimDoors.itemStabilizedRiftSignature, 1),
|
||||
" y ", "yxy", " y ", 'x', DimDoors.itemStableFabric, 'y', Items.iron_ingot);
|
||||
}
|
||||
if (properties.CraftingGoldenDimensionalDoorAllowed)
|
||||
{
|
||||
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemGoldenDimensionalDoor, 1),
|
||||
"yxy", 'x', mod_pocketDim.itemStableFabric, 'y', mod_pocketDim.itemGoldenDoor);
|
||||
GameRegistry.addRecipe(new ItemStack(DimDoors.itemGoldenDimensionalDoor, 1),
|
||||
"yxy", 'x', DimDoors.itemStableFabric, 'y', DimDoors.itemGoldenDoor);
|
||||
}
|
||||
if (properties.CraftingGoldenDoorAllowed)
|
||||
{
|
||||
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemGoldenDoor, 1),
|
||||
GameRegistry.addRecipe(new ItemStack(DimDoors.itemGoldenDoor, 1),
|
||||
"yy", "yy", "yy", 'y', Items.gold_ingot);
|
||||
}
|
||||
if (properties.CraftingPersonalDimDoorAllowed)
|
||||
{
|
||||
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemPersonalDoor,1),
|
||||
"yxy", 'y', mod_pocketDim.itemQuartzDoor, 'x', mod_pocketDim.itemStableFabric);
|
||||
GameRegistry.addRecipe(new ItemStack(DimDoors.itemPersonalDoor,1),
|
||||
"yxy", 'y', DimDoors.itemQuartzDoor, 'x', DimDoors.itemStableFabric);
|
||||
}
|
||||
if (properties.CraftingQuartzDoorAllowed)
|
||||
{
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(mod_pocketDim.itemQuartzDoor, new Object[]{
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(DimDoors.itemQuartzDoor, new Object[]{
|
||||
"yy", "yy", "yy", Character.valueOf('y'), "oreQuartz"}));
|
||||
|
||||
|
||||
}
|
||||
if (properties.CraftingDDKeysAllowed)
|
||||
{
|
||||
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemDDKey, 1),
|
||||
GameRegistry.addRecipe(new ItemStack(DimDoors.itemDDKey, 1),
|
||||
" z", " y ", "y ", 'y', Items.gold_ingot, 'z', Items.ender_pearl);
|
||||
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemDDKey, 1),
|
||||
"z", "z", 'z', mod_pocketDim.itemDDKey);
|
||||
GameRegistry.addRecipe(new ItemStack(DimDoors.itemDDKey, 1),
|
||||
"z", "z", 'z', DimDoors.itemDDKey);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -157,6 +157,6 @@ public class CraftingManager
|
|||
public static void registerDispenserBehaviors()
|
||||
{
|
||||
// Register the dispenser behaviors for certain DD items
|
||||
BlockDispenser.dispenseBehaviorRegistry.putObject(mod_pocketDim.itemStabilizedRiftSignature, new DispenserBehaviorStabilizedRS());
|
||||
BlockDispenser.dispenseBehaviorRegistry.putObject(DimDoors.itemStabilizedRiftSignature, new DispenserBehaviorStabilizedRS());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,8 +56,8 @@ public class DDLoot {
|
|||
addContent(true, items, Items.emerald, 20, 1, 2);
|
||||
addContent(true, items, Items.golden_apple, 10);
|
||||
|
||||
addContent(properties.FabricOfRealityLootEnabled, items, Item.getItemFromBlock(mod_pocketDim.blockDimWall), 20, 16, 64);
|
||||
addContent(properties.WorldThreadLootEnabled, items, mod_pocketDim.itemWorldThread, 80, 2, 12);
|
||||
addContent(properties.FabricOfRealityLootEnabled, items, Item.getItemFromBlock(DimDoors.blockDimWall), 20, 16, 64);
|
||||
addContent(properties.WorldThreadLootEnabled, items, DimDoors.itemWorldThread, 80, 2, 12);
|
||||
|
||||
// Add all the items to our dungeon chest
|
||||
addItemsToContainer(DungeonChestInfo, items);
|
||||
|
@ -180,7 +180,7 @@ public class DDLoot {
|
|||
// 10% chance of adding a Rift Blade (no enchants)
|
||||
if (properties.RiftBladeLootEnabled && random.nextInt(100) < 10)
|
||||
{
|
||||
stacks.add( new ItemStack(mod_pocketDim.itemRiftBlade, 1) );
|
||||
stacks.add( new ItemStack(DimDoors.itemRiftBlade, 1) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -280,7 +280,7 @@ public class DDLoot {
|
|||
private static void addGraveSkull(ArrayList<ItemStack> stacks, Random random)
|
||||
{
|
||||
final int PLAYER_SKULL_METADATA = 3;
|
||||
DeathTracker deathTracker = mod_pocketDim.deathTracker;
|
||||
DeathTracker deathTracker = DimDoors.deathTracker;
|
||||
String skullOwner;
|
||||
if (deathTracker.isEmpty() || (random.nextInt(MAX_SPECIAL_SKULL_CHANCE) < SPECIAL_SKULL_CHANCE))
|
||||
{
|
||||
|
|
|
@ -63,7 +63,7 @@ public class DimData implements Serializable
|
|||
{
|
||||
while (k<range)
|
||||
{
|
||||
if (world.getBlock(x+i, y+j, z+k) == mod_pocketDim.blockRift && MathHelper.abs(i)+MathHelper.abs(j)+MathHelper.abs(k)<distance)
|
||||
if (world.getBlock(x+i, y+j, z+k) == DimDoors.blockRift && MathHelper.abs(i)+MathHelper.abs(j)+MathHelper.abs(k)<distance)
|
||||
{
|
||||
if(MathHelper.abs(i)+MathHelper.abs(j)+MathHelper.abs(k)!=0)
|
||||
{
|
||||
|
@ -103,7 +103,7 @@ public class DimData implements Serializable
|
|||
{
|
||||
while (k<range)
|
||||
{
|
||||
if(world.getBlock(x+i, y+j, z+k)==mod_pocketDim.blockRift)
|
||||
if(world.getBlock(x+i, y+j, z+k)== DimDoors.blockRift)
|
||||
{
|
||||
if(MathHelper.abs(i)+MathHelper.abs(j)+MathHelper.abs(k)!=0)
|
||||
{
|
||||
|
|
|
@ -10,20 +10,6 @@ import com.zixiken.dimdoors.commands.CommandListDungeons;
|
|||
import com.zixiken.dimdoors.ticking.MobMonolith;
|
||||
import com.zixiken.dimdoors.world.LimboDecay;
|
||||
import com.zixiken.dimdoors.world.LimboProvider;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemDoor;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.common.ForgeChunkManager;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import com.zixiken.dimdoors.blocks.BlockDimWall;
|
||||
import com.zixiken.dimdoors.blocks.BlockDimWallPerm;
|
||||
import com.zixiken.dimdoors.blocks.BlockDoorGold;
|
||||
|
@ -77,28 +63,38 @@ import com.zixiken.dimdoors.world.DDBiomeGenBase;
|
|||
import com.zixiken.dimdoors.world.PersonalPocketProvider;
|
||||
import com.zixiken.dimdoors.world.PocketProvider;
|
||||
import com.zixiken.dimdoors.world.gateways.GatewayGenerator;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemDoor;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.common.ForgeChunkManager;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.SidedProxy;
|
||||
import net.minecraftforge.fml.common.event.*;
|
||||
import net.minecraftforge.fml.common.registry.EntityRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
@Mod(modid = mod_pocketDim.modid, name = "Dimensional Doors", version = mod_pocketDim.version)
|
||||
public class mod_pocketDim
|
||||
{
|
||||
public static final String version = "2.2.5-test9";
|
||||
public static final String modid = "dimdoors";
|
||||
|
||||
//TODO need a place to stick all these constants
|
||||
@Mod(modid = DimDoors.MODID, name = "Dimensional Doors", version = DimDoors.VERSION)
|
||||
public class DimDoors {
|
||||
public static final String VERSION = "2.3.0-a1";
|
||||
public static final String MODID = "dimdoors";
|
||||
|
||||
public static final int NETHER_DIMENSION_ID = -1;
|
||||
|
||||
//need to clean up
|
||||
@SidedProxy(clientSide = "ClientProxy", serverSide = "CommonProxy")
|
||||
@SidedProxy(clientSide = "com.zixiken.dimdoors.client.ClientProxy",
|
||||
serverSide = "com.zixiken.dimdoors.CommonProxy")
|
||||
public static CommonProxy proxy;
|
||||
|
||||
@Mod.Instance(mod_pocketDim.modid)
|
||||
public static mod_pocketDim instance;
|
||||
@Mod.Instance(DimDoors.MODID)
|
||||
public static DimDoors instance;
|
||||
|
||||
public static Block quartzDoor;
|
||||
public static Block personalDimDoor;
|
||||
|
@ -114,8 +110,8 @@ public class mod_pocketDim
|
|||
public static Block blockDimWallPerm;
|
||||
public static BlockRift blockRift;
|
||||
|
||||
public static Item itemGoldenDimensionalDoor;
|
||||
public static Item itemGoldenDoor;
|
||||
public static ItemDoor itemGoldenDimensionalDoor;
|
||||
public static ItemDoor itemGoldenDoor;
|
||||
public static Item itemWorldThread;
|
||||
|
||||
public static Item itemRiftBlade;
|
||||
|
@ -139,28 +135,27 @@ public class mod_pocketDim
|
|||
public static RiftRegenerator riftRegenerator;
|
||||
public static GatewayGenerator gatewayGenerator;
|
||||
public static DeathTracker deathTracker;
|
||||
|
||||
private static LimboDecayScheduler limboDecayScheduler;
|
||||
private static ServerTickHandler serverTickHandler;
|
||||
private static LimboDecayScheduler limboDecayScheduler;
|
||||
private static LimboDecay limboDecay;
|
||||
private static EventHookContainer hooks;
|
||||
|
||||
//TODO this is a temporary workaround for saving data
|
||||
private String currrentSaveRootDirectory;
|
||||
|
||||
public static CreativeTabs dimDoorsCreativeTab = new CreativeTabs("dimDoorsCreativeTab")
|
||||
{
|
||||
public static CreativeTabs dimDoorsCreativeTab = new CreativeTabs("dimDoorsCreativeTab") {
|
||||
@Override
|
||||
public Item getTabIconItem()
|
||||
{
|
||||
return mod_pocketDim.itemDimensionalDoor;
|
||||
return DimDoors.itemDimensionalDoor;
|
||||
}
|
||||
};
|
||||
|
||||
@Mod.EventHandler
|
||||
public void onPreInitialization(FMLPreInitializationEvent event)
|
||||
{
|
||||
public void onPreInitialization(FMLPreInitializationEvent event) {
|
||||
//This should be the FIRST thing that gets done.
|
||||
String path = event.getSuggestedConfigurationFile().getAbsolutePath().replace(modid, "DimDoors");
|
||||
String path = event.getSuggestedConfigurationFile().getAbsolutePath().replace(MODID, "DimDoors");
|
||||
|
||||
properties = DDProperties.initialize(new File(path));
|
||||
|
||||
|
@ -175,8 +170,7 @@ public class mod_pocketDim
|
|||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void onInitialization(FMLInitializationEvent event)
|
||||
{
|
||||
public void onInitialization(FMLInitializationEvent event) {
|
||||
// Initialize ServerTickHandler instance
|
||||
serverTickHandler = new ServerTickHandler();
|
||||
MinecraftForge.EVENT_BUS.register(serverTickHandler);
|
||||
|
@ -204,25 +198,25 @@ public class mod_pocketDim
|
|||
itemDDKey = new ItemDDKey();
|
||||
itemQuartzDoor = new ItemQuartzDoor();
|
||||
itemPersonalDoor = new ItemPersonalDoor();
|
||||
itemGoldenDoor = (new ItemGoldDoor(Material.wood)).setUnlocalizedName("itemGoldDoor");
|
||||
itemGoldenDimensionalDoor = (new ItemGoldDimDoor(Material.iron, (ItemDoor)this.itemGoldenDoor)).setUnlocalizedName("itemGoldDimDoor");
|
||||
itemDimensionalDoor = (ItemDimensionalDoor) (new ItemDimensionalDoor(Material.iron, (ItemDoor) Items.iron_door)).setUnlocalizedName("itemDimDoor");
|
||||
itemWarpDoor = (new ItemWarpDoor(Material.wood,(ItemDoor)Items.iron_door)).setUnlocalizedName("itemDimDoorWarp");
|
||||
itemRiftSignature = (new ItemRiftSignature()).setUnlocalizedName("itemLinkSignature");
|
||||
itemRiftRemover = (new itemRiftRemover(Material.wood)).setUnlocalizedName("itemRiftRemover");
|
||||
itemStableFabric = (new ItemStableFabric(0)).setUnlocalizedName("itemStableFabric");
|
||||
itemUnstableDoor = (new ItemUnstableDoor(Material.iron, null)).setUnlocalizedName("itemChaosDoor");
|
||||
itemRiftBlade = (new ItemRiftBlade(properties)).setUnlocalizedName("ItemRiftBlade");
|
||||
itemStabilizedRiftSignature = (new ItemStabilizedRiftSignature()).setUnlocalizedName("itemStabilizedRiftSig");
|
||||
itemWorldThread = (new ItemWorldThread()).setUnlocalizedName("itemWorldThread");
|
||||
itemGoldenDoor = new ItemGoldDoor();
|
||||
itemGoldenDimensionalDoor = new ItemGoldDimDoor();
|
||||
itemDimensionalDoor = new ItemDimensionalDoor();
|
||||
itemWarpDoor = new ItemWarpDoor();
|
||||
itemRiftSignature = new ItemRiftSignature();
|
||||
itemRiftRemover = new itemRiftRemover();
|
||||
itemStableFabric = new ItemStableFabric();
|
||||
itemUnstableDoor = new ItemUnstableDoor();
|
||||
itemRiftBlade = new ItemRiftBlade();
|
||||
itemStabilizedRiftSignature = new ItemStabilizedRiftSignature();
|
||||
itemWorldThread = new ItemWorldThread();
|
||||
|
||||
// Check if other biomes have been registered with the same IDs we want. If so, crash Minecraft
|
||||
// to notify the user instead of letting it pass and conflicting with Biomes o' Plenty.
|
||||
DDBiomeGenBase.checkBiomes( new int[] { properties.LimboBiomeID, properties.PocketBiomeID } );
|
||||
DDBiomeGenBase.checkBiomes(properties.LimboBiomeID, properties.PocketBiomeID);
|
||||
|
||||
// Initialize our biomes
|
||||
mod_pocketDim.limboBiome = (new BiomeGenLimbo(properties.LimboBiomeID));
|
||||
mod_pocketDim.pocketBiome = (new BiomeGenPocket(properties.PocketBiomeID));
|
||||
DimDoors.limboBiome = (new BiomeGenLimbo(properties.LimboBiomeID));
|
||||
DimDoors.pocketBiome = (new BiomeGenPocket(properties.PocketBiomeID));
|
||||
|
||||
GameRegistry.registerBlock(quartzDoor, null, "Quartz Door");
|
||||
GameRegistry.registerBlock(personalDimDoor, null, "Personal Dimensional Door");
|
||||
|
@ -255,11 +249,11 @@ public class mod_pocketDim
|
|||
|
||||
BlockRotator.setupOrientations();
|
||||
|
||||
if (!DimensionManager.registerProviderType(properties.PocketProviderID, PocketProvider.class, false))
|
||||
if(!DimensionManager.registerProviderType(properties.PocketProviderID, PocketProvider.class, false))
|
||||
throw new IllegalStateException("There is a provider ID conflict between PocketProvider from Dimensional Doors and another provider type. Fix your configuration!");
|
||||
if (!DimensionManager.registerProviderType(properties.LimboProviderID, LimboProvider.class, false))
|
||||
if(!DimensionManager.registerProviderType(properties.LimboProviderID, LimboProvider.class, false))
|
||||
throw new IllegalStateException("There is a provider ID conflict between LimboProvider from Dimensional Doors and another provider type. Fix your configuration!");
|
||||
if (!DimensionManager.registerProviderType(properties.PersonalPocketProviderID, PersonalPocketProvider.class, false))
|
||||
if(!DimensionManager.registerProviderType(properties.PersonalPocketProviderID, PersonalPocketProvider.class, false))
|
||||
throw new IllegalStateException("There is a provider ID conflict between PersonalPocketProvider from Dimensional Doors and another provider type. Fix your configuration!");
|
||||
|
||||
DimensionManager.registerDimension(properties.LimboDimensionID, properties.LimboProviderID);
|
||||
|
@ -275,7 +269,7 @@ public class mod_pocketDim
|
|||
|
||||
CraftingManager.registerRecipes(properties);
|
||||
CraftingManager.registerDispenserBehaviors();
|
||||
FMLCommonHandler.instance().bus().register(new CraftingManager());
|
||||
MinecraftForge.EVENT_BUS.register(new CraftingManager());
|
||||
|
||||
DungeonHelper.initialize();
|
||||
gatewayGenerator = new GatewayGenerator(properties);
|
||||
|
@ -283,60 +277,38 @@ public class mod_pocketDim
|
|||
|
||||
// Register loot chests
|
||||
DDLoot.registerInfo(properties);
|
||||
proxy.loadTextures();
|
||||
proxy.registerRenderers();
|
||||
FMLCommonHandler.instance().bus().register(new ConnectionHandler());
|
||||
MinecraftForge.EVENT_BUS.register(new ConnectionHandler());
|
||||
}
|
||||
|
||||
public static void translateAndAdd(String key, List list) {
|
||||
for (int i=0;i<10;i++) {
|
||||
if (StatCollector.canTranslate(key+Integer.toString(i))) {
|
||||
String line = StatCollector.translateToLocal(key + Integer.toString(i));
|
||||
list.add(line);
|
||||
} else
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void onPostInitialization(FMLPostInitializationEvent event)
|
||||
{
|
||||
public void onPostInitialization(FMLPostInitializationEvent event) {
|
||||
// Check in case other mods have registered over our biome IDs
|
||||
DDBiomeGenBase.checkBiomes( new int[] { properties.LimboBiomeID, properties.PocketBiomeID } );
|
||||
DDBiomeGenBase.checkBiomes(properties.LimboBiomeID, properties.PocketBiomeID);
|
||||
|
||||
ForgeChunkManager.setForcedChunkLoadingCallback(instance, new ChunkLoaderHelper());
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void onServerStopped(FMLServerStoppedEvent event)
|
||||
{
|
||||
try
|
||||
{
|
||||
PocketManager.tryUnload();
|
||||
if (deathTracker != null) {
|
||||
deathTracker.writeToFile();
|
||||
deathTracker = null;
|
||||
}
|
||||
worldProperties = null;
|
||||
currrentSaveRootDirectory = null;
|
||||
|
||||
// Unregister all tick receivers from serverTickHandler to avoid leaking
|
||||
// scheduled tasks between single-player game sessions
|
||||
if (serverTickHandler != null)
|
||||
serverTickHandler.unregisterReceivers();
|
||||
spawner = null;
|
||||
riftRegenerator = null;
|
||||
limboDecayScheduler = null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
public void onServerStopped(FMLServerStoppedEvent event) {
|
||||
PocketManager.tryUnload();
|
||||
if(deathTracker != null) {
|
||||
deathTracker.writeToFile();
|
||||
deathTracker = null;
|
||||
}
|
||||
worldProperties = null;
|
||||
currrentSaveRootDirectory = null;
|
||||
|
||||
// Unregister all tick receivers from serverTickHandler to avoid leaking
|
||||
// scheduled tasks between single-player game sessions
|
||||
if(serverTickHandler != null)
|
||||
serverTickHandler.unregisterReceivers();
|
||||
spawner = null;
|
||||
riftRegenerator = null;
|
||||
limboDecayScheduler = null;
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void onServerAboutToStart(FMLServerAboutToStartEvent event)
|
||||
{
|
||||
public void onServerAboutToStart(FMLServerAboutToStartEvent event) {
|
||||
currrentSaveRootDirectory = DimensionManager.getCurrentSaveRootDirectory().getAbsolutePath();
|
||||
|
||||
// Load the config file that's specific to this world
|
||||
|
@ -355,8 +327,7 @@ public class mod_pocketDim
|
|||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void onServerStarting(FMLServerStartingEvent event)
|
||||
{
|
||||
public void onServerStarting(FMLServerStartingEvent event) {
|
||||
// Register commands with the server
|
||||
event.registerServerCommand( CommandResetDungeons.instance() );
|
||||
event.registerServerCommand( CommandCreateDungeonRift.instance() );
|
||||
|
@ -366,26 +337,26 @@ public class mod_pocketDim
|
|||
event.registerServerCommand( CommandExportDungeon.instance() );
|
||||
event.registerServerCommand( CommandCreatePocket.instance() );
|
||||
event.registerServerCommand( CommandTeleportPlayer.instance() );
|
||||
|
||||
try
|
||||
{
|
||||
ChunkLoaderHelper.loadForcedChunkWorlds(event);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
System.err.println("Failed to load chunk loaders for Dimensional Doors. The following error occurred:");
|
||||
System.err.println(e.toString());
|
||||
}
|
||||
|
||||
ChunkLoaderHelper.loadForcedChunkWorlds(event);
|
||||
}
|
||||
|
||||
public String getCurrentSavePath()
|
||||
{
|
||||
return this.currrentSaveRootDirectory;
|
||||
}
|
||||
|
||||
public static void sendChat(EntityPlayer player, String message)
|
||||
{
|
||||
|
||||
public static void sendChat(EntityPlayer player, String message) {
|
||||
ChatComponentText text = new ChatComponentText(message);
|
||||
player.addChatComponentMessage(text);
|
||||
}
|
||||
|
||||
public static void translateAndAdd(String key, List list) {
|
||||
for(int i=0;i<10;i++) {
|
||||
if(StatCollector.canTranslate(key+Integer.toString(i))) {
|
||||
String line = StatCollector.translateToLocal(key + Integer.toString(i));
|
||||
list.add(line);
|
||||
} else break;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -51,7 +51,7 @@ public class EventHookContainer
|
|||
public void setSessionFields(DDWorldProperties worldProperties, RiftRegenerator regenerator)
|
||||
{
|
||||
// SenseiKiwi:
|
||||
// Why have a setter rather than accessing mod_pocketDim directly?
|
||||
// Why have a setter rather than accessing DimDoors directly?
|
||||
// I want to make this dependency explicit in our code.
|
||||
this.worldProperties = worldProperties;
|
||||
this.regenerator = regenerator;
|
||||
|
@ -89,7 +89,7 @@ public class EventHookContainer
|
|||
|
||||
if(data.type() == DimensionType.PERSONAL)
|
||||
{
|
||||
mod_pocketDim.sendChat(event.entityPlayer,("Something prevents the Warp Door from tunneling out here"));
|
||||
DimDoors.sendChat(event.entityPlayer,("Something prevents the Warp Door from tunneling out here"));
|
||||
event.setCanceled(true);
|
||||
return;
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ public class EventHookContainer
|
|||
if(entity.worldObj.provider instanceof PocketProvider)
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
mod_pocketDim.deathTracker.addUsername(player.getGameProfile().getName());
|
||||
DimDoors.deathTracker.addUsername(player.getGameProfile().getName());
|
||||
revivePlayerInLimbo(player);
|
||||
event.setCanceled(true);
|
||||
return false;
|
||||
|
@ -148,7 +148,7 @@ public class EventHookContainer
|
|||
{
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
revivePlayerInLimbo(player);
|
||||
mod_pocketDim.sendChat(player, "Search for the dark red pools which accumulate in the lower reaches of Limbo");
|
||||
DimDoors.sendChat(player, "Search for the dark red pools which accumulate in the lower reaches of Limbo");
|
||||
event.setCanceled(true);
|
||||
return false;
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ public class EventHookContainer
|
|||
if (entity instanceof EntityPlayer && isValidSourceForLimbo(entity.worldObj.provider))
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
mod_pocketDim.deathTracker.addUsername(player.getGameProfile().getName());
|
||||
DimDoors.deathTracker.addUsername(player.getGameProfile().getName());
|
||||
|
||||
if (properties.LimboEnabled && !properties.LimboReturnsInventoryEnabled)
|
||||
{
|
||||
|
@ -211,9 +211,9 @@ public class EventHookContainer
|
|||
{
|
||||
PocketManager.save(true);
|
||||
|
||||
if (mod_pocketDim.deathTracker != null && mod_pocketDim.deathTracker.isModified())
|
||||
if (DimDoors.deathTracker != null && DimDoors.deathTracker.isModified())
|
||||
{
|
||||
mod_pocketDim.deathTracker.writeToFile();
|
||||
DimDoors.deathTracker.writeToFile();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@ package com.zixiken.dimdoors.blocks;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.core.LinkType;
|
||||
import com.zixiken.dimdoors.core.DimLink;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDoor;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
|
@ -22,7 +22,6 @@ import net.minecraft.util.MathHelper;
|
|||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.core.DDTeleporter;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.items.ItemDDKey;
|
||||
|
@ -48,8 +47,8 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
|
|||
{
|
||||
upperTextures = new IIcon[2];
|
||||
lowerTextures = new IIcon[2];
|
||||
upperTextures[0] = iconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName() + "_upper");
|
||||
lowerTextures[0] = iconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName() + "_lower");
|
||||
upperTextures[0] = iconRegister.registerIcon(DimDoors.modid + ":" + this.getUnlocalizedName() + "_upper");
|
||||
lowerTextures[0] = iconRegister.registerIcon(DimDoors.modid + ":" + this.getUnlocalizedName() + "_lower");
|
||||
upperTextures[1] = new IconFlipped(upperTextures[0], true, false);
|
||||
lowerTextures[1] = new IconFlipped(lowerTextures[0], true, false);
|
||||
}
|
||||
|
@ -181,7 +180,7 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
|
|||
//but this works fine and is more versatile I think.
|
||||
public BaseDimDoor updateAttachedTile(World world, int x, int y, int z)
|
||||
{
|
||||
mod_pocketDim.proxy.updateDoorTE(this, world, x, y, z);
|
||||
DimDoors.proxy.updateDoorTE(this, world, x, y, z);
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if (tile instanceof TileEntityDimDoor)
|
||||
{
|
||||
|
@ -510,7 +509,7 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
|
|||
}
|
||||
}
|
||||
}
|
||||
player.playSound(mod_pocketDim.modid + ":doorLocked", 1F, 1F);
|
||||
player.playSound(DimDoors.modid + ":doorLocked", 1F, 1F);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -542,7 +541,7 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
|
|||
// Schedule rift regeneration for this block if it was replaced
|
||||
if (world.getBlock(x, y, z) != oldBlock)
|
||||
{
|
||||
mod_pocketDim.riftRegenerator.scheduleFastRegeneration(x, y, z, world);
|
||||
DimDoors.riftRegenerator.scheduleFastRegeneration(x, y, z, world);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,7 +3,7 @@ package com.zixiken.dimdoors.blocks;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -25,7 +25,7 @@ public class BlockDimWall extends Block {
|
|||
|
||||
public BlockDimWall() {
|
||||
super(Material.iron);
|
||||
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||
this.setCreativeTab(DimDoors.dimDoorsCreativeTab);
|
||||
setLightLevel(1.0F);
|
||||
setHardness(0.1F);
|
||||
setUnlocalizedName(ID);
|
||||
|
@ -65,9 +65,9 @@ public class BlockDimWall extends Block {
|
|||
@Override
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.blockIcon[0] = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName());
|
||||
this.blockIcon[1] = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName() + "Perm");
|
||||
this.blockIcon[2] = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName() + "Personal");
|
||||
this.blockIcon[0] = par1IconRegister.registerIcon(DimDoors.modid + ":" + this.getUnlocalizedName());
|
||||
this.blockIcon[1] = par1IconRegister.registerIcon(DimDoors.modid + ":" + this.getUnlocalizedName() + "Perm");
|
||||
this.blockIcon[2] = par1IconRegister.registerIcon(DimDoors.modid + ":" + this.getUnlocalizedName() + "Personal");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
|
@ -2,8 +2,8 @@ package com.zixiken.dimdoors.blocks;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -25,7 +25,7 @@ public class BlockDimWallPerm extends Block {
|
|||
|
||||
public BlockDimWallPerm() {
|
||||
super(Material.ground);
|
||||
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||
this.setCreativeTab(DimDoors.dimDoorsCreativeTab);
|
||||
setLightLevel(1.0F);
|
||||
setBlockUnbreakable();
|
||||
setResistance(6000000.0F);
|
||||
|
@ -36,7 +36,7 @@ public class BlockDimWallPerm extends Block {
|
|||
@Override
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName());
|
||||
this.blockIcon = par1IconRegister.registerIcon(DimDoors.modid + ":" + this.getUnlocalizedName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -55,7 +55,7 @@ public class BlockDimWallPerm extends Block {
|
|||
public void onEntityWalking(World world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
if (!world.isRemote && world.provider.dimensionId == properties.LimboDimensionID
|
||||
&& mod_pocketDim.worldProperties.LimboEscapeEnabled)
|
||||
&& DimDoors.worldProperties.LimboEscapeEnabled)
|
||||
{
|
||||
World overworld = DimensionManager.getWorld(0);
|
||||
if (overworld != null && entity instanceof EntityPlayerMP)
|
||||
|
@ -90,7 +90,7 @@ public class BlockDimWallPerm extends Block {
|
|||
if (Math.abs(xc) + Math.abs(zc) < random.nextInt(3) + 2 ||
|
||||
Math.abs(xc) + Math.abs(zc) < random.nextInt(3) + 3)
|
||||
{
|
||||
overworld.setBlock(destinationX + xc, destinationY - 1, destinationZ + zc, mod_pocketDim.blockLimbo);
|
||||
overworld.setBlock(destinationX + xc, destinationY - 1, destinationZ + zc, DimDoors.blockLimbo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,16 +2,11 @@ package com.zixiken.dimdoors.blocks;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import net.minecraft.block.BlockDoor;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.IconFlipped;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockDoorGold extends BlockDoor {
|
||||
public static final String ID = "doorGold";
|
||||
|
@ -25,18 +20,18 @@ public class BlockDoorGold extends BlockDoor {
|
|||
@SideOnly(Side.CLIENT)
|
||||
protected String getTextureName()
|
||||
{
|
||||
return mod_pocketDim.modid + ":" + this.getUnlocalizedName();
|
||||
return DimDoors.modid + ":" + this.getUnlocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int par1, Random par2Random, int par3)
|
||||
{
|
||||
return (par1 & 8) != 0 ? null : mod_pocketDim.itemGoldenDoor;
|
||||
return (par1 & 8) != 0 ? null : DimDoors.itemGoldenDoor;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World world, int x, int y, int z) {
|
||||
return mod_pocketDim.itemGoldenDoor;
|
||||
return DimDoors.itemGoldenDoor;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package com.zixiken.dimdoors.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockDoor;
|
||||
|
@ -21,18 +22,18 @@ public class BlockDoorQuartz extends BlockDoor {
|
|||
@SideOnly(Side.CLIENT)
|
||||
protected String getTextureName()
|
||||
{
|
||||
return mod_pocketDim.modid + ":" + this.getUnlocalizedName();
|
||||
return DimDoors.modid + ":" + this.getUnlocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int par1, Random par2Random, int par3)
|
||||
{
|
||||
return (par1 & 8) != 0 ? null : mod_pocketDim.itemQuartzDoor;
|
||||
return (par1 & 8) != 0 ? null : DimDoors.itemQuartzDoor;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World world, int x, int y, int z) {
|
||||
return mod_pocketDim.itemQuartzDoor;
|
||||
return DimDoors.itemQuartzDoor;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.zixiken.dimdoors.blocks;
|
||||
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.core.DimLink;
|
||||
import com.zixiken.dimdoors.core.LinkType;
|
||||
import com.zixiken.dimdoors.core.NewDimData;
|
||||
|
@ -39,7 +38,7 @@ public class BlockGoldDimDoor extends BaseDimDoor {
|
|||
@Override
|
||||
public Item getDoorItem()
|
||||
{
|
||||
return mod_pocketDim.itemGoldenDimensionalDoor;
|
||||
return DimDoors.itemGoldenDimensionalDoor;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -2,8 +2,8 @@ package com.zixiken.dimdoors.blocks;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.world.LimboDecay;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -25,7 +25,7 @@ public class BlockLimbo extends Block {
|
|||
limboDimensionID = DDProperties.instance().LimboDimensionID;
|
||||
this.decay = decay;
|
||||
setTickRandomly(true);
|
||||
setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||
setCreativeTab(DimDoors.dimDoorsCreativeTab);
|
||||
setHardness(.2F);
|
||||
setUnlocalizedName(ID);
|
||||
setLightLevel(.0F);
|
||||
|
@ -44,7 +44,7 @@ public class BlockLimbo extends Block {
|
|||
@Override
|
||||
public void registerBlockIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.blockIcon = iconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName());
|
||||
this.blockIcon = iconRegister.registerIcon(DimDoors.modid + ":" + this.getUnlocalizedName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -6,12 +6,12 @@ import java.util.LinkedList;
|
|||
import java.util.Queue;
|
||||
import java.util.Random;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.client.ClosingRiftFX;
|
||||
import com.zixiken.dimdoors.Point3D;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.core.DimLink;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.tileentities.TileEntityRift;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockLiquid;
|
||||
|
@ -60,29 +60,29 @@ public class BlockRift extends Block implements ITileEntityProvider {
|
|||
setUnlocalizedName(ID);
|
||||
|
||||
this.modBlocksImmuneToRift = new ArrayList<Block>();
|
||||
this.modBlocksImmuneToRift.add(mod_pocketDim.blockDimWall);
|
||||
this.modBlocksImmuneToRift.add(mod_pocketDim.blockDimWallPerm);
|
||||
this.modBlocksImmuneToRift.add(mod_pocketDim.dimensionalDoor);
|
||||
this.modBlocksImmuneToRift.add(mod_pocketDim.warpDoor);
|
||||
this.modBlocksImmuneToRift.add(mod_pocketDim.transTrapdoor);
|
||||
this.modBlocksImmuneToRift.add(mod_pocketDim.unstableDoor);
|
||||
this.modBlocksImmuneToRift.add(mod_pocketDim.blockRift);
|
||||
this.modBlocksImmuneToRift.add(mod_pocketDim.transientDoor);
|
||||
this.modBlocksImmuneToRift.add(mod_pocketDim.goldenDimensionalDoor);
|
||||
this.modBlocksImmuneToRift.add(mod_pocketDim.goldenDoor);
|
||||
this.modBlocksImmuneToRift.add(DimDoors.blockDimWall);
|
||||
this.modBlocksImmuneToRift.add(DimDoors.blockDimWallPerm);
|
||||
this.modBlocksImmuneToRift.add(DimDoors.dimensionalDoor);
|
||||
this.modBlocksImmuneToRift.add(DimDoors.warpDoor);
|
||||
this.modBlocksImmuneToRift.add(DimDoors.transTrapdoor);
|
||||
this.modBlocksImmuneToRift.add(DimDoors.unstableDoor);
|
||||
this.modBlocksImmuneToRift.add(DimDoors.blockRift);
|
||||
this.modBlocksImmuneToRift.add(DimDoors.transientDoor);
|
||||
this.modBlocksImmuneToRift.add(DimDoors.goldenDimensionalDoor);
|
||||
this.modBlocksImmuneToRift.add(DimDoors.goldenDoor);
|
||||
|
||||
this.blocksImmuneToRift = new ArrayList<Block>();
|
||||
this.blocksImmuneToRift.add(mod_pocketDim.blockDimWall);
|
||||
this.blocksImmuneToRift.add(mod_pocketDim.blockDimWallPerm);
|
||||
this.blocksImmuneToRift.add(mod_pocketDim.dimensionalDoor);
|
||||
this.blocksImmuneToRift.add(mod_pocketDim.warpDoor);
|
||||
this.blocksImmuneToRift.add(mod_pocketDim.transTrapdoor);
|
||||
this.blocksImmuneToRift.add(mod_pocketDim.unstableDoor);
|
||||
this.blocksImmuneToRift.add(mod_pocketDim.blockRift);
|
||||
this.blocksImmuneToRift.add(mod_pocketDim.transientDoor);
|
||||
this.blocksImmuneToRift.add(mod_pocketDim.goldenDimensionalDoor);
|
||||
this.blocksImmuneToRift.add(mod_pocketDim.goldenDoor);
|
||||
this.blocksImmuneToRift.add(mod_pocketDim.personalDimDoor);
|
||||
this.blocksImmuneToRift.add(DimDoors.blockDimWall);
|
||||
this.blocksImmuneToRift.add(DimDoors.blockDimWallPerm);
|
||||
this.blocksImmuneToRift.add(DimDoors.dimensionalDoor);
|
||||
this.blocksImmuneToRift.add(DimDoors.warpDoor);
|
||||
this.blocksImmuneToRift.add(DimDoors.transTrapdoor);
|
||||
this.blocksImmuneToRift.add(DimDoors.unstableDoor);
|
||||
this.blocksImmuneToRift.add(DimDoors.blockRift);
|
||||
this.blocksImmuneToRift.add(DimDoors.transientDoor);
|
||||
this.blocksImmuneToRift.add(DimDoors.goldenDimensionalDoor);
|
||||
this.blocksImmuneToRift.add(DimDoors.goldenDoor);
|
||||
this.blocksImmuneToRift.add(DimDoors.personalDimDoor);
|
||||
this.blocksImmuneToRift.add(Blocks.lapis_block);
|
||||
this.blocksImmuneToRift.add(Blocks.iron_block);
|
||||
this.blocksImmuneToRift.add(Blocks.gold_block);
|
||||
|
@ -93,7 +93,7 @@ public class BlockRift extends Block implements ITileEntityProvider {
|
|||
@Override
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName());
|
||||
this.blockIcon = par1IconRegister.registerIcon(DimDoors.modid + ":" + this.getUnlocalizedName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -236,7 +236,7 @@ public class BlockRift extends Block implements ITileEntityProvider {
|
|||
&& !(block instanceof BlockLiquid ||
|
||||
block instanceof IFluidBlock))
|
||||
{
|
||||
ItemStack thread = new ItemStack(mod_pocketDim.itemWorldThread, 1);
|
||||
ItemStack thread = new ItemStack(DimDoors.itemWorldThread, 1);
|
||||
world.spawnEntityInWorld(new EntityItem(world, x, y, z, thread));
|
||||
}
|
||||
}
|
||||
|
@ -281,7 +281,7 @@ public class BlockRift extends Block implements ITileEntityProvider {
|
|||
|
||||
// Create a child, replace the block with a rift, and consider dropping World Thread
|
||||
block = world.getBlock(x, y, z);
|
||||
if (world.setBlock(x, y, z, mod_pocketDim.blockRift))
|
||||
if (world.setBlock(x, y, z, DimDoors.blockRift))
|
||||
{
|
||||
dimension.createChildLink(x, y, z, parent);
|
||||
dropWorldThread(block, world, x, y, z, random);
|
||||
|
@ -333,7 +333,7 @@ public class BlockRift extends Block implements ITileEntityProvider {
|
|||
{
|
||||
if (world != null && !isBlockImmune(world, x, y, z))
|
||||
{
|
||||
return world.setBlock(x, y, z, mod_pocketDim.blockRift);
|
||||
return world.setBlock(x, y, z, DimDoors.blockRift);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -396,7 +396,7 @@ public class BlockRift extends Block implements ITileEntityProvider {
|
|||
// Schedule rift regeneration for this block if it was changed
|
||||
if (world.getBlock(x, y, z) != oldBlock)
|
||||
{
|
||||
mod_pocketDim.riftRegenerator.scheduleSlowRegeneration(x, y, z, world);
|
||||
DimDoors.riftRegenerator.scheduleSlowRegeneration(x, y, z, world);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,11 +2,10 @@ package com.zixiken.dimdoors.blocks;
|
|||
|
||||
import com.zixiken.dimdoors.core.DimLink;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.world.World;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.core.LinkType;
|
||||
import com.zixiken.dimdoors.core.NewDimData;
|
||||
|
||||
|
@ -37,6 +36,6 @@ public class DimensionalDoor extends BaseDimDoor {
|
|||
@Override
|
||||
public Item getDoorItem()
|
||||
{
|
||||
return mod_pocketDim.itemDimensionalDoor;
|
||||
return DimDoors.itemDimensionalDoor;
|
||||
}
|
||||
}
|
|
@ -1,11 +1,10 @@
|
|||
package com.zixiken.dimdoors.blocks;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.world.PersonalPocketProvider;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.core.DimLink;
|
||||
import com.zixiken.dimdoors.core.LinkType;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -40,7 +39,7 @@ public class PersonalDimDoor extends BaseDimDoor {
|
|||
@Override
|
||||
public Item getDoorItem()
|
||||
{
|
||||
return mod_pocketDim.itemPersonalDoor;
|
||||
return DimDoors.itemPersonalDoor;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.zixiken.dimdoors.blocks;
|
|||
import java.util.Random;
|
||||
|
||||
import com.zixiken.dimdoors.core.DimLink;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -32,7 +32,7 @@ public class TransTrapdoor extends BlockTrapDoor implements IDimDoor, ITileEntit
|
|||
|
||||
public TransTrapdoor() {
|
||||
super(Material.wood);
|
||||
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||
this.setCreativeTab(DimDoors.dimDoorsCreativeTab);
|
||||
setHardness(1.0F);
|
||||
setUnlocalizedName(ID);
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ public class TransTrapdoor extends BlockTrapDoor implements IDimDoor, ITileEntit
|
|||
@Override
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName());
|
||||
this.blockIcon = par1IconRegister.registerIcon(DimDoors.modid + ":" + this.getUnlocalizedName());
|
||||
}
|
||||
|
||||
//Teleports the player to the exit link of that dimension, assuming it is a pocket
|
||||
|
@ -156,7 +156,7 @@ public class TransTrapdoor extends BlockTrapDoor implements IDimDoor, ITileEntit
|
|||
@Override
|
||||
public Item getDoorItem()
|
||||
{
|
||||
return Item.getItemFromBlock(mod_pocketDim.transTrapdoor);
|
||||
return Item.getItemFromBlock(DimDoors.transTrapdoor);
|
||||
}
|
||||
|
||||
public static boolean isTrapdoorSetLow(int metadata)
|
||||
|
@ -188,7 +188,7 @@ public class TransTrapdoor extends BlockTrapDoor implements IDimDoor, ITileEntit
|
|||
// Schedule rift regeneration for this block if it was replaced
|
||||
if (world.getBlock(x, y, z) != oldBlock)
|
||||
{
|
||||
mod_pocketDim.riftRegenerator.scheduleFastRegeneration(x, y, z, world);
|
||||
DimDoors.riftRegenerator.scheduleFastRegeneration(x, y, z, world);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
package com.zixiken.dimdoors.blocks;
|
||||
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.core.DimLink;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
@ -9,7 +9,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.core.DDTeleporter;
|
||||
import com.zixiken.dimdoors.core.LinkType;
|
||||
import com.zixiken.dimdoors.core.NewDimData;
|
||||
|
@ -53,7 +52,7 @@ public class TransientDoor extends BaseDimDoor {
|
|||
DDTeleporter.traverseDimDoor(world, link, entity, this);
|
||||
// Turn the door into a rift AFTER teleporting the player.
|
||||
// The door's orientation may be necessary for the teleport.
|
||||
world.setBlock(x, y, z, mod_pocketDim.blockRift);
|
||||
world.setBlock(x, y, z, DimDoors.blockRift);
|
||||
world.setBlockToAir(x, y - 1, z);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
package com.zixiken.dimdoors.blocks;
|
||||
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.core.LinkType;
|
||||
import com.zixiken.dimdoors.core.NewDimData;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -35,7 +34,7 @@ public class UnstableDoor extends BaseDimDoor {
|
|||
@Override
|
||||
public Item getDoorItem()
|
||||
{
|
||||
return mod_pocketDim.itemUnstableDoor;
|
||||
return DimDoors.itemUnstableDoor;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
package com.zixiken.dimdoors.blocks;
|
||||
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.core.DimLink;
|
||||
import com.zixiken.dimdoors.core.LinkType;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -36,6 +35,6 @@ public class WarpDoor extends BaseDimDoor {
|
|||
@Override
|
||||
public Item getDoorItem()
|
||||
{
|
||||
return mod_pocketDim.itemWarpDoor;
|
||||
return DimDoors.itemWarpDoor;
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
package com.zixiken.dimdoors.client;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
@ -21,7 +21,7 @@ public class ClientOnlyHooks {
|
|||
|
||||
public ClientOnlyHooks(DDProperties properties) {
|
||||
this.properties = properties;
|
||||
this.limboMusic = PositionedSoundRecord.func_147673_a(new ResourceLocation(mod_pocketDim.modid + ":creepy"));
|
||||
this.limboMusic = PositionedSoundRecord.func_147673_a(new ResourceLocation(DimDoors.modid + ":creepy"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -31,8 +31,8 @@ public class ClientOnlyHooks {
|
|||
{
|
||||
ResourceLocation playingSound = event.sound.getPositionedSoundLocation();
|
||||
if (playingSound != null && playingSound.getResourceDomain().equals("minecraft") && (playingSound.getResourcePath().equals("music.game") || playingSound.getResourcePath().equals("music.game.creative"))) {
|
||||
if (FMLClientHandler.instance().getClient().thePlayer.worldObj.provider.dimensionId == mod_pocketDim.properties.LimboDimensionID) {
|
||||
ResourceLocation sound = new ResourceLocation(mod_pocketDim.modid + ":creepy");
|
||||
if (FMLClientHandler.instance().getClient().thePlayer.worldObj.provider.dimensionId == DimDoors.properties.LimboDimensionID) {
|
||||
ResourceLocation sound = new ResourceLocation(DimDoors.modid + ":creepy");
|
||||
|
||||
if (!Minecraft.getMinecraft().getSoundHandler().isSoundPlaying(limboMusic)) {
|
||||
event.result = limboMusic;
|
||||
|
@ -45,7 +45,7 @@ public class ClientOnlyHooks {
|
|||
|
||||
@SubscribeEvent
|
||||
public void onWorldLoad(WorldEvent.Load event) {
|
||||
if (event.world.provider.dimensionId == mod_pocketDim.properties.LimboDimensionID &&
|
||||
if (event.world.provider.dimensionId == DimDoors.properties.LimboDimensionID &&
|
||||
event.world.isRemote && !Minecraft.getMinecraft().getSoundHandler().isSoundPlaying(limboMusic)) {
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound(limboMusic);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.nio.FloatBuffer;
|
|||
import java.util.Random;
|
||||
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.tileentities.TileEntityDimDoor;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
@ -29,11 +29,11 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
public class RenderDimDoor extends TileEntitySpecialRenderer
|
||||
{
|
||||
private FloatBuffer buffer = GLAllocation.createDirectFloatBuffer(16);
|
||||
private ResourceLocation warpPath= new ResourceLocation(mod_pocketDim.modid + ":textures/other/WARP.png");
|
||||
private ResourceLocation keyPath= new ResourceLocation(mod_pocketDim.modid + ":textures/other/keyhole.png");
|
||||
private ResourceLocation KeyholeLight= new ResourceLocation(mod_pocketDim.modid + ":textures/other/keyholeLight.png");
|
||||
private ResourceLocation keyOutline= new ResourceLocation(mod_pocketDim.modid + ":textures/other/keyOutline.png");
|
||||
private ResourceLocation keyOutlineLight= new ResourceLocation(mod_pocketDim.modid + ":textures/other/keyOutlineLight.png");
|
||||
private ResourceLocation warpPath= new ResourceLocation(DimDoors.modid + ":textures/other/WARP.png");
|
||||
private ResourceLocation keyPath= new ResourceLocation(DimDoors.modid + ":textures/other/keyhole.png");
|
||||
private ResourceLocation KeyholeLight= new ResourceLocation(DimDoors.modid + ":textures/other/keyholeLight.png");
|
||||
private ResourceLocation keyOutline= new ResourceLocation(DimDoors.modid + ":textures/other/keyOutline.png");
|
||||
private ResourceLocation keyOutlineLight= new ResourceLocation(DimDoors.modid + ":textures/other/keyOutlineLight.png");
|
||||
|
||||
|
||||
private static final int NETHER_DIMENSION_ID = -1;
|
||||
|
@ -332,7 +332,7 @@ public class RenderDimDoor extends TileEntitySpecialRenderer
|
|||
TileEntityDimDoor tile = (TileEntityDimDoor) par1TileEntity;
|
||||
try
|
||||
{
|
||||
mod_pocketDim.dimensionalDoor.updateAttachedTile(tile.getWorldObj(),
|
||||
DimDoors.dimensionalDoor.updateAttachedTile(tile.getWorldObj(),
|
||||
tile.xCoord, tile.yCoord, tile.zCoord);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.zixiken.dimdoors.client;
|
||||
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.ticking.MobMonolith;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
|
@ -124,6 +124,6 @@ public class RenderMobObelisk extends RenderLiving
|
|||
protected ResourceLocation getEntityTexture(Entity entity)
|
||||
{
|
||||
MobMonolith monolith = (MobMonolith) entity;
|
||||
return new ResourceLocation(mod_pocketDim.modid + ":textures/mobs/oldMonolith/Monolith" + monolith.getTextureState() + ".png");
|
||||
return new ResourceLocation(DimDoors.modid + ":textures/mobs/oldMonolith/Monolith" + monolith.getTextureState() + ".png");
|
||||
}
|
||||
}
|
|
@ -3,9 +3,9 @@ package com.zixiken.dimdoors.client;
|
|||
import java.nio.FloatBuffer;
|
||||
import java.util.Random;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.blocks.TransTrapdoor;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.tileentities.TileEntityTransTrapdoor;
|
||||
import net.minecraft.block.BlockTrapDoor;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -24,8 +24,8 @@ public class RenderTransTrapdoor extends TileEntitySpecialRenderer
|
|||
{
|
||||
private FloatBuffer field_76908_a = GLAllocation.createDirectFloatBuffer(16);
|
||||
private static DDProperties properties = null;
|
||||
private ResourceLocation riftPath= new ResourceLocation(mod_pocketDim.modid+":textures/other/RIFT.png");
|
||||
private ResourceLocation warpPath= new ResourceLocation(mod_pocketDim.modid+":textures/other/WARP.png");
|
||||
private ResourceLocation riftPath= new ResourceLocation(DimDoors.modid+":textures/other/RIFT.png");
|
||||
private ResourceLocation warpPath= new ResourceLocation(DimDoors.modid+":textures/other/WARP.png");
|
||||
|
||||
|
||||
public RenderTransTrapdoor()
|
||||
|
|
|
@ -2,12 +2,12 @@ package com.zixiken.dimdoors.commands;
|
|||
|
||||
import java.util.Collection;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.core.DimLink;
|
||||
import com.zixiken.dimdoors.core.LinkType;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.dungeon.DungeonData;
|
||||
import com.zixiken.dimdoors.helpers.DungeonHelper;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.world.PocketBuilder;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
@ -64,10 +64,10 @@ public class CommandCreateDungeonRift extends DDCommandBase
|
|||
dimension = PocketManager.getDimensionData(sender.worldObj);
|
||||
link = dimension.createLink(x, y + 1, z, LinkType.DUNGEON, orientation);
|
||||
|
||||
if (PocketBuilder.generateSelectedDungeonPocket(link, mod_pocketDim.properties, result))
|
||||
if (PocketBuilder.generateSelectedDungeonPocket(link, DimDoors.properties, result))
|
||||
{
|
||||
// Create a rift to our selected dungeon and notify the player
|
||||
sender.worldObj.setBlock(x, y + 1, z, mod_pocketDim.blockRift, 0, 3);
|
||||
sender.worldObj.setBlock(x, y + 1, z, DimDoors.blockRift, 0, 3);
|
||||
sendChat(sender, "Created a rift to \"" + result.schematicName() + "\" dungeon (Dimension ID = " + link.destination().getDimension() + ").");
|
||||
}
|
||||
else
|
||||
|
|
|
@ -4,12 +4,12 @@ import java.util.ArrayList;
|
|||
import java.util.Collection;
|
||||
import java.util.Random;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.core.DimLink;
|
||||
import com.zixiken.dimdoors.core.LinkType;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.dungeon.DungeonData;
|
||||
import com.zixiken.dimdoors.helpers.DungeonHelper;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.world.PocketBuilder;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
@ -56,7 +56,7 @@ public class CommandCreateRandomRift extends DDCommandBase
|
|||
dimension = PocketManager.getDimensionData(sender.worldObj);
|
||||
link = dimension.createLink(x, y + 1, z, LinkType.DUNGEON, orientation);
|
||||
|
||||
sender.worldObj.setBlock(x, y + 1, z, mod_pocketDim.blockRift, 0, 3);
|
||||
sender.worldObj.setBlock(x, y + 1, z, DimDoors.blockRift, 0, 3);
|
||||
sendChat(sender, "Created a rift to a random dungeon.");
|
||||
}
|
||||
else
|
||||
|
@ -73,10 +73,10 @@ public class CommandCreateRandomRift extends DDCommandBase
|
|||
dimension = PocketManager.getDimensionData(sender.worldObj);
|
||||
link = dimension.createLink(x, y + 1, z, LinkType.DUNGEON, orientation);
|
||||
|
||||
if (PocketBuilder.generateSelectedDungeonPocket(link, mod_pocketDim.properties, result))
|
||||
if (PocketBuilder.generateSelectedDungeonPocket(link, DimDoors.properties, result))
|
||||
{
|
||||
// Create a rift to our selected dungeon and notify the player
|
||||
sender.worldObj.setBlock(x, y + 1, z, mod_pocketDim.blockRift, 0, 3);
|
||||
sender.worldObj.setBlock(x, y + 1, z, DimDoors.blockRift, 0, 3);
|
||||
sendChat(sender, "Created a rift to \"" + result.schematicName() + "\" dungeon (Dimension ID = " + link.destination().getDimension() + ").");
|
||||
}
|
||||
else
|
||||
|
|
|
@ -2,8 +2,8 @@ package com.zixiken.dimdoors.commands;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.core.DimLink;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import com.zixiken.dimdoors.core.NewDimData;
|
||||
|
@ -71,14 +71,14 @@ public class CommandDeleteRifts extends DDCommandBase
|
|||
x = location.getX();
|
||||
y = location.getY();
|
||||
z = location.getZ();
|
||||
if (world.getBlock(x, y, z) == mod_pocketDim.blockRift)
|
||||
if (world.getBlock(x, y, z) == DimDoors.blockRift)
|
||||
{
|
||||
// Remove the rift and its link
|
||||
world.setBlockToAir(x, y, z);
|
||||
dimension.deleteLink(link);
|
||||
linksRemoved++;
|
||||
}
|
||||
else if (!mod_pocketDim.blockRift.isBlockImmune(world, x, y, z))
|
||||
else if (!DimDoors.blockRift.isBlockImmune(world, x, y, z))
|
||||
{
|
||||
// If a block is not immune, then it must not be a DD block.
|
||||
// The link would regenerate into a rift eventually.
|
||||
|
|
|
@ -9,7 +9,7 @@ import com.zixiken.dimdoors.blocks.BaseDimDoor;
|
|||
import com.zixiken.dimdoors.blocks.IDimDoor;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.helpers.yCoordHelper;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.schematic.BlockRotator;
|
||||
import com.zixiken.dimdoors.tileentities.TileEntityDimDoor;
|
||||
import com.zixiken.dimdoors.util.Point4D;
|
||||
|
@ -756,7 +756,7 @@ public class DDTeleporter
|
|||
// exits intersecting blocks on those two surfaces.
|
||||
if (!world.isBlockNormalCubeDefault(x + dx, y, z + dz, false))
|
||||
{
|
||||
world.setBlock(x + dx, y, z + dz, mod_pocketDim.blockDimWall, 0, 2);
|
||||
world.setBlock(x + dx, y, z + dz, DimDoors.blockDimWall, 0, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -783,8 +783,8 @@ public class DDTeleporter
|
|||
sourceDim.setLinkDestination(reverse, source.getX(), source.getY(), source.getZ());
|
||||
|
||||
// Set up the warp door at the destination
|
||||
orientation = BlockRotator.transformMetadata(orientation, 2, mod_pocketDim.warpDoor);
|
||||
ItemDoor.placeDoorBlock(world, x, y + 1, z, orientation, mod_pocketDim.warpDoor);
|
||||
orientation = BlockRotator.transformMetadata(orientation, 2, DimDoors.warpDoor);
|
||||
ItemDoor.placeDoorBlock(world, x, y + 1, z, orientation, DimDoors.warpDoor);
|
||||
|
||||
// Complete the link to the destination
|
||||
// This comes last so the destination isn't set unless everything else works first
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.Random;
|
|||
import java.util.Stack;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.watcher.ClientLinkData;
|
||||
import com.zixiken.dimdoors.Point3D;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
|
@ -251,7 +251,7 @@ public abstract class NewDimData implements IPackable<PackedDimData>
|
|||
for (k = -range; k <= range; k++)
|
||||
{
|
||||
distance = getAbsoluteSum(i, j, k);
|
||||
if (distance > 0 && distance < minDistance && world.getBlock(x + i, y + j, z + k) == mod_pocketDim.blockRift)
|
||||
if (distance > 0 && distance < minDistance && world.getBlock(x + i, y + j, z + k) == DimDoors.blockRift)
|
||||
{
|
||||
link = getLink(x + i, y + j, z + k);
|
||||
if (link != null)
|
||||
|
@ -290,7 +290,7 @@ public abstract class NewDimData implements IPackable<PackedDimData>
|
|||
for (k = -range; k <= range; k++)
|
||||
{
|
||||
distance = getAbsoluteSum(i, j, k);
|
||||
if (distance > 0 && world.getBlock(x + i, y + j, z + k) == mod_pocketDim.blockRift)
|
||||
if (distance > 0 && world.getBlock(x + i, y + j, z + k) == DimDoors.blockRift)
|
||||
{
|
||||
link = getLink(x + i, y + j, z + k);
|
||||
if (link != null)
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.watcher.IUpdateWatcher;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -572,9 +572,9 @@ public class PocketManager
|
|||
// unfortuantly. I send the dimdata to the client when they
|
||||
// teleport.
|
||||
// Steven
|
||||
int providerID = mod_pocketDim.properties.PocketProviderID;
|
||||
int providerID = DimDoors.properties.PocketProviderID;
|
||||
if (type == DimensionType.PERSONAL)
|
||||
providerID = mod_pocketDim.properties.PersonalPocketProviderID;
|
||||
providerID = DimDoors.properties.PersonalPocketProviderID;
|
||||
DimensionManager.registerDimension(dimensionID,providerID);
|
||||
}
|
||||
return dimension;
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.io.InputStream;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.Point3D;
|
||||
import com.zixiken.dimdoors.blocks.IDimDoor;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
|
@ -48,11 +48,11 @@ public class DungeonSchematic extends Schematic {
|
|||
{
|
||||
super(source);
|
||||
modBlockFilterExceptions = new ArrayList<Block>(5);
|
||||
modBlockFilterExceptions.add(mod_pocketDim.blockDimWall);
|
||||
modBlockFilterExceptions.add(mod_pocketDim.blockDimWallPerm);
|
||||
modBlockFilterExceptions.add(mod_pocketDim.warpDoor);
|
||||
modBlockFilterExceptions.add(mod_pocketDim.dimensionalDoor);
|
||||
modBlockFilterExceptions.add(mod_pocketDim.transientDoor);
|
||||
modBlockFilterExceptions.add(DimDoors.blockDimWall);
|
||||
modBlockFilterExceptions.add(DimDoors.blockDimWallPerm);
|
||||
modBlockFilterExceptions.add(DimDoors.warpDoor);
|
||||
modBlockFilterExceptions.add(DimDoors.dimensionalDoor);
|
||||
modBlockFilterExceptions.add(DimDoors.transientDoor);
|
||||
}
|
||||
|
||||
public int getOrientation()
|
||||
|
@ -97,7 +97,7 @@ public class DungeonSchematic extends Schematic {
|
|||
public void applyImportFilters(DDProperties properties)
|
||||
{
|
||||
//Search for special blocks (warp doors, dim doors, and end portal frames that mark Monolith spawn points)
|
||||
SpecialBlockFinder finder = new SpecialBlockFinder(mod_pocketDim.warpDoor, mod_pocketDim.dimensionalDoor,
|
||||
SpecialBlockFinder finder = new SpecialBlockFinder(DimDoors.warpDoor, DimDoors.dimensionalDoor,
|
||||
Blocks.end_portal_frame, Blocks.sandstone);
|
||||
applyFilter(finder);
|
||||
|
||||
|
@ -112,7 +112,7 @@ public class DungeonSchematic extends Schematic {
|
|||
//Filter out mod blocks except some of our own
|
||||
CompoundFilter standardizer = new CompoundFilter();
|
||||
standardizer.addFilter(new ModBlockFilter(modBlockFilterExceptions,
|
||||
mod_pocketDim.blockDimWall, (byte) 0));
|
||||
DimDoors.blockDimWall, (byte) 0));
|
||||
|
||||
//Also convert standard DD block IDs to local versions
|
||||
applyFilter(standardizer);
|
||||
|
@ -127,7 +127,7 @@ public class DungeonSchematic extends Schematic {
|
|||
//Filter out mod blocks except some of our own
|
||||
//This comes after ID standardization because the mod block filter relies on standardized IDs
|
||||
standardizer.addFilter(new ModBlockFilter(modBlockFilterExceptions,
|
||||
mod_pocketDim.blockDimWall, (byte) 0));
|
||||
DimDoors.blockDimWall, (byte) 0));
|
||||
|
||||
applyFilter(standardizer);
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@ package com.zixiken.dimdoors.helpers;
|
|||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.world.PocketBuilder;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.ChunkCoordIntPair;
|
||||
|
@ -32,7 +32,7 @@ public class ChunkLoaderHelper implements LoadingCallback
|
|||
int y = ticket.getModData().getInteger("goldDimDoorY");
|
||||
int z = ticket.getModData().getInteger("goldDimDoorZ");
|
||||
|
||||
if (world.getBlock(x, y, z) == mod_pocketDim.goldenDimensionalDoor)
|
||||
if (world.getBlock(x, y, z) == DimDoors.goldenDimensionalDoor)
|
||||
{
|
||||
IChunkLoader loader = (IChunkLoader) world.getTileEntity(x, y, z);
|
||||
if (!loader.isInitialized())
|
||||
|
@ -51,7 +51,7 @@ public class ChunkLoaderHelper implements LoadingCallback
|
|||
public static Ticket createTicket(int x, int y, int z, World world)
|
||||
{
|
||||
NBTTagCompound data;
|
||||
Ticket ticket = ForgeChunkManager.requestTicket(mod_pocketDim.instance, world, Type.NORMAL);
|
||||
Ticket ticket = ForgeChunkManager.requestTicket(DimDoors.instance, world, Type.NORMAL);
|
||||
if (ticket != null)
|
||||
{
|
||||
data = ticket.getModData();
|
||||
|
|
|
@ -17,6 +17,7 @@ import java.util.Queue;
|
|||
import java.util.Random;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.core.DimLink;
|
||||
import com.zixiken.dimdoors.core.LinkType;
|
||||
|
@ -26,7 +27,6 @@ import com.zixiken.dimdoors.dungeon.pack.DungeonPack;
|
|||
import com.zixiken.dimdoors.dungeon.pack.DungeonPackConfig;
|
||||
import com.zixiken.dimdoors.dungeon.pack.DungeonPackConfigReader;
|
||||
import com.zixiken.dimdoors.items.ItemDimensionalDoor;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import net.minecraft.util.WeightedRandom;
|
||||
import net.minecraft.world.World;
|
||||
import com.zixiken.dimdoors.core.NewDimData;
|
||||
|
@ -267,7 +267,7 @@ public class DungeonHelper
|
|||
DimLink link = dimension.createLink(x, y + 1, z, LinkType.POCKET, 3);
|
||||
|
||||
//Place a Warp Door linked to that pocket
|
||||
ItemDimensionalDoor.placeDoorBlock(world, x, y, z, 3, mod_pocketDim.warpDoor);
|
||||
ItemDimensionalDoor.placeDoorBlock(world, x, y, z, 3, DimDoors.warpDoor);
|
||||
|
||||
return link;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.io.FileOutputStream;
|
|||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
|
||||
public class copyfile
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ public class copyfile
|
|||
//Note: For this to work properly, you must use getClass() on an instance of the class,
|
||||
//not on the value obtained from .class. That was what caused this code to fail before.
|
||||
//SchematicLoader didn't have this problem because we used instances of it.
|
||||
InputStream in = mod_pocketDim.instance.getClass().getResourceAsStream(ori);
|
||||
InputStream in = DimDoors.instance.getClass().getResourceAsStream(ori);
|
||||
OutputStream out = new FileOutputStream(dest);
|
||||
byte[] buf = new byte[1024];
|
||||
int len;
|
||||
|
|
|
@ -3,13 +3,12 @@ package com.zixiken.dimdoors.items;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.blocks.BaseDimDoor;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.core.DimLink;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
|
@ -35,7 +34,7 @@ public abstract class BaseItemDoor extends ItemDoor {
|
|||
public BaseItemDoor(Block block, ItemDoor vanillaDoor) {
|
||||
super(block);
|
||||
this.setMaxStackSize(64);
|
||||
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||
this.setCreativeTab(DimDoors.dimDoorsCreativeTab);
|
||||
if (properties == null)
|
||||
properties = DDProperties.instance();
|
||||
|
||||
|
@ -49,7 +48,7 @@ public abstract class BaseItemDoor extends ItemDoor {
|
|||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||
this.itemIcon = par1IconRegister.registerIcon(DimDoors.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes" })
|
||||
|
@ -175,7 +174,7 @@ public abstract class BaseItemDoor extends ItemDoor {
|
|||
MovingObjectPosition hit = BaseItemDoor.doRayTrace(player.worldObj, player, true);
|
||||
if (hit != null)
|
||||
{
|
||||
if (world.getBlock(hit.blockX, hit.blockY, hit.blockZ) == mod_pocketDim.blockRift)
|
||||
if (world.getBlock(hit.blockX, hit.blockY, hit.blockZ) == DimDoors.blockRift)
|
||||
{
|
||||
DimLink link = PocketManager.getLink(hit.blockX, hit.blockY, hit.blockZ, world.provider.dimensionId);
|
||||
if (link != null)
|
||||
|
@ -211,7 +210,7 @@ public abstract class BaseItemDoor extends ItemDoor {
|
|||
{
|
||||
Block block = world.getBlock(x, y, z);
|
||||
|
||||
return (block == mod_pocketDim.blockRift || block.isAir(world, x, y, z) || block.getMaterial().isReplaceable());
|
||||
return (block == DimDoors.blockRift || block.isAir(world, x, y, z) || block.getMaterial().isReplaceable());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.zixiken.dimdoors.items;
|
||||
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
|
@ -13,13 +13,13 @@ public class ItemBlockDimWall extends ItemBlock
|
|||
public ItemBlockDimWall(Block block)
|
||||
{
|
||||
super(block);
|
||||
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||
this.setCreativeTab(DimDoors.dimDoorsCreativeTab);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().replace("tile.", ""));
|
||||
this.itemIcon = par1IconRegister.registerIcon(DimDoors.modid + ":" + this.getUnlocalizedName().replace("tile.", ""));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -2,11 +2,11 @@ package com.zixiken.dimdoors.items;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.blocks.IDimDoor;
|
||||
import com.zixiken.dimdoors.core.DDLock;
|
||||
import com.zixiken.dimdoors.core.DimLink;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -26,7 +26,7 @@ public class ItemDDKey extends Item {
|
|||
|
||||
public ItemDDKey() {
|
||||
super();
|
||||
setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||
setCreativeTab(DimDoors.dimDoorsCreativeTab);
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(ID);
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ public class ItemDDKey extends Item {
|
|||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||
this.itemIcon = par1IconRegister.registerIcon(DimDoors.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -102,11 +102,11 @@ public class ItemDDKey extends Item {
|
|||
{
|
||||
if (link.getLockState())
|
||||
{
|
||||
world.playSoundAtEntity(player, mod_pocketDim.modid + ":keyUnlock", 1F, 1F);
|
||||
world.playSoundAtEntity(player, DimDoors.modid + ":keyUnlock", 1F, 1F);
|
||||
}
|
||||
else
|
||||
{
|
||||
world.playSoundAtEntity(player, mod_pocketDim.modid + ":keyLock", 1F, 1F);
|
||||
world.playSoundAtEntity(player, DimDoors.modid + ":keyLock", 1F, 1F);
|
||||
}
|
||||
PocketManager.getDimensionData(world).lock(link, !link.getLockState());
|
||||
PocketManager.getLinkWatcher().update(new ClientLinkData(link));
|
||||
|
@ -114,14 +114,14 @@ public class ItemDDKey extends Item {
|
|||
}
|
||||
else
|
||||
{
|
||||
world.playSoundAtEntity(player, mod_pocketDim.modid + ":doorLocked", 1F, 1F);
|
||||
world.playSoundAtEntity(player, DimDoors.modid + ":doorLocked", 1F, 1F);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!DDLock.hasCreatedLock(itemStack))
|
||||
{
|
||||
world.playSoundAtEntity(player, mod_pocketDim.modid + ":keyLock", 1F, 1F);
|
||||
world.playSoundAtEntity(player, DimDoors.modid + ":keyLock", 1F, 1F);
|
||||
PocketManager.getDimensionData(world).createLock(link, itemStack, world.rand.nextInt(Integer.MAX_VALUE));
|
||||
PocketManager.getLinkWatcher().update(new ClientLinkData(link));
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ public class ItemDDKey extends Item {
|
|||
if (link.doesKeyUnlock(itemStack) && !world.isRemote)
|
||||
{
|
||||
PocketManager.getDimensionData(world).removeLock(link, itemStack);
|
||||
world.playSoundAtEntity(player, mod_pocketDim.modid + ":doorLockRemoved", 1F, 1F);
|
||||
world.playSoundAtEntity(player, DimDoors.modid + ":doorLockRemoved", 1F, 1F);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,30 +2,32 @@ package com.zixiken.dimdoors.items;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.blocks.BaseDimDoor;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemDoor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemDimensionalDoor extends BaseItemDoor
|
||||
{
|
||||
public ItemDimensionalDoor(Material material, ItemDoor door)
|
||||
{
|
||||
super(material, door);
|
||||
public class ItemDimensionalDoor extends BaseItemDoor {
|
||||
public static final String ID = "itemDimDoor";
|
||||
|
||||
public ItemDimensionalDoor() {
|
||||
super(DimDoors.dimensionalDoor, (ItemDoor)Items.iron_door);
|
||||
setUnlocalizedName(ID);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
mod_pocketDim.translateAndAdd("info.dimDoor",par3List);
|
||||
DimDoors.translateAndAdd("info.dimDoor",par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BaseDimDoor getDoorBlock()
|
||||
{
|
||||
return (BaseDimDoor) mod_pocketDim.dimensionalDoor;
|
||||
return (BaseDimDoor) DimDoors.dimensionalDoor;
|
||||
}
|
||||
}
|
|
@ -2,31 +2,31 @@ package com.zixiken.dimdoors.items;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.blocks.BaseDimDoor;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemDoor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemGoldDimDoor extends BaseItemDoor
|
||||
{
|
||||
public class ItemGoldDimDoor extends BaseItemDoor {
|
||||
public static final String ID = "itemGoldDimDoor";
|
||||
|
||||
public ItemGoldDimDoor(Material material, ItemDoor door)
|
||||
{
|
||||
super(material, door);
|
||||
public ItemGoldDimDoor() {
|
||||
super(DimDoors.goldenDimensionalDoor, DimDoors.itemGoldenDoor);
|
||||
setUnlocalizedName(ID);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
mod_pocketDim.translateAndAdd("info.goldDimDoor", par3List);
|
||||
DimDoors.translateAndAdd("info.goldDimDoor", par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BaseDimDoor getDoorBlock()
|
||||
{
|
||||
return (BaseDimDoor) mod_pocketDim.goldenDimensionalDoor;
|
||||
return (BaseDimDoor) DimDoors.goldenDimensionalDoor;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.zixiken.dimdoors.items;
|
||||
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -10,18 +10,19 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemGoldDoor extends ItemDoor
|
||||
{
|
||||
public ItemGoldDoor(Material par2Material)
|
||||
{
|
||||
super(par2Material);
|
||||
this.setMaxStackSize(16);
|
||||
public class ItemGoldDoor extends ItemDoor {
|
||||
public static final String ID = "itemGoldDoor";
|
||||
|
||||
public ItemGoldDoor() {
|
||||
super(DimDoors.goldenDoor);
|
||||
setMaxStackSize(16);
|
||||
setUnlocalizedName(ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||
this.itemIcon = par1IconRegister.registerIcon(DimDoors.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -34,7 +35,7 @@ public class ItemGoldDoor extends ItemDoor
|
|||
else
|
||||
{
|
||||
++par5;
|
||||
Block block = mod_pocketDim.goldenDoor;
|
||||
Block block = DimDoors.goldenDoor;
|
||||
|
||||
if (par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack) && par2EntityPlayer.canPlayerEdit(par4, par5 + 1, par6, par7, par1ItemStack))
|
||||
{
|
||||
|
|
|
@ -2,19 +2,16 @@ package com.zixiken.dimdoors.items;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.blocks.BaseDimDoor;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemDoor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemPersonalDoor extends BaseItemDoor {
|
||||
public static final String ID = "itemQuartzDimDoor";
|
||||
|
||||
public ItemPersonalDoor() {
|
||||
super(mod_pocketDim.personalDimDoor, mod_pocketDim.itemQuartzDoor);
|
||||
super(DimDoors.personalDimDoor, DimDoors.itemQuartzDoor);
|
||||
setUnlocalizedName(ID);
|
||||
}
|
||||
|
||||
|
@ -22,12 +19,12 @@ public class ItemPersonalDoor extends BaseItemDoor {
|
|||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
mod_pocketDim.translateAndAdd("info.personalDimDoor", par3List);
|
||||
DimDoors.translateAndAdd("info.personalDimDoor", par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BaseDimDoor getDoorBlock()
|
||||
{
|
||||
return (BaseDimDoor) mod_pocketDim.personalDimDoor;
|
||||
return (BaseDimDoor) DimDoors.personalDimDoor;
|
||||
}
|
||||
}
|
|
@ -1,12 +1,9 @@
|
|||
package com.zixiken.dimdoors.items;
|
||||
|
||||
import com.zixiken.dimdoors.blocks.BlockDoorQuartz;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemDoor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
@ -16,14 +13,14 @@ public class ItemQuartzDoor extends ItemDoor {
|
|||
public static final String ID = "itemQuartzDoor";
|
||||
|
||||
public ItemQuartzDoor() {
|
||||
super(mod_pocketDim.quartzDoor);
|
||||
super(DimDoors.quartzDoor);
|
||||
setUnlocalizedName(ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||
this.itemIcon = par1IconRegister.registerIcon(DimDoors.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -36,7 +33,7 @@ public class ItemQuartzDoor extends ItemDoor {
|
|||
else
|
||||
{
|
||||
++par5;
|
||||
Block block = mod_pocketDim.quartzDoor;
|
||||
Block block = DimDoors.quartzDoor;
|
||||
|
||||
if (par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack) && par2EntityPlayer.canPlayerEdit(par4, par5 + 1, par6, par7, par1ItemStack))
|
||||
{
|
||||
|
|
|
@ -2,9 +2,9 @@ package com.zixiken.dimdoors.items;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
|
@ -20,16 +20,13 @@ import net.minecraft.world.World;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemRiftBlade extends ItemSword
|
||||
{
|
||||
private final DDProperties properties;
|
||||
public class ItemRiftBlade extends ItemSword {
|
||||
public static final String ID = "itemRiftBlade";
|
||||
|
||||
public ItemRiftBlade(DDProperties properties)
|
||||
{
|
||||
public ItemRiftBlade() {
|
||||
super(ToolMaterial.EMERALD);
|
||||
|
||||
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||
this.properties = properties;
|
||||
setCreativeTab(DimDoors.dimDoorsCreativeTab);
|
||||
setUnlocalizedName(ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -125,7 +122,7 @@ public class ItemRiftBlade extends ItemSword
|
|||
int x = hit.blockX;
|
||||
int y = hit.blockY;
|
||||
int z = hit.blockZ;
|
||||
if (world.getBlock(x, y, z) == mod_pocketDim.blockRift)
|
||||
if (world.getBlock(x, y, z) == DimDoors.blockRift)
|
||||
{
|
||||
if (PocketManager.getLink(x, y, z, world) != null)
|
||||
{
|
||||
|
@ -137,8 +134,8 @@ public class ItemRiftBlade extends ItemSword
|
|||
if (BaseItemDoor.canPlace(world, x, y, z) &&
|
||||
BaseItemDoor.canPlace(world, x, y - 1, z))
|
||||
{
|
||||
ItemDimensionalDoor.placeDoorBlock(world, x, y - 1, z, orientation, mod_pocketDim.transientDoor);
|
||||
player.worldObj.playSoundAtEntity(player,mod_pocketDim.modid+":riftDoor", 0.6f, 1);
|
||||
ItemDimensionalDoor.placeDoorBlock(world, x, y - 1, z, orientation, DimDoors.transientDoor);
|
||||
player.worldObj.playSoundAtEntity(player, DimDoors.modid+":riftDoor", 0.6f, 1);
|
||||
stack.damageItem(3, player);
|
||||
return stack;
|
||||
}
|
||||
|
@ -155,7 +152,7 @@ public class ItemRiftBlade extends ItemSword
|
|||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||
this.itemIcon = par1IconRegister.registerIcon(DimDoors.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -166,7 +163,7 @@ public class ItemRiftBlade extends ItemSword
|
|||
{
|
||||
//Don't include a call to super.getIsRepairable()!
|
||||
//That would cause this sword to accept diamonds as a repair material (since we set material = Diamond).
|
||||
return mod_pocketDim.itemStableFabric == par2ItemStack.getItem() ? true : false;
|
||||
return DimDoors.itemStableFabric == par2ItemStack.getItem() ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -177,6 +174,6 @@ public class ItemRiftBlade extends ItemSword
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
mod_pocketDim.translateAndAdd("info.riftblade", par3List);
|
||||
DimDoors.translateAndAdd("info.riftblade", par3List);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,12 +2,12 @@ package com.zixiken.dimdoors.items;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.blocks.BaseDimDoor;
|
||||
import com.zixiken.dimdoors.core.DimLink;
|
||||
import com.zixiken.dimdoors.core.LinkType;
|
||||
import com.zixiken.dimdoors.core.NewDimData;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.util.Point4D;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -22,15 +22,16 @@ import net.minecraftforge.common.DimensionManager;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemRiftSignature extends Item
|
||||
{
|
||||
public ItemRiftSignature()
|
||||
{
|
||||
public class ItemRiftSignature extends Item {
|
||||
public static final String ID = "itemRiftSignature";
|
||||
|
||||
public ItemRiftSignature() {
|
||||
super();
|
||||
this.setMaxStackSize(1);
|
||||
this.setMaxDamage(0);
|
||||
this.hasSubtypes = true;
|
||||
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||
setMaxStackSize(1);
|
||||
setMaxDamage(0);
|
||||
hasSubtypes = true;
|
||||
setCreativeTab(DimDoors.dimDoorsCreativeTab);
|
||||
setUnlocalizedName(ID);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
@ -44,7 +45,7 @@ public class ItemRiftSignature extends Item
|
|||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||
this.itemIcon = par1IconRegister.registerIcon(DimDoors.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -84,27 +85,27 @@ public class ItemRiftSignature extends Item
|
|||
sourceDimension.setLinkDestination(reverse, source.getX(), source.getY(), source.getZ());
|
||||
|
||||
// Try placing a rift at the destination point
|
||||
mod_pocketDim.blockRift.tryPlacingRift(world, x, adjustedY, z);
|
||||
DimDoors.blockRift.tryPlacingRift(world, x, adjustedY, z);
|
||||
|
||||
// Try placing a rift at the source point
|
||||
// We don't need to check if sourceWorld is null - that's already handled.
|
||||
World sourceWorld = DimensionManager.getWorld(sourceDimension.id());
|
||||
mod_pocketDim.blockRift.tryPlacingRift(sourceWorld, source.getX(), source.getY(), source.getZ());
|
||||
DimDoors.blockRift.tryPlacingRift(sourceWorld, source.getX(), source.getY(), source.getZ());
|
||||
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
{
|
||||
stack.stackSize--;
|
||||
}
|
||||
clearSource(stack);
|
||||
mod_pocketDim.sendChat(player, "Rift Created");
|
||||
world.playSoundAtEntity(player, mod_pocketDim.modid + ":riftEnd", 0.6f, 1);
|
||||
DimDoors.sendChat(player, "Rift Created");
|
||||
world.playSoundAtEntity(player, DimDoors.modid + ":riftEnd", 0.6f, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
//The link signature has not been used. Store its current target as the first location.
|
||||
setSource(stack, x, adjustedY, z, orientation, PocketManager.createDimensionData(world));
|
||||
mod_pocketDim.sendChat(player,("Location Stored in Rift Signature"));
|
||||
world.playSoundAtEntity(player,mod_pocketDim.modid+":riftStart", 0.6f, 1);
|
||||
DimDoors.sendChat(player,("Location Stored in Rift Signature"));
|
||||
world.playSoundAtEntity(player, DimDoors.modid+":riftStart", 0.6f, 1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -124,7 +125,7 @@ public class ItemRiftSignature extends Item
|
|||
}
|
||||
else
|
||||
{
|
||||
mod_pocketDim.translateAndAdd("info.riftSignature.unbound", par3List);
|
||||
DimDoors.translateAndAdd("info.riftSignature.unbound", par3List);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@ package com.zixiken.dimdoors.items;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.core.DimLink;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
|
@ -18,17 +18,18 @@ import com.zixiken.dimdoors.core.NewDimData;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemStabilizedRiftSignature extends ItemRiftSignature
|
||||
{
|
||||
public ItemStabilizedRiftSignature()
|
||||
{
|
||||
public class ItemStabilizedRiftSignature extends ItemRiftSignature {
|
||||
public static final String ID = "itemStableRiftSignature";
|
||||
|
||||
public ItemStabilizedRiftSignature() {
|
||||
super();
|
||||
setUnlocalizedName(ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||
this.itemIcon = par1IconRegister.registerIcon(DimDoors.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -78,7 +79,7 @@ public class ItemStabilizedRiftSignature extends ItemRiftSignature
|
|||
if (!player.capabilities.isCreativeMode &&
|
||||
!player.inventory.consumeInventoryItem(Items.ender_pearl))
|
||||
{
|
||||
mod_pocketDim.sendChat(player, "You don't have any Ender Pearls!");
|
||||
DimDoors.sendChat(player, "You don't have any Ender Pearls!");
|
||||
// I won't do this, but this is the chance to localize chat
|
||||
// messages sent to the player; look at ChatMessageComponent
|
||||
// and how MFR does it with items like the safari net launcher
|
||||
|
@ -92,22 +93,22 @@ public class ItemStabilizedRiftSignature extends ItemRiftSignature
|
|||
sourceDimension.setLinkDestination(reverse, source.getX(), source.getY(), source.getZ());
|
||||
|
||||
// Try placing a rift at the destination point
|
||||
mod_pocketDim.blockRift.tryPlacingRift(world, x, adjustedY, z);
|
||||
DimDoors.blockRift.tryPlacingRift(world, x, adjustedY, z);
|
||||
}
|
||||
|
||||
// Try placing a rift at the source point
|
||||
// We don't need to check if sourceWorld is null - that's already handled.
|
||||
World sourceWorld = DimensionManager.getWorld(sourceDimension.id());
|
||||
|
||||
mod_pocketDim.blockRift.tryPlacingRift(sourceWorld, source.getX(), source.getY(), source.getZ());
|
||||
mod_pocketDim.sendChat(player, "Rift Created");
|
||||
DimDoors.blockRift.tryPlacingRift(sourceWorld, source.getX(), source.getY(), source.getZ());
|
||||
DimDoors.sendChat(player, "Rift Created");
|
||||
world.playSoundAtEntity(player, "mods.DimDoors.sfx.riftEnd", 0.6f, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
// The link signature has not been used. Store its current target as the first location.
|
||||
setSource(stack, x, adjustedY, z, orientation, PocketManager.createDimensionData(world));
|
||||
mod_pocketDim.sendChat(player, "Location Stored in Stabilized Rift Signature");
|
||||
DimDoors.sendChat(player, "Location Stored in Stabilized Rift Signature");
|
||||
world.playSoundAtEntity(player, "mods.DimDoors.sfx.riftStart", 0.6f, 1);
|
||||
}
|
||||
return true;
|
||||
|
@ -148,7 +149,7 @@ public class ItemStabilizedRiftSignature extends ItemRiftSignature
|
|||
// Try placing a rift at the source point
|
||||
// We don't need to check if sourceWorld is null - that's already handled.
|
||||
World sourceWorld = DimensionManager.getWorld(sourceDimension.id());
|
||||
mod_pocketDim.blockRift.tryPlacingRift(sourceWorld, source.getX(), source.getY(), source.getZ());
|
||||
DimDoors.blockRift.tryPlacingRift(sourceWorld, source.getX(), source.getY(), source.getZ());
|
||||
|
||||
// This call doesn't seem to be working...
|
||||
world.playSoundEffect(x + 0.5, adjustedY + 0.5, z + 0.5, "mods.DimDoors.sfx.riftEnd", 0.6f, 1);
|
||||
|
@ -174,7 +175,7 @@ public class ItemStabilizedRiftSignature extends ItemRiftSignature
|
|||
}
|
||||
else
|
||||
{
|
||||
mod_pocketDim.translateAndAdd("info.riftSignature.stable", par3List);
|
||||
DimDoors.translateAndAdd("info.riftSignature.stable", par3List);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
package com.zixiken.dimdoors.items;
|
||||
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class ItemStableFabric extends Item
|
||||
{
|
||||
public ItemStableFabric(int par2)
|
||||
{
|
||||
public class ItemStableFabric extends Item {
|
||||
public static final String ID = "itemStableFabric";
|
||||
|
||||
public ItemStableFabric() {
|
||||
super();
|
||||
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||
setCreativeTab(DimDoors.dimDoorsCreativeTab);
|
||||
setUnlocalizedName(ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||
this.itemIcon = par1IconRegister.registerIcon(DimDoors.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,18 +3,19 @@ package com.zixiken.dimdoors.items;
|
|||
import java.util.List;
|
||||
|
||||
import com.zixiken.dimdoors.blocks.BaseDimDoor;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemDoor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class ItemUnstableDoor extends BaseItemDoor
|
||||
{
|
||||
public ItemUnstableDoor(Material material, ItemDoor door)
|
||||
{
|
||||
super( material, door);
|
||||
public class ItemUnstableDoor extends BaseItemDoor {
|
||||
public static final String ID = "itemChaosDoor";
|
||||
|
||||
public ItemUnstableDoor() {
|
||||
super(DimDoors.unstableDoor, null);
|
||||
setUnlocalizedName(ID);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
|
@ -27,6 +28,6 @@ public class ItemUnstableDoor extends BaseItemDoor
|
|||
@Override
|
||||
protected BaseDimDoor getDoorBlock()
|
||||
{
|
||||
return (BaseDimDoor) mod_pocketDim.unstableDoor;
|
||||
return (BaseDimDoor) DimDoors.unstableDoor;
|
||||
}
|
||||
}
|
|
@ -2,30 +2,32 @@ package com.zixiken.dimdoors.items;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.blocks.BaseDimDoor;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemDoor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemWarpDoor extends BaseItemDoor
|
||||
{
|
||||
public ItemWarpDoor(Material material, ItemDoor door)
|
||||
{
|
||||
super(material, door);
|
||||
public class ItemWarpDoor extends BaseItemDoor {
|
||||
public static final String ID = "itemDimDoorWarp";
|
||||
|
||||
public ItemWarpDoor() {
|
||||
super(DimDoors.warpDoor, (ItemDoor)Items.iron_door);
|
||||
setUnlocalizedName(ID);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
mod_pocketDim.translateAndAdd("info.warpDoor",par3List);
|
||||
DimDoors.translateAndAdd("info.warpDoor",par3List);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BaseDimDoor getDoorBlock()
|
||||
{
|
||||
return (BaseDimDoor) mod_pocketDim.warpDoor;
|
||||
return (BaseDimDoor) DimDoors.warpDoor;
|
||||
}
|
||||
}
|
|
@ -1,20 +1,21 @@
|
|||
package com.zixiken.dimdoors.items;
|
||||
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class ItemWorldThread extends Item
|
||||
{
|
||||
public ItemWorldThread()
|
||||
{
|
||||
public class ItemWorldThread extends Item {
|
||||
public static final String ID = "itemWorldThread";
|
||||
|
||||
public ItemWorldThread() {
|
||||
super();
|
||||
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||
setCreativeTab(DimDoors.dimDoorsCreativeTab);
|
||||
setUnlocalizedName(ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||
this.itemIcon = par1IconRegister.registerIcon(DimDoors.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@ package com.zixiken.dimdoors.items;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.core.DimLink;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.tileentities.TileEntityRift;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -19,20 +19,21 @@ import cpw.mods.fml.client.FMLClientHandler;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class itemRiftRemover extends Item
|
||||
{
|
||||
public itemRiftRemover(Material par2Material)
|
||||
{
|
||||
public class itemRiftRemover extends Item {
|
||||
public static final String ID = "itemRiftRemover";
|
||||
|
||||
public itemRiftRemover() {
|
||||
super();
|
||||
this.setMaxStackSize(1);
|
||||
this.setCreativeTab(mod_pocketDim.dimDoorsCreativeTab);
|
||||
this.setMaxDamage(4);
|
||||
setMaxStackSize(1);
|
||||
setCreativeTab(DimDoors.dimDoorsCreativeTab);
|
||||
setMaxDamage(4);
|
||||
setUnlocalizedName(ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||
this.itemIcon = par1IconRegister.registerIcon(DimDoors.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,7 +57,7 @@ public class itemRiftRemover extends Item
|
|||
int hz = hit.blockZ;
|
||||
NewDimData dimension = PocketManager.createDimensionData(world);
|
||||
DimLink link = dimension.getLink(hx, hy, hz);
|
||||
if (world.getBlock(hx, hy, hz) == mod_pocketDim.blockRift && link != null &&
|
||||
if (world.getBlock(hx, hy, hz) == DimDoors.blockRift && link != null &&
|
||||
player.canPlayerEdit(hx, hy, hz, hit.sideHit, stack))
|
||||
{
|
||||
// Invoke onPlayerRightClick()
|
||||
|
@ -87,7 +88,7 @@ public class itemRiftRemover extends Item
|
|||
|
||||
NewDimData dimension = PocketManager.createDimensionData(world);
|
||||
DimLink link = dimension.getLink(x, y, z);
|
||||
if (world.getBlock(x, y, z) == mod_pocketDim.blockRift && link != null &&
|
||||
if (world.getBlock(x, y, z) == DimDoors.blockRift && link != null &&
|
||||
player.canPlayerEdit(x, y, z, side, stack))
|
||||
{
|
||||
// Tell the rift's tile entity to do its removal animation
|
||||
|
@ -115,7 +116,7 @@ public class itemRiftRemover extends Item
|
|||
{
|
||||
stack.damageItem(1, player);
|
||||
}
|
||||
player.worldObj.playSoundAtEntity(player, mod_pocketDim.modid+":riftClose", 0.8f, 1);
|
||||
player.worldObj.playSoundAtEntity(player, DimDoors.modid+":riftClose", 0.8f, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -130,6 +131,6 @@ public class itemRiftRemover extends Item
|
|||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
mod_pocketDim.translateAndAdd("info.riftRemover",par3List);
|
||||
DimDoors.translateAndAdd("info.riftRemover",par3List);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.zixiken.dimdoors.network;
|
||||
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.network.handlers.*;
|
||||
import com.zixiken.dimdoors.network.packets.*;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
|
@ -19,7 +19,7 @@ import net.minecraft.entity.player.EntityPlayerMP;
|
|||
@ChannelHandler.Sharable
|
||||
public class DimDoorsNetwork extends SimpleNetworkWrapper {
|
||||
|
||||
private static final DimDoorsNetwork INSTANCE = new DimDoorsNetwork(mod_pocketDim.modid);
|
||||
private static final DimDoorsNetwork INSTANCE = new DimDoorsNetwork(DimDoors.modid);
|
||||
|
||||
public DimDoorsNetwork(String channelName) {
|
||||
super(channelName);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.zixiken.dimdoors.network.handlers;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.core.NewDimData;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.network.packets.ClientJoinPacket;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
|
@ -15,7 +15,7 @@ public class ClientJoinHandler implements IMessageHandler<ClientJoinPacket, IMes
|
|||
|
||||
@Override
|
||||
public IMessage onMessage(ClientJoinPacket message, MessageContext ctx) {
|
||||
EntityPlayer player = mod_pocketDim.proxy.getMessagePlayer(ctx);
|
||||
EntityPlayer player = DimDoors.proxy.getMessagePlayer(ctx);
|
||||
NewDimData dimensionData = PocketManager.getDimensionData(player.worldObj);
|
||||
|
||||
if (dimensionData.isPocketDimension())
|
||||
|
|
|
@ -15,7 +15,7 @@ import com.zixiken.dimdoors.core.LinkType;
|
|||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.dungeon.DungeonData;
|
||||
import com.zixiken.dimdoors.helpers.DungeonHelper;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.util.DDLogger;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import com.zixiken.dimdoors.core.DimensionType;
|
||||
|
@ -265,7 +265,7 @@ public class DDSaveHandler
|
|||
// the mod should crash to let the user know early on.
|
||||
|
||||
// Get the save directory path
|
||||
File saveDirectory = new File(mod_pocketDim.instance.getCurrentSavePath() + "/DimensionalDoors/data/");
|
||||
File saveDirectory = new File(DimDoors.instance.getCurrentSavePath() + "/DimensionalDoors/data/");
|
||||
String savePath = saveDirectory.getAbsolutePath();
|
||||
String baseSavePath = savePath + "/dim_";
|
||||
File backupDirectory = new File(savePath + "/backup");
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.zixiken.dimdoors.schematic;
|
||||
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import net.minecraft.block.*;
|
||||
import com.zixiken.dimdoors.Point3D;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
@ -69,10 +69,10 @@ public class BlockRotator
|
|||
hasOrientations.put(Blocks.lit_furnace, true);
|
||||
hasOrientations.put(Blocks.bed, true);
|
||||
|
||||
hasOrientations.put(mod_pocketDim.dimensionalDoor, true);
|
||||
hasOrientations.put(mod_pocketDim.warpDoor, true);
|
||||
hasOrientations.put(mod_pocketDim.goldenDimensionalDoor, true);
|
||||
hasOrientations.put(mod_pocketDim.personalDimDoor, true);
|
||||
hasOrientations.put(DimDoors.dimensionalDoor, true);
|
||||
hasOrientations.put(DimDoors.warpDoor, true);
|
||||
hasOrientations.put(DimDoors.goldenDimensionalDoor, true);
|
||||
hasOrientations.put(DimDoors.personalDimDoor, true);
|
||||
}
|
||||
|
||||
public static int transformMetadata(int metadata, int turns, Block block)
|
||||
|
|
|
@ -3,8 +3,8 @@ package com.zixiken.dimdoors.ticking;
|
|||
import java.util.Random;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
@ -66,7 +66,7 @@ public class CustomLimboPopulator implements IRegularTickReceiver {
|
|||
limboWorld = PocketManager.loadDimension(properties.LimboDimensionID);
|
||||
}
|
||||
placeMonolithsInLimbo(limboWorld, location.ChunkX, location.ChunkZ);
|
||||
mod_pocketDim.gatewayGenerator.generate(limboWorld.rand, location.ChunkX, location.ChunkZ,
|
||||
DimDoors.gatewayGenerator.generate(limboWorld.rand, location.ChunkX, location.ChunkZ,
|
||||
limboWorld, limboWorld.getChunkProvider(), limboWorld.getChunkProvider());
|
||||
}
|
||||
else
|
||||
|
@ -127,7 +127,7 @@ public class CustomLimboPopulator implements IRegularTickReceiver {
|
|||
block = pocket.getBlock(x, y, z);
|
||||
|
||||
}
|
||||
while ((block == mod_pocketDim.blockDimWall || block == mod_pocketDim.blockDimWallPerm) && y > 0)
|
||||
while ((block == DimDoors.blockDimWall || block == DimDoors.blockDimWallPerm) && y > 0)
|
||||
{
|
||||
y--;
|
||||
block = pocket.getBlock(x, y, z);
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.zixiken.dimdoors.ticking;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityFlying;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
|
@ -12,7 +13,6 @@ import net.minecraft.util.AxisAlignedBB;
|
|||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.core.DDTeleporter;
|
||||
import com.zixiken.dimdoors.util.Point4D;
|
||||
|
@ -175,7 +175,7 @@ public class MobMonolith extends EntityFlying implements IMob
|
|||
this.aggro = 0;
|
||||
Point4D destination = LimboProvider.getLimboSkySpawn(player, properties);
|
||||
DDTeleporter.teleportEntity(player, destination, false);
|
||||
player.worldObj.playSoundAtEntity(player, mod_pocketDim.modid + ":crack", 13, 1);
|
||||
player.worldObj.playSoundAtEntity(player, DimDoors.modid + ":crack", 13, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -244,17 +244,17 @@ public class MobMonolith extends EntityFlying implements IMob
|
|||
float aggroPercent = this.getAggroProgress();
|
||||
if (this.soundTime <= 0)
|
||||
{
|
||||
this.playSound(mod_pocketDim.modid + ":monk", 1F, 1F);
|
||||
this.playSound(DimDoors.modid + ":monk", 1F, 1F);
|
||||
this.soundTime = 100;
|
||||
}
|
||||
if ((aggroPercent > 0.70) && this.soundTime < 100)
|
||||
{
|
||||
this.worldObj.playSoundEffect(entityPlayer.posX, entityPlayer.posY, entityPlayer.posZ, mod_pocketDim.modid + ":tearing", 1F, (float) (1 + this.rand.nextGaussian()));
|
||||
this.worldObj.playSoundEffect(entityPlayer.posX, entityPlayer.posY, entityPlayer.posZ, DimDoors.modid + ":tearing", 1F, (float) (1 + this.rand.nextGaussian()));
|
||||
this.soundTime = 100 + this.rand.nextInt(75);
|
||||
}
|
||||
if ((aggroPercent > 0.80) && this.soundTime < 200)
|
||||
{
|
||||
this.worldObj.playSoundEffect(entityPlayer.posX, entityPlayer.posY, entityPlayer.posZ, mod_pocketDim.modid + ":tearing", 7, 1F);
|
||||
this.worldObj.playSoundEffect(entityPlayer.posX, entityPlayer.posY, entityPlayer.posZ, DimDoors.modid + ":tearing", 7, 1F);
|
||||
this.soundTime = 250;
|
||||
}
|
||||
this.soundTime--;
|
||||
|
|
|
@ -2,8 +2,8 @@ package com.zixiken.dimdoors.tileentities;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import com.zixiken.dimdoors.watcher.ClientLinkData;
|
||||
|
@ -88,7 +88,7 @@ public class TileEntityDimDoor extends DDTileEntityBase
|
|||
public float[] getRenderColor(Random rand)
|
||||
{
|
||||
float[] rgbaColor = {1,1,1,1};
|
||||
if (this.worldObj.provider.dimensionId == mod_pocketDim.NETHER_DIMENSION_ID)
|
||||
if (this.worldObj.provider.dimensionId == DimDoors.NETHER_DIMENSION_ID)
|
||||
{
|
||||
rgbaColor[0] = rand.nextFloat() * 0.5F + 0.4F;
|
||||
rgbaColor[1] = rand.nextFloat() * 0.05F;
|
||||
|
|
|
@ -3,10 +3,10 @@ package com.zixiken.dimdoors.tileentities;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.core.DimLink;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.monster.EntityEnderman;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -60,7 +60,7 @@ public class TileEntityRift extends DDTileEntityBase
|
|||
{
|
||||
if (PocketManager.getLink(xCoord, yCoord, zCoord, worldObj.provider.dimensionId) == null)
|
||||
{
|
||||
if (worldObj.getBlock(xCoord, yCoord, zCoord) == mod_pocketDim.blockRift)
|
||||
if (worldObj.getBlock(xCoord, yCoord, zCoord) == DimDoors.blockRift)
|
||||
{
|
||||
worldObj.setBlockToAir(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ public class TileEntityRift extends DDTileEntityBase
|
|||
return;
|
||||
}
|
||||
|
||||
if (worldObj.getBlock(xCoord, yCoord, zCoord) != mod_pocketDim.blockRift)
|
||||
if (worldObj.getBlock(xCoord, yCoord, zCoord) != DimDoors.blockRift)
|
||||
{
|
||||
invalidate();
|
||||
return;
|
||||
|
@ -88,13 +88,13 @@ public class TileEntityRift extends DDTileEntityBase
|
|||
|
||||
if (updateTimer >= UPDATE_PERIOD)
|
||||
{
|
||||
spawnEndermen(mod_pocketDim.properties);
|
||||
spawnEndermen(DimDoors.properties);
|
||||
updateTimer = 0;
|
||||
}
|
||||
else if (updateTimer == UPDATE_PERIOD / 2)
|
||||
{
|
||||
updateNearestRift();
|
||||
spread(mod_pocketDim.properties);
|
||||
spread(DimDoors.properties);
|
||||
}
|
||||
growth += 1F/(growth+1);
|
||||
updateTimer++;
|
||||
|
@ -244,7 +244,7 @@ public class TileEntityRift extends DDTileEntityBase
|
|||
{
|
||||
return;
|
||||
}
|
||||
mod_pocketDim.blockRift.spreadRift(dimension, link, worldObj, random);
|
||||
DimDoors.blockRift.spreadRift(dimension, link, worldObj, random);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.zixiken.dimdoors.tileentities;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
|
||||
public class TileEntityTransTrapdoor extends DDTileEntityBase
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ public class TileEntityTransTrapdoor extends DDTileEntityBase
|
|||
public float[] getRenderColor(Random rand)
|
||||
{
|
||||
float[] rgbaColor = {1,1,1,1};
|
||||
if (this.worldObj.provider.dimensionId == mod_pocketDim.NETHER_DIMENSION_ID)
|
||||
if (this.worldObj.provider.dimensionId == DimDoors.NETHER_DIMENSION_ID)
|
||||
{
|
||||
rgbaColor[0] = worldObj.rand.nextFloat() * 0.5F + 0.4F;
|
||||
rgbaColor[1] = worldObj.rand.nextFloat() * 0.05F;
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.zixiken.dimdoors.world;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
@ -194,7 +194,7 @@ public class CustomCaveGen extends MapGenBase
|
|||
var49 = true;
|
||||
}
|
||||
|
||||
if (var53 == mod_pocketDim.blockLimbo || var53 == Blocks.dirt || var53 == Blocks.grass)
|
||||
if (var53 == DimDoors.blockLimbo || var53 == Blocks.dirt || var53 == Blocks.grass)
|
||||
{
|
||||
if (var50 < 10)
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@ public class DDBiomeGenBase extends BiomeGenBase
|
|||
this.spawnableCaveCreatureList.clear();
|
||||
}
|
||||
|
||||
public static void checkBiomes(int[] biomes)
|
||||
public static void checkBiomes(int ... biomes)
|
||||
{
|
||||
for (int k = 0; k < biomes.length; k++)
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.zixiken.dimdoors.world;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
@ -39,7 +39,7 @@ public class LimboDecay {
|
|||
public Block[] getDecaySequence() {
|
||||
if (decaySequence == null) {
|
||||
decaySequence = new Block[] {
|
||||
mod_pocketDim.blockLimbo,
|
||||
DimDoors.blockLimbo,
|
||||
Blocks.gravel,
|
||||
Blocks.cobblestone,
|
||||
Blocks.stone
|
||||
|
@ -52,15 +52,15 @@ public class LimboDecay {
|
|||
public Block[] getBlocksImmuneToDecay() {
|
||||
if (blocksImmuneToDecay == null) {
|
||||
blocksImmuneToDecay = new Block[] {
|
||||
mod_pocketDim.blockLimbo,
|
||||
mod_pocketDim.blockDimWallPerm,
|
||||
mod_pocketDim.transientDoor,
|
||||
mod_pocketDim.dimensionalDoor,
|
||||
mod_pocketDim.warpDoor,
|
||||
mod_pocketDim.blockRift,
|
||||
mod_pocketDim.unstableDoor,
|
||||
mod_pocketDim.goldenDoor,
|
||||
mod_pocketDim.goldenDimensionalDoor
|
||||
DimDoors.blockLimbo,
|
||||
DimDoors.blockDimWallPerm,
|
||||
DimDoors.transientDoor,
|
||||
DimDoors.dimensionalDoor,
|
||||
DimDoors.warpDoor,
|
||||
DimDoors.blockRift,
|
||||
DimDoors.unstableDoor,
|
||||
DimDoors.goldenDoor,
|
||||
DimDoors.goldenDimensionalDoor
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ public class LimboDecay {
|
|||
Block block = world.getBlock(x, y, z);
|
||||
if (canDecayBlock(block, world, x, y, z))
|
||||
{
|
||||
world.setBlock(x, y, z, mod_pocketDim.blockLimbo);
|
||||
world.setBlock(x, y, z, DimDoors.blockLimbo);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.zixiken.dimdoors.world;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
|
@ -356,11 +356,11 @@ public class LimboGenerator extends ChunkProviderGenerate
|
|||
{
|
||||
if ((var47 += var49) > 0.0D)
|
||||
{
|
||||
blocks[var43 += var44] = mod_pocketDim.blockLimbo;
|
||||
blocks[var43 += var44] = DimDoors.blockLimbo;
|
||||
}
|
||||
else if (var12 * 8 + var31 < var6)
|
||||
{
|
||||
blocks[var43 += var44] = mod_pocketDim.blockDimWallPerm;
|
||||
blocks[var43 += var44] = DimDoors.blockDimWallPerm;
|
||||
}
|
||||
|
||||
else
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.zixiken.dimdoors.world;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -13,7 +14,6 @@ import net.minecraft.world.biome.WorldChunkManagerHell;
|
|||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraftforge.client.IRenderHandler;
|
||||
import com.zixiken.dimdoors.CloudRenderBlank;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.ticking.CustomLimboPopulator;
|
||||
import com.zixiken.dimdoors.util.Point4D;
|
||||
|
@ -35,8 +35,8 @@ public class LimboProvider extends WorldProvider
|
|||
{
|
||||
this.hasNoSky = false;
|
||||
this.skyRenderer = new LimboSkyProvider();
|
||||
this.spawner = mod_pocketDim.spawner;
|
||||
this.properties = mod_pocketDim.properties;
|
||||
this.spawner = DimDoors.spawner;
|
||||
this.properties = DimDoors.properties;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -49,13 +49,13 @@ public class LimboProvider extends WorldProvider
|
|||
@Override
|
||||
protected void registerWorldChunkManager()
|
||||
{
|
||||
super.worldChunkMgr = new WorldChunkManagerHell(mod_pocketDim.limboBiome,1);
|
||||
super.worldChunkMgr = new WorldChunkManagerHell(DimDoors.limboBiome,1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BiomeGenBase getBiomeGenForCoords(int x, int z)
|
||||
{
|
||||
return mod_pocketDim.limboBiome;
|
||||
return DimDoors.limboBiome;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -136,7 +136,7 @@ public class LimboProvider extends WorldProvider
|
|||
public boolean canCoordinateBeSpawn(int par1, int par2)
|
||||
{
|
||||
Block block = this.worldObj.getTopBlock(par1, par2);
|
||||
return block == mod_pocketDim.blockLimbo;
|
||||
return block == DimDoors.blockLimbo;
|
||||
}
|
||||
@Override
|
||||
public double getHorizon()
|
||||
|
|
|
@ -2,8 +2,8 @@ package com.zixiken.dimdoors.world;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.core.DimLink;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
@ -455,7 +455,7 @@ public class PocketBuilder
|
|||
BlockRotator.transformPoint(center, door, orientation - BlockRotator.EAST_DOOR_METADATA, door);
|
||||
|
||||
//Build the outer layer of Eternal Fabric
|
||||
buildBox(world, center.getX(), center.getY(), center.getZ(), (size / 2), mod_pocketDim.blockDimWallPerm, 0, false, 0);
|
||||
buildBox(world, center.getX(), center.getY(), center.getZ(), (size / 2), DimDoors.blockDimWallPerm, 0, false, 0);
|
||||
|
||||
//check if we are building a personal pocket
|
||||
int metadata = 0;
|
||||
|
@ -467,7 +467,7 @@ public class PocketBuilder
|
|||
//Build the (wallThickness - 1) layers of Fabric of Reality
|
||||
for (int layer = 1; layer < wallThickness; layer++)
|
||||
{
|
||||
buildBox(world, center.getX(), center.getY(), center.getZ(), (size / 2) - layer, mod_pocketDim.blockDimWall, metadata,
|
||||
buildBox(world, center.getX(), center.getY(), center.getZ(), (size / 2) - layer, DimDoors.blockDimWall, metadata,
|
||||
layer < (wallThickness - 1) && properties.TNFREAKINGT_Enabled, properties.NonTntWeight);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.zixiken.dimdoors.world;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.core.NewDimData;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.ticking.CustomLimboPopulator;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
|
@ -28,14 +28,14 @@ public class PocketProvider extends WorldProvider
|
|||
this.hasNoSky = true;
|
||||
this.skyRenderer = new PocketSkyProvider();
|
||||
|
||||
this.spawner = mod_pocketDim.spawner;
|
||||
this.properties = mod_pocketDim.properties;
|
||||
this.spawner = DimDoors.spawner;
|
||||
this.properties = DimDoors.properties;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerWorldChunkManager()
|
||||
{
|
||||
super.worldChunkMgr = new WorldChunkManagerHell(mod_pocketDim.pocketBiome, 1);
|
||||
super.worldChunkMgr = new WorldChunkManagerHell(DimDoors.pocketBiome, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.util.Random;
|
|||
import com.zixiken.dimdoors.core.DimLink;
|
||||
import com.zixiken.dimdoors.core.LinkType;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemDoor;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -160,7 +160,7 @@ public class ComponentNetherGateway extends StructureComponent
|
|||
{
|
||||
link = dimension.createLink(x, y + 1, z, LinkType.DUNGEON, orientation);
|
||||
}
|
||||
ItemDoor.placeDoorBlock(world, x, y, z, orientation, mod_pocketDim.transientDoor);
|
||||
ItemDoor.placeDoorBlock(world, x, y, z, orientation, DimDoors.transientDoor);
|
||||
}
|
||||
|
||||
for (x = 0; x <= 6; ++x)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.zixiken.dimdoors.world.gateways;
|
||||
|
||||
import com.zixiken.dimdoors.Point3D;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.schematic.Schematic;
|
||||
import com.zixiken.dimdoors.schematic.SchematicFilter;
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -44,30 +44,30 @@ public class GatewayBlockFilter extends SchematicFilter {
|
|||
{
|
||||
int indexBelow;
|
||||
int indexDoubleBelow;
|
||||
if (blocks[index] == mod_pocketDim.dimensionalDoor)
|
||||
if (blocks[index] == DimDoors.dimensionalDoor)
|
||||
{
|
||||
indexBelow = schematic.calculateIndexBelow(index);
|
||||
if (indexBelow >= 0 && blocks[indexBelow] == mod_pocketDim.dimensionalDoor)
|
||||
if (indexBelow >= 0 && blocks[indexBelow] == DimDoors.dimensionalDoor)
|
||||
{
|
||||
entranceDoorLocation = schematic.calculatePoint(index);
|
||||
entranceOrientation = (metadata[indexBelow] & 3);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (blocks[index] == mod_pocketDim.transientDoor)
|
||||
if (blocks[index] == DimDoors.transientDoor)
|
||||
{
|
||||
indexBelow = schematic.calculateIndexBelow(index);
|
||||
if (indexBelow >= 0 && blocks[indexBelow] == mod_pocketDim.transientDoor)
|
||||
if (indexBelow >= 0 && blocks[indexBelow] == DimDoors.transientDoor)
|
||||
{
|
||||
entranceDoorLocation = schematic.calculatePoint(index);
|
||||
entranceOrientation = (metadata[indexBelow] & 3);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (blocks[index] == mod_pocketDim.warpDoor)
|
||||
if (blocks[index] == DimDoors.warpDoor)
|
||||
{
|
||||
indexBelow = schematic.calculateIndexBelow(index);
|
||||
if (indexBelow >= 0 && blocks[indexBelow] == mod_pocketDim.warpDoor)
|
||||
if (indexBelow >= 0 && blocks[indexBelow] == DimDoors.warpDoor)
|
||||
{
|
||||
entranceDoorLocation = schematic.calculatePoint(index);
|
||||
entranceOrientation = (metadata[indexBelow] & 3);
|
||||
|
|
|
@ -8,7 +8,7 @@ import com.zixiken.dimdoors.core.DimLink;
|
|||
import com.zixiken.dimdoors.core.LinkType;
|
||||
import com.zixiken.dimdoors.core.NewDimData;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import com.zixiken.dimdoors.world.PocketProvider;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
@ -84,7 +84,7 @@ public class GatewayGenerator implements IWorldGenerator
|
|||
|
||||
// Check if we're allowed to generate rift clusters in this dimension.
|
||||
// If so, randomly decide whether to one.
|
||||
if (mod_pocketDim.worldProperties.RiftClusterDimensions.isAccepted(dimensionID)
|
||||
if (DimDoors.worldProperties.RiftClusterDimensions.isAccepted(dimensionID)
|
||||
&& random.nextInt(MAX_CLUSTER_GENERATION_CHANCE) < properties.ClusterGenerationChance)
|
||||
{
|
||||
link = null;
|
||||
|
@ -121,7 +121,7 @@ public class GatewayGenerator implements IWorldGenerator
|
|||
|
||||
// Check if we can place a Rift Gateway in this dimension, then randomly decide whether to place one.
|
||||
// This only happens if a rift cluster was NOT generated.
|
||||
else if (mod_pocketDim.worldProperties.RiftGatewayDimensions.isAccepted(dimensionID) &&
|
||||
else if (DimDoors.worldProperties.RiftGatewayDimensions.isAccepted(dimensionID) &&
|
||||
random.nextInt(MAX_GATEWAY_GENERATION_CHANCE) < properties.GatewayGenerationChance)
|
||||
{
|
||||
valid = false;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.zixiken.dimdoors.world.gateways;
|
||||
|
||||
import com.zixiken.dimdoors.DimDoors;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemDoor;
|
||||
import net.minecraft.world.World;
|
||||
import com.zixiken.dimdoors.mod_pocketDim;
|
||||
import com.zixiken.dimdoors.config.DDProperties;
|
||||
import com.zixiken.dimdoors.core.LinkType;
|
||||
import com.zixiken.dimdoors.core.PocketManager;
|
||||
|
@ -19,7 +19,7 @@ public class GatewayLimbo extends BaseGateway
|
|||
@Override
|
||||
public boolean generate(World world, int x, int y, int z)
|
||||
{
|
||||
Block block = mod_pocketDim.blockLimbo;
|
||||
Block block = DimDoors.blockLimbo;
|
||||
// Build the gateway out of Unraveled Fabric. Since nearly all the blocks in Limbo are of
|
||||
// that type, there is no point replacing the ground.
|
||||
world.setBlock(x, y + 3, z + 1, block, 0, 3);
|
||||
|
@ -33,7 +33,7 @@ public class GatewayLimbo extends BaseGateway
|
|||
|
||||
PocketManager.getDimensionData(world).createLink(x, y + 2, z, LinkType.DUNGEON, 0);
|
||||
|
||||
ItemDoor.placeDoorBlock(world, x, y + 1, z, 0, mod_pocketDim.transientDoor);
|
||||
ItemDoor.placeDoorBlock(world, x, y + 1, z, 0, DimDoors.transientDoor);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue