Merge branch '1.6.2-code' of github.com:StevenRS11/DimDoors

Conflicts:
	StevenDimDoors/mod_pocketDim/CraftingManager.java
	StevenDimDoors/mod_pocketDim/EventHookContainer.java
	StevenDimDoors/mod_pocketDim/blocks/BaseDimDoor.java
	StevenDimDoors/mod_pocketDim/blocks/BlockDimWall.java
	StevenDimDoors/mod_pocketDim/blocks/BlockDimWallPerm.java
	StevenDimDoors/mod_pocketDim/blocks/BlockDoorGold.java
	StevenDimDoors/mod_pocketDim/blocks/BlockGoldDimDoor.java
	StevenDimDoors/mod_pocketDim/blocks/BlockLimbo.java
	StevenDimDoors/mod_pocketDim/blocks/BlockRift.java
	StevenDimDoors/mod_pocketDim/blocks/TransTrapdoor.java
	StevenDimDoors/mod_pocketDim/commands/CommandCreateDungeonRift.java
	StevenDimDoors/mod_pocketDim/commands/CommandCreatePocket.java
	StevenDimDoors/mod_pocketDim/commands/CommandDeleteAllLinks.java
	StevenDimDoors/mod_pocketDim/commands/CommandDeleteRifts.java
	StevenDimDoors/mod_pocketDim/commands/CommandExportDungeon.java
	StevenDimDoors/mod_pocketDim/commands/CommandResetDungeons.java
	StevenDimDoors/mod_pocketDim/commands/CommandTeleportPlayer.java
	StevenDimDoors/mod_pocketDim/commands/DDCommandBase.java
	StevenDimDoors/mod_pocketDim/core/DDTeleporter.java
	StevenDimDoors/mod_pocketDim/core/NewDimData.java
	StevenDimDoors/mod_pocketDim/core/PocketManager.java
	StevenDimDoors/mod_pocketDim/helpers/ChunkLoaderHelper.java
	StevenDimDoors/mod_pocketDim/items/ItemBlockDimWall.java
	StevenDimDoors/mod_pocketDim/items/ItemRiftBlade.java
	StevenDimDoors/mod_pocketDim/items/ItemRiftSignature.java
	StevenDimDoors/mod_pocketDim/items/ItemStabilizedRiftSignature.java
	StevenDimDoors/mod_pocketDim/mod_pocketDim.java
	StevenDimDoors/mod_pocketDim/ticking/MobMonolith.java
	StevenDimDoors/mod_pocketDim/tileentities/TileEntityDimDoorGold.java
	StevenDimDoors/mod_pocketDim/watcher/ClientLinkData.java
	StevenDimDoors/mod_pocketDim/world/CustomSkyProvider.java
	StevenDimDoors/mod_pocketDim/world/PocketBuilder.java
	StevenDimDoors/mod_pocketDimClient/RenderDimDoor.java
	StevenDimDoors/mod_pocketDimClient/RenderMobObelisk.java
	StevenDimDoors/mod_pocketDimClient/RenderTransTrapdoor.java
	build.xml
This commit is contained in:
CannibalVox
2013-12-06 21:09:14 -06:00
202 changed files with 1284 additions and 1289 deletions

View File

@@ -1,10 +1,5 @@
package StevenDimDoors.mod_pocketDim.commands;
import java.util.Collection;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.MathHelper;
import StevenDimDoors.mod_pocketDim.mod_pocketDim;
import StevenDimDoors.mod_pocketDim.core.DimLink;
import StevenDimDoors.mod_pocketDim.core.LinkTypes;
@@ -14,6 +9,13 @@ import StevenDimDoors.mod_pocketDim.dungeon.DungeonData;
import StevenDimDoors.mod_pocketDim.helpers.DungeonHelper;
import StevenDimDoors.mod_pocketDim.world.PocketBuilder;
import java.util.Collection;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.MathHelper;
@SuppressWarnings("deprecation")
public class CommandCreateDungeonRift extends DDCommandBase
{
private static CommandCreateDungeonRift instance = null;
@@ -62,9 +64,9 @@ public class CommandCreateDungeonRift extends DDCommandBase
Collection<String> dungeonNames = dungeonHelper.getDungeonNames();
for (String name : dungeonNames)
{
sender.addChatMessage(name);
sendChat(sender,(name));
}
sender.addChatMessage("");
sendChat(sender,(""));
}
else
{
@@ -73,7 +75,7 @@ public class CommandCreateDungeonRift extends DDCommandBase
int x = MathHelper.floor_double(sender.posX);
int y = MathHelper.floor_double(sender.posY);
int z = MathHelper.floor_double (sender.posZ);
int orientation = MathHelper.floor_double((double) ((sender.rotationYaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3;
int orientation = MathHelper.floor_double((sender.rotationYaw + 180.0F) * 4.0F / 360.0F - 0.5D) & 3;
if (command[0].equals("random"))
{
@@ -82,7 +84,7 @@ public class CommandCreateDungeonRift extends DDCommandBase
link = dimension.createLink(x, y + 1, z, LinkTypes.DUNGEON,orientation);
sender.worldObj.setBlock(x, y + 1, z,mod_pocketDim.blockRift.blockID,0,3);
sender.addChatMessage("Created a rift to a random dungeon.");
sendChat(sender,("Created a rift to a random dungeon."));
}
else
{
@@ -92,17 +94,17 @@ public class CommandCreateDungeonRift extends DDCommandBase
result = findDungeonByPartialName(command[0], dungeonHelper.getUntaggedDungeons());
}
//Check if we found any matches
if (result != null)
{
//Create a rift to our selected dungeon and notify the player
//TODO currently crashes, need to create the dimension first
dimension = PocketManager.getDimensionData(sender.worldObj);
link = dimension.createLink(x, y + 1, z, LinkTypes.DUNGEON,orientation);
PocketBuilder.generateSelectedDungeonPocket(link, mod_pocketDim.properties, result);
sender.worldObj.setBlock(x, y + 1, z,mod_pocketDim.blockRift.blockID,0,3);
sender.addChatMessage("Created a rift to \"" + result.schematicName() + "\" dungeon (Dimension ID = " + link.destination().getDimension() + ").");
}
if (result != null)
{
//Create a rift to our selected dungeon and notify the player
//TODO currently crashes, need to create the dimension first
dimension = PocketManager.getDimensionData(sender.worldObj);
link = dimension.createLink(x, y + 1, z, LinkTypes.DUNGEON,orientation);
PocketBuilder.generateSelectedDungeonPocket(link, mod_pocketDim.properties, result);
sender.worldObj.setBlock(x, y + 1, z,mod_pocketDim.blockRift.blockID,0,3);
sendChat(sender,("Created a rift to \"" + result.schematicName() + "\" dungeon (Dimension ID = " + link.destination().getDimension() + ")."));
}
else
{
//No matches!

View File

@@ -47,7 +47,7 @@ public class CommandCreatePocket extends DDCommandBase
DungeonHelper.instance().createCustomDungeonDoor(sender.worldObj, x, y, z);
//Notify the player
sender.addChatMessage("Created a door to a pocket dimension. Please build your dungeon there.");
sendChat(sender,("Created a door to a pocket dimension. Please build your dungeon there."));
}
return DDCommandResult.SUCCESS;
}

View File

@@ -1,15 +1,16 @@
package StevenDimDoors.mod_pocketDim.commands;
import StevenDimDoors.mod_pocketDim.core.DimLink;
import StevenDimDoors.mod_pocketDim.core.NewDimData;
import StevenDimDoors.mod_pocketDim.core.PocketManager;
import java.util.ArrayList;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
import StevenDimDoors.mod_pocketDim.core.DimLink;
import StevenDimDoors.mod_pocketDim.core.NewDimData;
import StevenDimDoors.mod_pocketDim.core.PocketManager;
@SuppressWarnings("deprecation")
public class CommandDeleteAllLinks extends DDCommandBase
{
private static CommandDeleteAllLinks instance = null;
@@ -47,7 +48,7 @@ public class CommandDeleteAllLinks extends DDCommandBase
{
targetDim=0;
shouldGo=false;
sender.addChatMessage("Error-Invalid argument, delete_all_links <targetDimID>");
sendChat(sender, ("Error-Invalid argument, delete_all_links <targetDimID>"));
}
if(shouldGo)
@@ -65,7 +66,7 @@ public class CommandDeleteAllLinks extends DDCommandBase
linksRemoved++;
}
sender.addChatMessage("Removed " + linksRemoved + " links.");
sendChat(sender,("Removed " + linksRemoved + " links."));
}
return DDCommandResult.SUCCESS; //TEMPORARY HACK

View File

@@ -10,6 +10,7 @@ import StevenDimDoors.mod_pocketDim.core.DimLink;
import StevenDimDoors.mod_pocketDim.core.NewDimData;
import StevenDimDoors.mod_pocketDim.core.PocketManager;
@SuppressWarnings("deprecation")
public class CommandDeleteRifts extends DDCommandBase
{
private static CommandDeleteRifts instance = null;
@@ -47,7 +48,7 @@ public class CommandDeleteRifts extends DDCommandBase
{
targetDim=0;
shouldGo=false;
sender.addChatMessage("Error-Invalid argument, delete_all_links <targetDimID>");
sendChat(sender,("Error-Invalid argument, delete_all_links <targetDimID>"));
}
if(shouldGo)
@@ -67,7 +68,7 @@ public class CommandDeleteRifts extends DDCommandBase
dim.deleteLink(link);
}
}
sender.addChatMessage("Removed " + linksRemoved + " rifts.");
sendChat(sender,("Removed " + linksRemoved + " rifts."));
}
return DDCommandResult.SUCCESS; //TEMPORARY HACK

View File

@@ -140,7 +140,7 @@ public class CommandExportDungeon extends DDCommandBase
String exportPath = properties.CustomSchematicDirectory + File.separator + name + ".schematic";
if (dungeonHelper.exportDungeon(player.worldObj, x, y, z, exportPath))
{
player.addChatMessage("Saved dungeon schematic in " + exportPath);
sendChat(player,("Saved dungeon schematic in " + exportPath));
dungeonHelper.registerDungeon(exportPath, dungeonHelper.getDungeonPack("ruins"), false, true);
return DDCommandResult.SUCCESS;
}

View File

@@ -10,6 +10,7 @@ import StevenDimDoors.mod_pocketDim.core.LinkTypes;
import StevenDimDoors.mod_pocketDim.core.NewDimData;
import StevenDimDoors.mod_pocketDim.core.PocketManager;
@SuppressWarnings("deprecation")
public class CommandResetDungeons extends DDCommandBase
{
private static CommandResetDungeons instance = null;
@@ -90,7 +91,7 @@ public class CommandResetDungeons extends DDCommandBase
//TODO- for some reason the parent field of loaded dimenions get reset to null if I call .setParentToRoot() before I delete the pockets.
//TODO implement blackList
//Notify the user of the results
sender.addChatMessage("Reset complete. " + resetCount + " out of " + dungeonCount + " dungeons were reset.");
sendChat(sender,("Reset complete. " + resetCount + " out of " + dungeonCount + " dungeons were reset."));
return DDCommandResult.SUCCESS;
}
}

View File

@@ -1,24 +1,16 @@
package StevenDimDoors.mod_pocketDim.commands;
import java.util.ArrayList;
import StevenDimDoors.mod_pocketDim.core.DDTeleporter;
import StevenDimDoors.mod_pocketDim.core.PocketManager;
import StevenDimDoors.mod_pocketDim.util.Point4D;
import java.util.Arrays;
import java.util.List;
import cpw.mods.fml.common.FMLCommonHandler;
import StevenDimDoors.mod_pocketDim.BlankTeleporter;
import StevenDimDoors.mod_pocketDim.core.DDTeleporter;
import StevenDimDoors.mod_pocketDim.core.PocketManager;
import StevenDimDoors.mod_pocketDim.helpers.yCoordHelper;
import StevenDimDoors.mod_pocketDim.util.Point4D;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraftforge.common.DimensionManager;
public class CommandTeleportPlayer extends DDCommandBase
{
private static CommandTeleportPlayer instance = null;
@@ -48,7 +40,7 @@ public class CommandTeleportPlayer extends DDCommandBase
@Override
protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
{
List dimensionIDs = Arrays.asList(DimensionManager.getStaticDimensionIDs()); //Gets list of all registered dimensions, regardless if loaded or not
List<Integer> dimensionIDs = Arrays.asList(DimensionManager.getStaticDimensionIDs()); //Gets list of all registered dimensions, regardless if loaded or not
EntityPlayer targetPlayer = sender;
int dimDestinationID = sender.worldObj.provider.dimensionId;

View File

@@ -3,6 +3,7 @@ package StevenDimDoors.mod_pocketDim.commands;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ChatMessageComponent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
/*
@@ -32,6 +33,7 @@ public abstract class DDCommandBase extends CommandBase
*/
protected abstract DDCommandResult processCommand(EntityPlayer sender, String[] command);
@Override
public final String getCommandName()
{
return name;
@@ -49,6 +51,7 @@ public abstract class DDCommandBase extends CommandBase
* Method invoked by the server to execute a command. The call is forwarded to a derived class
* to provide the sending player directly.
*/
@Override
public final void processCommand(ICommandSender sender, String[] command)
{
//Forward the command
@@ -63,10 +66,10 @@ public abstract class DDCommandBase extends CommandBase
//Send the argument formats for this command
for (String format : formats)
{
player.addChatMessage("Usage: " + name + " " + format);
sendChat(player,("Usage: " + name + " " + format));
}
}
player.addChatMessage(result.getMessage());
sendChat(player,(result.getMessage()));
}
}
}