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
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/crack.ogg", (mod_pocketDim.class.getResource("/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/rift.ogg", (mod_pocketDim.class.getResource("/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/riftEnd.ogg", (mod_pocketDim.class.getResource("/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/riftDoor.ogg", (mod_pocketDim.class.getResource("/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.soundPoolSounds.addSound("mods/DimDoors/sfx/monk.ogg");
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/crack.ogg");
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/tearing.ogg");
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/rift.ogg");
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftStart.ogg");
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftEnd.ogg");
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftClose.ogg");
event.manager.soundPoolSounds.addSound("mods/DimDoors/sfx/riftDoor.ogg");
event.manager.soundPoolMusic.addSound("mods/DimDoors/sfx/creepy.ogg");
}
@SideOnly(Side.CLIENT)
@ -96,7 +96,7 @@ public class EventHookContainer
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);
DDTeleporter.teleportEntity(player, destination, false);
player.setEntityHealth(player.getMaxHealth());
player.setHealth(player.getMaxHealth());
event.setCanceled(true);
return false;
}
@ -119,7 +119,7 @@ public class EventHookContainer
SoundSystem sndSystem = FMLClientHandler.instance().getClient().sndManager.sndSystem;
sndSystem.stop("BgMusic");
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");
}
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)
{
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_top");
this.blockIconBottom = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName2()+"_bottom");
this.blockIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5)+"_top");
this.blockIconBottom = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().substring(5)+"_bottom");
}
@SideOnly(Side.CLIENT)

View file

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

View file

@ -32,7 +32,7 @@ public class BlockDimWallPerm extends Block
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)

View file

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

View file

@ -40,7 +40,7 @@ public class BlockLimbo extends Block
@Override
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

View file

@ -66,7 +66,7 @@ public class BlockRift extends BlockContainer
@Override
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)

View file

@ -32,7 +32,7 @@ public class TransTrapdoor extends BlockTrapDoor implements IDimDoor, ITileEntit
@Override
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

View file

@ -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;
@ -30,6 +31,13 @@ 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)
{
@ -54,9 +62,9 @@ public class CommandCreateDungeonRift extends DDCommandBase
Collection<String> dungeonNames = dungeonHelper.getDungeonNames();
for (String name : dungeonNames)
{
sender.sendChatToPlayer(name);
sender.addChatMessage(name);
}
sender.sendChatToPlayer("");
sender.addChatMessage("");
}
else
{
@ -74,7 +82,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.sendChatToPlayer("Created a rift to a random dungeon.");
sender.addChatMessage("Created a rift to a random dungeon.");
}
else
{
@ -93,7 +101,7 @@ public class CommandCreateDungeonRift extends DDCommandBase
PocketBuilder.generateSelectedDungeonPocket(link, mod_pocketDim.properties, 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() + ").");
sender.addChatMessage("Created a rift to \"" + result.schematicName() + "\" dungeon (Dimension ID = " + link.destination().getDimension() + ").");
}
else
{

View file

@ -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;
@ -20,6 +21,11 @@ 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)
{
@ -41,7 +47,7 @@ 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.");
sender.addChatMessage("Created a door to a pocket dimension. Please build your dungeon there.");
}
return DDCommandResult.SUCCESS;
}

View file

@ -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;
@ -26,6 +27,11 @@ 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)
{
@ -41,7 +47,7 @@ public class CommandDeleteAllLinks extends DDCommandBase
{
targetDim=0;
shouldGo=false;
sender.sendChatToPlayer("Error-Invalid argument, delete_all_links <targetDimID>");
sender.addChatMessage("Error-Invalid argument, delete_all_links <targetDimID>");
}
if(shouldGo)
@ -59,7 +65,7 @@ public class CommandDeleteAllLinks extends DDCommandBase
linksRemoved++;
}
sender.sendChatToPlayer("Removed " + linksRemoved + " links.");
sender.addChatMessage("Removed " + linksRemoved + " links.");
}
return DDCommandResult.SUCCESS; //TEMPORARY HACK

View file

@ -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;
@ -26,6 +27,11 @@ 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)
{
@ -41,7 +47,7 @@ public class CommandDeleteRifts extends DDCommandBase
{
targetDim=0;
shouldGo=false;
sender.sendChatToPlayer("Error-Invalid argument, delete_all_links <targetDimID>");
sender.addChatMessage("Error-Invalid argument, delete_all_links <targetDimID>");
}
if(shouldGo)
@ -61,7 +67,7 @@ public class CommandDeleteRifts extends DDCommandBase
dim.deleteLink(link);
}
}
sender.sendChatToPlayer("Removed " + linksRemoved + " rifts.");
sender.addChatMessage("Removed " + linksRemoved + " rifts.");
}
return DDCommandResult.SUCCESS; //TEMPORARY HACK

View file

@ -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;
@ -25,6 +26,13 @@ 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)
{
@ -132,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.sendChatToPlayer("Saved dungeon schematic in " + exportPath);
player.addChatMessage("Saved dungeon schematic in " + exportPath);
dungeonHelper.registerDungeon(exportPath, dungeonHelper.getDungeonPack("ruins"), false, true);
return DDCommandResult.SUCCESS;
}

View file

@ -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;
@ -26,6 +27,11 @@ public class CommandResetDungeons extends DDCommandBase
return instance;
}
@Override
public String getCommandUsage(ICommandSender sender) {
return "/dd-resetdungeons";
}
@Override
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 implement blackList
//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;
}
}

View file

@ -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;
@ -36,6 +37,11 @@ public class CommandTeleportPlayer extends DDCommandBase
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.
*/

View file

@ -63,10 +63,10 @@ public abstract class DDCommandBase extends CommandBase
//Send the argument formats for this command
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;
}
// Memory concerns.
oldWorld.releaseEntitySkin(entity);
oldWorld.onEntityRemoved(entity);
if (player == null) // Are we NOT working with a player?
{
NBTTagCompound entityNBT = new NBTTagCompound();
entity.isDead = false;
entity.addEntityID(entityNBT);
entity.writeMountToNBT(entityNBT);
entity.isDead = true;
entity = EntityList.createEntityFromNBT(entityNBT, newWorld);

View file

@ -28,6 +28,6 @@ public class ItemBlockDimWall extends ItemBlock
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 com.google.common.collect.Multimap;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
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.EntityPlayerMP;
import net.minecraft.item.EnumToolMaterial;
@ -60,10 +64,12 @@ public class ItemRiftBlade extends ItemSword
}
@Override
public int getDamageVsEntity(Entity par1Entity)
{
return 7;
}
public Multimap getItemAttributeModifiers()
{
Multimap multimap = super.getItemAttributeModifiers();
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Weapon modifier", (double)7, 0));
return multimap;
}
@Override
@SideOnly(Side.CLIENT)
@ -73,7 +79,7 @@ public class ItemRiftBlade extends ItemSword
}
@Override
public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving)
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLiving, EntityLivingBase par3EntityLiving)
{
par1ItemStack.damageItem(1, par3EntityLiving);
return true;

View file

@ -98,14 +98,14 @@ public class ItemRiftSignature extends Item
stack.stackSize--;
}
clearSource(stack);
player.sendChatToPlayer("Rift Created");
player.addChatMessage("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.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);
}
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.
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;
}
@ -86,14 +86,14 @@ public class ItemStabilizedRiftSignature extends ItemRiftSignature
{
player.inventory.consumeInventoryItem(Item.enderPearl.itemID);
}
player.sendChatToPlayer("Rift Created");
player.addChatMessage("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.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);
}
return true;

View file

@ -94,7 +94,7 @@ serverPacketHandlerSpec =
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";
//need to clean up

View file

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

View file

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

View file

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

View file

@ -1,5 +1,6 @@
package StevenDimDoors.mod_pocketDim.world;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
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);
RenderHelper.disableStandardItemLighting();
GL11.glDepthMask(false);
mc.renderEngine.bindTexture("/misc/tunnel.png");
mc.renderEngine.bindTexture(new ResourceLocation("/misc/tunnel.png"));
Tessellator tessellator = Tessellator.instance;
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(world.getCelestialAngle(par1) * 360.0F, 1.0F, 0.0F, 0.0F);
f10 = 30.0F;
mc.renderEngine.bindTexture(this.getSunRenderPath());
mc.renderEngine.bindTexture(new ResourceLocation(this.getSunRenderPath()));
tessellator1.startDrawingQuads();
tessellator1.addVertexWithUV((double)(-f10), 100.0D, (double)(-f10), 0.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.draw();
f10 = 20.0F;
mc.renderEngine.bindTexture(this.getMoonRenderPath());
mc.renderEngine.bindTexture(new ResourceLocation(this.getMoonRenderPath()));
int k = world.getMoonPhase();
int l = k % 4;
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.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import StevenDimDoors.mod_pocketDim.DDProperties;
@ -65,7 +66,7 @@ public class RenderDimDoor extends TileEntitySpecialRenderer
if (count == 0)
{
this.bindTextureByName("/RIFT.png");
this.bindTexture(new ResourceLocation("/RIFT.png"));
var17 = 0.1F;
var15 = 25.0F;
var16 = 0.125F;
@ -75,7 +76,7 @@ public class RenderDimDoor extends TileEntitySpecialRenderer
if (count == 1)
{
this.bindTextureByName("/WARP.png");
this.bindTexture(new ResourceLocation("/WARP.png"));
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
var16 = .5F;

View file

@ -3,6 +3,8 @@ package StevenDimDoors.mod_pocketDimClient;
import net.minecraft.client.renderer.entity.RenderLiving;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
@SideOnly(Side.CLIENT)
public class RenderMobObelisk extends RenderLiving
@ -16,6 +18,11 @@ 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.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import StevenDimDoors.mod_pocketDim.DDProperties;
@ -62,7 +63,7 @@ public class RenderTransTrapdoor extends TileEntitySpecialRenderer
if (count == 0)
{
this.bindTextureByName("/RIFT.png");
this.bindTexture(new ResourceLocation("/RIFT.png"));
var17 = 0.1F;
var15 = 25.0F;
var16 = 0.125F;
@ -72,7 +73,7 @@ public class RenderTransTrapdoor extends TileEntitySpecialRenderer
if (count == 1)
{
this.bindTextureByName("/WARP.png");
this.bindTexture(new ResourceLocation("/WARP.png"));
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
var16 = .5F;

192
build.xml
View file

@ -1,64 +1,93 @@
<project name="DimensionalDoors" default="install" basedir=".">
<project name="Necromancy" default="install" basedir=".">
<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="classes.dir" value="${build.dir}/packaging" />
<property name="src.dir" value="src" />
<property name="forge.version" value="1.5.2-7.8.0.691" />
<property name="resourcePack.dir" value="${classes.dir}/assets/" />
<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="mcp.version" value="751" />
<property name="forge.dir" value="${build.dir}/forge" />
<property name="mcp.dir" value="${forge.dir}/mcp" />
<property name="mcpsrc.dir" value="${mcp.dir}/src/minecraft" />
<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="mcpsrc.dir" value="${mcp.dir}/src/minecraft/StevenDimDoors" />
<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="download.dir" value="downloads" />
<property name="download.dir" value="${build.dir}/downloads" />
<property name="lib.dir" value="${mcp.dir}/lib" />
<property file="${forge.dir}/forgeversion.properties" />
<condition property="forge.already.installed">
<equals arg1="${forge.build.number}" arg2="691" />
<equals arg1="${forge.build.number}" arg2="${forge.buildnum}" />
</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="${build.dir}" />
<target name="get-version" depends="setup-forge">
<mkdir dir="${mcpsrc.dir}/StevenDimDoors" />
<copy todir="${mcpsrc.dir}/StevenDimDoors" overwrite="true">
<fileset dir="StevenDimDoors" />
</copy>
<exec dir="${verclass.dir}" executable="sh" osfamily="unix" outputproperty="grep.out">
<arg value="-c"/>
<arg value="grep -o -P '[0-9.]+R[0-9.]+(RC[0-9]+)?(B[0-9]+)?' ${verclass.name}"/>
</exec>
<exec executable="python" osfamily="unix">
<arg value="versionscript.py" />
<arg value="${grep.out}" />
</exec>
<echo message="Grepped version: ${grep.out}"/>
<copy todir="${classes.dir}" file="mcmod.info" overwrite="true"/>
<target name="get-version" depends="setup-forge">
<!-- Copy source -->
<copy todir="${mcpsrc.dir}" overwrite="true">
<fileset dir="${src.dir}"/>
</copy>
<!-- Get the version from the mcmod.info -->
<script language="javascript">
importClass(java.io.File);
importClass(java.nio.file.Files)
importClass(java.io.FileReader);
importClass(java.io.BufferedReader);
importClass(java.io.FileWriter);
importClass(java.io.BufferedWriter);
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>
<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}/deathrat" />
<available property="already-compiled" file="${classes.dir}/${src.dir}" />
<condition property="should-download-ant-contrib">
<or>
<available file="${download.dir}/ant-contrib/ant-contrib-1.0b3.jar"/>
@ -67,27 +96,16 @@
</condition>
<target name="install" depends="build">
<copy todir="${classes.dir}/schematics" overwrite="true">
<fileset dir="schematics" />
</copy>
<zip destfile="${dist.dir}/DimensionalDoors-${grep.out}-${build.number}.zip" basedir="${classes.dir}"/>
<delete dir="${mcpsrc.dir}/${src.dir}" />
<delete dir="${dist.dir}" />
<jar destfile="${dist.dir}/${project.name}-${mod.version}-${build.number}.jar" basedir="${classes.dir}"/>
<delete dir="${classes.dir}" />
<delete dir="${mcp.dir}/reobf"/>
<delete dir="${mcpsrc.dir}/StevenDimDoors" />
<delete dir="${mcpsrc.dir}/Steven" />
</target>
<target name="get-gson" unless="gson-exists">
<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>
<delete dir="{$apiclasses.dir}" />
<delete dir="${mcpsrc.dir}/${src.dir}" />
</target>
<target name="build" depends="get-version,get-gson" unless="already-compiled">
<target name="build" depends="get-version" unless="already-compiled">
<!-- Recompile -->
<exec dir="${mcp.dir}" executable="cmd" osfamily="windows" failonerror="true">
<arg line="/c recompile.bat"/>
@ -99,19 +117,40 @@
<!-- Reobf -->
<exec dir="${mcp.dir}" executable="cmd" osfamily="windows">
<arg line="/c reobfuscate_srg.bat"/>
<arg line="/c reobfuscate.bat --srgnames"/>
</exec>
<exec dir="${mcp.dir}" executable="sh" osfamily="unix">
<arg value="reobfuscate_srg.sh" />
<arg value="reobfuscate.sh" />
</exec>
<copy todir="${classes.dir}">
<fileset dir="${mcp.dir}/reobf/minecraft"/>
</copy>
<copy todir="${classes.dir}">
<fileset dir="${resources.dir}"/>
<copy todir="${resourcePack.dir}">
<fileset dir="${resources.dir}" />
</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 name="build-number-there" if="env.BUILD_NUMBER" >
@ -121,7 +160,7 @@
<target name="build-number-not-there" unless="env.BUILD_NUMBER" >
<echo message="!! No build number set !!" />
<property name="build.number" value="CUSTOM_BUILD" />
<property name="build.number" value="0" />
</target>
<target name="setup-forge" depends="download-forge,build-number-there,build-number-not-there" unless="forge.already.installed">
@ -132,16 +171,10 @@
<include name="minecraftforge-src-${forge.version}.zip"/>
</fileset>
</unzip>
<!-- Change executables' permitions -->
<chmod file="${forge.dir}/install.sh" perm="+x"/>
<!-- if your building on OSX these 2 should be executable -->
<!-- Install forge -->
<delete dir="${mcp.dir}" failonerror="no"/>
<exec dir="${forge.dir}" executable="cmd" osfamily="windows" inputstring="Yes\n">
@ -151,29 +184,12 @@
<exec dir="${forge.dir}" executable="sh" osfamily="unix" inputstring="Yes\n">
<arg value="install.sh" />
</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}/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/jad-osx" perm="+x" />
<!-- Copy libraries -->
<!-- <copy todir="${mcp.dir}/lib" >
<fileset dir="lib" >
<patternset includes="*.jar" />
</fileset>
</copy> -->
</target>
<target name="download-forge" depends="download-ant-contrib" unless="forge-exists">
@ -186,11 +202,10 @@
</classpath>
</taskdef>
<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 name="download-ant-contrib" unless="should-download-ant-contrib">
<echo message="Getting: ant-contrib"/>
<mkdir dir="${download.dir}/tmp"/>
@ -216,5 +231,4 @@
</target>
</project>
</project>

View file

@ -1,9 +1,12 @@
{
"modinfoversion":2,
"modlist":
[
{
"modid": "DimDoors",
"name": "Dimensional Doors",
"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",
"logoFile": "/dimdoors_logo.png",
"mcversion": "",
@ -15,3 +18,4 @@
"dependencies": [ "Forge"]
}
]
}