Examples of canPlaceEntityOnSide()


Examples of net.minecraft.world.World.canPlaceEntityOnSide()

                {
                  if (blockInfo == null || (blockInfo[0] == ((ItemBlock) checkStack.getItem()).getBlockID() && (blockInfo[1] == checkStack.getItemDamage() || projector.getModuleCount(ModularForceFieldSystem.itemModuleApproximation) > 0)) || (projector.getModuleCount(ModularForceFieldSystem.itemModuleApproximation) > 0 && this.isApproximationEqual(blockInfo[0], checkStack)))
                  {
                    try
                    {
                      if (world.canPlaceEntityOnSide(((ItemBlock) checkStack.getItem()).getBlockID(), position.intX(), position.intY(), position.intZ(), false, 0, null, checkStack))
                      {
                        int metadata = blockInfo != null ? blockInfo[1] : (checkStack.getHasSubtypes() ? checkStack.getItemDamage() : 0);
                        Block block = blockInfo != null ? Block.blocksList[blockInfo[0]] : null;

                        if (Blacklist.stabilizationBlacklist.contains(block) || block instanceof BlockFluid || block instanceof IFluidBlock)
View Full Code Here

Examples of net.minecraft.world.World.canPlaceEntityOnSide()

      int x = transciever.xCoord + randOffset(2);
      int y = transciever.yCoord + 1;
      int z = transciever.zCoord + randOffset(2);
      Block b = world.getBlock(x, y, z);
      entity.setPosition(x + 0.5, entity.posY, z + 0.5);
      if(world.canPlaceEntityOnSide(b, x, y, z, false, ForgeDirection.UP.ordinal(), entity, null)) {
        resetForRandomRandomSpawn(entity);
        if(worldserver.spawnEntityInWorld(entity)) {
          //entity.onUpdate();
          worldserver.updateEntity(entity);
          return;
View Full Code Here

Examples of net.minecraft.world.World.canPlaceEntityOnSide()

    Block blockBelow = world.getBlock(x, y - 1, z);
    if ((deathDrop ? blockBelow.isReplaceable(world, x, y - 1, z)
                   : !world.isSideSolid(x, y - 1, z, ForgeDirection.UP))) return false;
   
    // Return false if there's an entity blocking the placement.
    if (!world.canPlaceEntityOnSide(blockBackpack, x, y, z, deathDrop, side, carrier, backpack)) return false;
   
    // Return false if the player can't edit the block.
    if ((player != null) && (!world.canMineBlock(player, x, y, z) ||
                             !player.canPlayerEdit(x, y, z, side, backpack))) return false;
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.