Class MeteorProjectileEntity

java.lang.Object
net.minecraft.world.entity.Entity
net.minecraft.world.entity.projectile.Projectile
net.minecraft.world.entity.projectile.hurtingprojectile.AbstractHurtingProjectile
me.emafire003.dev.ohmymeteors.entities.MeteorProjectileEntity
All Implemented Interfaces:
net.fabricmc.fabric.api.attachment.v1.AttachmentTarget, net.minecraft.core.component.DataComponentGetter, net.minecraft.core.TypedInstance<net.minecraft.world.entity.EntityType<?>>, net.minecraft.network.syncher.SyncedDataHolder, net.minecraft.util.debug.DebugValueSource, net.minecraft.world.entity.ItemOwner, net.minecraft.world.entity.SlotProvider, net.minecraft.world.entity.TraceableEntity, net.minecraft.world.level.entity.EntityAccess, net.minecraft.world.level.entity.UniquelyIdentifyable, net.minecraft.world.Nameable, net.minecraft.world.scores.ScoreHolder

public class MeteorProjectileEntity extends net.minecraft.world.entity.projectile.hurtingprojectile.AbstractHurtingProjectile
The projectile entity that gets spawned as a meteor. Upon hitting a block which is not air, it will execute the on-hit actions such as creating an explosion and spawning the structure of blocks of the meteor thing
  • Nested Class Summary

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

    net.minecraft.world.entity.projectile.Projectile.ProjectileFactory<T>

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

    net.minecraft.world.entity.Entity.Flags, net.minecraft.world.entity.Entity.MoveFunction, net.minecraft.world.entity.Entity.MovementEmission, net.minecraft.world.entity.Entity.RemovalReason

    Nested classes/interfaces inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget

    net.fabricmc.fabric.api.attachment.v1.AttachmentTarget.OnAttachedSet<A>

    Nested classes/interfaces inherited from interface net.minecraft.util.debug.DebugValueSource

    net.minecraft.util.debug.DebugValueSource.Registration, net.minecraft.util.debug.DebugValueSource.ValueGetter<T>

    Nested classes/interfaces inherited from interface net.minecraft.world.entity.ItemOwner

    net.minecraft.world.entity.ItemOwner.OffsetFromOwner
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
    Since it likes to explode more times instead of just one, i'll put this here so it won't explode twice
    protected net.minecraft.world.phys.Vec3
     
    protected boolean
    Aka a meteor that is a result of the detonateScatter() method
    protected boolean
    Weather or not the meteor should be announced in chat (used for example in the meteor showers)
    final net.minecraft.world.entity.AnimationState
     
    protected int
     
    protected int
     

    Fields inherited from class net.minecraft.world.entity.projectile.hurtingprojectile.AbstractHurtingProjectile

    accelerationPower, DEFLECTION_SCALE, INITAL_ACCELERATION_POWER

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

    owner

    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, flyDist, FREEZE_HURT_FREQUENCY, horizontalCollision, hurtMarked, invulnerableTime, isInPowderSnow, mainSupportingBlockPos, MAX_ENTITY_TAG_COUNT, MAX_MOVEMENTS_HANDELED_PER_TICK, minorHorizontalCollision, moveDist, needsSync, noPhysics, portalProcess, random, stringUUID, stuckSpeedMultiplier, TAG_AIR, TAG_CUSTOM_NAME, 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, uuid, verticalCollision, verticalCollisionBelow, wasEyeInWater, wasInPowderSnow, wasTouchingWater, xo, xOld, xRotO, yo, yOld, yRotO, zo, zOld

    Fields inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget

    NBT_ATTACHMENT_KEY

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

    WILDCARD, WILDCARD_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
    MeteorProjectileEntity(net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.projectile.hurtingprojectile.AbstractHurtingProjectile> entityType, net.minecraft.world.level.Level world)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addAdditionalSaveData(net.minecraft.world.level.storage.ValueOutput view)
     
    void
     
    protected boolean
    canHitEntity(net.minecraft.world.entity.Entity target)
     
    This method can be used by other mods to add their own custom meteors and spawn their version of the meteors
    protected void
    defineSynchedData(net.minecraft.network.syncher.SynchedEntityData.Builder builder)
     
    void
    This will detonate the meteor with an explosion like detonateSimple() but will also spawn other meteors based on the size of this meteor.
    void
    Makes this entity explode without creating any structures on impact and then discards this entity
    void
    detonateSimple(int extraPower)
     
    void
    Like detonateSimple() but will also spawn the structure of the meteor
    void
    Like detonateWithStructure() but will only replace air blocks
    void
    Actually makes the meteor explode and disappear, and spawn stuff if it needs to.
    final @NotNull net.minecraft.world.entity.EntityDimensions
    getDimensions(net.minecraft.world.entity.Pose pose)
     
    protected net.minecraft.core.BlockPos
    getOffset(MeteorSizeClass sizeClass, net.minecraft.resources.Identifier tobeplaced)
    Returns the offset of the meteor structure, aka how much it's going to be embedded in the terrain.
    me.emafire003.dev.structureplacerapi.StructurePlacerAPI
     
    me.emafire003.dev.structureplacerapi.StructurePlacerAPI
     
    me.emafire003.dev.structureplacerapi.StructurePlacerAPI
    getPlacer(MeteorSizeClass sizeClass, String filter)
    If the meteor is micro size (less than 2) will just spawn a block and return null
    int
     
    Returns the size class of this meteor, based on the values of the config file
    net.minecraft.resources.Identifier
     
    net.minecraft.resources.Identifier
    Returns the ID of the structure that is going to be spawned based the size class
    void
    Initializes the meteor with a random size upon creation of the meteor object.
    boolean
    Returns true if this meteor is classified as huge, as in bigger than the biggest "big" size
    boolean
     
    boolean
     
    void
    Gets called every tick and makes sure that when the meteor travels through a chunk it is loaded
    void
     
    protected void
    onHitBlock(net.minecraft.world.phys.BlockHitResult blockHitResult)
    This is the main method which does the meteor stuff on impact
    protected void
    onHitEntity(net.minecraft.world.phys.EntityHitResult entityHitResult)
     
    void
    onSyncedDataUpdated(net.minecraft.network.syncher.EntityDataAccessor<?> data)
     
    void
    particleAnimation(double d, double e, double f)
    Spawns the particle effects behind the meteor
    protected void
    readAdditionalSaveData(net.minecraft.world.level.storage.ValueInput view)
     
    void
     
    void
    setScatterMeteor(boolean scatterMeteor)
     
    void
    setSilenced(boolean silenced)
     
    void
    setSize(int size)
     
    void
     
    boolean
    shouldRender(double cameraX, double cameraY, double cameraZ)
     
    boolean
    shouldRenderAtSqrDistance(double distance)
     
    protected int
    The sphere explosion is a little weaker than the vanilla one, so adjustment may be needed to have a niceer effect
    void
     

    Methods inherited from class net.minecraft.world.entity.projectile.hurtingprojectile.AbstractHurtingProjectile

    getClipType, getInertia, getLightLevelDependentMagicValue, getLiquidInertia, getTrailParticle, hurtServer, onDeflection, shouldBurn

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

    applyOnProjectileSpawned, calculateHorizontalHurtKnockbackDirection, checkLeftOwner, deflect, getAddEntityPacket, getDimensionChangingDelay, getEffectSource, getMovementToShoot, getOwner, getPickRadius, hitTargetOrDeflectSelf, isPickable, lerpRotation, mayBreak, mayInteract, onAboveBubbleColumn, onHit, onInsideBubbleColumn, onItemBreak, ownedBy, recreateFromPacket, restoreFrom, setOwner, setOwner, shoot, shootFromRotation, shouldBounceOnWorldBorder, spawnProjectile, spawnProjectile, spawnProjectileFromRotation, spawnProjectileUsingShoot, spawnProjectileUsingShoot, updateRotation

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

    absSnapRotationTo, absSnapTo, absSnapTo, addDeltaMovement, addPassenger, addTag, adjustSpawnLocation, animateHurt, applyComponentsFromItemStack, applyEffectsFromBlocks, applyEffectsFromBlocks, applyEffectsFromBlocksForLastMovements, applyGravity, applyImplicitComponent, applyImplicitComponentIfPresent, applyImplicitComponents, awardKillScore, baseTick, belowNameDisplay, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canBeHitByProjectile, canCollideWith, canControlVehicle, canFreeze, canInteractWithLevel, canRide, canSimulateMovement, canSpawnSprintParticle, canSprint, canTeleport, canUsePortal, castComponentValue, causeFallDamage, checkBelowWorld, checkDespawn, checkFallDamage, checkFallDistanceAccumulation, checkSupportingBlock, chunkPosition, clearFire, clearFreeze, clearMovementThisTick, closerThan, closerThan, collectAllColliders, collideBoundingBox, collidedWithFluid, collidedWithShapeMovingFrom, computeSpeed, considersEntityAsAlly, copyPosition, couldAcceptPassenger, countPlayerPassengers, createCommandSourceStackForNameResolution, createHoverEvent, damageSources, dampensVibrations, deflection, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doCheckFallDamage, doWaterSplashEffect, dropAllLeashConnections, ejectPassengers, entityTags, equals, extinguishFire, fillCrashReportCategory, fireImmune, fixupDimensions, forceSetRotation, fudgePositionAfterSizeChange, gameEvent, gameEvent, get, getAirSupply, getAttachments, getAvailableSpaceBelow, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockSpeedFactor, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getCollisionHorizontalEscapeVector, getControlledVehicle, getControllingPassenger, getCustomName, getDefaultGravity, getDefaultPassengerAttachmentPoint, getDeltaMovement, getDirection, getDismountLocationForPassenger, getDisplayName, getEncodeId, getEntityData, getEyeHeight, getEyeHeight, getEyePosition, getEyePosition, getEyeY, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidInteractionBox, getFluidJumpThreshold, getForward, getGravity, getHandHoldingItemAngle, getHeadLookAngle, getId, getInBlockState, getIndirectPassengers, getInputVector, getInterpolation, getKnownMovement, getKnownSpeed, getLightProbePosition, getLookAngle, getLootTable, getMaxAirSupply, getMaxFallDistance, getMotionDirection, getMovementEmission, getName, getNearestViewDirection, getOnPos, getOnPos, getOnPosLegacy, getPassengerAttachmentPoint, getPassengerRidingPosition, getPassengers, getPassengersAndSelf, getPercentFrozen, getPickResult, getPistonPushReaction, getPortalCooldown, getPose, getPosition, getPositionCodec, getPreciseBodyRotation, getPrimaryStepSoundBlockPos, getQuadLeashHolderOffsets, getRandom, getRandomX, getRandomY, getRandomY, getRandomZ, getRelativePortalPosition, getRemainingFireTicks, getRemovalReason, getRequiresPrecisePosition, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getSharedFlag, getSlot, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTeam, getTeamColor, getTicksFrozen, getTicksRequiredToFreeze, getType, 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, hasMovedHorizontallyRecently, hasPassenger, hasPassenger, hasPose, hurt, hurtClient, hurtOrSimulate, igniteForSeconds, igniteForTicks, ignoreExplosion, interact, is, isAffectedByBlocks, isAlive, isAlliedTo, isAlliedTo, isAlwaysTicking, isAttackable, isClientAuthoritative, isColliding, isCrouching, isCurrentlyGlowing, isCustomNameVisible, isDescending, isDiscrete, isEffectiveAi, isEyeInFluid, isFlapping, isFlyingVehicle, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInClouds, isInLava, isInLiquid, isInShallowWater, isInterpolating, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableToBase, isInWall, isInWater, isInWaterOrRain, isLocalClientAuthoritative, isLocalInstanceAuthoritative, isNoGravity, isOnFire, isOnPortalCooldown, isOnRails, isPassenger, isPassengerOfSameVehicle, isPushable, isPushedByFluid, isRemoved, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSupportedBy, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, isVisuallySwimming, kill, killedEntity, lavaHurt, lavaIgnite, lerpHeadTo, lerpMotion, lerpPositionAndRotationStep, level, limitPistonMovement, load, lookAt, makeBoundingBox, makeBoundingBox, makeStuckInBlock, markHurt, maxUpStep, maybeBackOffFromEdge, mirror, modifyPassengerFluidInteractionBox, move, moveOrInterpolateTo, moveOrInterpolateTo, moveOrInterpolateTo, moveOrInterpolateTo, moveRelative, moveTowardsClosestSpace, nextStep, notifyLeasheeRemoved, notifyLeashHolder, oldPosition, onBelowWorld, onExplosionHit, onFlap, onGround, onInsideBlock, onPassengerTurned, onRemoval, onSyncedDataUpdated, pick, placePortalTicket, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSound, playStepSound, playSwimSound, position, positionRider, positionRider, problemPath, processFlappingMovement, processPortalCooldown, propagateFallToPassengers, push, push, push, reapplyPosition, registerDebugValues, registryAccess, remove, removeAfterChangingDimensions, removeLatestMovementRecording, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, rideTick, rotate, save, saveAsPassenger, 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, setRemainingFireTicks, setRemoved, setRequiresPrecisePosition, setRot, setSharedFlag, setSharedFlagOnFire, setShiftKeyDown, setSilent, setSprinting, setSwimming, setTicksFrozen, setUUID, setViewScale, setXRot, setYBodyRot, setYHeadRot, setYRot, shearOffAllLeashConnections, shouldBeSaved, shouldBlockExplode, shouldPlayLavaHurtSound, shouldShowName, showVehicleHealth, skipAttackInteraction, snapTo, snapTo, snapTo, snapTo, snapTo, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startRiding, startSeenByPlayer, stopRiding, stopSeenByPlayer, supportQuadLeashAsHolder, syncPacketPositionCodec, teleport, teleportRelative, teleportSetPosition, teleportSetPosition, teleportSpectators, teleportTo, teleportTo, thunderHit, toString, touchingUnloadedChunk, trackingPosition, turn, typeHolder, unRide, unsetRemoved, updateDataBeforeSync, updateDynamicGameEventListener, updateFluidInteraction, updateSwimming, waterSwimSound

    Methods inherited from class Object

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

    Methods inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget

    getAttached, getAttachedOrCreate, getAttachedOrCreate, getAttachedOrElse, getAttachedOrGet, getAttachedOrSet, getAttachedOrThrow, hasAttached, modifyAttached, onAttachedSet, removeAttached, setAttached

    Methods inherited from interface net.minecraft.core.component.DataComponentGetter

    getOrDefault, getTyped

    Methods inherited from interface net.minecraft.world.entity.ItemOwner

    asLivingEntity

    Methods inherited from interface net.minecraft.world.Nameable

    getPlainTextName

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

    getFeedbackDisplayName

    Methods inherited from interface net.minecraft.world.entity.SlotProvider

    getSlotsFromRange

    Methods inherited from interface net.minecraft.core.TypedInstance

    is, is, is, is, is, tags
  • Field Details

    • rotationState

      public final net.minecraft.world.entity.AnimationState rotationState
    • rotationStateTimeout

      protected int rotationStateTimeout
    • isScatterMeteor

      protected boolean isScatterMeteor
      Aka a meteor that is a result of the detonateScatter() method
    • isSilenced

      protected boolean isSilenced
      Weather or not the meteor should be announced in chat (used for example in the meteor showers)
    • exploded

      protected boolean exploded
      Since it likes to explode more times instead of just one, i'll put this here so it won't explode twice
    • travelledBlocks

      protected int travelledBlocks
    • explosionPos

      protected net.minecraft.world.phys.Vec3 explosionPos
  • Constructor Details

    • MeteorProjectileEntity

      public MeteorProjectileEntity(net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.projectile.hurtingprojectile.AbstractHurtingProjectile> entityType, net.minecraft.world.level.Level world)
  • Method Details

    • defineSynchedData

      protected void defineSynchedData(net.minecraft.network.syncher.SynchedEntityData.Builder builder)
      Overrides:
      defineSynchedData in class net.minecraft.world.entity.projectile.hurtingprojectile.AbstractHurtingProjectile
    • setSize

      public void setSize(int size)
    • getSize

      public int getSize()
    • addAdditionalSaveData

      protected void addAdditionalSaveData(net.minecraft.world.level.storage.ValueOutput view)
      Overrides:
      addAdditionalSaveData in class net.minecraft.world.entity.projectile.hurtingprojectile.AbstractHurtingProjectile
    • readAdditionalSaveData

      protected void readAdditionalSaveData(net.minecraft.world.level.storage.ValueInput view)
      Overrides:
      readAdditionalSaveData in class net.minecraft.world.entity.projectile.hurtingprojectile.AbstractHurtingProjectile
    • refreshDimensions

      public void refreshDimensions()
      Overrides:
      refreshDimensions in class net.minecraft.world.entity.Entity
    • onSyncedDataUpdated

      public void onSyncedDataUpdated(net.minecraft.network.syncher.EntityDataAccessor<?> data)
      Specified by:
      onSyncedDataUpdated in interface net.minecraft.network.syncher.SyncedDataHolder
      Overrides:
      onSyncedDataUpdated in class net.minecraft.world.entity.Entity
    • initialize

      public void initialize()
      Initializes the meteor with a random size upon creation of the meteor object. Called along with the constructor method
    • getDimensions

      @NotNull public final @NotNull net.minecraft.world.entity.EntityDimensions getDimensions(net.minecraft.world.entity.Pose pose)
      Overrides:
      getDimensions in class net.minecraft.world.entity.Entity
    • loadChunk

      public void loadChunk()
      Gets called every tick and makes sure that when the meteor travels through a chunk it is loaded
    • tick

      public void tick()
      Overrides:
      tick in class net.minecraft.world.entity.projectile.hurtingprojectile.AbstractHurtingProjectile
    • setupAnimationStates

      public void setupAnimationStates()
    • particleAnimation

      public void particleAnimation(double d, double e, double f)
      Spawns the particle effects behind the meteor
    • sphereExplosionAdjuster

      protected int sphereExplosionAdjuster()
      The sphere explosion is a little weaker than the vanilla one, so adjustment may be needed to have a niceer effect
    • detonateSimple

      public void detonateSimple()
      Makes this entity explode without creating any structures on impact and then discards this entity
    • detonateSimple

      public void detonateSimple(int extraPower)
    • announceSpawn

      public void announceSpawn()
    • detonateWithStructure

      public void detonateWithStructure()
      Like detonateSimple() but will also spawn the structure of the meteor
    • detonateWithStructureOnlyAir

      public void detonateWithStructureOnlyAir()
      Like detonateWithStructure() but will only replace air blocks
    • getPlacer

      public me.emafire003.dev.structureplacerapi.StructurePlacerAPI getPlacer(MeteorSizeClass sizeClass, String filter)
      If the meteor is micro size (less than 2) will just spawn a block and return null
    • getPlacer

      public me.emafire003.dev.structureplacerapi.StructurePlacerAPI getPlacer(MeteorSizeClass sizeClass)
    • getPlacer

      public me.emafire003.dev.structureplacerapi.StructurePlacerAPI getPlacer()
    • getOffset

      protected net.minecraft.core.BlockPos getOffset(MeteorSizeClass sizeClass, net.minecraft.resources.Identifier tobeplaced)
      Returns the offset of the meteor structure, aka how much it's going to be embedded in the terrain. it's based on its size and the distance from the terrain that would be left from the imapct point, and the direction of the meteor
      Parameters:
      sizeClass - The staring sizeClass to determine the starting offset
      tobeplaced - the id of the meteor that is going to be placed
      Returns:
      the blockpos offset
    • getStructureToPlace

      public net.minecraft.resources.Identifier getStructureToPlace(MeteorSizeClass sizeClass, String filter)
      Returns the ID of the structure that is going to be spawned based the size class
      Parameters:
      sizeClass - The size of the meteors that we want to spawn, can be "small" "medium" "big" "huge"
    • getStructureToPlace

      public net.minecraft.resources.Identifier getStructureToPlace(MeteorSizeClass sizeClass)
    • detonateScatter

      public void detonateScatter()
      This will detonate the meteor with an explosion like detonateSimple() but will also spawn other meteors based on the size of this meteor.

      Meteors will be smaller and be oriented randomly from that point on, but will still go down.

    • onHitBlock

      protected void onHitBlock(net.minecraft.world.phys.BlockHitResult blockHitResult)
      This is the main method which does the meteor stuff on impact
      Overrides:
      onHitBlock in class net.minecraft.world.entity.projectile.Projectile
    • onHitEntity

      protected void onHitEntity(net.minecraft.world.phys.EntityHitResult entityHitResult)
      Overrides:
      onHitEntity in class net.minecraft.world.entity.projectile.Projectile
    • canHitEntity

      protected boolean canHitEntity(net.minecraft.world.entity.Entity target)
      Overrides:
      canHitEntity in class net.minecraft.world.entity.projectile.hurtingprojectile.AbstractHurtingProjectile
    • explodeMeteor

      public void explodeMeteor()
      Actually makes the meteor explode and disappear, and spawn stuff if it needs to. It's used when hitting a block or an entity
    • onClientRemoval

      public void onClientRemoval()
      Overrides:
      onClientRemoval in class net.minecraft.world.entity.Entity
    • isHuge

      public boolean isHuge()
      Returns true if this meteor is classified as huge, as in bigger than the biggest "big" size
    • isScatterMeteor

      public boolean isScatterMeteor()
    • setScatterMeteor

      public void setScatterMeteor(boolean scatterMeteor)
    • shouldRenderAtSqrDistance

      public boolean shouldRenderAtSqrDistance(double distance)
      Overrides:
      shouldRenderAtSqrDistance in class net.minecraft.world.entity.projectile.hurtingprojectile.AbstractHurtingProjectile
    • shouldRender

      public boolean shouldRender(double cameraX, double cameraY, double cameraZ)
      Overrides:
      shouldRender in class net.minecraft.world.entity.Entity
    • isSilenced

      public boolean isSilenced()
    • setSilenced

      public void setSilenced(boolean silenced)
    • copy

      This method can be used by other mods to add their own custom meteors and spawn their version of the meteors
    • getSizeClass

      public MeteorSizeClass getSizeClass()
      Returns the size class of this meteor, based on the values of the config file