diff --git a/StevenDimDoors/mod_pocketDim/EventHookContainer.java b/StevenDimDoors/mod_pocketDim/EventHookContainer.java index abdeafb..9915963 100644 --- a/StevenDimDoors/mod_pocketDim/EventHookContainer.java +++ b/StevenDimDoors/mod_pocketDim/EventHookContainer.java @@ -4,15 +4,11 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ChunkCoordinates; -import net.minecraft.util.DamageSource; import net.minecraftforge.client.event.sound.SoundLoadEvent; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.EventPriority; import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.entity.living.LivingDeathEvent; import net.minecraftforge.event.entity.living.LivingFallEvent; -import net.minecraftforge.event.entity.player.PlayerDropsEvent; import net.minecraftforge.event.world.WorldEvent; import StevenDimDoors.mod_pocketDim.core.DDTeleporter; import StevenDimDoors.mod_pocketDim.core.PocketManager; diff --git a/StevenDimDoors/mod_pocketDim/PlayerRespawnTracker.java b/StevenDimDoors/mod_pocketDim/PlayerRespawnTracker.java deleted file mode 100644 index 2a4f57e..0000000 --- a/StevenDimDoors/mod_pocketDim/PlayerRespawnTracker.java +++ /dev/null @@ -1,47 +0,0 @@ - - -package StevenDimDoors.mod_pocketDim; - - -import net.minecraft.entity.item.EntityItem; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemArmor; -import cpw.mods.fml.common.IPlayerTracker; - - -public class PlayerRespawnTracker implements IPlayerTracker -{ - private final DDProperties properties; - - public PlayerRespawnTracker(DDProperties properties) - { - this.properties = properties; - } - - @Override - public void onPlayerLogin(EntityPlayer player) { - // TODO Auto-generated method stub - - } - - @Override - public void onPlayerLogout(EntityPlayer player) { - // TODO Auto-generated method stub - - } - - @Override - public void onPlayerChangedDimension(EntityPlayer player) { - // TODO Auto-generated method stub - - } - - @Override - public void onPlayerRespawn(EntityPlayer player) { - // TODO Auto-generated method stub - - } - - -} \ No newline at end of file diff --git a/StevenDimDoors/mod_pocketDim/blocks/DDoorBase.java b/StevenDimDoors/mod_pocketDim/blocks/BaseDimDoor.java similarity index 85% rename from StevenDimDoors/mod_pocketDim/blocks/DDoorBase.java rename to StevenDimDoors/mod_pocketDim/blocks/BaseDimDoor.java index b51f08c..a23dac6 100644 --- a/StevenDimDoors/mod_pocketDim/blocks/DDoorBase.java +++ b/StevenDimDoors/mod_pocketDim/blocks/BaseDimDoor.java @@ -8,7 +8,6 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.Icon; @@ -21,25 +20,22 @@ import StevenDimDoors.mod_pocketDim.DDProperties; import StevenDimDoors.mod_pocketDim.mod_pocketDim; import StevenDimDoors.mod_pocketDim.core.DDTeleporter; import StevenDimDoors.mod_pocketDim.core.DimLink; -import StevenDimDoors.mod_pocketDim.core.LinkTypes; -import StevenDimDoors.mod_pocketDim.core.NewDimData; import StevenDimDoors.mod_pocketDim.core.PocketManager; import StevenDimDoors.mod_pocketDim.schematic.BlockRotator; import StevenDimDoors.mod_pocketDim.tileentities.TileEntityDimDoor; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class DDoorBase extends BlockContainer implements IDDoorLogic +public abstract class BaseDimDoor extends BlockContainer implements IDimDoor { - protected static DDProperties properties = null; + protected final DDProperties properties; private Icon blockIconBottom; - public DDoorBase(int par1, Material material) + public BaseDimDoor(int blockID, Material material, DDProperties properties) { - super(par1, material); + super(blockID, material); - if (properties == null) - properties = DDProperties.instance(); + this.properties = properties; } public void registerIcons(IconRegister par1IconRegister) @@ -54,63 +50,63 @@ public class DDoorBase extends BlockContainer implements IDDoorLogic this.enterDimDoor(world, x, y, z, entity); } - public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { boolean shouldOpen=true; //System.out.println(String.valueOf(par1World.getBlockMetadata(par2, par3, par4))); - if(par5EntityPlayer.inventory.getCurrentItem()!=null) + if(player.inventory.getCurrentItem()!=null) { - if(par5EntityPlayer.inventory.getCurrentItem().getItem() == mod_pocketDim.itemRiftBlade) + if(player.inventory.getCurrentItem().getItem() == mod_pocketDim.itemRiftBlade) { shouldOpen = false; - if (!par1World.isRemote && par1World.getBlockId(par2, par3-1, par4) == this.blockID) + if (!world.isRemote && world.getBlockId(x, y-1, z) == this.blockID) { - int var12 = (int) (MathHelper.floor_double((double)((par5EntityPlayer.rotationYaw+90) * 4.0F / 360.0F) + 0.5D) & 3); + int var12 = (int) (MathHelper.floor_double((double)((player.rotationYaw+90) * 4.0F / 360.0F) + 0.5D) & 3); - if (par1World.getBlockMetadata(par2, par3-1, par4) == var12) + if (world.getBlockMetadata(x, y-1, z) == var12) { var12 = BlockRotator.transformMetadata(var12, 1, this.blockID); } - par1World.setBlockMetadataWithNotify(par2, par3-1, par4, var12, 2); + world.setBlockMetadataWithNotify(x, y-1, z, var12, 2); } - if (!par1World.isRemote && par1World.getBlockId(par2, par3+1, par4) == this.blockID) + if (!world.isRemote && world.getBlockId(x, y+1, z) == this.blockID) { - int var12 = (int) (MathHelper.floor_double((double)((par5EntityPlayer.rotationYaw+90) * 4.0F / 360.0F) + 0.5D) & 3); - if(par1World.getBlockMetadata(par2, par3, par4)==var12) + int var12 = (int) (MathHelper.floor_double((double)((player.rotationYaw+90) * 4.0F / 360.0F) + 0.5D) & 3); + if(world.getBlockMetadata(x, y, z)==var12) { var12 = BlockRotator.transformMetadata(var12, 1, this.blockID); } - par1World.setBlockMetadataWithNotify(par2, par3, par4, var12, 2); + world.setBlockMetadataWithNotify(x, y, z, var12, 2); } - par1World.playAuxSFXAtEntity(par5EntityPlayer, 1001, par2, par3, par4, 0); + world.playAuxSFXAtEntity(player, 1001, x, y, z, 0); - if (!shouldOpen && !par1World.isRemote) + if (!shouldOpen && !world.isRemote) { - par5EntityPlayer.inventory.getCurrentItem().damageItem(5, par5EntityPlayer); + player.inventory.getCurrentItem().damageItem(5, player); } } } if(shouldOpen) { - int var10 = this.getFullMetadata(par1World, par2, par3, par4); + int var10 = this.getFullMetadata(world, x, y, z); int var11 = var10 & 7; var11 ^= 4; if ((var10 & 8) == 0) { - par1World.setBlockMetadataWithNotify(par2, par3, par4, var11,2); - par1World.markBlockRangeForRenderUpdate(par2, par3, par4, par2, par3, par4); + world.setBlockMetadataWithNotify(x, y, z, var11,2); + world.markBlockRangeForRenderUpdate(x, y, z, x, y, z); } else { - par1World.setBlockMetadataWithNotify(par2, par3 - 1, par4, var11,2); - par1World.markBlockRangeForRenderUpdate(par2, par3 - 1, par4, par2, par3, par4); + world.setBlockMetadataWithNotify(x, y - 1, z, var11,2); + world.markBlockRangeForRenderUpdate(x, y - 1, z, x, y, z); } - par1World.playAuxSFXAtEntity(par5EntityPlayer, 1003, par2, par3, par4, 0); + world.playAuxSFXAtEntity(player, 1003, x, y, z, 0); return true; } else @@ -158,11 +154,11 @@ public class DDoorBase extends BlockContainer implements IDDoorLogic this.updateAttachedTile(world, x, y, z); } - @SideOnly(Side.CLIENT) /** * Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side */ + @SideOnly(Side.CLIENT) public Icon getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) { if(par1IBlockAccess.getBlockId(par2, par3-1, par4) == this.blockID) @@ -177,7 +173,7 @@ public class DDoorBase extends BlockContainer implements IDDoorLogic //Called to update the render information on the tile entity. Could probably implement a data watcher, //but this works fine and is more versatile I think. - public DDoorBase updateAttachedTile(World world, int x, int y, int z) + public BaseDimDoor updateAttachedTile(World world, int x, int y, int z) { TileEntity tile = world.getBlockTileEntity(x, y, z); if (tile instanceof TileEntityDimDoor) @@ -200,11 +196,18 @@ public class DDoorBase extends BlockContainer implements IDDoorLogic tile.orientation = this.getFullMetadata(par1World, par2, par3, par4) & 7; } + public boolean isDoorOpen(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) + { + return (this.getFullMetadata(par1IBlockAccess, par2, par3, par4) & 4) != 0; + } + + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean getBlocksMovement(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { int var5 = this.getFullMetadata(par1IBlockAccess, par2, par3, par4); @@ -214,6 +217,7 @@ public class DDoorBase extends BlockContainer implements IDDoorLogic /** * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) */ + @Override public boolean renderAsNormalBlock() { return false; @@ -222,16 +226,18 @@ public class DDoorBase extends BlockContainer implements IDDoorLogic /** * The type of render function that is called for this block */ + @Override public int getRenderType() { return 7; } - @SideOnly(Side.CLIENT) /** * Returns the bounding box of the wired rectangular prism to render. */ + @Override + @SideOnly(Side.CLIENT) public AxisAlignedBB getSelectedBoundingBoxFromPool(World par1World, int par2, int par3, int par4) { this.setBlockBoundsBasedOnState(par1World, par2, par3, par4); @@ -251,6 +257,7 @@ public class DDoorBase extends BlockContainer implements IDDoorLogic /** * Updates the blocks bounds based on its current state. Args: world, x, y, z */ + @Override public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { this.setDoorRotation(this.getFullMetadata(par1IBlockAccess, par2, par3, par4)); @@ -264,11 +271,6 @@ public class DDoorBase extends BlockContainer implements IDDoorLogic return this.getFullMetadata(par1IBlockAccess, par2, par3, par4) & 3; } - public boolean isDoorOpen(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) - { - return (this.getFullMetadata(par1IBlockAccess, par2, par3, par4) & 4) != 0; - } - private void setDoorRotation(int par1) { float var2 = 0.1875F; @@ -354,6 +356,7 @@ public class DDoorBase extends BlockContainer implements IDDoorLogic /** * Called when the block is clicked by a player. Args: x, y, z, entityPlayer */ + @Override public void onBlockClicked(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer) { // System.out.println(this.getFullMetadata(par1World, par2, par3, par4)%4); @@ -363,6 +366,7 @@ public class DDoorBase extends BlockContainer implements IDDoorLogic * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are * their own) Args: x, y, z, neighbor blockID */ + @Override public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) { int var6 = par1World.getBlockMetadata(par2, par3, par4); @@ -425,6 +429,7 @@ public class DDoorBase extends BlockContainer implements IDDoorLogic * Ray traces through the blocks collision from start vector to end vector returning a ray trace hit. Args: world, * x, y, z, startVec, endVec */ + @Override public MovingObjectPosition collisionRayTrace(World par1World, int par2, int par3, int par4, Vec3 par5Vec3, Vec3 par6Vec3) { this.setBlockBoundsBasedOnState(par1World, par2, par3, par4); @@ -434,6 +439,7 @@ public class DDoorBase extends BlockContainer implements IDDoorLogic /** * Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z */ + @Override public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) { return par3 >= 255 ? false : par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && super.canPlaceBlockAt(par1World, par2, par3, par4) && super.canPlaceBlockAt(par1World, par2, par3 + 1, par4); @@ -443,6 +449,7 @@ public class DDoorBase extends BlockContainer implements IDDoorLogic * Returns the mobility information of the block, 0 = free, 1 = can't push but can move over, 2 = total immobility * and stop pistons */ + @Override public int getMobilityFlag() { return 2; @@ -473,15 +480,17 @@ public class DDoorBase extends BlockContainer implements IDDoorLogic return var7 & 7 | (var6 ? 8 : 0) | (var9 ? 16 : 0); } - @SideOnly(Side.CLIENT) /** * only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative) */ + @Override + @SideOnly(Side.CLIENT) public int idPicked(World par1World, int par2, int par3, int par4) { return this.getDrops(); } + @Override public int idDropped(int par1, Random par2Random, int par3) { return (par1 & 8) != 0 ? 0 : (getDrops()); @@ -490,6 +499,7 @@ public class DDoorBase extends BlockContainer implements IDDoorLogic /** * Called when the block is attempted to be harvested */ + @Override public void onBlockHarvested(World par1World, int par2, int par3, int par4, int par5, EntityPlayer par6EntityPlayer) { if (par6EntityPlayer.capabilities.isCreativeMode && (par5 & 8) != 0 && par1World.getBlockId(par2, par3 - 1, par4) == this.blockID) @@ -501,8 +511,7 @@ public class DDoorBase extends BlockContainer implements IDDoorLogic @Override public TileEntity createNewTileEntity(World world) { - TileEntity tile = new TileEntityDimDoor(); - return tile; + return new TileEntityDimDoor(); } @Override @@ -523,12 +532,7 @@ public class DDoorBase extends BlockContainer implements IDDoorLogic } } } - - @Override - public void placeDimDoor(World world, int x, int y, int z) - { - // TODO Auto-generated method stub - } + @Override public int getDrops() { diff --git a/StevenDimDoors/mod_pocketDim/blocks/DimensionalDoor.java b/StevenDimDoors/mod_pocketDim/blocks/DimensionalDoor.java index b2ba41c..9b59b8b 100644 --- a/StevenDimDoors/mod_pocketDim/blocks/DimensionalDoor.java +++ b/StevenDimDoors/mod_pocketDim/blocks/DimensionalDoor.java @@ -1,41 +1,20 @@ package StevenDimDoors.mod_pocketDim.blocks; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.Icon; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; -import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import StevenDimDoors.mod_pocketDim.DDProperties; -import StevenDimDoors.mod_pocketDim.mod_pocketDim; -import StevenDimDoors.mod_pocketDim.core.DDTeleporter; import StevenDimDoors.mod_pocketDim.core.DimLink; import StevenDimDoors.mod_pocketDim.core.LinkTypes; import StevenDimDoors.mod_pocketDim.core.NewDimData; import StevenDimDoors.mod_pocketDim.core.PocketManager; -import StevenDimDoors.mod_pocketDim.schematic.BlockRotator; -import StevenDimDoors.mod_pocketDim.tileentities.TileEntityDimDoor; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -public class DimensionalDoor extends DDoorBase implements IDDoorLogic +public class DimensionalDoor extends BaseDimDoor { - public DimensionalDoor(int par1, Material material) + public DimensionalDoor(int blockID, Material material, DDProperties properties) { - super(par1, material); - // TODO Auto-generated constructor stub + super(blockID, material, properties); } @Override diff --git a/StevenDimDoors/mod_pocketDim/blocks/IDDoorLogic.java b/StevenDimDoors/mod_pocketDim/blocks/IDimDoor.java similarity index 90% rename from StevenDimDoors/mod_pocketDim/blocks/IDDoorLogic.java rename to StevenDimDoors/mod_pocketDim/blocks/IDimDoor.java index 6d459ed..6ebe012 100644 --- a/StevenDimDoors/mod_pocketDim/blocks/IDDoorLogic.java +++ b/StevenDimDoors/mod_pocketDim/blocks/IDimDoor.java @@ -3,7 +3,7 @@ package StevenDimDoors.mod_pocketDim.blocks; import net.minecraft.entity.Entity; import net.minecraft.world.World; -public interface IDDoorLogic +public interface IDimDoor { public void enterDimDoor(World world, int x, int y, int z, Entity entity); diff --git a/StevenDimDoors/mod_pocketDim/blocks/TransientDoor.java b/StevenDimDoors/mod_pocketDim/blocks/TransientDoor.java index d9b00d4..e0d7c1d 100644 --- a/StevenDimDoors/mod_pocketDim/blocks/TransientDoor.java +++ b/StevenDimDoors/mod_pocketDim/blocks/TransientDoor.java @@ -1,29 +1,22 @@ package StevenDimDoors.mod_pocketDim.blocks; -import java.util.Random; - import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.Entity; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.Icon; import net.minecraft.util.MathHelper; -import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import StevenDimDoors.mod_pocketDim.mod_pocketDim; +import StevenDimDoors.mod_pocketDim.DDProperties; import StevenDimDoors.mod_pocketDim.core.DDTeleporter; import StevenDimDoors.mod_pocketDim.core.DimLink; import StevenDimDoors.mod_pocketDim.core.LinkTypes; import StevenDimDoors.mod_pocketDim.core.NewDimData; import StevenDimDoors.mod_pocketDim.core.PocketManager; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -public class TransientDoor extends DDoorBase implements IDDoorLogic +public class TransientDoor extends BaseDimDoor { - public TransientDoor(int blockID, Material material) + public TransientDoor(int blockID, Material material, DDProperties properties) { - super(blockID, material); + super(blockID, material, properties); } @Override @@ -54,28 +47,32 @@ public class TransientDoor extends DDoorBase implements IDDoorLogic { NewDimData dimension = PocketManager.getDimensionData(world); DimLink link = dimension.getLink(x, y, z); - if (link == null&&dimension.isPocketDimension()) + if (link == null && dimension.isPocketDimension()) { dimension.createLink(x, y, z, LinkTypes.SAFE_EXIT); } } } + @Override public int getDrops() { return 0; } - + + @Override public boolean isCollidable() { return false; } + @Override public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) { return null; } + @Override public int getRenderType() { return 8; diff --git a/StevenDimDoors/mod_pocketDim/blocks/UnstableDoor.java b/StevenDimDoors/mod_pocketDim/blocks/UnstableDoor.java index 155520c..77d283d 100644 --- a/StevenDimDoors/mod_pocketDim/blocks/UnstableDoor.java +++ b/StevenDimDoors/mod_pocketDim/blocks/UnstableDoor.java @@ -1,28 +1,18 @@ package StevenDimDoors.mod_pocketDim.blocks; import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.entity.Entity; import net.minecraft.item.Item; -import net.minecraft.util.Icon; -import net.minecraft.util.MathHelper; -import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import StevenDimDoors.mod_pocketDim.DDProperties; -import StevenDimDoors.mod_pocketDim.mod_pocketDim; -import StevenDimDoors.mod_pocketDim.core.DDTeleporter; -import StevenDimDoors.mod_pocketDim.core.DimLink; import StevenDimDoors.mod_pocketDim.core.LinkTypes; import StevenDimDoors.mod_pocketDim.core.NewDimData; import StevenDimDoors.mod_pocketDim.core.PocketManager; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -public class UnstableDoor extends DDoorBase implements IDDoorLogic +public class UnstableDoor extends BaseDimDoor { - public UnstableDoor(int par1, Material material) + public UnstableDoor(int blockID, Material material, DDProperties properties) { - super(par1, material); + super(blockID, material, properties); } @Override diff --git a/StevenDimDoors/mod_pocketDim/blocks/WarpDoor.java b/StevenDimDoors/mod_pocketDim/blocks/WarpDoor.java index 960fc33..4e4c4b4 100644 --- a/StevenDimDoors/mod_pocketDim/blocks/WarpDoor.java +++ b/StevenDimDoors/mod_pocketDim/blocks/WarpDoor.java @@ -1,29 +1,19 @@ package StevenDimDoors.mod_pocketDim.blocks; -import java.util.Random; - import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.entity.Entity; import net.minecraft.item.Item; -import net.minecraft.util.Icon; -import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import StevenDimDoors.mod_pocketDim.mod_pocketDim; +import StevenDimDoors.mod_pocketDim.DDProperties; import StevenDimDoors.mod_pocketDim.core.DimLink; import StevenDimDoors.mod_pocketDim.core.LinkTypes; import StevenDimDoors.mod_pocketDim.core.NewDimData; import StevenDimDoors.mod_pocketDim.core.PocketManager; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -public class WarpDoor extends DDoorBase implements IDDoorLogic +public class WarpDoor extends BaseDimDoor { - private Icon blockIconBottom; - - public WarpDoor(int blockID, Material material) + public WarpDoor(int blockID, Material material, DDProperties properties) { - super(blockID, material); + super(blockID, material, properties); } @Override @@ -33,7 +23,7 @@ public class WarpDoor extends DDoorBase implements IDDoorLogic { NewDimData dimension = PocketManager.getDimensionData(world); DimLink link = dimension.getLink(x, y, z); - if (link == null&&dimension.isPocketDimension()) + if (link == null && dimension.isPocketDimension()) { dimension.createLink(x, y, z, LinkTypes.SAFE_EXIT); } @@ -45,6 +35,4 @@ public class WarpDoor extends DDoorBase implements IDDoorLogic { return Item.doorWood.itemID; } - - } \ No newline at end of file diff --git a/StevenDimDoors/mod_pocketDim/mod_pocketDim.java b/StevenDimDoors/mod_pocketDim/mod_pocketDim.java index 487ffe3..0dd6474 100644 --- a/StevenDimDoors/mod_pocketDim/mod_pocketDim.java +++ b/StevenDimDoors/mod_pocketDim/mod_pocketDim.java @@ -1,15 +1,11 @@ package StevenDimDoors.mod_pocketDim; -import java.util.ArrayList; -import java.util.HashMap; - import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityEggInfo; import net.minecraft.entity.EntityList; -import net.minecraft.entity.item.EntityItem; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -113,8 +109,6 @@ public class mod_pocketDim public static BiomeGenBase limboBiome; public static BiomeGenBase pocketBiome; - - public static PlayerRespawnTracker tracker; public static boolean isPlayerWearingGoogles = false; @@ -148,7 +142,6 @@ public class mod_pocketDim //Now do other stuff MinecraftForge.EVENT_BUS.register(new EventHookContainer(properties)); - tracker = new PlayerRespawnTracker(properties); riftGen = new GatewayGenerator(properties); } @@ -165,15 +158,15 @@ public class mod_pocketDim new RiftRegenerator(commonTickHandler); //No need to store the reference LimboDecay decay = new LimboDecay(commonTickHandler, properties); - transientDoor = (new TransientDoor(properties.TransientDoorID, Material.iron)).setHardness(1.0F) .setUnlocalizedName("transientDoor"); + transientDoor = new TransientDoor(properties.TransientDoorID, Material.iron, properties).setHardness(1.0F) .setUnlocalizedName("transientDoor"); - blockDimWall = (new BlockDimWall(properties.FabricBlockID, 0, Material.iron)).setLightValue(1.0F).setHardness(0.1F).setUnlocalizedName("blockDimWall"); + blockDimWall = new BlockDimWall(properties.FabricBlockID, 0, Material.iron).setLightValue(1.0F).setHardness(0.1F).setUnlocalizedName("blockDimWall"); blockDimWallPerm = (new BlockDimWallPerm(properties.PermaFabricBlockID, 0, Material.iron)).setLightValue(1.0F).setBlockUnbreakable().setResistance(6000000.0F).setUnlocalizedName("blockDimWallPerm"); - warpDoor = (new WarpDoor(properties.WarpDoorID, Material.wood)).setHardness(1.0F) .setUnlocalizedName("dimDoorWarp"); + warpDoor = new WarpDoor(properties.WarpDoorID, Material.wood, properties).setHardness(1.0F) .setUnlocalizedName("dimDoorWarp"); blockRift = (BlockRift) (new BlockRift(properties.RiftBlockID, 0, Material.air, properties).setHardness(1.0F) .setUnlocalizedName("rift")); - blockLimbo = (new BlockLimbo(properties.LimboBlockID, 15, Material.iron, properties.LimboDimensionID, decay).setHardness(.2F).setUnlocalizedName("BlockLimbo").setLightValue(.0F)); - unstableDoor = (new UnstableDoor(properties.UnstableDoorID, Material.iron).setHardness(.2F).setUnlocalizedName("chaosDoor").setLightValue(.0F) ); - dimensionalDoor = (DimensionalDoor) (new DimensionalDoor(properties.DimensionalDoorID, Material.iron)).setHardness(1.0F).setResistance(2000.0F) .setUnlocalizedName("dimDoor"); + blockLimbo = new BlockLimbo(properties.LimboBlockID, 15, Material.iron, properties.LimboDimensionID, decay).setHardness(.2F).setUnlocalizedName("BlockLimbo").setLightValue(.0F); + unstableDoor = (new UnstableDoor(properties.UnstableDoorID, Material.iron, properties).setHardness(.2F).setUnlocalizedName("chaosDoor").setLightValue(.0F) ); + dimensionalDoor = (DimensionalDoor) (new DimensionalDoor(properties.DimensionalDoorID, Material.iron, properties).setHardness(1.0F).setResistance(2000.0F) .setUnlocalizedName("dimDoor")); dimHatch = (new dimHatch(properties.TransTrapdoorID, 84, Material.iron)).setHardness(1.0F) .setUnlocalizedName("dimHatch"); // dimRail = (new DimRail(dimRailID, 88, false)).setHardness(.5F) .setUnlocalizedName("dimRail"); @@ -202,8 +195,6 @@ public class mod_pocketDim GameRegistry.registerBlock(blockDimWall, ItemBlockDimWall.class, "Fabric of Reality"); - GameRegistry.registerPlayerTracker(tracker); - DimensionManager.registerProviderType(properties.PocketProviderID, PocketProvider.class, false); DimensionManager.registerProviderType(properties.LimboProviderID, LimboProvider.class, false); DimensionManager.registerDimension(properties.LimboDimensionID, properties.LimboProviderID); diff --git a/StevenDimDoors/mod_pocketDim/world/LimboProvider.java b/StevenDimDoors/mod_pocketDim/world/LimboProvider.java index 4ddbc2b..44d1843 100644 --- a/StevenDimDoors/mod_pocketDim/world/LimboProvider.java +++ b/StevenDimDoors/mod_pocketDim/world/LimboProvider.java @@ -181,6 +181,7 @@ public class LimboProvider extends WorldProvider return var5; } + @Override public ChunkCoordinates getRandomizedSpawnPoint() {