Package org.spoutcraft.api.util

Examples of org.spoutcraft.api.util.FixedLocation


   * Gets the hardness of block at the given coordinates in the given world, relative to the ability of the given
   * EntityPlayer.
   */
  public float getPlayerRelativeBlockHardness(EntityPlayer entityhuman) {
    if (entityhuman instanceof EntityPlayerSP) {
      FixedLocation target = Spoutcraft.getActivePlayer().getLastClickedLocation();
      if (target != null) {
        int x = (int) target.getX();
        int y = (int) target.getY();
        int z = (int) target.getZ();
        SpoutcraftChunk chunk = Spoutcraft.getChunkAt(entityhuman.worldObj, x, y, z);
        short customId = chunk.getCustomBlockId(x, y, z);
        if (customId > 0) {
          CustomBlock b = MaterialData.getCustomBlock(customId);
          if (b == null) {
View Full Code Here


   * Called when the block is clicked by a player. Args: x, y, z, entityPlayer
   */
  // Spout Start
  public void onBlockClicked(World var1, int var2, int var3, int var4, EntityPlayer var5) {
    if (var5 instanceof EntityPlayerSP) {
      FixedLocation location = new FastLocation(var2, var3, var4, 0, 0);
      ((EntityPlayerSP)var5).lastClickLocation = location;
    }
  }
View Full Code Here

TOP

Related Classes of org.spoutcraft.api.util.FixedLocation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.