@@ -96,6 +96,7 @@ public class DDProperties
|
||||
public final boolean LimboReturnsInventoryEnabled;
|
||||
public final boolean DoorRenderingEnabled;
|
||||
public final boolean TNFREAKINGT_Enabled;
|
||||
public final boolean MonolithTeleportationEnabled;
|
||||
|
||||
|
||||
/**
|
||||
@@ -118,6 +119,7 @@ public class DDProperties
|
||||
//Names of categories
|
||||
private final String CATEGORY_CRAFTING = "crafting";
|
||||
private final String CATEGORY_ENTITY = "entity";
|
||||
private final String CATEGORY_SPECIAL = "special";
|
||||
private final String CATEGORY_DIMENSION = "dimension";
|
||||
private final String CATEGORY_PROVIDER = "provider";
|
||||
private final String CATEGORY_BIOME = "biome";
|
||||
@@ -235,6 +237,13 @@ public class DDProperties
|
||||
{
|
||||
throw new IllegalStateException("World generation blocks MUST have block IDs less than 256. Fix your configuration!");
|
||||
}
|
||||
|
||||
// SPECIAL CONFIG SETTINGS
|
||||
// I'm adding this category because one of our users convinced me, personally, to please allow this.
|
||||
// These settings are checked _after_ we save the config file, so Forge won't generate them automatically.
|
||||
// Whoever wants to use them must intentionally write them into the config file.
|
||||
|
||||
MonolithTeleportationEnabled = config.get(CATEGORY_SPECIAL, "Enable Monolith Teleportation", true).getBoolean(true);
|
||||
}
|
||||
|
||||
public static DDProperties initialize(File configFile)
|
||||
|
||||
@@ -32,14 +32,6 @@ public class CommandCreateDungeonRift extends DDCommandBase
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandUsage(ICommandSender sender)
|
||||
{
|
||||
return "Usage: /dd-rift <dungeon name>\r\n" +
|
||||
" /dd-rift list\r\n" +
|
||||
" /dd-rift random";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
|
||||
{
|
||||
|
||||
@@ -21,11 +21,6 @@ public class CommandCreatePocket extends DDCommandBase
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandUsage(ICommandSender sender) {
|
||||
return "Usage: /dd-create";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
|
||||
{
|
||||
|
||||
@@ -28,11 +28,6 @@ public class CommandDeleteAllLinks extends DDCommandBase
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandUsage(ICommandSender sender) {
|
||||
return "Usage: /dd-deletelinks <targetDimensionID>";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
|
||||
{
|
||||
|
||||
@@ -28,11 +28,6 @@ public class CommandDeleteRifts extends DDCommandBase
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandUsage(ICommandSender sender) {
|
||||
return "Usage: /dd-??? <dimension ID>";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
|
||||
{
|
||||
|
||||
@@ -26,13 +26,6 @@ public class CommandExportDungeon extends DDCommandBase
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandUsage(ICommandSender sender) {
|
||||
return "Usage: /dd-export <dungeon type> <dungeon name> open <weight>\r\n" +
|
||||
" /dd-export <dungeon type> <dungeon name> closed <weight>\r\n" +
|
||||
" /dd-export <schematic name> override";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
|
||||
{
|
||||
|
||||
@@ -28,11 +28,6 @@ public class CommandResetDungeons extends DDCommandBase
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandUsage(ICommandSender sender) {
|
||||
return "/dd-resetdungeons";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
|
||||
{
|
||||
|
||||
@@ -23,15 +23,9 @@ public class CommandTeleportPlayer extends DDCommandBase
|
||||
public static CommandTeleportPlayer instance()
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
instance = new CommandTeleportPlayer();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandUsage(ICommandSender sender) {
|
||||
return "Usage: /dd-tp <player name> <dimension id> <x> <y> <z>";
|
||||
return instance;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -39,12 +39,22 @@ public abstract class DDCommandBase extends CommandBase
|
||||
return name;
|
||||
}
|
||||
|
||||
/*
|
||||
* Registers the command at server startup.
|
||||
*/
|
||||
public void register(FMLServerStartingEvent event)
|
||||
@Override
|
||||
public final String getCommandUsage(ICommandSender sender)
|
||||
{
|
||||
event.registerServerCommand(this);
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append('/');
|
||||
builder.append(name);
|
||||
builder.append(' ');
|
||||
builder.append(formats[0]);
|
||||
for (int index = 1; index < formats.length; index++)
|
||||
{
|
||||
builder.append(" OR /");
|
||||
builder.append(name);
|
||||
builder.append(' ');
|
||||
builder.append(formats[index]);
|
||||
}
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -66,10 +76,10 @@ public abstract class DDCommandBase extends CommandBase
|
||||
//Send the argument formats for this command
|
||||
for (String format : formats)
|
||||
{
|
||||
sendChat(player,("Usage: " + name + " " + format));
|
||||
sendChat(player, "Usage: " + name + " " + format);
|
||||
}
|
||||
}
|
||||
sendChat(player,(result.getMessage()));
|
||||
sendChat(player, result.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,12 +88,5 @@ public abstract class DDCommandBase extends CommandBase
|
||||
ChatMessageComponent cmp = new ChatMessageComponent();
|
||||
cmp.addText(message);
|
||||
player.sendChatToPlayer(cmp);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Object par1Obj)
|
||||
{
|
||||
return this.getCommandName().compareTo(((CommandBase)par1Obj).getCommandName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -307,16 +307,16 @@ public class mod_pocketDim
|
||||
//TODO- load dims with forced chunks on server startup here
|
||||
|
||||
// Register commands with the server
|
||||
CommandResetDungeons.instance().register(event);
|
||||
CommandCreateDungeonRift.instance().register(event);
|
||||
CommandDeleteAllLinks.instance().register(event);
|
||||
event.registerServerCommand( CommandResetDungeons.instance() );
|
||||
event.registerServerCommand( CommandCreateDungeonRift.instance() );
|
||||
event.registerServerCommand( CommandDeleteAllLinks.instance() );
|
||||
//CommandDeleteDimensionData.instance().register(event);
|
||||
CommandDeleteRifts.instance().register(event);
|
||||
CommandExportDungeon.instance().register(event);
|
||||
event.registerServerCommand( CommandDeleteRifts.instance() );
|
||||
event.registerServerCommand( CommandExportDungeon.instance() );
|
||||
//CommandPrintDimensionData.instance().register(event);
|
||||
//CommandPruneDimensions.instance().register(event);
|
||||
CommandCreatePocket.instance().register(event);
|
||||
CommandTeleportPlayer.instance().register(event);
|
||||
event.registerServerCommand( CommandCreatePocket.instance() );
|
||||
event.registerServerCommand( CommandTeleportPlayer.instance() );
|
||||
|
||||
// Initialize a new DeathTracker
|
||||
String deathTrackerFile = DimensionManager.getCurrentSaveRootDirectory() + "/DimensionalDoors/data/deaths.txt";
|
||||
|
||||
@@ -22,6 +22,7 @@ public class BlockRotator
|
||||
static
|
||||
{
|
||||
hasOrientations[Block.dispenser.blockID] = true;
|
||||
hasOrientations[Block.dropper.blockID] = true;
|
||||
hasOrientations[Block.stairsStoneBrick.blockID] = true;
|
||||
hasOrientations[Block.lever.blockID] = true;
|
||||
hasOrientations[Block.stoneButton.blockID] = true;
|
||||
@@ -241,7 +242,7 @@ public class BlockRotator
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (blockID == Block.chest.blockID || blockID == Block.chestTrapped.blockID || blockID == Block.ladder.blockID || blockID == Block.hopperBlock.blockID|| blockID == Block.furnaceBurning.blockID|| blockID == Block.furnaceIdle.blockID)
|
||||
else if (blockID == Block.chest.blockID || blockID == Block.chestTrapped.blockID || blockID == Block.ladder.blockID || blockID == Block.furnaceBurning.blockID|| blockID == Block.furnaceIdle.blockID)
|
||||
{
|
||||
switch (metadata)
|
||||
{
|
||||
@@ -258,7 +259,36 @@ public class BlockRotator
|
||||
metadata = 3;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
else if (blockID == Block.hopperBlock.blockID)
|
||||
{
|
||||
switch (metadata)
|
||||
{
|
||||
case 2:
|
||||
metadata = 5;
|
||||
break;
|
||||
case 3:
|
||||
metadata = 4;
|
||||
break;
|
||||
case 4:
|
||||
metadata = 2;
|
||||
break;
|
||||
case 5:
|
||||
metadata = 3;
|
||||
break;
|
||||
case 10:
|
||||
metadata = 13;
|
||||
break;
|
||||
case 11:
|
||||
metadata = 12;
|
||||
break;
|
||||
case 12:
|
||||
metadata = 10;
|
||||
break;
|
||||
case 13:
|
||||
metadata = 11;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (blockID==Block.vine.blockID)
|
||||
{
|
||||
@@ -352,7 +382,7 @@ public class BlockRotator
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(blockID== Block.lever.blockID||blockID== Block.stoneButton.blockID||blockID== Block.stoneButton.blockID||blockID== Block.woodenButton.blockID||blockID== Block.torchWood.blockID||blockID== Block.torchRedstoneIdle.blockID||blockID== Block.torchRedstoneActive.blockID)
|
||||
else if(blockID== Block.lever.blockID || blockID == Block.stoneButton.blockID || blockID == Block.woodenButton.blockID || blockID== Block.torchWood.blockID||blockID== Block.torchRedstoneIdle.blockID||blockID== Block.torchRedstoneActive.blockID)
|
||||
{
|
||||
switch (metadata)
|
||||
{
|
||||
|
||||
@@ -193,7 +193,7 @@ public class MobMonolith extends EntityFlying implements IMob
|
||||
this.soundTime=200;
|
||||
}
|
||||
}
|
||||
else if (!this.worldObj.isRemote && !entityPlayer.capabilities.isCreativeMode)
|
||||
else if (!this.worldObj.isRemote && properties.MonolithTeleportationEnabled && !entityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
ChunkCoordinates coords = LimboProvider.getLimboSkySpawn(entityPlayer.worldObj.rand);
|
||||
Point4D destination = new Point4D((int) (coords.posX+entityPlayer.posX), coords.posY, (int) (coords.posZ+entityPlayer.posZ ), mod_pocketDim.properties.LimboDimensionID);
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user