Package vazkii.botania.common.entity
Class ManaSparkEntity
java.lang.Object
net.minecraft.world.entity.Entity
vazkii.botania.common.entity.SparkBaseEntity
vazkii.botania.common.entity.ManaSparkEntity
- All Implemented Interfaces:
net.minecraft.commands.CommandSource,net.minecraft.network.syncher.SyncedDataHolder,net.minecraft.world.level.entity.EntityAccess,net.minecraft.world.Nameable,net.minecraft.world.scores.ScoreHolder,SparkEntity,ManaSpark
-
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
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, 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
ConstructorsConstructorDescriptionManaSparkEntity(net.minecraft.world.entity.EntityType<ManaSparkEntity> type, net.minecraft.world.level.Level world) ManaSparkEntity(net.minecraft.world.level.Level world) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAdditionalSaveData(@NotNull net.minecraft.nbt.CompoundTag cmp) booleanprotected voiddefineSynchedData(net.minecraft.network.syncher.SynchedEntityData.Builder builder) @Nullable ManaReceiverGet the thing this spark is attached to, if anyGets a collection of all Sparks this is tranfering to.@NotNull net.minecraft.world.item.ItemStackprotected net.minecraft.world.item.Itemnet.minecraft.world.InteractionResultinteract(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand) static voidparticleBeam(net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.Entity e1, net.minecraft.world.entity.Entity e2) protected voidreadAdditionalSaveData(@NotNull net.minecraft.nbt.CompoundTag cmp) voidregisterTransfer(ManaSpark entity) Registers the Spark passed in as a Spark meant for mana to be transfered towards.voidremove(net.minecraft.world.entity.Entity.RemovalReason removalReason) voidsetNetwork(net.minecraft.world.item.DyeColor color) voidsetUpgrade(SparkUpgradeType upgrade) voidtick()voidMakes that spark register transfers for all relevant sparks, needs to be called whenever the connected sparks may change (setNetwork, remove and setUpgrade should already do this)Methods inherited from class vazkii.botania.common.entity.SparkBaseEntity
getAddEntityPacket, getAttachPos, getNetwork, isPickableMethods 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, canChangeDimensions, canCollideWith, canControlVehicle, canFreeze, canRide, canSpawnSprintParticle, canSprint, canUsePortal, 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, getDefaultGravity, 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, getPickRadius, 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, handleEntityEvent, handlePortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, hasPose, hurt, igniteForSeconds, igniteForTicks, ignoreExplosion, interactAt, is, isAlive, isAlliedTo, isAlliedTo, isAlwaysTicking, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCurrentlyGlowing, isCustomNameVisible, isDescending, isDiscrete, isEffectiveAi, isEyeInFluid, isFlapping, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInLava, 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, lerpMotion, lerpPositionAndRotationStep, lerpTargetX, lerpTargetXRot, lerpTargetY, lerpTargetYRot, lerpTargetZ, lerpTo, level, limitPistonMovement, load, lookAt, makeBoundingBox, makeStuckInBlock, markHurt, maxUpStep, maybeBackOffFromEdge, mayInteract, 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, recreateFromPacket, refreshDimensions, registryAccess, removeAfterChangingDimensions, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, restoreFrom, 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, shouldRenderAtSqrDistance, 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, updateFluidHeightAndDoFluidPushing, 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
getFeedbackDisplayNameMethods inherited from interface vazkii.botania.api.item.SparkEntity
entity, getAttachPos, getNetwork
-
Constructor Details
-
ManaSparkEntity
public ManaSparkEntity(net.minecraft.world.entity.EntityType<ManaSparkEntity> type, net.minecraft.world.level.Level world) -
ManaSparkEntity
public ManaSparkEntity(net.minecraft.world.level.Level world)
-
-
Method Details
-
defineSynchedData
protected void defineSynchedData(net.minecraft.network.syncher.SynchedEntityData.Builder builder) - Overrides:
defineSynchedDatain classSparkBaseEntity
-
getPickResult
@NotNull public @NotNull net.minecraft.world.item.ItemStack getPickResult()- Overrides:
getPickResultin classnet.minecraft.world.entity.Entity
-
tick
public void tick()- Overrides:
tickin classnet.minecraft.world.entity.Entity
-
updateTransfers
public void updateTransfers()Description copied from interface:ManaSparkMakes that spark register transfers for all relevant sparks, needs to be called whenever the connected sparks may change (setNetwork, remove and setUpgrade should already do this)- Specified by:
updateTransfersin interfaceManaSpark
-
particleBeam
public static void particleBeam(net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.Entity e1, net.minecraft.world.entity.Entity e2) -
getSparkItem
protected net.minecraft.world.item.Item getSparkItem() -
remove
public void remove(net.minecraft.world.entity.Entity.RemovalReason removalReason) - Overrides:
removein classnet.minecraft.world.entity.Entity
-
interact
public net.minecraft.world.InteractionResult interact(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand) - Overrides:
interactin classnet.minecraft.world.entity.Entity
-
readAdditionalSaveData
protected void readAdditionalSaveData(@NotNull @NotNull net.minecraft.nbt.CompoundTag cmp) - Overrides:
readAdditionalSaveDatain classSparkBaseEntity
-
addAdditionalSaveData
protected void addAdditionalSaveData(@NotNull @NotNull net.minecraft.nbt.CompoundTag cmp) - Overrides:
addAdditionalSaveDatain classSparkBaseEntity
-
getAttachedTile
Description copied from interface:ManaSparkGet the thing this spark is attached to, if any- Specified by:
getAttachedTilein interfaceManaSpark
-
getAttachedManaReceiver
- Specified by:
getAttachedManaReceiverin interfaceManaSpark- Returns:
- The attached mana receiver under the spark, if available
-
getOutgoingTransfers
Description copied from interface:ManaSparkGets a collection of all Sparks this is tranfering to.- Specified by:
getOutgoingTransfersin interfaceManaSpark
-
registerTransfer
Description copied from interface:ManaSparkRegisters the Spark passed in as a Spark meant for mana to be transfered towards.- Specified by:
registerTransferin interfaceManaSpark
-
getUpgrade
- Specified by:
getUpgradein interfaceManaSpark
-
setUpgrade
- Specified by:
setUpgradein interfaceManaSpark
-
setNetwork
public void setNetwork(net.minecraft.world.item.DyeColor color) - Specified by:
setNetworkin interfaceSparkEntity- Overrides:
setNetworkin classSparkBaseEntity
-
areIncomingTransfersDone
public boolean areIncomingTransfersDone()Description copied from interface:ManaSpark- Specified by:
areIncomingTransfersDonein interfaceManaSpark
-