Package vazkii.botania.common.entity
Class CorporeaSparkEntity
java.lang.Object
net.minecraft.world.entity.Entity
vazkii.botania.common.entity.SparkBaseEntity
vazkii.botania.common.entity.CorporeaSparkEntity
- 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,CorporeaSpark,SparkEntity
-
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
ConstructorsConstructorDescriptionCorporeaSparkEntity(net.minecraft.world.entity.EntityType<CorporeaSparkEntity> type, net.minecraft.world.level.Level world) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAdditionalSaveData(@NotNull net.minecraft.nbt.CompoundTag cmp) protected voiddefineSynchedData(net.minecraft.network.syncher.SynchedEntityData.Builder builder) @NotNull net.minecraft.world.item.ItemStackGets the list of sparks that this spark added to the list of connections during registerConnections(), this is mainly used to create a non messy chain of particles to display the network when a spark is right clicked with a wand.protected net.minecraft.world.item.Itemnet.minecraft.world.InteractionResultinteract(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand) voidintroduceNearbyTo(Set<CorporeaSpark> network, CorporeaSpark master) Look around this spark for neighbors and introduce them to the network by adding them tonetwork.booleanGets if this spark is considered a creative spark.booleanisMaster()Gets if this spark is considered a master spark.voidonItemExtracted(net.minecraft.world.item.ItemStack stack) Called when an item is extracted from the node this spark is attached to through this spark.voidonItemsRequested(List<net.minecraft.world.item.ItemStack> stacks) Called when this spark requests items, passes in the result of the request and not the actual requested stack(s).protected voidreadAdditionalSaveData(@NotNull net.minecraft.nbt.CompoundTag cmp) voidremove(net.minecraft.world.entity.Entity.RemovalReason reason) voidsetCreative(boolean creative) voidsetMaster(boolean master) voidsetNetwork(net.minecraft.world.item.DyeColor color) voidtick()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
-
CorporeaSparkEntity
public CorporeaSparkEntity(net.minecraft.world.entity.EntityType<CorporeaSparkEntity> type, 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
-
getSparkItem
protected net.minecraft.world.item.Item getSparkItem() -
remove
public void remove(net.minecraft.world.entity.Entity.RemovalReason reason) - Overrides:
removein classnet.minecraft.world.entity.Entity
-
introduceNearbyTo
Description copied from interface:CorporeaSparkLook around this spark for neighbors and introduce them to the network by adding them tonetwork. If they weren't already innetwork, this method should then recursively call this method on all newcomers. This spark should then retain thenetworkobject internally for quick access to all members of the network.- Specified by:
introduceNearbyToin interfaceCorporeaSpark
-
getSparkNode
- Specified by:
getSparkNodein interfaceCorporeaSpark- Returns:
- Corporea node this spark is attached to, generally belonging to the block below it
-
getConnections
- Specified by:
getConnectionsin interfaceCorporeaSpark- Returns:
- All sparks in the same logical corporea network as this one, including this spark itself.
-
getRelatives
Description copied from interface:CorporeaSparkGets the list of sparks that this spark added to the list of connections during registerConnections(), this is mainly used to create a non messy chain of particles to display the network when a spark is right clicked with a wand.- Specified by:
getRelativesin interfaceCorporeaSpark
-
onItemExtracted
public void onItemExtracted(net.minecraft.world.item.ItemStack stack) Description copied from interface:CorporeaSparkCalled when an item is extracted from the node this spark is attached to through this spark.- Specified by:
onItemExtractedin interfaceCorporeaSpark- Parameters:
stack- The itemstack, before any extraction was done. Do not mutate this.
-
onItemsRequested
Description copied from interface:CorporeaSparkCalled when this spark requests items, passes in the result of the request and not the actual requested stack(s).- Specified by:
onItemsRequestedin interfaceCorporeaSpark
-
getMaster
- Specified by:
getMasterin interfaceCorporeaSpark- Returns:
- The master spark of the network this spark is part of. A master spark's
master is itself. Returns
nullif this spark is not in a network with a valid master.
-
setMaster
public void setMaster(boolean master) -
isMaster
public boolean isMaster()Description copied from interface:CorporeaSparkGets if this spark is considered a master spark.- Specified by:
isMasterin interfaceCorporeaSpark
-
setCreative
public void setCreative(boolean creative) -
isCreative
public boolean isCreative()Description copied from interface:CorporeaSparkGets if this spark is considered a creative spark.- Specified by:
isCreativein interfaceCorporeaSpark
-
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
-
setNetwork
public void setNetwork(net.minecraft.world.item.DyeColor color) - Specified by:
setNetworkin interfaceSparkEntity- Overrides:
setNetworkin classSparkBaseEntity
-
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
-