类 SpiderEggCocoonBlockEntity

java.lang.Object
net.minecraft.block.entity.BlockEntity
pers.saikel0rado1iu.spontaneousreplace.cobwebbed.block.entity.SpiderEggCocoonBlockEntity
所有已实现的接口:
net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity

public class SpiderEggCocoonBlockEntity extends net.minecraft.block.entity.BlockEntity

蜘蛛卵茧方块实体

蜘蛛卵茧方块的方块实体,用于判断玩家是否在触发范围内并生成三只幼株
从以下版本开始:
1.0.0
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    protected static final int
    粒子个数
    protected static final float
    检测范围

    从类继承的字段 net.minecraft.block.entity.BlockEntity

    pos, removed, world
  • 构造器概要

    构造器
    构造器
    说明
    SpiderEggCocoonBlockEntity(net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState state)
    构建蜘蛛卵茧实体
  • 方法概要

    修饰符和类型
    方法
    说明
    protected static boolean
    canTrigger(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos)
    是否可以触发
    static void
    clientTick(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState ignoredState, SpiderEggCocoonBlockEntity ignoredBlockEntity)
    客户端每 Tick 运行函数
    static void
    serverTick(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState ignoredState, SpiderEggCocoonBlockEntity ignoredBlockEntity)
    服务端每 Tick 运行函数
    static void
    spawnSpiderEntity(net.minecraft.entity.mob.HostileEntity spider, net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos)
    在蜘蛛卵茧位置生成蜘蛛实体
    static void
    triggered(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos)
    触发蜘蛛卵茧并破坏蜘蛛卵茧

    从类继承的方法 net.minecraft.block.entity.BlockEntity

    cancelRemoval, copyItemDataRequiresOperator, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, posFromNbt, readNbt, setCachedState, setStackNbt, setWorld, toInitialChunkDataNbt, toUpdatePacket, writeIdToNbt, writeNbt

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    从接口继承的方法 net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity

    getRenderData
  • 字段详细资料

    • RANGE

      protected static final float RANGE
      检测范围
      另请参阅:
    • PARTICLE_COUNT

      protected static final int PARTICLE_COUNT
      粒子个数
      另请参阅:
  • 构造器详细资料

    • SpiderEggCocoonBlockEntity

      public SpiderEggCocoonBlockEntity(net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState state)
      构建蜘蛛卵茧实体
  • 方法详细资料

    • serverTick

      public static void serverTick(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState ignoredState, SpiderEggCocoonBlockEntity ignoredBlockEntity)

      服务端每 Tick 运行函数

      生成蜘蛛

    • clientTick

      public static void clientTick(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState ignoredState, SpiderEggCocoonBlockEntity ignoredBlockEntity)

      客户端每 Tick 运行函数

      生成音效,粒子

    • canTrigger

      protected static boolean canTrigger(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos)
      是否可以触发
    • triggered

      public static void triggered(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos)
      触发蜘蛛卵茧并破坏蜘蛛卵茧
    • spawnSpiderEntity

      public static void spawnSpiderEntity(net.minecraft.entity.mob.HostileEntity spider, net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos)
      在蜘蛛卵茧位置生成蜘蛛实体
      参数:
      spider - 生成的蜘蛛实体