Various fixes
This commit is contained in:
parent
f2f1ee7af9
commit
bb7cd95dcc
12 changed files with 36 additions and 17 deletions
|
@ -8,7 +8,6 @@ import net.minecraft.block.ITileEntityProvider;
|
||||||
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.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import StevenDimDoors.mod_pocketDim.core.PocketManager;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.particle.EntityFX;
|
import net.minecraft.client.particle.EntityFX;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
@ -37,7 +37,7 @@ public class TransientDoor extends BaseDimDoor
|
||||||
{
|
{
|
||||||
boolean canUse = true;
|
boolean canUse = true;
|
||||||
int metadata = world.getBlockMetadata(x, y - 1, z);
|
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
|
// Don't check for non-living entities since it might not work right
|
||||||
canUse = BaseDimDoor.isEntityFacingDoor(metadata, (EntityLivingBase) entity);
|
canUse = BaseDimDoor.isEntityFacingDoor(metadata, (EntityLivingBase) entity);
|
||||||
|
|
|
@ -4,7 +4,6 @@ import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import StevenDimDoors.mod_pocketDim.util.Point4D;
|
import StevenDimDoors.mod_pocketDim.util.Point4D;
|
||||||
@Deprecated
|
|
||||||
public abstract class DimLink
|
public abstract class DimLink
|
||||||
{
|
{
|
||||||
protected Point4D source;
|
protected Point4D source;
|
||||||
|
|
|
@ -337,7 +337,11 @@ public abstract class NewDimData
|
||||||
{
|
{
|
||||||
linkList.remove(target);
|
linkList.remove(target);
|
||||||
//Raise deletion event
|
//Raise deletion event
|
||||||
linkWatcher.onDeleted(target.source);
|
//TODO why is source null here?
|
||||||
|
if(target.source!=null)
|
||||||
|
{
|
||||||
|
linkWatcher.onDeleted(target.source);
|
||||||
|
}
|
||||||
target.clear();
|
target.clear();
|
||||||
}
|
}
|
||||||
return (target != null);
|
return (target != null);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package StevenDimDoors.mod_pocketDim.helpers;
|
package StevenDimDoors.mod_pocketDim.helpers;
|
||||||
|
|
||||||
import StevenDimDoors.mod_pocketDim.IChunkLoader;
|
import StevenDimDoors.mod_pocketDim.IChunkLoader;
|
||||||
|
import StevenDimDoors.mod_pocketDim.mod_pocketDim;
|
||||||
import StevenDimDoors.mod_pocketDim.core.NewDimData;
|
import StevenDimDoors.mod_pocketDim.core.NewDimData;
|
||||||
import StevenDimDoors.mod_pocketDim.core.PocketManager;
|
import StevenDimDoors.mod_pocketDim.core.PocketManager;
|
||||||
|
|
||||||
|
@ -26,9 +27,15 @@ public class ChunkLoaderHelper implements LoadingCallback
|
||||||
int goldDimDoorX = ticket.getModData().getInteger("goldDimDoorX");
|
int goldDimDoorX = ticket.getModData().getInteger("goldDimDoorX");
|
||||||
int goldDimDoorY = ticket.getModData().getInteger("goldDimDoorY");
|
int goldDimDoorY = ticket.getModData().getInteger("goldDimDoorY");
|
||||||
int goldDimDoorZ = ticket.getModData().getInteger("goldDimDoorZ");
|
int goldDimDoorZ = ticket.getModData().getInteger("goldDimDoorZ");
|
||||||
IChunkLoader tile = (IChunkLoader) world.getBlockTileEntity(goldDimDoorX, goldDimDoorY, goldDimDoorZ);
|
if(world.getBlockId(goldDimDoorX, goldDimDoorY, goldDimDoorZ)!=mod_pocketDim.properties.GoldDimDoorID)
|
||||||
tile.forceChunkLoading(ticket,goldDimDoorX,goldDimDoorZ);
|
{
|
||||||
|
ForgeChunkManager.releaseTicket(ticket);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IChunkLoader tile = (IChunkLoader) world.getBlockTileEntity(goldDimDoorX, goldDimDoorY, goldDimDoorZ);
|
||||||
|
tile.forceChunkLoading(ticket,goldDimDoorX,goldDimDoorZ);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ public class itemRiftRemover extends Item
|
||||||
{
|
{
|
||||||
stack.damageItem(1, player);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,10 +52,17 @@ public class TileEntityDimDoorGold extends TileEntityDimDoor implements IChunkLo
|
||||||
return;
|
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,
|
ForgeChunkManager.forceChunk(chunkTicket, new ChunkCoordIntPair((xCoord >> 4) + chunksX,
|
||||||
(zCoord >> 4) + chunks));
|
(zCoord >> 4)));
|
||||||
|
|
||||||
|
for(int chunksZ = (PocketBuilder.DEFAULT_POCKET_SIZE/16) + 1; chunksZ > 0; --chunksZ)
|
||||||
|
{
|
||||||
|
ForgeChunkManager.forceChunk(chunkTicket, new ChunkCoordIntPair((xCoord >> 4),
|
||||||
|
(zCoord >> 4) + chunksZ));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -186,7 +186,10 @@ public class TileEntityRift extends TileEntity
|
||||||
worldObj.setBlockToAir(xCoord, yCoord, zCoord);
|
worldObj.setBlockToAir(xCoord, yCoord, zCoord);
|
||||||
if (dimension.getLink(xCoord, yCoord, zCoord) != null)
|
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);
|
worldObj.playSound(xCoord, yCoord, zCoord, "mods.DimDoors.sfx.riftClose", (float) .7, 1, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,8 +22,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||||
public class RenderDimDoor extends TileEntitySpecialRenderer
|
public class RenderDimDoor extends TileEntitySpecialRenderer
|
||||||
{
|
{
|
||||||
FloatBuffer field_76908_a = GLAllocation.createDirectFloatBuffer(16);
|
FloatBuffer field_76908_a = GLAllocation.createDirectFloatBuffer(16);
|
||||||
private ResourceLocation riftPath= new ResourceLocation(mod_pocketDim.modid+":/RIFT.png");
|
private ResourceLocation riftPath= new ResourceLocation(mod_pocketDim.modid+":textures/other/RIFT.png");
|
||||||
private ResourceLocation warpPath= new ResourceLocation(mod_pocketDim.modid+":/WARP.png");
|
private ResourceLocation warpPath= new ResourceLocation(mod_pocketDim.modid+":textures/other/WARP.png");
|
||||||
|
|
||||||
public RenderDimDoor()
|
public RenderDimDoor()
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,8 +23,8 @@ public class RenderTransTrapdoor extends TileEntitySpecialRenderer
|
||||||
{
|
{
|
||||||
private FloatBuffer field_76908_a = GLAllocation.createDirectFloatBuffer(16);
|
private FloatBuffer field_76908_a = GLAllocation.createDirectFloatBuffer(16);
|
||||||
private static DDProperties properties = null;
|
private static DDProperties properties = null;
|
||||||
private ResourceLocation riftPath= new ResourceLocation(mod_pocketDim.modid+":/RIFT.png");
|
private ResourceLocation riftPath= new ResourceLocation(mod_pocketDim.modid+":textures/other/RIFT.png");
|
||||||
private ResourceLocation warpPath= new ResourceLocation(mod_pocketDim.modid+":/WARP.png");
|
private ResourceLocation warpPath= new ResourceLocation(mod_pocketDim.modid+":textures/other/WARP.png");
|
||||||
|
|
||||||
|
|
||||||
public RenderTransTrapdoor()
|
public RenderTransTrapdoor()
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 345 KiB |
Binary file not shown.
Before Width: | Height: | Size: 471 KiB |
Loading…
Reference in a new issue