Fixed Slow Rift Regeneration and Various Improvements #173
@@ -63,14 +63,6 @@ public class TransTrapdoor extends BlockTrapDoor implements IDimDoor, ITileEntit
|
||||
{
|
||||
this.placeLink(world, x, y, z);
|
||||
world.setBlockTileEntity(x, y, z, this.createNewTileEntity(world));
|
||||
updateAttachedTile(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random random)
|
||||
{
|
||||
TileEntityTransTrapdoor tile = (TileEntityTransTrapdoor) world.getBlockTileEntity(x, y, z);
|
||||
tile.hasRift = PocketManager.getLink(x, y, z, world) != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -79,16 +71,6 @@ public class TransTrapdoor extends BlockTrapDoor implements IDimDoor, ITileEntit
|
||||
return new TileEntityTransTrapdoor();
|
||||
}
|
||||
|
||||
public static void updateAttachedTile(World world, int x, int y, int z)
|
||||
{
|
||||
TileEntity tile = world.getBlockTileEntity(x, y, z);
|
||||
if (tile instanceof TileEntityTransTrapdoor)
|
||||
{
|
||||
TileEntityTransTrapdoor trapdoorTile = (TileEntityTransTrapdoor) tile;
|
||||
trapdoorTile.hasRift = (PocketManager.getLink(x, y, z, world) != null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void placeLink(World world, int x, int y, int z)
|
||||
{
|
||||
|
||||
@@ -6,8 +6,6 @@ import StevenDimDoors.mod_pocketDim.mod_pocketDim;
|
||||
|
||||
public class TileEntityTransTrapdoor extends DDTileEntityBase
|
||||
{
|
||||
public boolean hasRift;
|
||||
|
||||
@Override
|
||||
public boolean canUpdate()
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ package StevenDimDoors.mod_pocketDimClient;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.BlockTrapDoor;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
@@ -38,21 +39,6 @@ public class RenderTransTrapdoor extends TileEntitySpecialRenderer
|
||||
*/
|
||||
public void renderTransTrapdoorTileEntity(TileEntityTransTrapdoor tile, double x, double y, double z, float par8)
|
||||
{
|
||||
try
|
||||
{
|
||||
mod_pocketDim.transTrapdoor.updateAttachedTile(tile.worldObj, tile.xCoord, tile.yCoord, tile.zCoord);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
// float playerX = (float)this.tileEntityRenderer.playerX;
|
||||
// float playerY = (float)this.tileEntityRenderer.playerY;
|
||||
// float playerZ = (float)this.tileEntityRenderer.playerZ;
|
||||
|
||||
//float distance = (float) tile.getDistanceFrom(playerX, playerY, playerZ);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
Random random = new Random(31100L);
|
||||
int metadata = tile.worldObj.getBlockMetadata(tile.xCoord, tile.yCoord, tile.zCoord);
|
||||
@@ -77,7 +63,6 @@ public class RenderTransTrapdoor extends TileEntitySpecialRenderer
|
||||
if (count == 1)
|
||||
{
|
||||
this.bindTexture(warpPath);
|
||||
// move files into assets/modid and change to new ResourceLocation(modid:/WARP.png)
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
|
||||
var16 = .5F;
|
||||
@@ -127,7 +112,7 @@ public class RenderTransTrapdoor extends TileEntitySpecialRenderer
|
||||
GL11.glColor4d(var21 * var17, var22 * var17, var23 * var17, 1.0F);
|
||||
if (TransTrapdoor.isTrapdoorSetLow(metadata))
|
||||
{
|
||||
if (TransTrapdoor.isTrapdoorOpen(metadata))
|
||||
if (BlockTrapDoor.isTrapdoorOpen(metadata))
|
||||
{
|
||||
GL11.glVertex3d(x, y+0.2, z);
|
||||
GL11.glVertex3d(x, y+0.2, z+1);
|
||||
@@ -144,7 +129,7 @@ public class RenderTransTrapdoor extends TileEntitySpecialRenderer
|
||||
}
|
||||
else
|
||||
{
|
||||
if (TransTrapdoor.isTrapdoorOpen(metadata))
|
||||
if (BlockTrapDoor.isTrapdoorOpen(metadata))
|
||||
{
|
||||
GL11.glVertex3d(x, y+0.95, z);
|
||||
GL11.glVertex3d(x, y+0.95, z+1);
|
||||
@@ -180,6 +165,7 @@ public class RenderTransTrapdoor extends TileEntitySpecialRenderer
|
||||
return this.field_76908_a;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity par1TileEntity, double par2, double par4, double par6, float par8)
|
||||
{
|
||||
if (properties.DoorRenderingEnabled)
|
||||
|
||||
Reference in New Issue
Block a user