Various fixes

This commit is contained in:
StevenRS11 2013-11-07 00:28:40 -05:00
parent f2f1ee7af9
commit bb7cd95dcc
12 changed files with 36 additions and 17 deletions

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -337,7 +337,11 @@ public abstract class NewDimData
{
linkList.remove(target);
//Raise deletion event
//TODO why is source null here?
if(target.source!=null)
{
linkWatcher.onDeleted(target.source);
}
target.clear();
}
return (target != null);

View file

@ -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");
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);
}
}
}

View file

@ -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);
}
}
}

View file

@ -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));
}
}
}

View file

@ -185,8 +185,11 @@ public class TileEntityRift extends TileEntity
this.invalidate();
worldObj.setBlockToAir(xCoord, yCoord, zCoord);
if (dimension.getLink(xCoord, yCoord, zCoord) != null)
{
if(!this.worldObj.isRemote)
{
dimension.deleteLink(xCoord, yCoord, zCoord);
}
worldObj.playSound(xCoord, yCoord, zCoord, "mods.DimDoors.sfx.riftClose", (float) .7, 1, true);
}
}

View file

@ -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()
{

View file

@ -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()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 345 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 471 KiB