Class BlockBehaviorRailPowered


public class BlockBehaviorRailPowered extends BlockBehaviorRail
  • Field Summary

    Fields inherited from class org.cloudburstmc.server.block.behavior.BlockBehaviorRail

    canBePowered, directionTrait, type
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    canPowered​(org.cloudburstmc.api.block.Block block, com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.util.data.RailDirection direction, int power, boolean relative)
     
    protected boolean
    checkSurrounding​(org.cloudburstmc.api.block.Block block, com.nukkitx.math.vector.Vector3i pos, boolean relative, int power)
    Check the surrounding of the rail
    org.cloudburstmc.api.item.ItemStack[]
    getDrops​(org.cloudburstmc.api.block.Block block, org.cloudburstmc.api.item.ItemStack hand)
     
    int
    onUpdate​(org.cloudburstmc.api.block.Block block, int type)
     

    Methods inherited from class org.cloudburstmc.server.block.behavior.BlockBehaviorRail

    canPowered, checkRailsConnected, getColor, getOrientation, isAbstract, isActive, place, setActive, setOrientation, toItem

    Methods inherited from class org.cloudburstmc.server.block.behavior.BaseBlockBehavior

    getBreakTime, placeBlock

    Methods inherited from class org.cloudburstmc.api.block.behavior.BlockBehavior

    addVelocityToEntity, canBeActivated, canBeBrokenWith, canBeClimbed, canBeFlooded, canBePlaced, canBePushed, canBeReplaced, canHarvestWithHand, canPassThrough, canSilkTouch, canWaterlogFlowing, canWaterlogSource, checkTool, clone, collidesWithBB, collidesWithBB, getBoundingBox, getBoundingBox, getBoundingBox, getBurnAbility, getBurnChance, getCollisionBoxes, getCollisionBoxes, getComparatorInputOverride, getDescriptionId, getDropExp, getFilterLevel, getFrictionFactor, getHardness, getLightLevel, getMinimalTier, getResistance, getSaveId, getStrongPower, getToolType, getWeakPower, hasComparatorInputOverride, hasEntityCollision, isBreakable, isLiquid, isNormalBlock, isPowerSource, isSolid, isTransparent, onActivate, onActivate, onBreak, onBreak, onEntityCollide, placeBlock, placeBlock, placeBlock, removeBlock, removeBlock, tickRate

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BlockBehaviorRailPowered

      public BlockBehaviorRailPowered()
  • Method Details

    • onUpdate

      public int onUpdate(org.cloudburstmc.api.block.Block block, int type)
      Overrides:
      onUpdate in class BlockBehaviorRail
    • checkSurrounding

      protected boolean checkSurrounding(org.cloudburstmc.api.block.Block block, com.nukkitx.math.vector.Vector3i pos, boolean relative, int power)
      Check the surrounding of the rail
      Parameters:
      pos - The rail position
      relative - The relative of the rail that will be checked
      power - The count of the rail that had been counted
      Returns:
      Boolean of the surrounding area. Where the powered rail on!
    • canPowered

      protected boolean canPowered(org.cloudburstmc.api.block.Block block, com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.util.data.RailDirection direction, int power, boolean relative)
    • getDrops

      public org.cloudburstmc.api.item.ItemStack[] getDrops(org.cloudburstmc.api.block.Block block, org.cloudburstmc.api.item.ItemStack hand)
      Overrides:
      getDrops in class BlockBehaviorRail