Package vazkii.botania.common.entity
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 ClassesNested 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
FieldsFields 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, zOldFields inherited from interface net.minecraft.commands.CommandSource
NULLFields inherited from interface net.minecraft.world.scores.ScoreHolder
WILDCARD, WILDCARD_NAME -
Constructor Summary
ConstructorsConstructorDescriptionManaBurstEntity(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 TypeMethodDescriptionvoidaddAdditionalSaveData(net.minecraft.nbt.CompoundTag tag) static net.minecraft.world.phys.Vec3calculateBurstVelocity(float xRot, float yRot) booleancanChangeDimensions(net.minecraft.world.level.Level oldLevel, net.minecraft.world.level.Level newLevel) protected voiddefineSynchedData(net.minecraft.network.syncher.SynchedEntityData.Builder builder) floatnet.minecraft.core.BlockPosThe block position of the block entity that spawned this burst.@Nullable ManaReceivergetCollidedTile(boolean noParticles) intgetColor()double@Nullable net.minecraft.core.BlockPosintgetMana()floatintintfloat@Nullable UUIDnet.minecraft.world.item.ItemStackintintvoidhandleEntityEvent(byte event) booleanhasAlreadyCollidedAt(net.minecraft.core.BlockPos pos) booleanbooleanbooleanbooleanisFake()booleanisInLava()protected voidonHit(net.minecraft.world.phys.HitResult hit) protected voidonHitBlock(@NotNull net.minecraft.world.phys.BlockHitResult hit) protected voidonHitEntity(@NotNull net.minecraft.world.phys.EntityHitResult hit) voidvoidping()voidreadAdditionalSaveData(net.minecraft.nbt.CompoundTag cmp) voidremove(net.minecraft.world.entity.Entity.RemovalReason reason) voidsetBurstSourceCoords(net.minecraft.core.BlockPos pos) voidsetCollidedAt(net.minecraft.core.BlockPos pos) voidsetColor(int color) voidsetFake(boolean fake) voidsetGravity(float gravity) voidsetMagnetizePos(@Nullable net.minecraft.core.BlockPos pos) voidsetMana(int mana) voidsetManaLossPerTick(float mana) voidsetMinManaLoss(int minManaLoss) voidsetOrbitTime(int time) voidvoidsetShooterUUID(UUID uuid) voidsetSourceLens(net.minecraft.world.item.ItemStack lens) voidsetStartingMana(int mana) voidsetTicksExisted(int ticks) voidsetTripped(boolean tripped) voidsetWarped(boolean warped) protected booleanvoidtick()booleanupdateFluidHeightAndDoFluidPushing(net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid> fluid, double mag) Methods inherited from class net.minecraft.world.entity.projectile.ThrowableProjectile
canUsePortal, shouldRenderAtSqrDistanceMethods 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, updateRotationMethods 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, waterSwimSoundMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.commands.CommandSource
alwaysAcceptsMethods inherited from interface net.minecraft.world.scores.ScoreHolder
getFeedbackDisplayName
-
Field Details
-
propsList
-
-
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:
defineSynchedDatain classnet.minecraft.world.entity.Entity
-
calculateBurstVelocity
public static net.minecraft.world.phys.Vec3 calculateBurstVelocity(float xRot, float yRot) -
tick
public void tick()- Overrides:
tickin classnet.minecraft.world.entity.projectile.ThrowableProjectile
-
updateFluidHeightAndDoFluidPushing
public boolean updateFluidHeightAndDoFluidPushing(net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid> fluid, double mag) - Overrides:
updateFluidHeightAndDoFluidPushingin classnet.minecraft.world.entity.Entity
-
isInLava
public boolean isInLava()- Overrides:
isInLavain classnet.minecraft.world.entity.Entity
-
getCollidedTile
-
canChangeDimensions
public boolean canChangeDimensions(net.minecraft.world.level.Level oldLevel, net.minecraft.world.level.Level newLevel) - Overrides:
canChangeDimensionsin classnet.minecraft.world.entity.Entity
-
addAdditionalSaveData
public void addAdditionalSaveData(net.minecraft.nbt.CompoundTag tag) - Overrides:
addAdditionalSaveDatain classnet.minecraft.world.entity.projectile.Projectile
-
readAdditionalSaveData
public void readAdditionalSaveData(net.minecraft.nbt.CompoundTag cmp) - Overrides:
readAdditionalSaveDatain classnet.minecraft.world.entity.projectile.Projectile
-
particles
public void particles() -
handleEntityEvent
public void handleEntityEvent(byte event) - Overrides:
handleEntityEventin classnet.minecraft.world.entity.Entity
-
getParticleSize
public float getParticleSize() -
onHit
protected void onHit(net.minecraft.world.phys.HitResult hit) - Overrides:
onHitin classnet.minecraft.world.entity.projectile.Projectile
-
onHitBlock
protected void onHitBlock(@NotNull @NotNull net.minecraft.world.phys.BlockHitResult hit) - Overrides:
onHitBlockin classnet.minecraft.world.entity.projectile.Projectile
-
onHitEntity
protected void onHitEntity(@NotNull @NotNull net.minecraft.world.phys.EntityHitResult hit) - Overrides:
onHitEntityin classnet.minecraft.world.entity.projectile.Projectile
-
remove
public void remove(net.minecraft.world.entity.Entity.RemovalReason reason) - Overrides:
removein classnet.minecraft.world.entity.Entity
-
getDefaultGravity
public double getDefaultGravity()- Overrides:
getDefaultGravityin classnet.minecraft.world.entity.projectile.ThrowableProjectile
-
isFake
public boolean isFake() -
setFake
public void setFake(boolean fake) -
setScanBeam
public void setScanBeam() -
getColor
public int getColor() -
setColor
public void setColor(int color) -
getMana
public int getMana() -
setMana
public void setMana(int mana) -
getStartingMana
public int getStartingMana()- Specified by:
getStartingManain interfaceManaBurst
-
setStartingMana
public void setStartingMana(int mana) - Specified by:
setStartingManain interfaceManaBurst
-
getMinManaLoss
public int getMinManaLoss()- Specified by:
getMinManaLossin interfaceManaBurst
-
setMinManaLoss
public void setMinManaLoss(int minManaLoss) - Specified by:
setMinManaLossin interfaceManaBurst
-
getManaLossPerTick
public float getManaLossPerTick()- Specified by:
getManaLossPerTickin interfaceManaBurst
-
setManaLossPerTick
public void setManaLossPerTick(float mana) - Specified by:
setManaLossPerTickin interfaceManaBurst
-
getBurstGravity
public float getBurstGravity()- Specified by:
getBurstGravityin interfaceManaBurst
-
setGravity
public void setGravity(float gravity) - Specified by:
setGravityin interfaceManaBurst
-
getBurstSourceBlockPos
public net.minecraft.core.BlockPos getBurstSourceBlockPos()Description copied from interface:ManaBurstThe block position of the block entity that spawned this burst. If the burst wasn't fired from a block entity, returnsManaBurst.NO_SOURCE- Specified by:
getBurstSourceBlockPosin interfaceManaBurst
-
setBurstSourceCoords
public void setBurstSourceCoords(net.minecraft.core.BlockPos pos) - Specified by:
setBurstSourceCoordsin interfaceManaBurst
-
getSourceLens
public net.minecraft.world.item.ItemStack getSourceLens()- Specified by:
getSourceLensin interfaceManaBurst
-
setSourceLens
public void setSourceLens(net.minecraft.world.item.ItemStack lens) - Specified by:
setSourceLensin interfaceManaBurst
-
getTicksExisted
public int getTicksExisted()- Specified by:
getTicksExistedin interfaceManaBurst
-
hasLeftSource
public boolean hasLeftSource()- Specified by:
hasLeftSourcein interfaceManaBurst- 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:
hasAlreadyCollidedAtin interfaceManaBurst
-
setCollidedAt
public void setCollidedAt(net.minecraft.core.BlockPos pos) - Specified by:
setCollidedAtin interfaceManaBurst
-
setShooterUUID
- Specified by:
setShooterUUIDin interfaceManaBurst
-
getShooterUUID
- Specified by:
getShooterUUIDin interfaceManaBurst
-
ping
public void ping() -
hasWarped
public boolean hasWarped() -
setWarped
public void setWarped(boolean warped) -
getOrbitTime
public int getOrbitTime()- Specified by:
getOrbitTimein interfaceManaBurst
-
setOrbitTime
public void setOrbitTime(int time) - Specified by:
setOrbitTimein interfaceManaBurst
-
hasTripped
public boolean hasTripped()- Specified by:
hasTrippedin interfaceManaBurst- Returns:
- Whether an entity has tripped this burst for the tripwire lens
-
setTripped
public void setTripped(boolean tripped) - Specified by:
setTrippedin interfaceManaBurst
-
getMagnetizedPos
@Nullable public @Nullable net.minecraft.core.BlockPos getMagnetizedPos()- Specified by:
getMagnetizedPosin interfaceManaBurst- Returns:
- The position this burst is magnetized towards
-
setMagnetizePos
public void setMagnetizePos(@Nullable @Nullable net.minecraft.core.BlockPos pos) - Specified by:
setMagnetizePosin interfaceManaBurst
-
shouldDoFakeParticles
protected boolean shouldDoFakeParticles()
-