Fixed Pick Block Results #170

Merged
SenseiKiwi merged 9 commits from master into master 2014-07-11 15:38:21 +00:00
19 changed files with 164 additions and 147 deletions

View File

@@ -13,14 +13,15 @@ buildscript {
apply plugin: 'forge' apply plugin: 'forge'
version = "2.2.4-" + System.getenv("BUILD_NUMBER") version = "2.2.4-" + System.getenv("BUILD_NUMBER")
group= "com.stevenrs11.dimdoors" // http://maven.apache.org/guides/mini/guide-naming-conventions.html group = "com.stevenrs11.dimdoors" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "DimensionalDoors" archivesBaseName = "DimensionalDoors"
minecraft { minecraft {
version = "1.6.4-9.11.1.964" version = "1.6.4-9.11.1.964"
replaceIn "mod_pocketDim.java"
replace "@VERSION@", project.version
} }
targetCompatibility = '1.6' targetCompatibility = '1.6'
@@ -28,15 +29,15 @@ sourceCompatibility = '1.6'
processResources processResources
{ {
// replace stuff in mcmod.info, nothing else // Replace stuff $version and $mcversion in mcmod.info
from(sourceSets.main.resources.srcDirs) { from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info' include 'mcmod.info'
// replace version and mcversion // Replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version expand 'version':project.version, 'mcversion':project.minecraft.version
} }
// copy everything else, thats not the mcmod.info // Copy everything else
from(sourceSets.main.resources.srcDirs) { from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info' exclude 'mcmod.info'
} }

View File

@@ -11,7 +11,6 @@ import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
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.item.Item;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon; import net.minecraft.util.Icon;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
@@ -22,7 +21,6 @@ import StevenDimDoors.mod_pocketDim.config.DDProperties;
import StevenDimDoors.mod_pocketDim.core.DDTeleporter; import StevenDimDoors.mod_pocketDim.core.DDTeleporter;
import StevenDimDoors.mod_pocketDim.core.DimLink; import StevenDimDoors.mod_pocketDim.core.DimLink;
import StevenDimDoors.mod_pocketDim.core.PocketManager; import StevenDimDoors.mod_pocketDim.core.PocketManager;
import StevenDimDoors.mod_pocketDim.schematic.BlockRotator;
import StevenDimDoors.mod_pocketDim.tileentities.TileEntityDimDoor; import StevenDimDoors.mod_pocketDim.tileentities.TileEntityDimDoor;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@@ -159,16 +157,13 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
reversed = !reversed; reversed = !reversed;
} }
} }
if (isUpperDoorBlock(fullMetadata)) if (isUpperDoorBlock(fullMetadata))
{
return this.upperTextures[reversed ? 1 : 0]; return this.upperTextures[reversed ? 1 : 0];
else }
return this.lowerTextures[reversed ? 1 : 0]; return this.lowerTextures[reversed ? 1 : 0];
}
else
{
return this.lowerTextures[0];
} }
return this.lowerTextures[0];
} }
//Called to update the render information on the tile entity. Could probably implement a data watcher, //Called to update the render information on the tile entity. Could probably implement a data watcher,
@@ -180,29 +175,23 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
{ {
int metadata = world.getBlockMetadata(x, y, z); int metadata = world.getBlockMetadata(x, y, z);
TileEntityDimDoor dimTile = (TileEntityDimDoor) tile; TileEntityDimDoor dimTile = (TileEntityDimDoor) tile;
dimTile.openOrClosed = this.isDoorOnRift(world, x, y, z)&&this.isUpperDoorBlock(metadata); dimTile.openOrClosed = isDoorOnRift(world, x, y, z) && isUpperDoorBlock(metadata);
dimTile.orientation = this.getFullMetadata(world, x, y, z) & 7; dimTile.orientation = this.getFullMetadata(world, x, y, z) & 7;
} }
return this; return this;
} }
public boolean isDoorOnRift(World world, int x, int y, int z) public static boolean isDoorOnRift(World world, int x, int y, int z)
{ {
if(this.isUpperDoorBlock( world.getBlockMetadata(x, y, z))) if (isUpperDoorBlock(world.getBlockMetadata(x, y, z)))
{ {
if(PocketManager.getLink(x, y, z, world.provider.dimensionId) != null||PocketManager.getLink(x, y-1, z, world.provider.dimensionId) != null) // Target block is the upper block
{ return (PocketManager.getLink(x, y, z, world.provider.dimensionId) != null ||
return true; PocketManager.getLink(x, y - 1, z, world.provider.dimensionId) != null);
}
} }
else // Target block is the lower block
{ return (PocketManager.getLink(x, y, z, world.provider.dimensionId) != null ||
if(PocketManager.getLink(x, y, z, world.provider.dimensionId) != null||PocketManager.getLink(x, y+1, z, world.provider.dimensionId) != null) PocketManager.getLink(x, y + 1, z, world.provider.dimensionId) != null);
{
return true;
}
}
return false;
} }
/** /**
@@ -351,15 +340,16 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
*/ */
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public int idPicked(World par1World, int par2, int par3, int par4) public int idPicked(World world, int x, int y, int z)
{ {
return this.getDrops(); return this.getDoorItem();
} }
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int metadata, Random random, int fortune) @Override
public int idDropped(int metadata, Random random, int fortune)
{ {
return isUpperDoorBlock(metadata) ? 0 : this.getDrops(); return isUpperDoorBlock(metadata) ? 0 : this.getDrops();
} }

View File

@@ -88,6 +88,7 @@ public class BlockDimWall extends Block
subItems.add(new ItemStack(this, 1, ix)); subItems.add(new ItemStack(this, 1, ix));
} }
} }
@Override @Override
public void onBlockDestroyedByPlayer(World par1World, int par2, int par3, int par4, int par5) {} public void onBlockDestroyedByPlayer(World par1World, int par2, int par3, int par4, int par5) {}

View File

@@ -2,17 +2,16 @@ package StevenDimDoors.mod_pocketDim.blocks;
import java.util.Random; import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import StevenDimDoors.mod_pocketDim.mod_pocketDim;
import StevenDimDoors.mod_pocketDim.config.DDProperties;
import net.minecraft.block.BlockDoor; import net.minecraft.block.BlockDoor;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.IconFlipped; import net.minecraft.client.renderer.IconFlipped;
import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.Item;
import net.minecraft.util.Icon; import net.minecraft.util.Icon;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import StevenDimDoors.mod_pocketDim.mod_pocketDim;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockDoorGold extends BlockDoor public class BlockDoorGold extends BlockDoor
{ {
@@ -37,6 +36,13 @@ public class BlockDoorGold extends BlockDoor
upperTextures[1] = new IconFlipped(upperTextures[0], true, false); upperTextures[1] = new IconFlipped(upperTextures[0], true, false);
lowerTextures[1] = new IconFlipped(lowerTextures[0], true, false); lowerTextures[1] = new IconFlipped(lowerTextures[0], true, false);
} }
@Override
@SideOnly(Side.CLIENT)
public int idPicked(World world, int x, int y, int z)
{
return mod_pocketDim.itemGoldenDoor.itemID;
}
@Override @Override
public int idDropped(int par1, Random par2Random, int par3) public int idDropped(int par1, Random par2Random, int par3)
@@ -110,15 +116,12 @@ public class BlockDoorGold extends BlockDoor
reversed = !reversed; reversed = !reversed;
} }
} }
if (BaseDimDoor.isUpperDoorBlock(fullMetadata)) if (BaseDimDoor.isUpperDoorBlock(fullMetadata))
{
return this.upperTextures[reversed ? 1 : 0]; return this.upperTextures[reversed ? 1 : 0];
else }
return this.lowerTextures[reversed ? 1 : 0]; return this.lowerTextures[reversed ? 1 : 0];
}
else
{
return this.lowerTextures[0];
} }
return this.lowerTextures[0];
} }
} }

View File

@@ -34,6 +34,12 @@ public class BlockGoldDimDoor extends BaseDimDoor
} }
} }
@Override
public int getDoorItem()
{
return mod_pocketDim.itemGoldenDimensionalDoor.itemID;
}
@Override @Override
public int getDrops() public int getDrops()
{ {

View File

@@ -3,16 +3,15 @@ package StevenDimDoors.mod_pocketDim.blocks;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.world.World; import net.minecraft.world.World;
import StevenDimDoors.mod_pocketDim.mod_pocketDim;
import StevenDimDoors.mod_pocketDim.config.DDProperties; import StevenDimDoors.mod_pocketDim.config.DDProperties;
import StevenDimDoors.mod_pocketDim.core.DimLink; import StevenDimDoors.mod_pocketDim.core.DimLink;
import StevenDimDoors.mod_pocketDim.core.LinkTypes; import StevenDimDoors.mod_pocketDim.core.LinkTypes;
import StevenDimDoors.mod_pocketDim.core.NewDimData; import StevenDimDoors.mod_pocketDim.core.NewDimData;
import StevenDimDoors.mod_pocketDim.core.PocketManager; import StevenDimDoors.mod_pocketDim.core.PocketManager;
@SuppressWarnings("deprecation")
public class DimensionalDoor extends BaseDimDoor public class DimensionalDoor extends BaseDimDoor
{ {
public DimensionalDoor(int blockID, Material material, DDProperties properties) public DimensionalDoor(int blockID, Material material, DDProperties properties)
{ {
super(blockID, material, properties); super(blockID, material, properties);
@@ -27,10 +26,17 @@ public class DimensionalDoor extends BaseDimDoor
DimLink link = dimension.getLink(x, y, z); DimLink link = dimension.getLink(x, y, z);
if (link == null) if (link == null)
{ {
dimension.createLink(x, y, z, LinkTypes.POCKET,world.getBlockMetadata(x, y - 1, z)); dimension.createLink(x, y, z, LinkTypes.POCKET, world.getBlockMetadata(x, y - 1, z));
} }
} }
} }
@Override
public int getDoorItem()
{
return mod_pocketDim.itemDimensionalDoor.itemID;
}
@Override @Override
public int getDrops() public int getDrops()
{ {

View File

@@ -12,5 +12,7 @@ public interface IDimDoor
public int getDrops(); public int getDrops();
public int getDoorItem();
public TileEntity initDoorTE(World world, int x, int y, int z); public TileEntity initDoorTE(World world, int x, int y, int z);
} }

View File

@@ -2,6 +2,9 @@ package StevenDimDoors.mod_pocketDim.blocks;
import java.util.Random; import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockTrapDoor; import net.minecraft.block.BlockTrapDoor;
import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.ITileEntityProvider;
@@ -18,7 +21,6 @@ import StevenDimDoors.mod_pocketDim.core.NewDimData;
import StevenDimDoors.mod_pocketDim.core.PocketManager; import StevenDimDoors.mod_pocketDim.core.PocketManager;
import StevenDimDoors.mod_pocketDim.tileentities.TileEntityTransTrapdoor; import StevenDimDoors.mod_pocketDim.tileentities.TileEntityTransTrapdoor;
@SuppressWarnings("deprecation")
public class TransTrapdoor extends BlockTrapDoor implements IDimDoor, ITileEntityProvider public class TransTrapdoor extends BlockTrapDoor implements IDimDoor, ITileEntityProvider
{ {
@@ -61,7 +63,7 @@ public class TransTrapdoor extends BlockTrapDoor implements IDimDoor, ITileEntit
{ {
this.placeLink(world, x, y, z); this.placeLink(world, x, y, z);
world.setBlockTileEntity(x, y, z, this.createNewTileEntity(world)); world.setBlockTileEntity(x, y, z, this.createNewTileEntity(world));
this.updateAttachedTile(world, x, y, z); updateAttachedTile(world, x, y, z);
} }
@Override @Override
@@ -76,8 +78,8 @@ public class TransTrapdoor extends BlockTrapDoor implements IDimDoor, ITileEntit
{ {
return new TileEntityTransTrapdoor(); return new TileEntityTransTrapdoor();
} }
public void updateAttachedTile(World world, int x, int y, int z) public static void updateAttachedTile(World world, int x, int y, int z)
{ {
TileEntity tile = world.getBlockTileEntity(x, y, z); TileEntity tile = world.getBlockTileEntity(x, y, z);
if (tile instanceof TileEntityTransTrapdoor) if (tile instanceof TileEntityTransTrapdoor)
@@ -100,18 +102,30 @@ public class TransTrapdoor extends BlockTrapDoor implements IDimDoor, ITileEntit
} }
} }
} }
@Override
@SideOnly(Side.CLIENT)
public int idPicked(World world, int x, int y, int z)
{
return this.getDoorItem();
}
@Override @Override
public int idDropped(int metadata, Random random, int fortuneLevel) public int idDropped(int metadata, Random random, int fortuneLevel)
{ {
return getDrops(); return this.getDrops();
} }
@Override
public int getDoorItem()
{
return mod_pocketDim.transTrapdoor.blockID;
}
@Override @Override
public int getDrops() public int getDrops()
{ {
return Block.trapdoor.blockID; return Block.trapdoor.blockID;
} }
public static boolean isTrapdoorSetLow(int metadata) public static boolean isTrapdoorSetLow(int metadata)

View File

@@ -72,6 +72,12 @@ public class TransientDoor extends BaseDimDoor
} }
} }
} }
@Override
public int getDoorItem()
{
return 0;
}
@Override @Override
public int getDrops() public int getDrops()

View File

@@ -3,6 +3,7 @@ package StevenDimDoors.mod_pocketDim.blocks;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.world.World; import net.minecraft.world.World;
import StevenDimDoors.mod_pocketDim.mod_pocketDim;
import StevenDimDoors.mod_pocketDim.config.DDProperties; import StevenDimDoors.mod_pocketDim.config.DDProperties;
import StevenDimDoors.mod_pocketDim.core.LinkTypes; import StevenDimDoors.mod_pocketDim.core.LinkTypes;
import StevenDimDoors.mod_pocketDim.core.NewDimData; import StevenDimDoors.mod_pocketDim.core.NewDimData;
@@ -24,6 +25,13 @@ public class UnstableDoor extends BaseDimDoor
dimension.createLink(x, y, z, LinkTypes.RANDOM,world.getBlockMetadata(x, y - 1, z)); dimension.createLink(x, y, z, LinkTypes.RANDOM,world.getBlockMetadata(x, y - 1, z));
} }
} }
@Override
public int getDoorItem()
{
return mod_pocketDim.itemUnstableDoor.itemID;
}
@Override @Override
public int getDrops() public int getDrops()
{ {

View File

@@ -3,13 +3,13 @@ package StevenDimDoors.mod_pocketDim.blocks;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.world.World; import net.minecraft.world.World;
import StevenDimDoors.mod_pocketDim.mod_pocketDim;
import StevenDimDoors.mod_pocketDim.config.DDProperties; import StevenDimDoors.mod_pocketDim.config.DDProperties;
import StevenDimDoors.mod_pocketDim.core.DimLink; import StevenDimDoors.mod_pocketDim.core.DimLink;
import StevenDimDoors.mod_pocketDim.core.LinkTypes; import StevenDimDoors.mod_pocketDim.core.LinkTypes;
import StevenDimDoors.mod_pocketDim.core.NewDimData; import StevenDimDoors.mod_pocketDim.core.NewDimData;
import StevenDimDoors.mod_pocketDim.core.PocketManager; import StevenDimDoors.mod_pocketDim.core.PocketManager;
@SuppressWarnings("deprecation")
public class WarpDoor extends BaseDimDoor public class WarpDoor extends BaseDimDoor
{ {
public WarpDoor(int blockID, Material material, DDProperties properties) public WarpDoor(int blockID, Material material, DDProperties properties)
@@ -31,6 +31,12 @@ public class WarpDoor extends BaseDimDoor
} }
} }
@Override
public int getDoorItem()
{
return mod_pocketDim.itemWarpDoor.itemID;
}
@Override @Override
public int getDrops() public int getDrops()
{ {

View File

@@ -51,59 +51,49 @@ public class DDTeleporter
private DDTeleporter() { } private DDTeleporter() { }
/**Checks if the destination supplied is valid, ie, filled by any non-replaceable block. /**
* * Checks if the destination supplied is safe (i.e. filled by any replaceable or non-opaque blocks)
* @param entity
* @param world
* @param destination
* @param properties
* @return
*/ */
private static boolean checkDestination(Entity entity, WorldServer world, Point4D destination,DDProperties properties) private static boolean checkDestination(WorldServer world, Point4D destination, int orientation)
{ {
int x = destination.getX(); int x = destination.getX();
int y = destination.getY(); int y = destination.getY();
int z = destination.getZ(); int z = destination.getZ();
int blockIDTop; int blockIDTop;
int blockIDBottom; int blockIDBottom;
Point3D point; Point3D point;
int orientation;
orientation = getDestinationOrientation(destination, properties);
entity.rotationYaw = (orientation * 90) + 90;
switch (orientation) switch (orientation)
{ {
case 0: case 0:
point = new Point3D(MathHelper.floor_double(x - 0.5), y - 1, MathHelper.floor_double(z + 0.5)); point = new Point3D(x - 1, y - 1, z);
break; break;
case 1: case 1:
point = new Point3D(MathHelper.floor_double(x + 0.5), y - 1, MathHelper.floor_double(z - 0.5)); point = new Point3D(x, y - 1, z - 1);
break; break;
case 2: case 2:
point = new Point3D(MathHelper.floor_double(x + 1.5), y - 1, MathHelper.floor_double(z + 0.5)); point = new Point3D(x + 1, y - 1, z);
break; break;
case 3: case 3:
point = new Point3D(MathHelper.floor_double(x + 0.5), y - 1, MathHelper.floor_double(z + 1.5)); point = new Point3D(x, y - 1, z + 1);
break; break;
default: default:
point = new Point3D(x, y - 1, z); point = new Point3D(x, y - 1, z);
break; break;
} }
blockIDBottom = world.getBlockId(point.getX(), point.getY(), point.getZ()); blockIDBottom = world.getBlockId(point.getX(), point.getY(), point.getZ());
blockIDTop = world.getBlockId(point.getX(), point.getY()+1, point.getZ()); blockIDTop = world.getBlockId(point.getX(), point.getY() + 1, point.getZ());
if (Block.blocksList[blockIDBottom] != null) if (Block.blocksList[blockIDBottom] != null)
{ {
if(!Block.blocksList[blockIDBottom].isBlockReplaceable(world, point.getX(), point.getY(), point.getZ())&&world.isBlockOpaqueCube(point.getX(), point.getY(), point.getZ())) if (!Block.blocksList[blockIDBottom].isBlockReplaceable(world, point.getX(), point.getY(), point.getZ()) && world.isBlockOpaqueCube(point.getX(), point.getY(), point.getZ()))
{ {
return false; return false;
} }
} }
if (Block.blocksList[blockIDTop] != null) if (Block.blocksList[blockIDTop] != null)
{ {
if (!Block.blocksList[blockIDTop].isBlockReplaceable(world, point.getX(), point.getY()+1, point.getZ())) if (!Block.blocksList[blockIDTop].isBlockReplaceable(world, point.getX(), point.getY() + 1, point.getZ()))
{ {
return false; return false;
} }
@@ -125,56 +115,37 @@ public class DDTeleporter
} }
else else
{ {
//Teleport the entity to the precise destination point // Teleport the entity to the precise destination point
orientation = -1; orientation = -1;
} }
if (!checkDestination(entity, world, destination, properties)) if (entity instanceof EntityPlayer)
{
if (entity instanceof EntityPlayerMP)
{
EntityPlayer player = (EntityPlayer) entity;
player.rotationYaw = (orientation * 90) + 90;
switch (orientation)
{
case 0:
player.setPositionAndUpdate(x + 0.5, y - 1, z + 0.5);
break;
case 1:
player.setPositionAndUpdate(x + 0.5, y - 1, z + 0.5);
break;
case 2:
player.setPositionAndUpdate(x + 0.5, y - 1, z + 0.5);
break;
case 3:
player.setPositionAndUpdate(x + 0.5, y - 1, z + 0.5);
break;
default:
player.setPositionAndUpdate(x, y - 1, z);
break;
}
}
}
else if (entity instanceof EntityPlayer)
{ {
EntityPlayer player = (EntityPlayer) entity; EntityPlayer player = (EntityPlayer) entity;
switch (orientation) if (checkDestination(world, destination, orientation))
{ {
case 0: switch (orientation)
player.setPositionAndUpdate(x - 0.5, y - 1, z + 0.5); {
break; case 0:
case 1: player.setPositionAndUpdate(x - 0.5, y - 1, z + 0.5);
player.setPositionAndUpdate(x + 0.5, y - 1, z - 0.5); break;
break; case 1:
case 2: player.setPositionAndUpdate(x + 0.5, y - 1, z - 0.5);
player.setPositionAndUpdate(x + 1.5, y - 1, z + 0.5); break;
break; case 2:
case 3: player.setPositionAndUpdate(x + 1.5, y - 1, z + 0.5);
player.setPositionAndUpdate(x + 0.5, y - 1, z + 1.5); break;
break; case 3:
default: player.setPositionAndUpdate(x + 0.5, y - 1, z + 1.5);
player.setPositionAndUpdate(x + 0.5, y - 1, z + 0.5); break;
break; default:
player.setPositionAndUpdate(x + 0.5, y - 1, z + 0.5);
break;
}
}
else
{
player.setPositionAndUpdate(x + 0.5, y - 1, z + 0.5);
} }
} }
else if (entity instanceof EntityMinecart) else if (entity instanceof EntityMinecart)
@@ -200,7 +171,7 @@ public class DDTeleporter
entity.worldObj.updateEntityWithOptionalForce(entity, false); entity.worldObj.updateEntityWithOptionalForce(entity, false);
break; break;
case 3: case 3:
DDTeleporter.setEntityPosition(entity, x + 0.5, y, z + 1.5 ); DDTeleporter.setEntityPosition(entity, x + 0.5, y, z + 1.5);
entity.motionZ = 0.39; entity.motionZ = 0.39;
entity.worldObj.updateEntityWithOptionalForce(entity, false); entity.worldObj.updateEntityWithOptionalForce(entity, false);
break; break;

View File

@@ -162,7 +162,7 @@ public class DungeonSchematic extends Schematic {
applyFilter(standardizer); applyFilter(standardizer);
} }
private Map<Short, Short> getAssignedToStandardIDMapping(DDProperties properties) private static Map<Short, Short> getAssignedToStandardIDMapping(DDProperties properties)
{ {
//If we ever need this broadly or support other mods, this should be moved to a separate class //If we ever need this broadly or support other mods, this should be moved to a separate class
TreeMap<Short, Short> mapping = new TreeMap<Short, Short>(); TreeMap<Short, Short> mapping = new TreeMap<Short, Short>();

View File

@@ -97,7 +97,7 @@ serverPacketHandlerSpec =
@SidedPacketHandler(channels = {PacketConstants.CHANNEL_NAME}, packetHandler = ServerPacketHandler.class)) @SidedPacketHandler(channels = {PacketConstants.CHANNEL_NAME}, packetHandler = ServerPacketHandler.class))
public class mod_pocketDim public class mod_pocketDim
{ {
public static final String version = "1.6.4-R2.2.4"; public static final String version = "@VERSION@";
public static final String modid = "dimdoors"; public static final String modid = "dimdoors";
//TODO need a place to stick all these constants //TODO need a place to stick all these constants
@@ -107,8 +107,8 @@ public class mod_pocketDim
@SidedProxy(clientSide = "StevenDimDoors.mod_pocketDimClient.ClientProxy", serverSide = "StevenDimDoors.mod_pocketDim.CommonProxy") @SidedProxy(clientSide = "StevenDimDoors.mod_pocketDimClient.ClientProxy", serverSide = "StevenDimDoors.mod_pocketDim.CommonProxy")
public static CommonProxy proxy; public static CommonProxy proxy;
@Instance("PocketDimensions") @Instance(mod_pocketDim.modid)
public static mod_pocketDim instance = new mod_pocketDim(); public static mod_pocketDim instance;
public static Block transientDoor; public static Block transientDoor;
public static Block warpDoor; public static Block warpDoor;
@@ -169,7 +169,6 @@ public class mod_pocketDim
@EventHandler @EventHandler
public void onPreInitialization(FMLPreInitializationEvent event) public void onPreInitialization(FMLPreInitializationEvent event)
{ {
instance = this;
//This should be the FIRST thing that gets done. //This should be the FIRST thing that gets done.
String path = event.getSuggestedConfigurationFile().getAbsolutePath().replace(modid, "DimDoors"); String path = event.getSuggestedConfigurationFile().getAbsolutePath().replace(modid, "DimDoors");

View File

@@ -36,19 +36,20 @@ public class TileEntityDimDoor extends DDTileEntityBase
} }
return null; return null;
} }
public void invalidate() @Override
{ public void invalidate()
this.tileEntityInvalid = true; {
this.tileEntityInvalid = true;
if(this.worldObj.getBlockId(xCoord, yCoord, zCoord)==0&&!this.worldObj.isRemote)
{ if(this.worldObj.getBlockId(xCoord, yCoord, zCoord)==0&&!this.worldObj.isRemote)
if(PocketManager.getLink(xCoord, yCoord, zCoord, worldObj)!=null) {
{ if(PocketManager.getLink(xCoord, yCoord, zCoord, worldObj)!=null)
mod_pocketDim.instance.fastRiftRegenerator.registerRiftForRegen(xCoord, yCoord, zCoord, this.worldObj.provider.dimensionId); {
} mod_pocketDim.fastRiftRegenerator.registerRiftForRegen(xCoord, yCoord, zCoord, this.worldObj.provider.dimensionId);
} }
} }
}
@Override @Override
public void readFromNBT(NBTTagCompound nbt) public void readFromNBT(NBTTagCompound nbt)

View File

@@ -66,7 +66,8 @@ public class ComponentNetherGateway extends StructureComponent
* second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at
* the end, it adds Fences... * the end, it adds Fences...
*/ */
public boolean addComponentParts(World world, Random random, StructureBoundingBox bounds) @Override
public boolean addComponentParts(World world, Random random, StructureBoundingBox bounds)
{ {
int NETHER_SLAB_METADATA = 6; int NETHER_SLAB_METADATA = 6;

View File

@@ -18,7 +18,8 @@ public class DDNetherFortressGenerator extends MapGenNetherBridge
MapGenStructureIO.func_143034_b(DDStructureNetherBridgeStart.class, "Fortress"); MapGenStructureIO.func_143034_b(DDStructureNetherBridgeStart.class, "Fortress");
} }
protected StructureStart getStructureStart(int chunkX, int chunkZ) @Override
protected StructureStart getStructureStart(int chunkX, int chunkZ)
{ {
return new DDStructureNetherBridgeStart(this.worldObj, this.rand, chunkX, chunkZ, DDProperties.instance()); return new DDStructureNetherBridgeStart(this.worldObj, this.rand, chunkX, chunkZ, DDProperties.instance());
} }

View File

@@ -105,7 +105,8 @@ public class DDStructureNetherBridgeStart extends StructureNetherBridgeStart
/** /**
* Keeps iterating Structure Pieces and spawning them until the checks tell it to stop * Keeps iterating Structure Pieces and spawning them until the checks tell it to stop
*/ */
public void generateStructure(World world, Random random, StructureBoundingBox generationBounds) @Override
public void generateStructure(World world, Random random, StructureBoundingBox generationBounds)
{ {
if (hasGateway) if (hasGateway)
{ {

View File

@@ -6,10 +6,10 @@
"modid": "dimdoors", "modid": "dimdoors",
"name": "Dimensional Doors", "name": "Dimensional Doors",
"description": "Bend and twist reality itself, creating pocket dimensions, rifts, and much more", "description": "Bend and twist reality itself, creating pocket dimensions, rifts, and much more",
"version": "1.6.4-R2.2.4", "version": "$version",
"credits": "Created by StevenRS11, Coded by StevenRS11 and SenseiKiwi, Logo and Testing by Jaitsu", "credits": "Created by StevenRS11, Coded by StevenRS11 and SenseiKiwi, Logo and Testing by Jaitsu",
"logoFile": "/dimdoors_logo.png", "logoFile": "/dimdoors_logo.png",
"mcversion": "", "mcversion": "$mcversion",
"url": "http://www.minecraftforum.net/topic/1650007-147smpssplan-dimensional-doors-v110-physics-what-physics-updated-with-fancy-opengl/", "url": "http://www.minecraftforum.net/topic/1650007-147smpssplan-dimensional-doors-v110-physics-what-physics-updated-with-fancy-opengl/",
"updateUrl": "", "updateUrl": "",
"authors": [ "StevenRS11", "SenseiKiwi" ], "authors": [ "StevenRS11", "SenseiKiwi" ],