diff --git a/StevenDimDoors/mod_pocketDim/blocks/BaseDimDoor.java b/StevenDimDoors/mod_pocketDim/blocks/BaseDimDoor.java index 8446341d..54f844f0 100644 --- a/StevenDimDoors/mod_pocketDim/blocks/BaseDimDoor.java +++ b/StevenDimDoors/mod_pocketDim/blocks/BaseDimDoor.java @@ -8,7 +8,6 @@ import net.minecraft.block.ITileEntityProvider; 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.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; diff --git a/StevenDimDoors/mod_pocketDim/blocks/TransientDoor.java b/StevenDimDoors/mod_pocketDim/blocks/TransientDoor.java index d19eb112..a47d7e98 100644 --- a/StevenDimDoors/mod_pocketDim/blocks/TransientDoor.java +++ b/StevenDimDoors/mod_pocketDim/blocks/TransientDoor.java @@ -10,7 +10,7 @@ import StevenDimDoors.mod_pocketDim.core.PocketManager; import net.minecraft.block.material.Material; import net.minecraft.client.particle.EntityFX; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; @@ -37,7 +37,7 @@ public class TransientDoor extends BaseDimDoor { boolean canUse = true; int metadata = world.getBlockMetadata(x, y - 1, z); - if (canUse && entity instanceof EntityLiving) + if (canUse && entity instanceof EntityPlayer) { // Don't check for non-living entities since it might not work right canUse = BaseDimDoor.isEntityFacingDoor(metadata, (EntityLivingBase) entity); diff --git a/StevenDimDoors/mod_pocketDim/core/DimLink.java b/StevenDimDoors/mod_pocketDim/core/DimLink.java index 9f1369d8..0b89b30e 100644 --- a/StevenDimDoors/mod_pocketDim/core/DimLink.java +++ b/StevenDimDoors/mod_pocketDim/core/DimLink.java @@ -4,7 +4,6 @@ import java.util.LinkedList; import java.util.List; import StevenDimDoors.mod_pocketDim.util.Point4D; -@Deprecated public abstract class DimLink { protected Point4D source; diff --git a/StevenDimDoors/mod_pocketDim/core/NewDimData.java b/StevenDimDoors/mod_pocketDim/core/NewDimData.java index 4c1d0027..4562252e 100644 --- a/StevenDimDoors/mod_pocketDim/core/NewDimData.java +++ b/StevenDimDoors/mod_pocketDim/core/NewDimData.java @@ -337,7 +337,11 @@ public abstract class NewDimData { linkList.remove(target); //Raise deletion event - linkWatcher.onDeleted(target.source); + //TODO why is source null here? + if(target.source!=null) + { + linkWatcher.onDeleted(target.source); + } target.clear(); } return (target != null); diff --git a/StevenDimDoors/mod_pocketDim/helpers/ChunkLoaderHelper.java b/StevenDimDoors/mod_pocketDim/helpers/ChunkLoaderHelper.java index 140e2a88..c14e9557 100644 --- a/StevenDimDoors/mod_pocketDim/helpers/ChunkLoaderHelper.java +++ b/StevenDimDoors/mod_pocketDim/helpers/ChunkLoaderHelper.java @@ -1,6 +1,7 @@ package StevenDimDoors.mod_pocketDim.helpers; import StevenDimDoors.mod_pocketDim.IChunkLoader; +import StevenDimDoors.mod_pocketDim.mod_pocketDim; import StevenDimDoors.mod_pocketDim.core.NewDimData; import StevenDimDoors.mod_pocketDim.core.PocketManager; @@ -26,9 +27,15 @@ public class ChunkLoaderHelper implements LoadingCallback int goldDimDoorX = ticket.getModData().getInteger("goldDimDoorX"); int goldDimDoorY = ticket.getModData().getInteger("goldDimDoorY"); int goldDimDoorZ = ticket.getModData().getInteger("goldDimDoorZ"); - IChunkLoader tile = (IChunkLoader) world.getBlockTileEntity(goldDimDoorX, goldDimDoorY, goldDimDoorZ); - tile.forceChunkLoading(ticket,goldDimDoorX,goldDimDoorZ); - + if(world.getBlockId(goldDimDoorX, goldDimDoorY, goldDimDoorZ)!=mod_pocketDim.properties.GoldDimDoorID) + { + ForgeChunkManager.releaseTicket(ticket); + } + else + { + IChunkLoader tile = (IChunkLoader) world.getBlockTileEntity(goldDimDoorX, goldDimDoorY, goldDimDoorZ); + tile.forceChunkLoading(ticket,goldDimDoorX,goldDimDoorZ); + } } } diff --git a/StevenDimDoors/mod_pocketDim/items/itemRiftRemover.java b/StevenDimDoors/mod_pocketDim/items/itemRiftRemover.java index b2824d68..119e5786 100644 --- a/StevenDimDoors/mod_pocketDim/items/itemRiftRemover.java +++ b/StevenDimDoors/mod_pocketDim/items/itemRiftRemover.java @@ -115,7 +115,7 @@ public class itemRiftRemover extends Item { stack.damageItem(1, player); } - player.worldObj.playSoundAtEntity(player, "mods.DimDoors.sfx.riftClose", 0.8f, 1); + player.worldObj.playSoundAtEntity(player, mod_pocketDim.modid+":riftClose", 0.8f, 1); } } } diff --git a/StevenDimDoors/mod_pocketDim/tileentities/TileEntityDimDoorGold.java b/StevenDimDoors/mod_pocketDim/tileentities/TileEntityDimDoorGold.java index 819eecde..db5c51d1 100644 --- a/StevenDimDoors/mod_pocketDim/tileentities/TileEntityDimDoorGold.java +++ b/StevenDimDoors/mod_pocketDim/tileentities/TileEntityDimDoorGold.java @@ -52,10 +52,17 @@ public class TileEntityDimDoorGold extends TileEntityDimDoor implements IChunkLo return; } - for(int chunks = (PocketBuilder.DEFAULT_POCKET_SIZE/16) + 1; chunks > 0; --chunks) + //TODO fix this + for(int chunksX = (PocketBuilder.DEFAULT_POCKET_SIZE/16) + 1; chunksX > 0; --chunksX) { - ForgeChunkManager.forceChunk(chunkTicket, new ChunkCoordIntPair((xCoord >> 4) + chunks, - (zCoord >> 4) + chunks)); + ForgeChunkManager.forceChunk(chunkTicket, new ChunkCoordIntPair((xCoord >> 4) + chunksX, + (zCoord >> 4))); + + for(int chunksZ = (PocketBuilder.DEFAULT_POCKET_SIZE/16) + 1; chunksZ > 0; --chunksZ) + { + ForgeChunkManager.forceChunk(chunkTicket, new ChunkCoordIntPair((xCoord >> 4), + (zCoord >> 4) + chunksZ)); + } } } diff --git a/StevenDimDoors/mod_pocketDim/tileentities/TileEntityRift.java b/StevenDimDoors/mod_pocketDim/tileentities/TileEntityRift.java index 21516cf9..5f795e61 100644 --- a/StevenDimDoors/mod_pocketDim/tileentities/TileEntityRift.java +++ b/StevenDimDoors/mod_pocketDim/tileentities/TileEntityRift.java @@ -186,7 +186,10 @@ public class TileEntityRift extends TileEntity worldObj.setBlockToAir(xCoord, yCoord, zCoord); if (dimension.getLink(xCoord, yCoord, zCoord) != null) { - dimension.deleteLink(xCoord, yCoord, zCoord); + if(!this.worldObj.isRemote) + { + dimension.deleteLink(xCoord, yCoord, zCoord); + } worldObj.playSound(xCoord, yCoord, zCoord, "mods.DimDoors.sfx.riftClose", (float) .7, 1, true); } } diff --git a/StevenDimDoors/mod_pocketDimClient/RenderDimDoor.java b/StevenDimDoors/mod_pocketDimClient/RenderDimDoor.java index 4f5ecd4e..8fd12a08 100644 --- a/StevenDimDoors/mod_pocketDimClient/RenderDimDoor.java +++ b/StevenDimDoors/mod_pocketDimClient/RenderDimDoor.java @@ -22,8 +22,8 @@ import cpw.mods.fml.relauncher.SideOnly; public class RenderDimDoor extends TileEntitySpecialRenderer { FloatBuffer field_76908_a = GLAllocation.createDirectFloatBuffer(16); - private ResourceLocation riftPath= new ResourceLocation(mod_pocketDim.modid+":/RIFT.png"); - private ResourceLocation warpPath= new ResourceLocation(mod_pocketDim.modid+":/WARP.png"); + private ResourceLocation riftPath= new ResourceLocation(mod_pocketDim.modid+":textures/other/RIFT.png"); + private ResourceLocation warpPath= new ResourceLocation(mod_pocketDim.modid+":textures/other/WARP.png"); public RenderDimDoor() { diff --git a/StevenDimDoors/mod_pocketDimClient/RenderTransTrapdoor.java b/StevenDimDoors/mod_pocketDimClient/RenderTransTrapdoor.java index 7677ce6c..dc65e578 100644 --- a/StevenDimDoors/mod_pocketDimClient/RenderTransTrapdoor.java +++ b/StevenDimDoors/mod_pocketDimClient/RenderTransTrapdoor.java @@ -23,8 +23,8 @@ public class RenderTransTrapdoor extends TileEntitySpecialRenderer { private FloatBuffer field_76908_a = GLAllocation.createDirectFloatBuffer(16); private static DDProperties properties = null; - private ResourceLocation riftPath= new ResourceLocation(mod_pocketDim.modid+":/RIFT.png"); - private ResourceLocation warpPath= new ResourceLocation(mod_pocketDim.modid+":/WARP.png"); + private ResourceLocation riftPath= new ResourceLocation(mod_pocketDim.modid+":textures/other/RIFT.png"); + private ResourceLocation warpPath= new ResourceLocation(mod_pocketDim.modid+":textures/other/WARP.png"); public RenderTransTrapdoor() diff --git a/resources/mods/dimdoors/RIFT.png b/resources/mods/dimdoors/RIFT.png deleted file mode 100644 index ae24e834..00000000 Binary files a/resources/mods/dimdoors/RIFT.png and /dev/null differ diff --git a/resources/mods/dimdoors/WARP.png b/resources/mods/dimdoors/WARP.png deleted file mode 100644 index fd8efb2c..00000000 Binary files a/resources/mods/dimdoors/WARP.png and /dev/null differ