Package cz.jeme.bestium.api.entity
Class CustomEntity
java.lang.Object
net.minecraft.world.entity.Entity
cz.jeme.bestium.api.entity.CustomEntity
- All Implemented Interfaces:
ca.spottedleaf.moonrise.patches.chunk_system.entity.ChunkSystemEntity
,ca.spottedleaf.moonrise.patches.entity_tracker.EntityTrackerEntity
,Injectable
,net.minecraft.core.component.DataComponentGetter
,net.minecraft.network.syncher.SyncedDataHolder
,net.minecraft.world.level.entity.EntityAccess
,net.minecraft.world.level.entity.UniquelyIdentifyable
,net.minecraft.world.Nameable
,net.minecraft.world.scores.ScoreHolder
@NullMarked
public abstract class CustomEntity
extends net.minecraft.world.entity.Entity
implements Injectable
Extend this class to implement your own entity with custom behavior or properties.
This class should be rarely used, extending it may lead to unstable behavior.
Examples of vanilla Entity
subclasses: LightningBolt
, FallingBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.Entity
net.minecraft.world.entity.Entity.DefaultDrop, 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
activatedImmunityTick, activatedTick, activationType, BASE_SAFE_FALL_DISTANCE, BASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, collisionLoadChunks, CONTENTS_SLOT_INDEX, DATA_POSE, DATA_SHARED_FLAGS_ID, DEFAULT_BB_HEIGHT, DEFAULT_BB_WIDTH, defaultActivationState, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_2, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_5, DELTA_AFFECTED_BY_BLOCKS_BELOW_1_0, entityData, fallDistance, firstTick, fixedPose, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_INVISIBLE, FLAG_ONFIRE, fluidHeight, flyDist, forceDrops, FREEZE_HURT_FREQUENCY, freezeLocked, fromNetherPortal, generation, hasImpulse, horizontalCollision, hurtMarked, invulnerableTime, inWorld, isInPowderSnow, isTemporarilyActive, lastDamageCancelled, lastLavaContact, mainSupportingBlockPos, MAX_ENTITY_TAG_COUNT, MAX_MOVEMENTS_HANDELED_PER_TICK, maxAirTicks, minorHorizontalCollision, moveDist, noPhysics, numCollisions, onGround, origin, originWorld, passengers, persist, persistentInvisibility, pluginRemoved, portalCooldown, portalProcess, posLock, preserveMotion, projectileSource, random, SHARED_RANDOM, spawnedViaMobSpawner, spawnReason, stringUUID, stuckSpeedMultiplier, TAG_AIR, TAG_DATA, TAG_FALL_DISTANCE, TAG_FIRE, TAG_GLOWING, TAG_ID, TAG_INVULNERABLE, TAG_MOTION, TAG_NO_GRAVITY, TAG_ON_GROUND, TAG_PASSENGERS, TAG_PORTAL_COOLDOWN, TAG_POS, TAG_ROTATION, TAG_SILENT, TAG_UUID, tickCount, TOTAL_AIR_SUPPLY, totalEntityAge, uuid, valid, verticalCollision, verticalCollisionBelow, visibleByDefault, visualFire, wasEyeInWater, wasInPowderSnow, wasTouchingWater, xo, xOld, xRotO, yo, yOld, yRotO, zo, zOld
Fields inherited from interface net.minecraft.world.scores.ScoreHolder
WILDCARD, WILDCARD_NAME
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CustomEntity
(net.minecraft.world.entity.EntityType<? extends CustomEntity> entityType, net.minecraft.world.level.Level level) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAdditionalSaveData
(net.minecraft.world.level.storage.ValueOutput output) final net.minecraft.world.entity.EntityType
<?> getType()
Methods inherited from class net.minecraft.world.entity.Entity
absSnapRotationTo, absSnapTo, absSnapTo, addAdditionalSaveData, addDeltaMovement, addPassenger, addTag, adjustSpawnLocation, animateHurt, applyComponentsFromItemStack, applyEffectsFromBlocks, applyEffectsFromBlocks, applyGravity, applyImplicitComponent, applyImplicitComponentIfPresent, applyImplicitComponents, awardKillScore, baseTick, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, callPortalEvent, canAddPassenger, canBeCollidedWith, canBeHitByProjectile, canCollideWith, canCollideWithBukkit, canControlVehicle, canFreeze, canRide, canSimulateMovement, canSpawnSprintParticle, canSprint, canTeleport, canUsePortal, castComponentValue, causeFallDamage, checkBelowWorld, checkDespawn, checkFallDamage, checkFallDistanceAccumulation, checkPosition, checkSupportingBlock, chunkPosition, clearFire, clearFreeze, clearMovementThisTick, closerThan, closerThan, collideBoundingBox, collidedWithFluid, collidedWithShapeMovingFrom, considersEntityAsAlly, copyPosition, couldAcceptPassenger, countPlayerPassengers, createCommandSourceStackForNameResolution, createHoverEvent, damageSources, dampensVibrations, defineSynchedData, deflection, discard, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doCheckFallDamage, doWaterSplashEffect, dropAllLeashConnections, dropAllLeashConnections, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, fireImmune, fixupDimensions, forceSetRotation, fudgePositionAfterSizeChange, gameEvent, gameEvent, get, getAddEntityPacket, getAirSupply, getAttachments, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockSpeedFactor, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getBoundingBoxAt, getBukkitEntity, getBukkitEntityRaw, getBukkitYaw, getCollisionHorizontalEscapeVector, getControlledVehicle, getControllingPassenger, getCustomName, getDefaultGravity, getDefaultMaxAirSupply, getDefaultPassengerAttachmentPoint, getDeltaMovement, getDimensionChangingDelay, getDimensions, getDirection, getDismountLocationForPassenger, getDisplayName, getEncodeId, getEncodeId, getEntityData, getEyeHeight, getEyeHeight, getEyePosition, getEyePosition, getEyeY, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getForward, getGravity, getHandHoldingItemAngle, getId, getInBlockState, getIndirectPassengers, getInputVector, getInterpolation, getKnownMovement, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getLootTable, getMaxAirSupply, getMaxFallDistance, getMotionDirection, getMovementEmission, getName, getNearestViewDirection, getOnPos, getOnPos, getOnPosLegacy, getPassengerAttachmentPoint, getPassengerRidingPosition, getPassengers, getPassengersAndSelf, getPercentFrozen, getPickRadius, getPickResult, getPistonPushReaction, getPortalCooldown, getPose, getPosition, getPositionCodec, getPreciseBodyRotation, getPrimaryStepSoundBlockPos, getQuadLeashHolderOffsets, getRandom, getRandomX, getRandomY, getRandomZ, getRelativePortalPosition, getRemainingFireTicks, getRemovalReason, getRequiresPrecisePosition, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getSlot, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getTicksFrozen, getTicksRequiredToFreeze, getTypeName, getUpVector, getUUID, getVehicle, getVehicleAttachmentPoint, getViewScale, getViewVector, getViewXRot, getViewYRot, getVisualRotationYInDegrees, getWeaponItem, getX, getX, getXRot, getXRot, getY, getY, getYHeadRot, getYRot, getYRot, getZ, getZ, handleDamageEvent, handleEntityEvent, handleOnAboveBubbleColumn, handleOnInsideBubbleColumn, handlePortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPose, hurt, hurtClient, hurtOrSimulate, hurtServer, igniteForSeconds, igniteForSeconds, igniteForTicks, ignoreExplosion, inactiveTick, interact, interactAt, is, isAffectedByBlocks, isAlive, isAlliedTo, isAlliedTo, isAlwaysTicking, isAttackable, isClientAuthoritative, isCollidable, isColliding, isCrouching, isCurrentlyGlowing, isCustomNameVisible, isDescending, isDiscrete, isEffectiveAi, isEyeInFluid, isFlapping, isFlyingVehicle, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInClouds, isInLava, isInLiquid, isInRain, isInterpolating, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableToBase, isInWall, isInWater, isInWaterOrRain, isLocalClientAuthoritative, isLocalInstanceAuthoritative, isNoGravity, isOnFire, isOnPortalCooldown, isOnRails, isPassenger, isPassengerOfSameVehicle, isPickable, isPushable, isPushedByFluid, isRemoved, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSupportedBy, isSuppressingBounce, isSwimming, isTicking, isUnderWater, isVehicle, isVisuallyCrawling, isVisuallySwimming, kill, killedEntity, lavaHurt, lavaHurt, lavaIgnite, lavaIgnite, lerpHeadTo, lerpMotion, lerpPositionAndRotationStep, level, limitPistonMovement, load, lookAt, makeBoundingBox, makeBoundingBox, makeStuckInBlock, markHurt, maxUpStep, maybeBackOffFromEdge, mayInteract, mirror, moonrise$getChunkData, moonrise$getChunkStatus, moonrise$getSectionX, moonrise$getSectionY, moonrise$getSectionZ, moonrise$getTrackedEntity, moonrise$hasAnyPlayerPassengers, moonrise$isHardColliding, moonrise$isUpdatingSectionStatus, moonrise$setChunkData, moonrise$setChunkStatus, moonrise$setSectionX, moonrise$setSectionY, moonrise$setSectionZ, moonrise$setTrackedEntity, moonrise$setUpdatingSectionStatus, move, moveOrInterpolateTo, moveRelative, moveTowardsClosestSpace, nextEntityId, nextStep, notifyLeasheeRemoved, notifyLeashHolder, oldPosition, onAboveBubbleColumn, onBelowWorld, onClientRemoval, onExplosionHit, onFlap, onGround, onInsideBlock, onInsideBubbleColumn, onPassengerTurned, onRemoval, onSyncedDataUpdated, onSyncedDataUpdated, pick, placePortalTicket, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSound, playStepSound, playSwimSound, position, positionRider, positionRider, postTick, problemPath, processFlappingMovement, processPortalCooldown, propagateFallToPassengers, push, push, push, push, readAdditionalSaveData, reapplyPosition, recreateFromPacket, refreshDimensions, refreshEntityData, registerScheduler, registryAccess, remove, remove, removeAfterChangingDimensions, removeLatestMovementRecording, removePassenger, removePassenger, removeTag, removeVehicle, removeVehicle, repositionEntityAfterLoad, resendPossiblyDesyncedDataValues, resendPossiblyDesyncedEntityData, resetFallDistance, restoreFrom, retireScheduler, rideTick, rotate, save, saveAsPassenger, saveAsPassenger, saveWithoutId, saveWithoutId, sendBubbleColumnParticles, setAirSupply, setAsInsidePortal, setBoundingBox, setComponent, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setLevel, setLevelCallback, setNoGravity, setOldPos, setOldPosAndRot, setOldPosAndRot, setOldRot, setOnGround, setOnGroundWithMovement, setOnGroundWithMovement, setPortalCooldown, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setPosRaw, setRemainingFireTicks, setRemoved, setRequiresPrecisePosition, setRot, setSharedFlag, setSharedFlagOnFire, setShiftKeyDown, setSilent, setSprinting, setSwimming, setTicksFrozen, setUUID, setViewScale, setXRot, setYBodyRot, setYHeadRot, setYRot, shearOffAllLeashConnections, shearOffAllLeashConnections, shouldBeSaved, shouldBlockExplode, shouldPlayLavaHurtSound, shouldRender, shouldRenderAtSqrDistance, shouldShowName, showVehicleHealth, skipAttackInteraction, snapTo, snapTo, snapTo, snapTo, snapTo, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startRiding, startSeenByPlayer, stopRiding, stopRiding, stopSeenByPlayer, supportQuadLeashAsHolder, syncPacketPositionCodec, teleport, teleportPassengers, teleportRelative, teleportSetPosition, teleportSpectators, teleportTo, teleportTo, teleportTo, thunderHit, tick, toString, touchingUnloadedChunk, trackingPosition, turn, unRide, unsetRemoved, updateDynamicGameEventListener, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateSwimming, waterSwimSound
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ca.spottedleaf.moonrise.patches.chunk_system.entity.ChunkSystemEntity
moonrise$isHardCollidingUncached
Methods inherited from interface net.minecraft.core.component.DataComponentGetter
getOrDefault, getTyped
Methods inherited from interface net.minecraft.world.level.entity.EntityAccess
setRemoved
Methods inherited from interface cz.jeme.bestium.api.inject.Injectable
bestium_addAdditionalSaveData, bestium_asEntity, bestium_backingType, bestium_init, bestium_key, bestium_realType
Methods inherited from interface net.minecraft.world.scores.ScoreHolder
getFeedbackDisplayName
-
Constructor Details
-
CustomEntity
protected CustomEntity(net.minecraft.world.entity.EntityType<? extends CustomEntity> entityType, net.minecraft.world.level.Level level)
-
-
Method Details
-
getType
public final net.minecraft.world.entity.EntityType<?> getType()- Overrides:
getType
in classnet.minecraft.world.entity.Entity
-
addAdditionalSaveData
protected void addAdditionalSaveData(net.minecraft.world.level.storage.ValueOutput output) - Specified by:
addAdditionalSaveData
in classnet.minecraft.world.entity.Entity
-