Class ManaBurstEntity

java.lang.Object
net.minecraft.world.entity.Entity
net.minecraft.world.entity.projectile.Projectile
net.minecraft.world.entity.projectile.ThrowableProjectile
vazkii.botania.common.entity.ManaBurstEntity
All Implemented Interfaces:
net.minecraft.commands.CommandSource, net.minecraft.network.syncher.SyncedDataHolder, net.minecraft.world.entity.TraceableEntity, net.minecraft.world.level.entity.EntityAccess, net.minecraft.world.Nameable, net.minecraft.world.scores.ScoreHolder, ManaBurst

public class ManaBurstEntity extends net.minecraft.world.entity.projectile.ThrowableProjectile implements ManaBurst
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
     

    Nested classes/interfaces inherited from class net.minecraft.world.entity.Entity

    net.minecraft.world.entity.Entity.MoveFunction, net.minecraft.world.entity.Entity.MovementEmission, net.minecraft.world.entity.Entity.RemovalReason
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     

    Fields inherited from class net.minecraft.world.entity.Entity

    BASE_SAFE_FALL_DISTANCE, BASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, CONTENTS_SLOT_INDEX, DATA_POSE, DATA_SHARED_FLAGS_ID, DEFAULT_BB_HEIGHT, DEFAULT_BB_WIDTH, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_2, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_5, DELTA_AFFECTED_BY_BLOCKS_BELOW_1_0, entityData, fallDistance, firstTick, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_ONFIRE, fluidHeight, flyDist, FREEZE_HURT_FREQUENCY, hasImpulse, horizontalCollision, hurtMarked, ID_TAG, invulnerableTime, isInPowderSnow, mainSupportingBlockPos, MAX_ENTITY_TAG_COUNT, minorHorizontalCollision, moveDist, noCulling, noPhysics, PASSENGERS_TAG, portalProcess, random, stringUUID, stuckSpeedMultiplier, tickCount, TOTAL_AIR_SUPPLY, uuid, UUID_TAG, verticalCollision, verticalCollisionBelow, walkDist, walkDistO, wasEyeInWater, wasInPowderSnow, wasOnFire, wasTouchingWater, xo, xOld, xRotO, yo, yOld, yRotO, zo, zOld

    Fields inherited from interface net.minecraft.commands.CommandSource

    NULL

    Fields inherited from interface vazkii.botania.api.internal.ManaBurst

    NO_SOURCE

    Fields inherited from interface net.minecraft.world.scores.ScoreHolder

    WILDCARD, WILDCARD_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
    ManaBurstEntity(net.minecraft.world.entity.EntityType<ManaBurstEntity> type, net.minecraft.world.level.Level world)
     
    ManaBurstEntity(net.minecraft.world.entity.player.Player player)
     
    ManaBurstEntity(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, float rotX, float rotY, boolean fake)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addAdditionalSaveData(net.minecraft.nbt.CompoundTag tag)
     
    static net.minecraft.world.phys.Vec3
    calculateBurstVelocity(float xRot, float yRot)
     
    boolean
    canChangeDimensions(net.minecraft.world.level.Level oldLevel, net.minecraft.world.level.Level newLevel)
     
    protected void
    defineSynchedData(net.minecraft.network.syncher.SynchedEntityData.Builder builder)
     
    float
     
    net.minecraft.core.BlockPos
    The block position of the block entity that spawned this burst.
    @Nullable ManaReceiver
    getCollidedTile(boolean noParticles)
     
    int
     
    double
     
    @Nullable net.minecraft.core.BlockPos
     
    int
     
    float
     
    int
     
    int
     
    float
     
    @Nullable UUID
     
    net.minecraft.world.item.ItemStack
     
    int
     
    int
     
    void
    handleEntityEvent(byte event)
     
    boolean
    hasAlreadyCollidedAt(net.minecraft.core.BlockPos pos)
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    protected void
    onHit(net.minecraft.world.phys.HitResult hit)
     
    protected void
    onHitBlock(@NotNull net.minecraft.world.phys.BlockHitResult hit)
     
    protected void
    onHitEntity(@NotNull net.minecraft.world.phys.EntityHitResult hit)
     
    void
     
    void
     
    void
    readAdditionalSaveData(net.minecraft.nbt.CompoundTag cmp)
     
    void
    remove(net.minecraft.world.entity.Entity.RemovalReason reason)
     
    void
    setBurstSourceCoords(net.minecraft.core.BlockPos pos)
     
    void
    setCollidedAt(net.minecraft.core.BlockPos pos)
     
    void
    setColor(int color)
     
    void
    setFake(boolean fake)
     
    void
    setGravity(float gravity)
     
    void
    setMagnetizePos(@Nullable net.minecraft.core.BlockPos pos)
     
    void
    setMana(int mana)
     
    void
    setManaLossPerTick(float mana)
     
    void
    setMinManaLoss(int minManaLoss)
     
    void
    setOrbitTime(int time)
     
    void
     
    void
     
    void
    setSourceLens(net.minecraft.world.item.ItemStack lens)
     
    void
    setStartingMana(int mana)
     
    void
    setTicksExisted(int ticks)
     
    void
    setTripped(boolean tripped)
     
    void
    setWarped(boolean warped)
     
    protected boolean
     
    void
     
    boolean
    updateFluidHeightAndDoFluidPushing(net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid> fluid, double mag)
     

    Methods inherited from class net.minecraft.world.entity.projectile.ThrowableProjectile

    canUsePortal, shouldRenderAtSqrDistance

    Methods inherited from class net.minecraft.world.entity.projectile.Projectile

    calculateHorizontalHurtKnockbackDirection, canHitEntity, deflect, getAddEntityPacket, getEffectSource, getMovementToShoot, getOwner, getPickRadius, hitTargetOrDeflectSelf, isPickable, lerpMotion, lerpRotation, mayBreak, mayInteract, onDeflection, ownedBy, recreateFromPacket, restoreFrom, setOwner, shoot, shootFromRotation, updateRotation

    Methods inherited from class net.minecraft.world.entity.Entity

    absMoveTo, absMoveTo, absRotateTo, acceptsFailure, acceptsSuccess, addDeltaMovement, addPassenger, addTag, adjustSpawnLocation, animateHurt, applyGravity, awardKillScore, baseTick, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canBeHitByProjectile, canCollideWith, canControlVehicle, canFreeze, canRide, canSpawnSprintParticle, canSprint, causeFallDamage, changeDimension, checkBelowWorld, checkDespawn, checkFallDamage, checkInsideBlocks, checkSlowFallDistance, checkSupportingBlock, chunkPosition, clearFire, closerThan, closerThan, collideBoundingBox, copyPosition, couldAcceptPassenger, countPlayerPassengers, createCommandSourceStack, createHoverEvent, damageSources, dampensVibrations, deflection, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doWaterSplashEffect, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, fireImmune, fixupDimensions, fudgePositionAfterSizeChange, gameEvent, gameEvent, getAirSupply, getAttachments, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockSpeedFactor, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getBoundingBoxForCulling, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControlledVehicle, getControllingPassenger, getCustomName, getDefaultPassengerAttachmentPoint, getDeltaMovement, getDimensionChangingDelay, getDimensions, getDirection, getDismountLocationForPassenger, getDisplayName, getEncodeId, getEntityData, getEyeHeight, getEyeHeight, getEyePosition, getEyePosition, getEyeY, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getForward, getGravity, getHandHoldingItemAngle, getId, getInBlockState, getIndirectPassengers, getKnownMovement, getLeashOffset, getLeashOffset, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMotionDirection, getMovementEmission, getName, getNearestViewDirection, getOnPos, getOnPos, getOnPosLegacy, getPassengerAttachmentPoint, getPassengerRidingPosition, getPassengers, getPassengersAndSelf, getPercentFrozen, getPermissionLevel, getPickResult, getPistonPushReaction, getPortalCooldown, getPose, getPosition, getPositionCodec, getPreciseBodyRotation, getPrimaryStepSoundBlockPos, getRandom, getRandomX, getRandomY, getRandomZ, getRelativePortalPosition, getRemainingFireTicks, getRemovalReason, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getSlot, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getTicksFrozen, getTicksRequiredToFreeze, getType, getTypeName, getUpVector, getUUID, getVehicle, getVehicleAttachmentPoint, getViewScale, getViewVector, getViewXRot, getViewYRot, getVisualRotationYInDegrees, getWeaponItem, getX, getX, getXRot, getY, getY, getYHeadRot, getYRot, getZ, getZ, handleDamageEvent, handlePortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, hasPose, hurt, igniteForSeconds, igniteForTicks, ignoreExplosion, interact, interactAt, is, isAlive, isAlliedTo, isAlliedTo, isAlwaysTicking, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCurrentlyGlowing, isCustomNameVisible, isDescending, isDiscrete, isEffectiveAi, isEyeInFluid, isFlapping, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInLiquid, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isInWall, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isNoGravity, isOnFire, isOnPortalCooldown, isOnRails, isPassenger, isPassengerOfSameVehicle, isPushable, isPushedByFluid, isRemoved, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSupportedBy, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, isVisuallySwimming, kill, killedEntity, lavaHurt, lerpHeadTo, lerpPositionAndRotationStep, lerpTargetX, lerpTargetXRot, lerpTargetY, lerpTargetYRot, lerpTargetZ, lerpTo, level, limitPistonMovement, load, lookAt, makeBoundingBox, makeStuckInBlock, markHurt, maxUpStep, maybeBackOffFromEdge, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onBelowWorld, onClientRemoval, onExplosionHit, onFlap, onGround, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onSyncedDataUpdated, onSyncedDataUpdated, pick, placePortalTicket, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSound, playStepSound, playSwimSound, position, positionRider, positionRider, processFlappingMovement, processPortalCooldown, push, push, push, reapplyPosition, refreshDimensions, registryAccess, removeAfterChangingDimensions, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, rideTick, rotate, save, saveAsPassenger, saveWithoutId, sendSystemMessage, setAirSupply, setAsInsidePortal, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setLevel, setLevelCallback, setNoGravity, setOldPosAndRot, setOnGround, setOnGroundWithMovement, setPortalCooldown, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemainingFireTicks, setRemoved, setRot, setSharedFlag, setSharedFlagOnFire, setShiftKeyDown, setSilent, setSprinting, setSwimming, setTicksFrozen, setUUID, setViewScale, setXRot, setYBodyRot, setYHeadRot, setYRot, shouldBeSaved, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldShowName, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startRiding, startSeenByPlayer, stopRiding, stopSeenByPlayer, syncPacketPositionCodec, teleportRelative, teleportTo, teleportTo, thunderHit, toString, touchingUnloadedChunk, trackingPosition, tryCheckInsideBlocks, turn, unRide, unsetRemoved, updateDynamicGameEventListener, updateInWaterStateAndDoFluidPushing, updateSwimming, waterSwimSound

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface net.minecraft.commands.CommandSource

    alwaysAccepts

    Methods inherited from interface vazkii.botania.api.internal.ManaBurst

    entity

    Methods inherited from interface net.minecraft.world.scores.ScoreHolder

    getFeedbackDisplayName
  • Field Details

  • Constructor Details

    • ManaBurstEntity

      public ManaBurstEntity(net.minecraft.world.entity.EntityType<ManaBurstEntity> type, net.minecraft.world.level.Level world)
    • ManaBurstEntity

      public ManaBurstEntity(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, float rotX, float rotY, boolean fake)
    • ManaBurstEntity

      public ManaBurstEntity(net.minecraft.world.entity.player.Player player)
  • Method Details

    • defineSynchedData

      protected void defineSynchedData(net.minecraft.network.syncher.SynchedEntityData.Builder builder)
      Specified by:
      defineSynchedData in class net.minecraft.world.entity.Entity
    • calculateBurstVelocity

      public static net.minecraft.world.phys.Vec3 calculateBurstVelocity(float xRot, float yRot)
    • tick

      public void tick()
      Overrides:
      tick in class net.minecraft.world.entity.projectile.ThrowableProjectile
    • updateFluidHeightAndDoFluidPushing

      public boolean updateFluidHeightAndDoFluidPushing(net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid> fluid, double mag)
      Overrides:
      updateFluidHeightAndDoFluidPushing in class net.minecraft.world.entity.Entity
    • isInLava

      public boolean isInLava()
      Overrides:
      isInLava in class net.minecraft.world.entity.Entity
    • getCollidedTile

      @Nullable public @Nullable ManaReceiver getCollidedTile(boolean noParticles)
    • canChangeDimensions

      public boolean canChangeDimensions(net.minecraft.world.level.Level oldLevel, net.minecraft.world.level.Level newLevel)
      Overrides:
      canChangeDimensions in class net.minecraft.world.entity.Entity
    • addAdditionalSaveData

      public void addAdditionalSaveData(net.minecraft.nbt.CompoundTag tag)
      Overrides:
      addAdditionalSaveData in class net.minecraft.world.entity.projectile.Projectile
    • readAdditionalSaveData

      public void readAdditionalSaveData(net.minecraft.nbt.CompoundTag cmp)
      Overrides:
      readAdditionalSaveData in class net.minecraft.world.entity.projectile.Projectile
    • particles

      public void particles()
    • handleEntityEvent

      public void handleEntityEvent(byte event)
      Overrides:
      handleEntityEvent in class net.minecraft.world.entity.Entity
    • getParticleSize

      public float getParticleSize()
    • onHit

      protected void onHit(net.minecraft.world.phys.HitResult hit)
      Overrides:
      onHit in class net.minecraft.world.entity.projectile.Projectile
    • onHitBlock

      protected void onHitBlock(@NotNull @NotNull net.minecraft.world.phys.BlockHitResult hit)
      Overrides:
      onHitBlock in class net.minecraft.world.entity.projectile.Projectile
    • onHitEntity

      protected void onHitEntity(@NotNull @NotNull net.minecraft.world.phys.EntityHitResult hit)
      Overrides:
      onHitEntity in class net.minecraft.world.entity.projectile.Projectile
    • remove

      public void remove(net.minecraft.world.entity.Entity.RemovalReason reason)
      Overrides:
      remove in class net.minecraft.world.entity.Entity
    • getDefaultGravity

      public double getDefaultGravity()
      Overrides:
      getDefaultGravity in class net.minecraft.world.entity.projectile.ThrowableProjectile
    • isFake

      public boolean isFake()
      Specified by:
      isFake in interface ManaBurst
    • setFake

      public void setFake(boolean fake)
      Specified by:
      setFake in interface ManaBurst
    • setScanBeam

      public void setScanBeam()
    • getColor

      public int getColor()
      Specified by:
      getColor in interface ManaBurst
    • setColor

      public void setColor(int color)
      Specified by:
      setColor in interface ManaBurst
    • getMana

      public int getMana()
      Specified by:
      getMana in interface ManaBurst
    • setMana

      public void setMana(int mana)
      Specified by:
      setMana in interface ManaBurst
    • getStartingMana

      public int getStartingMana()
      Specified by:
      getStartingMana in interface ManaBurst
    • setStartingMana

      public void setStartingMana(int mana)
      Specified by:
      setStartingMana in interface ManaBurst
    • getMinManaLoss

      public int getMinManaLoss()
      Specified by:
      getMinManaLoss in interface ManaBurst
    • setMinManaLoss

      public void setMinManaLoss(int minManaLoss)
      Specified by:
      setMinManaLoss in interface ManaBurst
    • getManaLossPerTick

      public float getManaLossPerTick()
      Specified by:
      getManaLossPerTick in interface ManaBurst
    • setManaLossPerTick

      public void setManaLossPerTick(float mana)
      Specified by:
      setManaLossPerTick in interface ManaBurst
    • getBurstGravity

      public float getBurstGravity()
      Specified by:
      getBurstGravity in interface ManaBurst
    • setGravity

      public void setGravity(float gravity)
      Specified by:
      setGravity in interface ManaBurst
    • getBurstSourceBlockPos

      public net.minecraft.core.BlockPos getBurstSourceBlockPos()
      Description copied from interface: ManaBurst
      The block position of the block entity that spawned this burst. If the burst wasn't fired from a block entity, returns ManaBurst.NO_SOURCE
      Specified by:
      getBurstSourceBlockPos in interface ManaBurst
    • setBurstSourceCoords

      public void setBurstSourceCoords(net.minecraft.core.BlockPos pos)
      Specified by:
      setBurstSourceCoords in interface ManaBurst
    • getSourceLens

      public net.minecraft.world.item.ItemStack getSourceLens()
      Specified by:
      getSourceLens in interface ManaBurst
    • setSourceLens

      public void setSourceLens(net.minecraft.world.item.ItemStack lens)
      Specified by:
      setSourceLens in interface ManaBurst
    • getTicksExisted

      public int getTicksExisted()
      Specified by:
      getTicksExisted in interface ManaBurst
    • hasLeftSource

      public boolean hasLeftSource()
      Specified by:
      hasLeftSource in interface ManaBurst
      Returns:
      True if the burst has ticked at least once outside of ManaBurst.getBurstSourceBlockPos().
    • setTicksExisted

      public void setTicksExisted(int ticks)
    • hasAlreadyCollidedAt

      public boolean hasAlreadyCollidedAt(net.minecraft.core.BlockPos pos)
      Specified by:
      hasAlreadyCollidedAt in interface ManaBurst
    • setCollidedAt

      public void setCollidedAt(net.minecraft.core.BlockPos pos)
      Specified by:
      setCollidedAt in interface ManaBurst
    • setShooterUUID

      public void setShooterUUID(UUID uuid)
      Specified by:
      setShooterUUID in interface ManaBurst
    • getShooterUUID

      @Nullable public @Nullable UUID getShooterUUID()
      Specified by:
      getShooterUUID in interface ManaBurst
    • ping

      public void ping()
      Specified by:
      ping in interface ManaBurst
    • hasWarped

      public boolean hasWarped()
      Specified by:
      hasWarped in interface ManaBurst
      Returns:
      True if a warp lens has already warped this burst once
    • setWarped

      public void setWarped(boolean warped)
      Specified by:
      setWarped in interface ManaBurst
    • getOrbitTime

      public int getOrbitTime()
      Specified by:
      getOrbitTime in interface ManaBurst
    • setOrbitTime

      public void setOrbitTime(int time)
      Specified by:
      setOrbitTime in interface ManaBurst
    • hasTripped

      public boolean hasTripped()
      Specified by:
      hasTripped in interface ManaBurst
      Returns:
      Whether an entity has tripped this burst for the tripwire lens
    • setTripped

      public void setTripped(boolean tripped)
      Specified by:
      setTripped in interface ManaBurst
    • getMagnetizedPos

      @Nullable public @Nullable net.minecraft.core.BlockPos getMagnetizedPos()
      Specified by:
      getMagnetizedPos in interface ManaBurst
      Returns:
      The position this burst is magnetized towards
    • setMagnetizePos

      public void setMagnetizePos(@Nullable @Nullable net.minecraft.core.BlockPos pos)
      Specified by:
      setMagnetizePos in interface ManaBurst
    • shouldDoFakeParticles

      protected boolean shouldDoFakeParticles()