All non-texture changes made
This commit is contained in:
@@ -2,6 +2,7 @@ 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;
|
||||
@@ -53,9 +54,9 @@ public class CommandCreateDungeonRift extends DDCommandBase
|
||||
Collection<String> dungeonNames = dungeonHelper.getDungeonNames();
|
||||
for (String name : dungeonNames)
|
||||
{
|
||||
sender.sendChatToPlayer(name);
|
||||
sendChat(sender,(name));
|
||||
}
|
||||
sender.sendChatToPlayer("");
|
||||
sendChat(sender,(""));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -73,7 +74,7 @@ public class CommandCreateDungeonRift extends DDCommandBase
|
||||
link = dimension.createLink(x, y + 1, z, LinkTypes.DUNGEON);
|
||||
sender.worldObj.setBlock(x, y + 1, z,mod_pocketDim.blockRift.blockID,0,3);
|
||||
|
||||
sender.sendChatToPlayer("Created a rift to a random dungeon.");
|
||||
sendChat(sender,("Created a rift to a random dungeon."));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -91,7 +92,7 @@ public class CommandCreateDungeonRift extends DDCommandBase
|
||||
link = dimension.createLink(x, y + 1, z, LinkTypes.DUNGEON);
|
||||
PocketManager.getDimensionData(link.destination().getDimension()).initializeDungeon(x, y + 1, z, orientation,link, result);
|
||||
sender.worldObj.setBlock(x, y + 1, z,mod_pocketDim.blockRift.blockID,0,3);
|
||||
sender.sendChatToPlayer("Created a rift to \"" + result.schematicName() + "\" dungeon (Dimension ID = " + link.destination().getDimension() + ").");
|
||||
sendChat(sender,("Created a rift to \"" + result.schematicName() + "\" dungeon (Dimension ID = " + link.destination().getDimension() + ")."));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -125,4 +126,10 @@ public class CommandCreateDungeonRift extends DDCommandBase
|
||||
}
|
||||
return bestMatch;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandUsage(ICommandSender icommandsender) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package StevenDimDoors.mod_pocketDim.commands;
|
||||
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import StevenDimDoors.mod_pocketDim.helpers.DungeonHelper;
|
||||
|
||||
@@ -41,8 +42,14 @@ public class CommandCreatePocket extends DDCommandBase
|
||||
DungeonHelper.instance().createCustomDungeonDoor(sender.worldObj, x, y, z);
|
||||
|
||||
//Notify the player
|
||||
sender.sendChatToPlayer("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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandUsage(ICommandSender icommandsender) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package StevenDimDoors.mod_pocketDim.commands;
|
||||
|
||||
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;
|
||||
@@ -41,7 +42,7 @@ public class CommandDeleteAllLinks extends DDCommandBase
|
||||
{
|
||||
targetDim=0;
|
||||
shouldGo=false;
|
||||
sender.sendChatToPlayer("Error-Invalid argument, delete_all_links <targetDimID>");
|
||||
sendChat(sender, ("Error-Invalid argument, delete_all_links <targetDimID>"));
|
||||
}
|
||||
|
||||
if(shouldGo)
|
||||
@@ -59,9 +60,15 @@ public class CommandDeleteAllLinks extends DDCommandBase
|
||||
|
||||
linksRemoved++;
|
||||
}
|
||||
sender.sendChatToPlayer("Removed " + linksRemoved + " links.");
|
||||
sendChat(sender,("Removed " + linksRemoved + " links."));
|
||||
|
||||
}
|
||||
return DDCommandResult.SUCCESS; //TEMPORARY HACK
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandUsage(ICommandSender icommandsender) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package StevenDimDoors.mod_pocketDim.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import StevenDimDoors.mod_pocketDim.mod_pocketDim;
|
||||
@@ -41,7 +42,7 @@ public class CommandDeleteRifts extends DDCommandBase
|
||||
{
|
||||
targetDim=0;
|
||||
shouldGo=false;
|
||||
sender.sendChatToPlayer("Error-Invalid argument, delete_all_links <targetDimID>");
|
||||
sendChat(sender,("Error-Invalid argument, delete_all_links <targetDimID>"));
|
||||
}
|
||||
|
||||
if(shouldGo)
|
||||
@@ -61,9 +62,15 @@ public class CommandDeleteRifts extends DDCommandBase
|
||||
dim.deleteLink(link);
|
||||
}
|
||||
}
|
||||
sender.sendChatToPlayer("Removed " + linksRemoved + " rifts.");
|
||||
sendChat(sender,("Removed " + linksRemoved + " rifts."));
|
||||
|
||||
}
|
||||
return DDCommandResult.SUCCESS; //TEMPORARY HACK
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandUsage(ICommandSender icommandsender) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package StevenDimDoors.mod_pocketDim.commands;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import StevenDimDoors.mod_pocketDim.DDProperties;
|
||||
import StevenDimDoors.mod_pocketDim.helpers.DungeonHelper;
|
||||
@@ -132,7 +133,7 @@ public class CommandExportDungeon extends DDCommandBase
|
||||
String exportPath = properties.CustomSchematicDirectory + File.separator + name + ".schematic";
|
||||
if (dungeonHelper.exportDungeon(player.worldObj, x, y, z, exportPath))
|
||||
{
|
||||
player.sendChatToPlayer("Saved dungeon schematic in " + exportPath);
|
||||
sendChat(player,("Saved dungeon schematic in " + exportPath));
|
||||
dungeonHelper.registerDungeon(exportPath, dungeonHelper.getDungeonPack("ruins"), false, true);
|
||||
return DDCommandResult.SUCCESS;
|
||||
}
|
||||
@@ -165,4 +166,10 @@ public class CommandExportDungeon extends DDCommandBase
|
||||
}
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandUsage(ICommandSender icommandsender) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package StevenDimDoors.mod_pocketDim.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import StevenDimDoors.mod_pocketDim.core.DimLink;
|
||||
@@ -84,7 +85,13 @@ 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.sendChatToPlayer("Reset complete. " + resetCount + " out of " + dungeonCount + " dungeons were reset.");
|
||||
sendChat(sender,("Reset complete. " + resetCount + " out of " + dungeonCount + " dungeons were reset."));
|
||||
return DDCommandResult.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandUsage(ICommandSender icommandsender) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ 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;
|
||||
@@ -92,6 +93,12 @@ public class CommandTeleportPlayer extends DDCommandBase
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandUsage(ICommandSender icommandsender) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
/*
|
||||
@@ -63,10 +64,18 @@ public abstract class DDCommandBase extends CommandBase
|
||||
//Send the argument formats for this command
|
||||
for (String format : formats)
|
||||
{
|
||||
player.sendChatToPlayer("Usage: " + name + " " + format);
|
||||
sendChat(player,("Usage: " + name + " " + format));
|
||||
}
|
||||
}
|
||||
player.sendChatToPlayer(result.getMessage());
|
||||
sendChat(player,(result.getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
public static void sendChat(EntityPlayer player, String message)
|
||||
{
|
||||
ChatMessageComponent cmp = new ChatMessageComponent();
|
||||
cmp.addText(message);
|
||||
player.sendChatToPlayer(cmp);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -327,6 +327,7 @@ public class DDTeleporter
|
||||
// the last non-sleeping player leaves the Overworld
|
||||
// for a pocket dimension, causing all sleeping players
|
||||
// to remain asleep instead of progressing to day.
|
||||
((WorldServer)entity.worldObj).getPlayerManager().removePlayer(player);
|
||||
oldWorld.removePlayerEntityDangerously(player);
|
||||
player.isDead = false;
|
||||
|
||||
@@ -357,13 +358,13 @@ public class DDTeleporter
|
||||
oldWorld.getChunkFromChunkCoords(entX, entZ).isModified = true;
|
||||
}
|
||||
// Memory concerns.
|
||||
oldWorld.releaseEntitySkin(entity);
|
||||
// oldWorld.releaseEntitySkin(entity);
|
||||
|
||||
if (player == null) // Are we NOT working with a player?
|
||||
{
|
||||
NBTTagCompound entityNBT = new NBTTagCompound();
|
||||
entity.isDead = false;
|
||||
entity.addEntityID(entityNBT);
|
||||
entity.writeToNBTOptional(entityNBT);
|
||||
entity.isDead = true;
|
||||
entity = EntityList.createEntityFromNBT(entityNBT, newWorld);
|
||||
|
||||
@@ -399,6 +400,10 @@ public class DDTeleporter
|
||||
if (player != null)
|
||||
{
|
||||
newWorld.getChunkProvider().loadChunk(MathHelper.floor_double(entity.posX) >> 4, MathHelper.floor_double(entity.posZ) >> 4);
|
||||
if(difDest)
|
||||
{
|
||||
newWorld.getPlayerManager().addPlayer(player);
|
||||
}
|
||||
|
||||
// Tell Forge we're moving its players so everyone else knows.
|
||||
// Let's try doing this down here in case this is what's killing NEI.
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package StevenDimDoors.mod_pocketDimClient;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -16,6 +18,4 @@ protected ModelMobObelisk obeliskModel;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user