java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.LivingEntity
net.minecraft.entity.mob.MobEntity
net.minecraft.entity.mob.PathAwareEntity
net.minecraft.entity.mob.HostileEntity
net.minecraft.entity.mob.SpiderEntity
pers.saikel0rado1iu.spontaneousreplace.cobwebbed.entity.mob.VariantsSpiderEntity
所有已实现的接口:
net.minecraft.entity.Attackable, net.minecraft.entity.mob.Monster, net.minecraft.entity.Targeter, net.minecraft.scoreboard.ScoreHolder, net.minecraft.server.command.CommandOutput, net.minecraft.util.Nameable, net.minecraft.world.entity.EntityLike
直接已知子类:
GuardSpiderEntity, SpiderLarvaEntity, SprayPoisonSpiderEntity, WeavingWebSpiderEntity

public abstract class VariantsSpiderEntity extends net.minecraft.entity.mob.SpiderEntity

变种蜘蛛实体

蛛丝网迹的变种蜘蛛的基础实体属性,逻辑控制
从以下版本开始:
1.0.0
  • 嵌套类概要

    嵌套类
    修饰符和类型
    说明
    protected static class 
    蜘蛛默认攻击目标
    protected static class 
    所有自然更替的蜘蛛变体群体攻击目标
    protected static class 
    VariantsSpiderEntity.TargetGoal<T extends net.minecraft.entity.LivingEntity>
    蜘蛛默认低光照主动攻击目标

    从类继承的嵌套类/接口 net.minecraft.entity.mob.SpiderEntity

    net.minecraft.entity.mob.SpiderEntity.SpiderData

    从类继承的嵌套类/接口 net.minecraft.entity.LivingEntity

    net.minecraft.entity.LivingEntity.FallSounds

    从类继承的嵌套类/接口 net.minecraft.entity.Entity

    net.minecraft.entity.Entity.MoveEffect, net.minecraft.entity.Entity.PositionUpdater, net.minecraft.entity.Entity.RemovalReason
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    final net.minecraft.entity.AnimationState
     
    final net.minecraft.entity.AnimationState
     
    final net.minecraft.entity.AnimationState
     
    final net.minecraft.entity.AnimationState
     
    protected int
     
    static final int
     
    final net.minecraft.entity.AnimationState
     
    final net.minecraft.entity.AnimationState
     

    从类继承的字段 net.minecraft.entity.mob.PathAwareEntity

    DEFAULT_PATHFINDING_FAVOR

    从类继承的字段 net.minecraft.entity.mob.MobEntity

    ambientSoundChance, armorDropChances, BASE_ENCHANTED_ARMOR_CHANCE, BASE_ENCHANTED_MAIN_HAND_EQUIPMENT_CHANCE, BASE_SPAWN_EQUIPMENT_CHANCE, DEFAULT_CAN_PICKUP_LOOT_CHANCE, DEFAULT_DROP_CHANCE, experiencePoints, field_35039, field_38932, goalSelector, handDropChances, jumpControl, LEASH_KEY, lookControl, MINIMUM_DROPPED_XP_PER_EQUIPMENT, moveControl, navigation, targetSelector

    从类继承的字段 net.minecraft.entity.LivingEntity

    activeItemStack, attackingPlayer, BABY_SCALE_FACTOR, bodyTrackingIncrements, bodyYaw, brain, dead, DEATH_TICKS, deathTime, defaultMaxHealth, despawnCounter, EQUIPMENT_SLOT_ID, field_30063, field_30067, field_30069, field_30070, field_30072, field_30074, field_30075, field_6215, forwardSpeed, GLOWING_FLAG, GRAVITY, handSwinging, handSwingProgress, handSwingTicks, headTrackingIncrements, headYaw, hurtTime, itemUseTimeLeft, jumping, lastAttackedTicks, lastDamageTaken, lastHandSwingProgress, limbAnimator, LIVING_FLAGS, lookDirection, maxHurtTime, OFF_HAND_ACTIVE_FLAG, playerHitTimer, preferredHand, prevBodyYaw, prevHeadYaw, prevLookDirection, prevStepBobbingAmount, randomLargeSeed, randomSmallSeed, riptideTicks, roll, scoreAmount, serverHeadYaw, serverPitch, serverX, serverY, serverYaw, serverZ, sidewaysSpeed, SLEEPING_DIMENSIONS, stepBobbingAmount, stuckArrowTimer, stuckStingerTimer, upwardSpeed, USING_ITEM_FLAG, USING_RIPTIDE_FLAG

    从类继承的字段 net.minecraft.entity.Entity

    age, collidedSoftly, dataTracker, DEFAULT_FRICTION, DEFAULT_MIN_FREEZE_DAMAGE_TICKS, DEFAULT_PORTAL_COOLDOWN, distanceTraveled, FALL_FLYING_FLAG_INDEX, fallDistance, field_29991, field_44870, field_44871, field_44872, firstUpdate, FLAGS, fluidHeight, FREEZING_DAMAGE_INTERVAL, GLOWING_FLAG_INDEX, groundCollision, horizontalCollision, horizontalSpeed, ID_KEY, ignoreCameraFrustum, inNetherPortal, inPowderSnow, intersectionChecked, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, MAX_COMMAND_TAGS, MAX_RIDING_COOLDOWN, MIN_RISING_BUBBLE_COLUMN_SPEED, movementMultiplier, netherPortalTime, noClip, ON_FIRE_FLAG_INDEX, PASSENGERS_KEY, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, random, ridingCooldown, speed, submergedInWater, supportingBlockPos, timeUntilRegen, touchingWater, uuid, UUID_KEY, uuidString, velocityDirty, velocityModified, verticalCollision, wasInPowderSnow, wasOnFire

    从接口继承的字段 net.minecraft.server.command.CommandOutput

    DUMMY

    从接口继承的字段 net.minecraft.entity.mob.Monster

    NORMAL_MONSTER_XP, SMALL_MONSTER_XP, STRONG_MONSTER_XP, STRONGER_MONSTER_XP, WITHER_XP, ZERO_XP

    从接口继承的字段 net.minecraft.scoreboard.ScoreHolder

    WILDCARD, WILDCARD_NAME
  • 构造器概要

    构造器
    构造器
    说明
    VariantsSpiderEntity(net.minecraft.entity.EntityType<? extends net.minecraft.entity.mob.SpiderEntity> entityType, net.minecraft.world.World world)
     
  • 方法概要

    修饰符和类型
    方法
    说明
    boolean
    canSpawn(net.minecraft.world.WorldAccess world, net.minecraft.entity.SpawnReason spawnReason)
     
    boolean
    canSpawn(net.minecraft.world.WorldView world)
     
    boolean
    handleFallDamage(float fallDistance, float damageMultiplier, net.minecraft.entity.damage.DamageSource damageSource)
    重载处理坠落伤害函数,使蜘蛛不再遭受坠落伤害
    void
    handleStatus(byte status)
    设置攻击动画
    protected void
    重新分配目标逻辑
    net.minecraft.entity.EntityData
    initialize(net.minecraft.world.ServerWorldAccess world, net.minecraft.world.LocalDifficulty difficulty, net.minecraft.entity.SpawnReason spawnReason, @Nullable net.minecraft.entity.EntityData entityData, @Nullable net.minecraft.nbt.NbtCompound entityNbt)
    重写实体初始化函数,使用一个内部类替换抽象祖父类实例
    protected void
    设置默认攻击目标,最好在 initGoals() 函数中分配
    protected void
    设置默认攻击主动攻击目标目标,最好在 initGoals() 函数中分配
    protected void
    setExpPoint(double radio)
    设置经验点数
    protected void
    setExpPoint(int expPoint)
    设置经验点数
    protected boolean
    是否应该跳跃
    protected boolean
    是否应该游泳
    protected boolean
    是否应该行走
    void
    设置生物动画
    boolean
    tryAttack(net.minecraft.entity.Entity target)
    设置攻击标志

    从类继承的方法 net.minecraft.entity.mob.SpiderEntity

    canHaveStatusEffect, createNavigation, createSpiderAttributes, getActiveEyeHeight, getAmbientSound, getDeathSound, getGroup, getHurtSound, getPassengerAttachmentPos, getUnscaledRidingOffset, initDataTracker, isClimbing, isClimbingWall, playStepSound, setClimbingWall, slowMovement

    从类继承的方法 net.minecraft.entity.mob.HostileEntity

    canSpawnIgnoreLightLevel, canSpawnInDark, createHostileAttributes, getFallSounds, getPathfindingFavor, getProjectileType, getSoundCategory, getSplashSound, getSwimSound, isAngryAt, isDisallowedInPeaceful, isSpawnDark, shouldDropLoot, shouldDropXp, tickMovement, updateDespawnCounter

    从类继承的方法 net.minecraft.entity.mob.PathAwareEntity

    getFollowLeashSpeed, getPathfindingFavor, isNavigating, isPanicking, shouldFollowLeash, updateForLeashLength, updateLeash

    从类继承的方法 net.minecraft.entity.mob.MobEntity

    attachLeash, baseTick, canBeLeashedBy, canEquip, canGather, canImmediatelyDespawn, canMobSpawn, canMoveVoluntarily, cannotDespawn, canPickupItem, canPickUpLoot, canTarget, canUseRangedWeapon, checkDespawn, clearGoals, clearGoalsAndTasks, clearPositionTarget, convertTo, createBodyControl, createMobAttributes, detachLeash, dropEquipment, dropLoot, enchantEquipment, enchantMainHandItem, equipLootStack, equipStack, getArmorItems, getAttackBox, getControllingPassenger, getDropChance, getEquipmentForSlot, getEquippedStack, getHandItems, getHoldingEntity, getItemPickUpRangeExpander, getJumpControl, getLimitPerChunk, getLookControl, getLootTable, getLootTableId, getLootTableSeed, getMainArm, getMaxHeadRotation, getMaxLookPitchChange, getMaxLookYawChange, getMinAmbientSoundDelay, getMoveControl, getNavigation, getPathfindingPenalty, getPickBlockStack, getPositionTarget, getPositionTargetRange, getSafeFallDistance, getTarget, getVisibilityCache, getXpToDrop, hasPositionTarget, initEquipment, interact, interactMob, isAffectedByDaylight, isAiDisabled, isAttacking, isInAttackRange, isInWalkTargetRange, isInWalkTargetRange, isLeashed, isLeftHanded, isPersistent, lookAtEntity, loot, mobTick, movesIndependently, onEatingGrass, onFinishPathfinding, onPlayerSpawnedChild, onStartPathfinding, playAmbientSound, playHurtSound, playSpawnEffects, prefersNewDamageableItem, prefersNewEquipment, readCustomDataFromNbt, removeFromDimension, sendAiDebugData, setAiDisabled, setAttacking, setBaby, setCanPickUpLoot, setEquipmentDropChance, setForwardSpeed, setHoldingEntityId, setLeftHanded, setMovementSpeed, setPathfindingPenalty, setPersistent, setPositionTarget, setSidewaysSpeed, setTarget, setUpwardSpeed, spawnsTooManyForEachTry, startRiding, swimUpward, tickNewAi, tryEquip, turnHead, updateDropChances, updateEnchantments, updateGoalControls, writeCustomDataToNbt

    从类继承的方法 net.minecraft.entity.LivingEntity

    addPowderSnowSlowIfNeeded, addSoulSpeedBoostIfNeeded, addStatusEffect, addStatusEffect, animateDamage, applyArmorToDamage, applyDamage, applyFluidMovingSpeed, applyMovementEffects, applyMovementInput, areItemsDifferent, attackLivingEntity, blockedByShield, canBreatheInWater, canFreeze, canHit, canSee, canTakeDamage, canTarget, canUsePortals, canWalkOnFluid, clearActiveItem, clearPotionSwirls, clearSleepingPosition, clearStatusEffects, computeFallDamage, consumeItem, containsOnlyAmbientEffects, createBrainProfile, createLivingAttributes, damage, damageArmor, damageHelmet, damageShield, deserializeBrain, disableExperienceDropping, disablesShield, displaySoulSpeedEffects, drop, dropInventory, dropXp, eatFood, endCombat, enterCombat, fall, getAbsorptionAmount, getActiveHand, getActiveItem, getActiveStatusEffects, getArmor, getArmorVisibility, getAttackDistanceScalingFactor, getAttacker, getAttacking, getAttributeBaseValue, getAttributeBaseValue, getAttributeInstance, getAttributes, getAttributeValue, getAttributeValue, getBaseMovementSpeedMultiplier, getBodyYaw, getBoundingBox, getBrain, getClimbingPos, getControlledMovementInput, getDamageTiltYaw, getDamageTracker, getDespawnCounter, getDimensions, getDrinkSound, getEatSound, getEyeHeight, getHandSwingProgress, getHeadYaw, getHealth, getHitbox, getItemUseTime, getItemUseTimeLeft, getJumpBoostVelocityModifier, getJumpVelocity, getLastAttackedTime, getLastAttacker, getLastAttackTime, getLeaningPitch, getLerpTargetPitch, getLerpTargetX, getLerpTargetY, getLerpTargetYaw, getLerpTargetZ, getMainHandStack, getMaxAbsorption, getMaxHealth, getMaxRelativeHeadRotation, getMovementSpeed, getNextAirOnLand, getNextAirUnderwater, getOffGroundSpeed, getOffHandStack, getPassengerRidingPos, getPoses, getPreferredEquipmentSlot, getPrimeAdversary, getRandom, getRecentDamageSource, getRidingOffset, getRoll, getSaddledSpeed, getScaleFactor, getSleepingDirection, getSleepingPosition, getSoundPitch, getSoundVolume, getStackInHand, getStackReference, getStatusEffect, getStatusEffects, getStepHeight, getStingerCount, getStuckArrowCount, getVelocityMultiplier, getVisibilityBoundingBox, getYaw, hasNoDrag, hasStackEquipped, hasStatusEffect, heal, hurtByWater, isAffectedBySplashPotions, isAlive, isArmorSlot, isBaby, isBlocking, isDead, isExperienceDroppingDisabled, isFallFlying, isGlowing, isHolding, isHolding, isHoldingOntoLadder, isImmobile, isInsideWall, isInSwimmingPose, isMobOrPlayer, isOnSoulSpeedBlock, isPartOfGame, isPushable, isSleeping, isTarget, isUndead, isUsingItem, isUsingRiptide, jump, kill, knockback, knockDownwards, lookAt, markEffectsDirty, method_52539, modifyAppliedDamage, onAttacking, onDamaged, onDeath, onEquipStack, onKilledBy, onSpawnPacket, onStatusEffectApplied, onStatusEffectRemoved, onStatusEffectUpgraded, onTrackedDataSet, playBlockFallSound, positionInPortal, positionInPortal, processEquippedStack, pushAway, pushAwayFrom, remove, removePowderSnowSlow, removeSoulSpeedBoost, removeStatusEffect, removeStatusEffectInternal, sendEffectToControllingPlayer, sendEquipmentBreakStatus, sendPickup, sendToolBreakStatus, setAbsorptionAmount, setAbsorptionAmountUnclamped, setAttacker, setAttacking, setBodyYaw, setCurrentHand, setDespawnCounter, setHeadYaw, setHealth, setJumping, setLivingFlag, setNearbySongPlaying, setNoDrag, setSleepingPosition, setSprinting, setStackInHand, setStatusEffect, setStingerCount, setStuckArrowCount, shouldAlwaysDropXp, shouldDisplaySoulSpeedEffects, shouldRemoveSoulSpeedBoost, shouldRenderName, shouldSwimInFluids, sleep, spawnConsumptionEffects, stopRiding, stopUsingItem, swingHand, swingHand, takeKnockback, takeShieldHit, teleport, tickControlled, tickCramming, tickHandSwing, tickInVoid, tickItemStackUsage, tickRiding, tickRiptide, tickStatusEffects, tiltScreen, travel, triggerItemPickedUpByEntityCriteria, updateLimbs, updateLimbs, updatePostDeath, updatePotionVisibility, updateTrackedHeadRotation, updateTrackedPositionAndAngles, wakeUp, wouldNotSuffocateInPose

    从类继承的方法 net.minecraft.entity.Entity

    addAirTravelEffects, addCommandTag, addFlapEffects, addPassenger, addVelocity, addVelocity, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, applyDamageEffects, applyMirror, applyRotation, attemptTickInVoid, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundingBox, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeHitByProjectile, canBeSpectated, canExplosionDestroyBlock, canModifyAt, canSprintAsVehicle, canStartRiding, changeLookDirection, checkBlockCollision, collidesWith, collidesWithStateAtPos, copyFrom, copyPositionAndRotation, couldAcceptPassenger, createSpawnPacket, detach, discard, dismountVehicle, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, emitGameEvent, emitGameEvent, entityDataRequiresOperator, equals, extinguish, extinguishWithSound, getAir, getBlockPos, getBlockStateAtPos, getBlockX, getBlockY, getBlockZ, getBodyY, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getChunkPos, getClientCameraPosVec, getCommandSource, getCommandTags, getControllingVehicle, getCustomName, getDamageSources, getDataTracker, getDefaultName, getDefaultPortalCooldown, getDisplayName, getEffectiveExplosionResistance, getEntityWorld, getEyeHeight, getEyePos, getEyeY, getFireTicks, getFirstPassenger, getFlag, getFluidHeight, getFreezingScale, getFrozenTicks, getHandPosOffset, getHeight, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getId, getItemsEquipped, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getLeashOffset, getLeashOffset, getLeashPos, getLerpedPos, getMaxAir, getMaxNetherPortalTime, getMinFreezeDamageTicks, getMoveEffect, getMovementDirection, getName, getNameForScoreboard, getNameLabelHeight, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerDismountOffset, getPassengerList, getPassengersDeep, getPermissionLevel, getPistonBehavior, getPitch, getPitch, getPlayerPassengers, getPortalCooldown, getPortalRect, getPos, getPose, getPosWithYOffset, getRandomBodyY, getRemovalReason, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSavedEntityId, getScoreboardTeam, getServer, getStandingEyeHeight, getSteppingBlockState, getSteppingPos, getStepSoundPos, getSwimHeight, getSyncedPos, getTargetingMargin, getTeamColorValue, getTeleportTarget, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVelocity, getVelocityAffectingPos, getWidth, getWorld, getX, getY, getYaw, getZ, handleAttack, hasCollidedSoftly, hasControllingPassenger, hasCustomName, hashCode, hasNoGravity, hasPassenger, hasPassenger, hasPassengerDeep, hasPassengers, hasPermissionLevel, hasPlayerRider, hasPortalCooldown, hasVehicle, interactAt, isAttackable, isCollidable, isConnectedThroughVehicle, isCrawling, isCustomNameVisible, isDescending, isFireImmune, isFlappingWings, isFrozen, isGlowingLocal, isImmuneToExplosion, isInFluid, isInLava, isInPose, isInRange, isInRange, isInsideWaterOrBubbleColumn, isInSneakingPose, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isLiving, isLogicalSideForUpdatingMovement, isOnFire, isOnGround, isOnRail, isPartOf, isPlayer, isPushedByFluids, isRegionUnloaded, isRemoved, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSupportedBy, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, lerpPosAndRotation, limitFallDistance, move, moveToWorld, occludeVibrationSignals, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onDataTrackerUpdate, onKilledOther, onLanding, onPassengerLookAround, onPlayerCollision, onRemoved, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, playCombinationStepSounds, playExtinguishSound, playSecondaryStepSound, playSound, playSoundIfNotSilent, playSwimSound, playSwimSound, populateCrashReport, pushOutOfBlocks, raycast, readNbt, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, reinitDimensions, removeAllPassengers, removeCommandTag, removePassenger, requestTeleport, requestTeleportAndDismount, requestTeleportOffset, resetPortalCooldown, resetPosition, saveNbt, saveSelfNbt, scheduleVelocityUpdate, sendMessage, setAir, setBoundingBox, setChangeListener, setCustomName, setCustomNameVisible, setFireTicks, setFlag, setFrozenTicks, setGlowing, setId, setInNetherPortal, setInPowderSnow, setInvisible, setInvulnerable, setNoGravity, setOnFire, setOnFireFor, setOnFireFromLava, setOnGround, setOnGround, setPitch, setPortalCooldown, setPos, setPose, setPosition, setPosition, setRemoved, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setStepHeight, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, setWorld, setYaw, shouldBroadcastConsoleToOps, shouldControlVehicles, shouldDismountUnderwater, shouldEscapePowderSnow, shouldReceiveFeedback, shouldRender, shouldRender, shouldSave, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTrackOutput, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, startRiding, streamPassengersAndSelf, streamSelfAndPassengers, teleport, teleport, tickPortal, tickPortalCooldown, toNbtList, toNbtList, toString, tryCheckBlockCollision, unsetRemoved, updateEventHandler, updateKilledAdvancementCriterion, updateMovementInFluid, updatePassengerForDismount, updatePassengerPosition, updatePassengerPosition, updatePosition, updatePositionAndAngles, updateSupportingBlockPos, updateSwimming, updateTrackedPosition, updateVelocity, updateWaterState, writeNbt

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

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    从接口继承的方法 net.minecraft.server.command.CommandOutput

    cannotBeSilenced

    从接口继承的方法 net.minecraft.scoreboard.ScoreHolder

    getStyledDisplayName
  • 字段详细资料

    • SPIDER_EYES_COLOR

      public static final int SPIDER_EYES_COLOR
      另请参阅:
    • walkingAnimationState

      public final net.minecraft.entity.AnimationState walkingAnimationState
    • swimmingAnimationState

      public final net.minecraft.entity.AnimationState swimmingAnimationState
    • climbingAnimationState

      public final net.minecraft.entity.AnimationState climbingAnimationState
    • jumpingAnimationState

      public final net.minecraft.entity.AnimationState jumpingAnimationState
    • attackingAnimationState

      public final net.minecraft.entity.AnimationState attackingAnimationState
    • dyingAnimationState

      public final net.minecraft.entity.AnimationState dyingAnimationState
    • jumpStopFlag

      protected int jumpStopFlag
  • 构造器详细资料

    • VariantsSpiderEntity

      public VariantsSpiderEntity(net.minecraft.entity.EntityType<? extends net.minecraft.entity.mob.SpiderEntity> entityType, net.minecraft.world.World world)
  • 方法详细资料

    • canSpawn

      public boolean canSpawn(net.minecraft.world.WorldAccess world, net.minecraft.entity.SpawnReason spawnReason)
      覆盖:
      canSpawn 在类中 net.minecraft.entity.mob.PathAwareEntity
    • canSpawn

      public boolean canSpawn(net.minecraft.world.WorldView world)
      覆盖:
      canSpawn 在类中 net.minecraft.entity.mob.MobEntity
    • handleFallDamage

      public boolean handleFallDamage(float fallDistance, float damageMultiplier, net.minecraft.entity.damage.DamageSource damageSource)
      重载处理坠落伤害函数,使蜘蛛不再遭受坠落伤害
      覆盖:
      handleFallDamage 在类中 net.minecraft.entity.LivingEntity
    • tick

      public void tick()
      设置生物动画
      覆盖:
      tick 在类中 net.minecraft.entity.mob.SpiderEntity
    • initGoals

      protected void initGoals()
      重新分配目标逻辑
      覆盖:
      initGoals 在类中 net.minecraft.entity.mob.SpiderEntity
    • initialize

      public net.minecraft.entity.EntityData initialize(net.minecraft.world.ServerWorldAccess world, net.minecraft.world.LocalDifficulty difficulty, net.minecraft.entity.SpawnReason spawnReason, @Nullable @Nullable net.minecraft.entity.EntityData entityData, @Nullable @Nullable net.minecraft.nbt.NbtCompound entityNbt)

      重写实体初始化函数,使用一个内部类替换抽象祖父类实例

      然后使用方法句柄方式跳过父类调用祖父类实例的初始化代码重新编写自定义初始化

      覆盖:
      initialize 在类中 net.minecraft.entity.mob.SpiderEntity
    • tryAttack

      public boolean tryAttack(net.minecraft.entity.Entity target)
      设置攻击标志
      覆盖:
      tryAttack 在类中 net.minecraft.entity.mob.MobEntity
      参数:
      target - 攻击目标
    • handleStatus

      public void handleStatus(byte status)
      设置攻击动画
      覆盖:
      handleStatus 在类中 net.minecraft.entity.mob.MobEntity
      参数:
      status - 状态
    • setExpPoint

      protected void setExpPoint(double radio)
      设置经验点数
      参数:
      radio - 经验倍率
    • setExpPoint

      protected void setExpPoint(int expPoint)
      设置经验点数
      参数:
      expPoint - 经验点
    • shouldWalk

      protected boolean shouldWalk()
      是否应该行走
      返回:
      如果应该走则返回 true
    • shouldSwim

      protected boolean shouldSwim()
      是否应该游泳
      返回:
      如果应该游则返回 true
    • shouldJump

      protected boolean shouldJump()
      是否应该跳跃
      返回:
      如果应该跳则返回 true
    • setDefaultAttackGoals

      protected void setDefaultAttackGoals()
      设置默认攻击目标,最好在 initGoals() 函数中分配
    • setDefaultTargetGoals

      protected void setDefaultTargetGoals()
      设置默认攻击主动攻击目标目标,最好在 initGoals() 函数中分配