1.6.4 basic fixes

This commit is contained in:
CannibalVox 2013-12-06 20:38:55 -06:00
parent 7687a77332
commit e825cb74b9
31 changed files with 234 additions and 158 deletions

View file

@ -36,15 +36,15 @@ public class EventHookContainer
@ForgeSubscribe @ForgeSubscribe
public void onSoundLoad(SoundLoadEvent event) public void onSoundLoad(SoundLoadEvent event)
{ {
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/monk.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/monk.ogg"))); event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/monk.ogg");
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/crack.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/crack.ogg"))); event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/crack.ogg");
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/tearing.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/tearing.ogg"))); event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/tearing.ogg");
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/rift.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/rift.ogg"))); event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/rift.ogg");
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftStart.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/riftStart.ogg"))); event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftStart.ogg");
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftEnd.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/riftEnd.ogg"))); event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftEnd.ogg");
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftClose.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/riftClose.ogg"))); event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftClose.ogg");
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftDoor.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/riftDoor.ogg"))); event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftDoor.ogg");
event.manager.soundPoolMusic.addSound("mods/DimDoors/sfx/creepy.ogg", (mod_pocketDim.class.getResource("/mods/DimDoors/sfx/creepy.ogg"))); event.manager.soundPoolMusic.addSound("mods/DimDoors/sfx/creepy.ogg");
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@ -96,7 +96,7 @@ public class EventHookContainer
ChunkCoordinates coords = LimboProvider.getLimboSkySpawn(player.worldObj.rand); ChunkCoordinates coords = LimboProvider.getLimboSkySpawn(player.worldObj.rand);
Point4D destination = new Point4D((int) (coords.posX+entity.posX), coords.posY, (int) (coords.posZ+entity.posZ ), mod_pocketDim.properties.LimboDimensionID); Point4D destination = new Point4D((int) (coords.posX+entity.posX), coords.posY, (int) (coords.posZ+entity.posZ ), mod_pocketDim.properties.LimboDimensionID);
DDTeleporter.teleportEntity(player, destination, false); DDTeleporter.teleportEntity(player, destination, false);
player.setEntityHealth(player.getMaxHealth()); player.setHealth(player.getMaxHealth());
event.setCanceled(true); event.setCanceled(true);
return false; return false;
} }
@ -119,7 +119,7 @@ public class EventHookContainer
SoundSystem sndSystem = FMLClientHandler.instance().getClient().sndManager.sndSystem; SoundSystem sndSystem = FMLClientHandler.instance().getClient().sndManager.sndSystem;
sndSystem.stop("BgMusic"); sndSystem.stop("BgMusic");
SoundPoolEntry soundPoolEntry = FMLClientHandler.instance().getClient().sndManager.soundPoolMusic.getRandomSoundFromSoundPool("mods.DimDoors.sfx.creepy"); SoundPoolEntry soundPoolEntry = FMLClientHandler.instance().getClient().sndManager.soundPoolMusic.getRandomSoundFromSoundPool("mods.DimDoors.sfx.creepy");
sndSystem.backgroundMusic("LimboMusic", soundPoolEntry.soundUrl, soundPoolEntry.soundName, false); sndSystem.backgroundMusic("LimboMusic", soundPoolEntry.getSoundUrl(), soundPoolEntry.getSoundName(), false);
sndSystem.play("LimboMusic"); sndSystem.play("LimboMusic");
} }
else if(world.isRemote && !(world.provider instanceof LimboProvider)) else if(world.isRemote && !(world.provider instanceof LimboProvider))

View file

@ -42,8 +42,8 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
public void registerIcons(IconRegister par1IconRegister) public void registerIcons(IconRegister par1IconRegister)
{ {
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_top"); this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5)+"_top");
this.blockIconBottom = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_bottom"); this.blockIconBottom = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5)+"_bottom");
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)

View file

@ -59,8 +59,8 @@ public class BlockDimWall extends Block
public void registerIcons(IconRegister par1IconRegister) public void registerIcons(IconRegister par1IconRegister)
{ {
this.blockIcon[0] = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()); this.blockIcon[0] = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5));
this.blockIcon[1] = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2() + "Perm"); this.blockIcon[1] = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5) + "Perm");
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)

View file

@ -32,7 +32,7 @@ public class BlockDimWallPerm extends Block
public void registerIcons(IconRegister par1IconRegister) public void registerIcons(IconRegister par1IconRegister)
{ {
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()); this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5));
} }
public int quantityDropped(Random par1Random) public int quantityDropped(Random par1Random)

View file

@ -33,8 +33,8 @@ public class BlockDoorGold extends BlockDoor
public void registerIcons(IconRegister par1IconRegister) public void registerIcons(IconRegister par1IconRegister)
{ {
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_top"); this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5)+"_top");
this.blockIconBottom = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_bottom"); this.blockIconBottom = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5)+"_bottom");
} }
public Icon getIcon(int par1, int par2) public Icon getIcon(int par1, int par2)

View file

@ -40,7 +40,7 @@ public class BlockLimbo extends Block
@Override @Override
public void registerIcons(IconRegister iconRegister) public void registerIcons(IconRegister iconRegister)
{ {
this.blockIcon = iconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()); this.blockIcon = iconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5));
} }
@Override @Override

View file

@ -66,7 +66,7 @@ public class BlockRift extends BlockContainer
@Override @Override
public void registerIcons(IconRegister par1IconRegister) public void registerIcons(IconRegister par1IconRegister)
{ {
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()); this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5));
} }
//sends a packet informing the client that there is a link present so it renders properly. (when placed) //sends a packet informing the client that there is a link present so it renders properly. (when placed)

View file

@ -32,7 +32,7 @@ public class TransTrapdoor extends BlockTrapDoor implements IDimDoor, ITileEntit
@Override @Override
public void registerIcons(IconRegister par1IconRegister) public void registerIcons(IconRegister par1IconRegister)
{ {
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()); this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5));
} }
//Teleports the player to the exit link of that dimension, assuming it is a pocket //Teleports the player to the exit link of that dimension, assuming it is a pocket

View file

@ -2,6 +2,7 @@ package StevenDimDoors.mod_pocketDim.commands;
import java.util.Collection; import java.util.Collection;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
import StevenDimDoors.mod_pocketDim.mod_pocketDim; import StevenDimDoors.mod_pocketDim.mod_pocketDim;
@ -30,6 +31,13 @@ public class CommandCreateDungeonRift extends DDCommandBase
return instance; 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 @Override
protected DDCommandResult processCommand(EntityPlayer sender, String[] command) protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
{ {
@ -54,9 +62,9 @@ public class CommandCreateDungeonRift extends DDCommandBase
Collection<String> dungeonNames = dungeonHelper.getDungeonNames(); Collection<String> dungeonNames = dungeonHelper.getDungeonNames();
for (String name : dungeonNames) for (String name : dungeonNames)
{ {
sender.sendChatToPlayer(name); sender.addChatMessage(name);
} }
sender.sendChatToPlayer(""); sender.addChatMessage("");
} }
else else
{ {
@ -74,7 +82,7 @@ public class CommandCreateDungeonRift extends DDCommandBase
link = dimension.createLink(x, y + 1, z, LinkTypes.DUNGEON,orientation); link = dimension.createLink(x, y + 1, z, LinkTypes.DUNGEON,orientation);
sender.worldObj.setBlock(x, y + 1, z,mod_pocketDim.blockRift.blockID,0,3); sender.worldObj.setBlock(x, y + 1, z,mod_pocketDim.blockRift.blockID,0,3);
sender.sendChatToPlayer("Created a rift to a random dungeon."); sender.addChatMessage("Created a rift to a random dungeon.");
} }
else else
{ {
@ -93,7 +101,7 @@ public class CommandCreateDungeonRift extends DDCommandBase
PocketBuilder.generateSelectedDungeonPocket(link, mod_pocketDim.properties, result); PocketBuilder.generateSelectedDungeonPocket(link, mod_pocketDim.properties, result);
sender.worldObj.setBlock(x, y + 1, z,mod_pocketDim.blockRift.blockID,0,3); 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() + ")."); sender.addChatMessage("Created a rift to \"" + result.schematicName() + "\" dungeon (Dimension ID = " + link.destination().getDimension() + ").");
} }
else else
{ {

View file

@ -1,5 +1,6 @@
package StevenDimDoors.mod_pocketDim.commands; package StevenDimDoors.mod_pocketDim.commands;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import StevenDimDoors.mod_pocketDim.helpers.DungeonHelper; import StevenDimDoors.mod_pocketDim.helpers.DungeonHelper;
@ -20,6 +21,11 @@ public class CommandCreatePocket extends DDCommandBase
return instance; return instance;
} }
@Override
public String getCommandUsage(ICommandSender sender) {
return "Usage: /dd-create";
}
@Override @Override
protected DDCommandResult processCommand(EntityPlayer sender, String[] command) protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
{ {
@ -41,7 +47,7 @@ public class CommandCreatePocket extends DDCommandBase
DungeonHelper.instance().createCustomDungeonDoor(sender.worldObj, x, y, z); DungeonHelper.instance().createCustomDungeonDoor(sender.worldObj, x, y, z);
//Notify the player //Notify the player
sender.sendChatToPlayer("Created a door to a pocket dimension. Please build your dungeon there."); sender.addChatMessage("Created a door to a pocket dimension. Please build your dungeon there.");
} }
return DDCommandResult.SUCCESS; return DDCommandResult.SUCCESS;
} }

View file

@ -2,6 +2,7 @@ package StevenDimDoors.mod_pocketDim.commands;
import java.util.ArrayList; import java.util.ArrayList;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.DimensionManager;
@ -26,6 +27,11 @@ public class CommandDeleteAllLinks extends DDCommandBase
return instance; return instance;
} }
@Override
public String getCommandUsage(ICommandSender sender) {
return "Usage: /dd-deletelinks <targetDimensionID>";
}
@Override @Override
protected DDCommandResult processCommand(EntityPlayer sender, String[] command) protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
{ {
@ -41,7 +47,7 @@ public class CommandDeleteAllLinks extends DDCommandBase
{ {
targetDim=0; targetDim=0;
shouldGo=false; shouldGo=false;
sender.sendChatToPlayer("Error-Invalid argument, delete_all_links <targetDimID>"); sender.addChatMessage("Error-Invalid argument, delete_all_links <targetDimID>");
} }
if(shouldGo) if(shouldGo)
@ -59,7 +65,7 @@ public class CommandDeleteAllLinks extends DDCommandBase
linksRemoved++; linksRemoved++;
} }
sender.sendChatToPlayer("Removed " + linksRemoved + " links."); sender.addChatMessage("Removed " + linksRemoved + " links.");
} }
return DDCommandResult.SUCCESS; //TEMPORARY HACK return DDCommandResult.SUCCESS; //TEMPORARY HACK

View file

@ -2,6 +2,7 @@ package StevenDimDoors.mod_pocketDim.commands;
import java.util.ArrayList; import java.util.ArrayList;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World; import net.minecraft.world.World;
import StevenDimDoors.mod_pocketDim.mod_pocketDim; import StevenDimDoors.mod_pocketDim.mod_pocketDim;
@ -26,6 +27,11 @@ public class CommandDeleteRifts extends DDCommandBase
return instance; return instance;
} }
@Override
public String getCommandUsage(ICommandSender sender) {
return "Usage: /dd-??? <dimension ID>";
}
@Override @Override
protected DDCommandResult processCommand(EntityPlayer sender, String[] command) protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
{ {
@ -41,7 +47,7 @@ public class CommandDeleteRifts extends DDCommandBase
{ {
targetDim=0; targetDim=0;
shouldGo=false; shouldGo=false;
sender.sendChatToPlayer("Error-Invalid argument, delete_all_links <targetDimID>"); sender.addChatMessage("Error-Invalid argument, delete_all_links <targetDimID>");
} }
if(shouldGo) if(shouldGo)
@ -61,7 +67,7 @@ public class CommandDeleteRifts extends DDCommandBase
dim.deleteLink(link); dim.deleteLink(link);
} }
} }
sender.sendChatToPlayer("Removed " + linksRemoved + " rifts."); sender.addChatMessage("Removed " + linksRemoved + " rifts.");
} }
return DDCommandResult.SUCCESS; //TEMPORARY HACK return DDCommandResult.SUCCESS; //TEMPORARY HACK

View file

@ -2,6 +2,7 @@ package StevenDimDoors.mod_pocketDim.commands;
import java.io.File; import java.io.File;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import StevenDimDoors.mod_pocketDim.DDProperties; import StevenDimDoors.mod_pocketDim.DDProperties;
import StevenDimDoors.mod_pocketDim.helpers.DungeonHelper; import StevenDimDoors.mod_pocketDim.helpers.DungeonHelper;
@ -25,6 +26,13 @@ public class CommandExportDungeon extends DDCommandBase
return instance; 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 @Override
protected DDCommandResult processCommand(EntityPlayer sender, String[] command) protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
{ {
@ -132,7 +140,7 @@ public class CommandExportDungeon extends DDCommandBase
String exportPath = properties.CustomSchematicDirectory + File.separator + name + ".schematic"; String exportPath = properties.CustomSchematicDirectory + File.separator + name + ".schematic";
if (dungeonHelper.exportDungeon(player.worldObj, x, y, z, exportPath)) if (dungeonHelper.exportDungeon(player.worldObj, x, y, z, exportPath))
{ {
player.sendChatToPlayer("Saved dungeon schematic in " + exportPath); player.addChatMessage("Saved dungeon schematic in " + exportPath);
dungeonHelper.registerDungeon(exportPath, dungeonHelper.getDungeonPack("ruins"), false, true); dungeonHelper.registerDungeon(exportPath, dungeonHelper.getDungeonPack("ruins"), false, true);
return DDCommandResult.SUCCESS; return DDCommandResult.SUCCESS;
} }

View file

@ -2,6 +2,7 @@ package StevenDimDoors.mod_pocketDim.commands;
import java.util.ArrayList; import java.util.ArrayList;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.DimensionManager;
import StevenDimDoors.mod_pocketDim.core.DimLink; import StevenDimDoors.mod_pocketDim.core.DimLink;
@ -26,6 +27,11 @@ public class CommandResetDungeons extends DDCommandBase
return instance; return instance;
} }
@Override
public String getCommandUsage(ICommandSender sender) {
return "/dd-resetdungeons";
}
@Override @Override
protected DDCommandResult processCommand(EntityPlayer sender, String[] command) protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
{ {
@ -84,7 +90,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- 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 //TODO implement blackList
//Notify the user of the results //Notify the user of the results
sender.sendChatToPlayer("Reset complete. " + resetCount + " out of " + dungeonCount + " dungeons were reset."); sender.addChatMessage("Reset complete. " + resetCount + " out of " + dungeonCount + " dungeons were reset.");
return DDCommandResult.SUCCESS; return DDCommandResult.SUCCESS;
} }
} }

View file

@ -11,6 +11,7 @@ import StevenDimDoors.mod_pocketDim.core.PocketManager;
import StevenDimDoors.mod_pocketDim.helpers.yCoordHelper; import StevenDimDoors.mod_pocketDim.helpers.yCoordHelper;
import StevenDimDoors.mod_pocketDim.util.Point4D; import StevenDimDoors.mod_pocketDim.util.Point4D;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.world.World; import net.minecraft.world.World;
@ -36,6 +37,11 @@ public class CommandTeleportPlayer extends DDCommandBase
return instance; return instance;
} }
@Override
public String getCommandUsage(ICommandSender sender) {
return "Usage: /dd-tp <player name> <dimension id> <x> <y> <z>";
}
/** /**
* TODO- Change to accept variety of input, like just coords, just dim ID, or two player names. * TODO- Change to accept variety of input, like just coords, just dim ID, or two player names.
*/ */

View file

@ -63,10 +63,10 @@ public abstract class DDCommandBase extends CommandBase
//Send the argument formats for this command //Send the argument formats for this command
for (String format : formats) for (String format : formats)
{ {
player.sendChatToPlayer("Usage: " + name + " " + format); player.addChatMessage("Usage: " + name + " " + format);
} }
} }
player.sendChatToPlayer(result.getMessage()); player.addChatMessage(result.getMessage());
} }
} }
} }

View file

@ -357,13 +357,13 @@ public class DDTeleporter
oldWorld.getChunkFromChunkCoords(entX, entZ).isModified = true; oldWorld.getChunkFromChunkCoords(entX, entZ).isModified = true;
} }
// Memory concerns. // Memory concerns.
oldWorld.releaseEntitySkin(entity); oldWorld.onEntityRemoved(entity);
if (player == null) // Are we NOT working with a player? if (player == null) // Are we NOT working with a player?
{ {
NBTTagCompound entityNBT = new NBTTagCompound(); NBTTagCompound entityNBT = new NBTTagCompound();
entity.isDead = false; entity.isDead = false;
entity.addEntityID(entityNBT); entity.writeMountToNBT(entityNBT);
entity.isDead = true; entity.isDead = true;
entity = EntityList.createEntityFromNBT(entityNBT, newWorld); entity = EntityList.createEntityFromNBT(entityNBT, newWorld);

View file

@ -28,6 +28,6 @@ public class ItemBlockDimWall extends ItemBlock
public String getUnlocalizedName(ItemStack par1ItemStack) public String getUnlocalizedName(ItemStack par1ItemStack)
{ {
return subNames[getItemDamageFromStack(par1ItemStack)]; return subNames[this.getDamage(par1ItemStack)];
} }
} }

View file

@ -2,11 +2,15 @@ package StevenDimDoors.mod_pocketDim.items;
import java.util.List; import java.util.List;
import com.google.common.collect.Multimap;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.EnumToolMaterial;
@ -60,9 +64,11 @@ public class ItemRiftBlade extends ItemSword
} }
@Override @Override
public int getDamageVsEntity(Entity par1Entity) public Multimap getItemAttributeModifiers()
{ {
return 7; Multimap multimap = super.getItemAttributeModifiers();
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Weapon modifier", (double)7, 0));
return multimap;
} }
@Override @Override
@ -73,7 +79,7 @@ public class ItemRiftBlade extends ItemSword
} }
@Override @Override
public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving) public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLiving, EntityLivingBase par3EntityLiving)
{ {
par1ItemStack.damageItem(1, par3EntityLiving); par1ItemStack.damageItem(1, par3EntityLiving);
return true; return true;

View file

@ -98,14 +98,14 @@ public class ItemRiftSignature extends Item
stack.stackSize--; stack.stackSize--;
} }
clearSource(stack); clearSource(stack);
player.sendChatToPlayer("Rift Created"); player.addChatMessage("Rift Created");
world.playSoundAtEntity(player,"mods.DimDoors.sfx.riftEnd", 0.6f, 1); world.playSoundAtEntity(player,"mods.DimDoors.sfx.riftEnd", 0.6f, 1);
} }
else else
{ {
//The link signature has not been used. Store its current target as the first location. //The link signature has not been used. Store its current target as the first location.
setSource(stack, x, adjustedY, z,orientation, PocketManager.getDimensionData(world)); setSource(stack, x, adjustedY, z,orientation, PocketManager.getDimensionData(world));
player.sendChatToPlayer("Location Stored in Rift Signature"); player.addChatMessage("Location Stored in Rift Signature");
world.playSoundAtEntity(player,"mods.DimDoors.sfx.riftStart", 0.6f, 1); world.playSoundAtEntity(player,"mods.DimDoors.sfx.riftStart", 0.6f, 1);
} }
return true; return true;

View file

@ -56,7 +56,7 @@ public class ItemStabilizedRiftSignature extends ItemRiftSignature
// or if the player can pay an Ender Pearl to create a rift. // or if the player can pay an Ender Pearl to create a rift.
if (!player.capabilities.isCreativeMode && !player.inventory.hasItem(Item.enderPearl.itemID)) if (!player.capabilities.isCreativeMode && !player.inventory.hasItem(Item.enderPearl.itemID))
{ {
player.sendChatToPlayer("You don't have any Ender Pearls!"); player.addChatMessage("You don't have any Ender Pearls!");
return true; return true;
} }
@ -86,14 +86,14 @@ public class ItemStabilizedRiftSignature extends ItemRiftSignature
{ {
player.inventory.consumeInventoryItem(Item.enderPearl.itemID); player.inventory.consumeInventoryItem(Item.enderPearl.itemID);
} }
player.sendChatToPlayer("Rift Created"); player.addChatMessage("Rift Created");
world.playSoundAtEntity(player,"mods.DimDoors.sfx.riftEnd", 0.6f, 1); world.playSoundAtEntity(player,"mods.DimDoors.sfx.riftEnd", 0.6f, 1);
} }
else else
{ {
//The link signature has not been used. Store its current target as the first location. //The link signature has not been used. Store its current target as the first location.
setSource(stack, x, adjustedY, z, orientation, PocketManager.getDimensionData(world)); setSource(stack, x, adjustedY, z, orientation, PocketManager.getDimensionData(world));
player.sendChatToPlayer("Location Stored in Rift Signature"); player.addChatMessage("Location Stored in Rift Signature");
world.playSoundAtEntity(player,"mods.DimDoors.sfx.riftStart", 0.6f, 1); world.playSoundAtEntity(player,"mods.DimDoors.sfx.riftStart", 0.6f, 1);
} }
return true; return true;

View file

@ -94,7 +94,7 @@ serverPacketHandlerSpec =
public class mod_pocketDim public class mod_pocketDim
{ {
public static final String version = "1.5.2R2.0.1RC1"; public static final String version = "$VERSION$";
public static final String modid = "DimDoors"; public static final String modid = "DimDoors";
//need to clean up //need to clean up

View file

@ -11,8 +11,6 @@ import java.io.UnsupportedEncodingException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import scala.Char;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;

View file

@ -5,6 +5,7 @@ import java.util.List;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityFlying; import net.minecraft.entity.EntityFlying;
import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.monster.IMob; import net.minecraft.entity.monster.IMob;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
@ -36,7 +37,7 @@ public class MobMonolith extends EntityFlying implements IMob
public MobMonolith(World par1World) public MobMonolith(World par1World)
{ {
super(par1World); super(par1World);
this.texture="/mods/DimDoors/textures/mobs/Monolith0.png"; this.getDataWatcher().addObject(16,0);
this.setSize(3F, 9.0F); this.setSize(3F, 9.0F);
this.noClip=true; this.noClip=true;
this.scaleFactor= (float) ((rand.nextDouble()/2)+1); this.scaleFactor= (float) ((rand.nextDouble()/2)+1);
@ -55,10 +56,10 @@ public class MobMonolith extends EntityFlying implements IMob
} }
@Override @Override
public int getMaxHealth() protected void applyEntityAttributes()
{ {
// TODO Auto-generated method stub super.applyEntityAttributes();
return 20; this.getAttributeMap().func_111150_b(SharedMonsterAttributes.maxHealth).setAttribute(20);
} }
public boolean canBePushed() public boolean canBePushed()
@ -93,9 +94,6 @@ public class MobMonolith extends EntityFlying implements IMob
this.setDead(); this.setDead();
} }
byte b0 = this.dataWatcher.getWatchableObjectByte(16);
this.texture="/mods/DimDoors/textures/mobs/Monolith"+b0+".png";
super.onEntityUpdate(); super.onEntityUpdate();
if (this.isEntityAlive() && this.isEntityInsideOpaqueBlock()) if (this.isEntityAlive() && this.isEntityInsideOpaqueBlock())

View file

@ -350,13 +350,13 @@ public class TileEntityRift extends TileEntity
NBTTagCompound nbt = new NBTTagCompound(); NBTTagCompound nbt = new NBTTagCompound();
writeToNBT(nbt); writeToNBT(nbt);
packet.customParam1 = nbt; packet.data = nbt;
return packet; return packet;
} }
@Override @Override
public void onDataPacket(INetworkManager net, Packet132TileEntityData pkt) public void onDataPacket(INetworkManager net, Packet132TileEntityData pkt)
{ {
readFromNBT(pkt.customParam1); readFromNBT(pkt.data);
} }
} }

View file

@ -1,5 +1,6 @@
package StevenDimDoors.mod_pocketDim.world; package StevenDimDoors.mod_pocketDim.world;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
@ -43,7 +44,7 @@ public class CustomSkyProvider extends IRenderHandler
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
RenderHelper.disableStandardItemLighting(); RenderHelper.disableStandardItemLighting();
GL11.glDepthMask(false); GL11.glDepthMask(false);
mc.renderEngine.bindTexture("/misc/tunnel.png"); mc.renderEngine.bindTexture(new ResourceLocation("/misc/tunnel.png"));
Tessellator tessellator = Tessellator.instance; Tessellator tessellator = Tessellator.instance;
if (mc.theWorld.provider.isSurfaceWorld()) if (mc.theWorld.provider.isSurfaceWorld())
@ -136,7 +137,7 @@ public class CustomSkyProvider extends IRenderHandler
GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(world.getCelestialAngle(par1) * 360.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(world.getCelestialAngle(par1) * 360.0F, 1.0F, 0.0F, 0.0F);
f10 = 30.0F; f10 = 30.0F;
mc.renderEngine.bindTexture(this.getSunRenderPath()); mc.renderEngine.bindTexture(new ResourceLocation(this.getSunRenderPath()));
tessellator1.startDrawingQuads(); tessellator1.startDrawingQuads();
tessellator1.addVertexWithUV((double)(-f10), 100.0D, (double)(-f10), 0.0D, 0.0D); tessellator1.addVertexWithUV((double)(-f10), 100.0D, (double)(-f10), 0.0D, 0.0D);
tessellator1.addVertexWithUV((double)f10, 100.0D, (double)(-f10), 1.0D, 0.0D); tessellator1.addVertexWithUV((double)f10, 100.0D, (double)(-f10), 1.0D, 0.0D);
@ -144,7 +145,7 @@ public class CustomSkyProvider extends IRenderHandler
tessellator1.addVertexWithUV((double)(-f10), 100.0D, (double)f10, 0.0D, 1.0D); tessellator1.addVertexWithUV((double)(-f10), 100.0D, (double)f10, 0.0D, 1.0D);
tessellator1.draw(); tessellator1.draw();
f10 = 20.0F; f10 = 20.0F;
mc.renderEngine.bindTexture(this.getMoonRenderPath()); mc.renderEngine.bindTexture(new ResourceLocation(this.getMoonRenderPath()));
int k = world.getMoonPhase(); int k = world.getMoonPhase();
int l = k % 4; int l = k % 4;
int i1 = k / 4 % 2; int i1 = k / 4 % 2;

View file

@ -9,6 +9,7 @@ import net.minecraft.client.renderer.GLAllocation;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import StevenDimDoors.mod_pocketDim.DDProperties; import StevenDimDoors.mod_pocketDim.DDProperties;
@ -65,7 +66,7 @@ public class RenderDimDoor extends TileEntitySpecialRenderer
if (count == 0) if (count == 0)
{ {
this.bindTextureByName("/RIFT.png"); this.bindTexture(new ResourceLocation("/RIFT.png"));
var17 = 0.1F; var17 = 0.1F;
var15 = 25.0F; var15 = 25.0F;
var16 = 0.125F; var16 = 0.125F;
@ -75,7 +76,7 @@ public class RenderDimDoor extends TileEntitySpecialRenderer
if (count == 1) if (count == 1)
{ {
this.bindTextureByName("/WARP.png"); this.bindTexture(new ResourceLocation("/WARP.png"));
GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE); GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
var16 = .5F; var16 = .5F;

View file

@ -3,6 +3,8 @@ package StevenDimDoors.mod_pocketDimClient;
import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.client.renderer.entity.RenderLiving;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class RenderMobObelisk extends RenderLiving public class RenderMobObelisk extends RenderLiving
@ -17,5 +19,10 @@ protected ModelMobObelisk obeliskModel;
} }
@Override
public ResourceLocation getEntityTexture(Entity entity) {
int watchByte = entity.getDataWatcher().getWatchableObjectByte(16);
return new ResourceLocation("/mods/DimDoors/textures/mobs/Monolith"+watchByte+".png");
}
} }

View file

@ -8,6 +8,7 @@ import net.minecraft.client.renderer.GLAllocation;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import StevenDimDoors.mod_pocketDim.DDProperties; import StevenDimDoors.mod_pocketDim.DDProperties;
@ -62,7 +63,7 @@ public class RenderTransTrapdoor extends TileEntitySpecialRenderer
if (count == 0) if (count == 0)
{ {
this.bindTextureByName("/RIFT.png"); this.bindTexture(new ResourceLocation("/RIFT.png"));
var17 = 0.1F; var17 = 0.1F;
var15 = 25.0F; var15 = 25.0F;
var16 = 0.125F; var16 = 0.125F;
@ -72,7 +73,7 @@ public class RenderTransTrapdoor extends TileEntitySpecialRenderer
if (count == 1) if (count == 1)
{ {
this.bindTextureByName("/WARP.png"); this.bindTexture(new ResourceLocation("/WARP.png"));
GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE); GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
var16 = .5F; var16 = .5F;

182
build.xml
View file

@ -1,64 +1,93 @@
<project name="Necromancy" default="install" basedir=".">
<project name="DimensionalDoors" default="install" basedir=".">
<property environment="env" /> <property environment="env" />
<property name="project.name" value="DimDoors" />
<property name="src.dir" value="StevenDimDoors" />
<property name="resources.dir" value="resources" />
<property name="schematics.dir" value="schematics" />
<property name="versionclass.dir" value="mod_pocketDim" />
<property name="versionclass.file" value="mod_pocketDim.java"/>
<property name="minecraft.version" value="1.6.4" />
<property name="forge.forgeversion" value="9.11.1" />
<property name="forge.buildnum" value="953" />
<property name="build.dir" value="build" /> <property name="build.dir" value="build" />
<property name="classes.dir" value="${build.dir}/packaging" /> <property name="classes.dir" value="${build.dir}/packaging" />
<property name="src.dir" value="src" /> <property name="resourcePack.dir" value="${classes.dir}/assets/" />
<property name="forge.version" value="1.5.2-7.8.0.691" /> <property name="schematicPack.dir" value="${classes.dir}/schematics/" />
<property name="apiclasses.dir" value="${build.dir}/api-packaging" />
<property name="forge.version" value="${minecraft.version}-${forge.forgeversion}.${forge.buildnum}" />
<property name="forge.url" value="http://files.minecraftforge.net/minecraftforge/minecraftforge-src-${forge.version}.zip" /> <property name="forge.url" value="http://files.minecraftforge.net/minecraftforge/minecraftforge-src-${forge.version}.zip" />
<property name="mcp.version" value="751" />
<property name="forge.dir" value="${build.dir}/forge" /> <property name="forge.dir" value="${build.dir}/forge" />
<property name="mcp.dir" value="${forge.dir}/mcp" /> <property name="mcp.dir" value="${forge.dir}/mcp" />
<property name="mcpsrc.dir" value="${mcp.dir}/src/minecraft" /> <property name="mcpsrc.dir" value="${mcp.dir}/src/minecraft/StevenDimDoors" />
<property name="resources.dir" value="resources" />
<property name="gson.url" value="https://google-gson.googlecode.com/files/google-gson-2.2.4-release.zip" />
<property name="gson.name" value="gson-2.2.4.zip" />
<property name="package.meta-inf" value="META-INF" /> <property name="package.meta-inf" value="META-INF" />
<property name="build.ver" value="1.5.2" />
<property name="dist.dir" value="${build.dir}/dist" /> <property name="dist.dir" value="${build.dir}/dist" />
<property name="download.dir" value="downloads" /> <property name="download.dir" value="${build.dir}/downloads" />
<property name="lib.dir" value="${mcp.dir}/lib" /> <property name="lib.dir" value="${mcp.dir}/lib" />
<property file="${forge.dir}/forgeversion.properties" /> <property file="${forge.dir}/forgeversion.properties" />
<condition property="forge.already.installed"> <condition property="forge.already.installed">
<equals arg1="${forge.build.number}" arg2="691" /> <equals arg1="${forge.build.number}" arg2="${forge.buildnum}" />
</condition> </condition>
<property name="verclass.dir" value="${mcpsrc.dir}/StevenDimDoors/mod_pocketDim/" />
<property name="verclass.name" value="mod_pocketDim.java"/>
<mkdir dir="${download.dir}"/> <mkdir dir="${download.dir}"/>
<mkdir dir="${build.dir}" /> <mkdir dir="${build.dir}" />
<target name="get-version" depends="setup-forge"> <target name="get-version" depends="setup-forge">
<mkdir dir="${mcpsrc.dir}/StevenDimDoors" /> <!-- Copy source -->
<copy todir="${mcpsrc.dir}/StevenDimDoors" overwrite="true"> <copy todir="${mcpsrc.dir}" overwrite="true">
<fileset dir="StevenDimDoors" /> <fileset dir="${src.dir}"/>
</copy> </copy>
<exec dir="${verclass.dir}" executable="sh" osfamily="unix" outputproperty="grep.out"> <!-- Get the version from the mcmod.info -->
<arg value="-c"/> <script language="javascript">
<arg value="grep -o -P '[0-9.]+R[0-9.]+(RC[0-9]+)?(B[0-9]+)?' ${verclass.name}"/> importClass(java.io.File);
</exec> importClass(java.nio.file.Files)
<exec executable="python" osfamily="unix"> importClass(java.io.FileReader);
<arg value="versionscript.py" /> importClass(java.io.BufferedReader);
<arg value="${grep.out}" /> importClass(java.io.FileWriter);
</exec> importClass(java.io.BufferedWriter);
<echo message="Grepped version: ${grep.out}"/>
<copy todir="${classes.dir}" file="mcmod.info" overwrite="true"/> echo = project.createTask("echo");
echo.setMessage("Parsing mcmod.info...");
echo.perform();
var file = new File("./mcmod.info");
fr = new FileReader(file);
br = new BufferedReader(fr);
// Read the file.
// This assumes the file has no line
var line;
var json = "";
while ((line = br.readLine()) != null) {
json += line;
}
var struct = JSON.parse(json);
var version = struct["modlist"][0].version;
echo = project.createTask("echo");
echo.setMessage("Parsed version: " + version);
echo.perform();
project.setProperty("mod.version", version);
</script>
<!-- Replace the version information in the mod class -->
<replace file="${mcpsrc.dir}/${versionclass.dir}/${versionclass.file}">
<replacefilter token="$VERSION$" value="${mod.version}"/>
</replace>
</target> </target>
<available property="forge-exists" file="${download.dir}/minecraftforge-src-${forge.version}.zip" /> <available property="forge-exists" file="${download.dir}/minecraftforge-src-${forge.version}.zip" />
<available property="gson-exists" file="${mcpsrc.dir}/com/google/gson/Gson.java" /> <available property="already-compiled" file="${classes.dir}/${src.dir}" />
<available property="already-compiled" file="${classes.dir}/deathrat" />
<condition property="should-download-ant-contrib"> <condition property="should-download-ant-contrib">
<or> <or>
<available file="${download.dir}/ant-contrib/ant-contrib-1.0b3.jar"/> <available file="${download.dir}/ant-contrib/ant-contrib-1.0b3.jar"/>
@ -67,27 +96,16 @@
</condition> </condition>
<target name="install" depends="build"> <target name="install" depends="build">
<copy todir="${classes.dir}/schematics" overwrite="true"> <delete dir="${mcpsrc.dir}/${src.dir}" />
<fileset dir="schematics" /> <delete dir="${dist.dir}" />
</copy> <jar destfile="${dist.dir}/${project.name}-${mod.version}-${build.number}.jar" basedir="${classes.dir}"/>
<zip destfile="${dist.dir}/DimensionalDoors-${grep.out}-${build.number}.zip" basedir="${classes.dir}"/>
<delete dir="${classes.dir}" /> <delete dir="${classes.dir}" />
<delete dir="${mcp.dir}/reobf"/> <delete dir="${mcp.dir}/reobf"/>
<delete dir="${mcpsrc.dir}/StevenDimDoors" /> <delete dir="{$apiclasses.dir}" />
<delete dir="${mcpsrc.dir}/Steven" /> <delete dir="${mcpsrc.dir}/${src.dir}" />
</target> </target>
<target name="get-gson" unless="gson-exists"> <target name="build" depends="get-version" unless="already-compiled">
<get src="${gson.url}" dest="${download.dir}/${gson.name}" />
<unzip src="${download.dir}/${gson.name}" dest="${download.dir}" />
<unzip src="${download.dir}/google-gson-2.2.4/gson-2.2.4-sources.jar" dest="${download.dir}/google-gson-2.2.4/"/>
<copy todir="${mcpsrc.dir}/com">
<fileset dir="${download.dir}/google-gson-2.2.4/com"/>
</copy>
</target>
<target name="build" depends="get-version,get-gson" unless="already-compiled">
<!-- Recompile --> <!-- Recompile -->
<exec dir="${mcp.dir}" executable="cmd" osfamily="windows" failonerror="true"> <exec dir="${mcp.dir}" executable="cmd" osfamily="windows" failonerror="true">
<arg line="/c recompile.bat"/> <arg line="/c recompile.bat"/>
@ -99,19 +117,40 @@
<!-- Reobf --> <!-- Reobf -->
<exec dir="${mcp.dir}" executable="cmd" osfamily="windows"> <exec dir="${mcp.dir}" executable="cmd" osfamily="windows">
<arg line="/c reobfuscate_srg.bat"/> <arg line="/c reobfuscate.bat --srgnames"/>
</exec> </exec>
<exec dir="${mcp.dir}" executable="sh" osfamily="unix"> <exec dir="${mcp.dir}" executable="sh" osfamily="unix">
<arg value="reobfuscate_srg.sh" /> <arg value="reobfuscate.sh" />
</exec> </exec>
<copy todir="${classes.dir}"> <copy todir="${classes.dir}">
<fileset dir="${mcp.dir}/reobf/minecraft"/> <fileset dir="${mcp.dir}/reobf/minecraft"/>
</copy> </copy>
<copy todir="${classes.dir}">
<fileset dir="${resources.dir}"/> <copy todir="${resourcePack.dir}">
<fileset dir="${resources.dir}" />
</copy> </copy>
<copy todir="${schematicPack.dir}">
<fileset dir="${schematics.dir}" />
</copy>
<copy todir="${classes.dir}">
<fileset file="mcmod.info" />
</copy>
<copy todir="${classes.dir}">
<fileset file="${resources.dir}/pack.mcmeta" />
</copy>
<copy todir="${classes.dir}">
<fileset file="${resources.dir}/dimdoors_logo.png" />
</copy>
<delete file="${resourcePack.dir}/mcmod.info" />
<delete file="${resourcePack.dir}/pack.mcmeta" />
</target> </target>
<target name="build-number-there" if="env.BUILD_NUMBER" > <target name="build-number-there" if="env.BUILD_NUMBER" >
@ -121,7 +160,7 @@
<target name="build-number-not-there" unless="env.BUILD_NUMBER" > <target name="build-number-not-there" unless="env.BUILD_NUMBER" >
<echo message="!! No build number set !!" /> <echo message="!! No build number set !!" />
<property name="build.number" value="CUSTOM_BUILD" /> <property name="build.number" value="0" />
</target> </target>
<target name="setup-forge" depends="download-forge,build-number-there,build-number-not-there" unless="forge.already.installed"> <target name="setup-forge" depends="download-forge,build-number-there,build-number-not-there" unless="forge.already.installed">
@ -133,15 +172,9 @@
</fileset> </fileset>
</unzip> </unzip>
<!-- Change executables' permitions --> <!-- Change executables' permitions -->
<chmod file="${forge.dir}/install.sh" perm="+x"/> <chmod file="${forge.dir}/install.sh" perm="+x"/>
<!-- if your building on OSX these 2 should be executable -->
<!-- Install forge --> <!-- Install forge -->
<delete dir="${mcp.dir}" failonerror="no"/> <delete dir="${mcp.dir}" failonerror="no"/>
<exec dir="${forge.dir}" executable="cmd" osfamily="windows" inputstring="Yes\n"> <exec dir="${forge.dir}" executable="cmd" osfamily="windows" inputstring="Yes\n">
@ -152,28 +185,11 @@
<arg value="install.sh" /> <arg value="install.sh" />
</exec> </exec>
<get src="http://mirror.technicpack.net/Technic/lib/fml/fml_libs15.zip" dest="${download.dir}/fml_libs15.zip" />
<unzip src="${download.dir}/fml_libs15.zip" dest="${lib.dir}/" />
<exec dir="${forge.dir}" executable="cmd" osfamily="windows" inputstring="Yes">
<arg line="/c install.cmd"/>
</exec>
<exec dir="${forge.dir}" executable="sh" osfamily="unix" inputstring="Yes">
<arg value="install.sh" />
</exec>
<chmod file="${mcp.dir}/updatemd5.sh" perm="+x"/> <chmod file="${mcp.dir}/updatemd5.sh" perm="+x"/>
<chmod file="${mcp.dir}/recompile.sh" perm="+x"/> <chmod file="${mcp.dir}/recompile.sh" perm="+x"/>
<chmod file="${mcp.dir}/reobfuscate_srg.sh" perm="+x"/> <chmod file="${mcp.dir}/reobfuscate.sh" perm="+x"/>
<chmod file="${mcp.dir}/runtime/bin/astyle-osx" perm="+x" /> <chmod file="${mcp.dir}/runtime/bin/astyle-osx" perm="+x" />
<chmod file="${mcp.dir}/runtime/bin/jad-osx" perm="+x" /> <chmod file="${mcp.dir}/runtime/bin/jad-osx" perm="+x" />
<!-- Copy libraries -->
<!-- <copy todir="${mcp.dir}/lib" >
<fileset dir="lib" >
<patternset includes="*.jar" />
</fileset>
</copy> -->
</target> </target>
<target name="download-forge" depends="download-ant-contrib" unless="forge-exists"> <target name="download-forge" depends="download-ant-contrib" unless="forge-exists">
@ -186,11 +202,10 @@
</classpath> </classpath>
</taskdef> </taskdef>
<echo message="Downloading forge... " /> <echo message="Downloading forge... " />
<get src="${forge.url}" dest="${download.dir}/minecraftforge-src-${forge.version}.zip" /> <get src="http://files.minecraftforge.net/minecraftforge-src-${forge.version}.zip"
dest="${download.dir}/minecraftforge-src-${forge.version}.zip" />
</target> </target>
<target name="download-ant-contrib" unless="should-download-ant-contrib"> <target name="download-ant-contrib" unless="should-download-ant-contrib">
<echo message="Getting: ant-contrib"/> <echo message="Getting: ant-contrib"/>
<mkdir dir="${download.dir}/tmp"/> <mkdir dir="${download.dir}/tmp"/>
@ -217,4 +232,3 @@
</project> </project>

View file

@ -1,9 +1,12 @@
{
"modinfoversion":2,
"modlist":
[ [
{ {
"modid": "DimDoors", "modid": "DimDoors",
"name": "Dimensional Doors", "name": "Dimensional Doors",
"description": "Bend and twist reality itself, creating pocket dimensions, rifts, and much more", "description": "Bend and twist reality itself, creating pocket dimensions, rifts, and much more",
"version": "1.5.2R1.4.1RC1", "version": "1.6.4R2.1.2RC1",
"credits": "Created by StevenRS11, Coded by StevenRS11 and SenseiKiwi, Logo and Testing by Jaitsu", "credits": "Created by StevenRS11, Coded by StevenRS11 and SenseiKiwi, Logo and Testing by Jaitsu",
"logoFile": "/dimdoors_logo.png", "logoFile": "/dimdoors_logo.png",
"mcversion": "", "mcversion": "",
@ -15,3 +18,4 @@
"dependencies": [ "Forge"] "dependencies": [ "Forge"]
} }
] ]
}