Class RocketContraptionEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.entity.Entity>
net.minecraft.world.entity.Entity
com.simibubi.create.content.contraptions.AbstractContraptionEntity
com.lightning.northstar.contraption.rocket.RocketContraptionEntity
- All Implemented Interfaces:
NorthstarEntity,net.minecraft.commands.CommandSource,net.minecraft.world.level.entity.EntityAccess,net.minecraft.world.Nameable,net.minecraftforge.common.capabilities.ICapabilityProvider,net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.entity.Entity>,net.minecraftforge.common.capabilities.ICapabilitySerializable<net.minecraft.nbt.CompoundTag>,net.minecraftforge.common.extensions.IForgeEntity,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>,net.minecraftforge.entity.IEntityAdditionalSpawnData
@ParametersAreNonnullByDefault
public class RocketContraptionEntity
extends com.simibubi.create.content.contraptions.AbstractContraptionEntity
implements net.minecraftforge.entity.IEntityAdditionalSpawnData
-
Nested Class Summary
Nested classes/interfaces inherited from class com.simibubi.create.content.contraptions.AbstractContraptionEntity
com.simibubi.create.content.contraptions.AbstractContraptionEntity.ContraptionRotationStateNested 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.RemovalReasonNested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatThe speed at which the air sound reaches full volume, in blocks per tickstatic final intThe launch countdown, in ticks.static final floatThe maximum acceleration in m/s^2static final floatMaximum velocity, in blocks per tickstatic final floatMinimum descent velocity, in blocks per tickstatic final floatMinimum artificial gravity, used to prevent the rocket from being stuck in zero gravity dimensionsstatic final intThe delay during which the rocket stands still before and after changing dimensions, in ticks.Fields inherited from class com.simibubi.create.content.contraptions.AbstractContraptionEntity
collidingEntities, contraption, initialized, prevPosInvalid, staleTicksFields inherited from class net.minecraft.world.entity.Entity
BASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, BREATHING_DISTANCE_BELOW_EYES, 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, ENTITY_COUNTER, entityData, fallDistance, firstTick, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_ONFIRE, fluidHeight, flyDist, forgeFluidTypeHeight, FREEZE_HURT_FREQUENCY, hasImpulse, horizontalCollision, hurtMarked, ID_TAG, invulnerableTime, isInPowderSnow, isInsidePortal, mainSupportingBlockPos, MAX_ENTITY_TAG_COUNT, minorHorizontalCollision, moveDist, noCulling, noPhysics, PASSENGERS_TAG, portalEntrancePos, portalTime, 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
NULL -
Constructor Summary
ConstructorsConstructorDescriptionRocketContraptionEntity(net.minecraft.world.entity.EntityType<?> type, net.minecraft.world.level.Level level) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyLocalTransforms(com.mojang.blaze3d.vertex.PoseStack matrixStack, float partialTicks) net.minecraft.world.phys.Vec3applyRotation(net.minecraft.world.phys.Vec3 localPos, float partialTicks) boolean@Nullable net.minecraft.world.entity.EntitychangeDimension(net.minecraft.server.level.ServerLevel destination) @Nullable net.minecraft.world.entity.EntitychangeDimension(net.minecraft.server.level.ServerLevel destination, net.minecraftforge.common.util.ITeleporter teleporter) booleancontrol(net.minecraft.core.BlockPos controlsLocalPos, Collection<Integer> heldControls, net.minecraft.world.entity.player.Player player) static RocketContraptionEntitycreate(net.minecraft.world.level.Level world, com.simibubi.create.content.contraptions.Contraption contraption) net.minecraft.core.BlockPosgetAnchorPosition(net.minecraft.core.BlockPos waypointPos, @Nullable net.minecraft.core.Direction waypointDir) @Nullable net.minecraft.world.entity.player.Playerintnet.minecraft.world.phys.Vec3getDismountLocationForPassenger(net.minecraft.world.entity.LivingEntity entityLiving) net.minecraft.world.phys.Vec3getPassengerPosition(net.minecraft.world.entity.Entity passenger, float partialTick) com.simibubi.create.content.contraptions.AbstractContraptionEntity.ContraptionRotationStateprotected floatfloatprotected voidhandleStallInformation(double x, double y, double z, float angle) protected booleanisActorActive(com.simibubi.create.content.contraptions.behaviour.MovementContext context, com.simibubi.create.api.behaviour.movement.MovementBehaviour actor) booleanvoidlerpTo(double x, double y, double z, float yRot, float xRot, int lerpSteps, boolean teleport) protected com.simibubi.create.content.contraptions.StructureTransformvoidonSync(RocketSyncPacket packet) protected voidreadAdditional(net.minecraft.nbt.CompoundTag compound, boolean spawnData) protected voidremovePassenger(net.minecraft.world.entity.Entity passenger) net.minecraft.world.phys.Vec3reverseRotation(net.minecraft.world.phys.Vec3 localPos, float partialTicks) protected voidsetContraption(com.simibubi.create.content.contraptions.Contraption contraption) voidsetStatus(LaunchStatus status) booleanstartControlling(net.minecraft.core.BlockPos controlsLocalPos, @Nullable net.minecraft.world.entity.player.Player player) voidstopControlling(net.minecraft.core.BlockPos controlsLocalPos) protected voidprotected voidwriteAdditional(net.minecraft.nbt.CompoundTag compound, boolean spawnPacket) Methods inherited from class com.simibubi.create.content.contraptions.AbstractContraptionEntity
addAdditionalSaveData, addSittingPassenger, alignPassenger, build, canAddPassenger, canCollideWith, collisionEnabled, contraptionInitialize, defineSynchedData, disassemble, doWaterSplashEffect, getAddEntityPacket, getAnchorVec, getContactPointMotion, getContraptionName, getControllingPlayer, getPistonPushReaction, getPrevAnchorVec, getPrevPositionVec, getYawOffset, handleBlockChange, handlePlayerInteraction, hasExactlyOnePlayerPassenger, hurt, isAliveOrStale, isIgnoringBlockTriggers, isPickable, isPrevPosInvalid, isReadyForRender, isStalled, kill, move, move, onBelowWorld, onContraptionStalled, onRemovedFromWorld, pitchFromVector, positionRider, readAdditionalSaveData, readSpawnData, refreshPSIs, registerColliding, remove, saveWithoutId, setBlock, setContraptionMotion, setControllingPlayer, setDeltaMovement, setPos, setSecondsOnFire, shouldActorTrigger, supportsTerrainCollision, tick, tickActors, toGlobalVector, toGlobalVector, toLocalVector, toLocalVector, updateInWaterStateAndDoFluidPushing, writeSpawnData, yawFromVectorMethods inherited from class net.minecraft.world.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addDeltaMovement, addPassenger, addTag, animateHurt, awardKillScore, baseTick, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canBeCollidedWith, canBeHitByProjectile, canChangeDimensions, canEnterPose, canFreeze, canRide, canSpawnSprintParticle, canSprint, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, causeFallDamage, checkBelowWorld, checkDespawn, checkFallDamage, checkInsideBlocks, checkSlowFallDistance, checkSupportingBlock, chunkPosition, clearFire, closerThan, closerThan, collideBoundingBox, copyPosition, couldAcceptPassenger, createCommandSourceStack, createHoverEvent, damageSources, dampensVibrations, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, fixupDimensions, gameEvent, gameEvent, getAirSupply, getAllSlots, getArmorSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockSpeedFactor, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getBoundingBoxForCulling, getBoundingBoxForPose, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControlledVehicle, getControllingPassenger, getCustomName, getDeltaMovement, getDimensionChangingDelay, getDimensions, getDimensionsForge, getDirection, getDisplayName, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyeInFluidType, getEyePosition, getEyePosition, getEyeY, getFeetBlockState, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getFluidTypeHeight, getForward, getHandHoldingItemAngle, getHandSlots, getId, getIndirectPassengers, getLeashOffset, getLeashOffset, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMaxHeightFluidType, getMotionDirection, getMovementEmission, getMyRidingOffset, getName, getNameTagOffsetY, getOnPos, getOnPos, getOnPosLegacy, getPassengers, getPassengersAndSelf, getPassengersRidingOffset, getPercentFrozen, getPermissionLevel, getPersistentData, getPickRadius, getPickResult, getPortalCooldown, getPortalWaitTime, getPose, getPosition, getPositionCodec, getPrimaryStepSoundBlockPos, 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, getViewScale, getViewVector, getViewXRot, getViewYRot, getVisualRotationYInDegrees, getX, getX, getXRot, getY, getY, getYHeadRot, getYRot, getZ, getZ, handleDamageEvent, handleEntityEvent, handleInsidePortal, handleNetherPortal, hasControllingPassenger, hasCustomName, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, hasPose, ignoreExplosion, interact, interactAt, is, isAddedToWorld, isAlive, isAlliedTo, isAlliedTo, isAlwaysTicking, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCurrentlyGlowing, isCustomNameVisible, isDescending, isDiscrete, isEffectiveAi, isEyeInFluid, isFlapping, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isInFluidType, isInFluidType, isInLava, 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, killedEntity, lavaHurt, lerpHeadTo, lerpMotion, level, limitPistonMovement, load, lookAt, makeBoundingBox, makeStuckInBlock, markHurt, maxUpStep, maybeBackOffFromEdge, mayInteract, mirror, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onClientRemoval, onFlap, onGround, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onSyncedDataUpdated, onSyncedDataUpdated, pick, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSound, playStepSound, playSwimSound, position, positionRider, processFlappingMovement, processPortalCooldown, push, push, reapplyPosition, recreateFromPacket, refreshDimensions, removeAfterChangingDimensions, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, restoreFrom, revive, rideTick, rotate, save, saveAsPassenger, sendSystemMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setItemSlot, setLevel, setLevelCallback, setMaxUpStep, setNoGravity, setOldPosAndRot, setOnGround, setOnGroundWithKnownMovement, setPortalCooldown, setPortalCooldown, 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, teleportToWithTicket, thunderHit, toString, touchingUnloadedChunk, trackingPosition, tryCheckInsideBlocks, turn, unRide, unsetRemoved, updateDynamicGameEventListener, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateSwimming, waterSwimSoundMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapsMethods 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.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapabilityMethods inherited from interface net.minecraftforge.entity.IEntityAdditionalSpawnData
readSpawnData, writeSpawnDataMethods inherited from interface net.minecraftforge.common.extensions.IForgeEntity
canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canSwimInFluidType, deserializeNBT, getClassification, getEyeHeightForge, getFluidFallDistanceModifier, getFluidMotionScale, getParts, getPickedResult, getSoundFromFluidType, getStepHeight, hasCustomOutlineRendering, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, serializeNBT, shouldRiderSit, shouldUpdateFluidWhileBoatingMethods inherited from interface com.lightning.northstar.accessor.NorthstarEntity
northstar$onResourceReload
-
Field Details
-
LAUNCH_COUNTDOWN_TICKS
public static final int LAUNCH_COUNTDOWN_TICKSThe launch countdown, in ticks.- See Also:
-
TRANSPORT_DELAY_TICKS
public static final int TRANSPORT_DELAY_TICKSThe delay during which the rocket stands still before and after changing dimensions, in ticks.- See Also:
-
MAX_SPEED
public static final float MAX_SPEEDMaximum velocity, in blocks per tick- See Also:
-
AIR_SOUND_SPEED
public static final float AIR_SOUND_SPEEDThe speed at which the air sound reaches full volume, in blocks per tick- See Also:
-
MIN_DESCEND_SPEED
public static final float MIN_DESCEND_SPEEDMinimum descent velocity, in blocks per tick- See Also:
-
MINIMUM_GRAVITY
public static final float MINIMUM_GRAVITYMinimum artificial gravity, used to prevent the rocket from being stuck in zero gravity dimensions- See Also:
-
MAX_ACCELERATION
public static final float MAX_ACCELERATIONThe maximum acceleration in m/s^2- See Also:
-
-
Constructor Details
-
RocketContraptionEntity
public RocketContraptionEntity(net.minecraft.world.entity.EntityType<?> type, net.minecraft.world.level.Level level)
-
-
Method Details
-
create
public static RocketContraptionEntity create(net.minecraft.world.level.Level world, com.simibubi.create.content.contraptions.Contraption contraption) -
tickContraption
protected void tickContraption()- Specified by:
tickContraptionin classcom.simibubi.create.content.contraptions.AbstractContraptionEntity
-
control
public boolean control(net.minecraft.core.BlockPos controlsLocalPos, Collection<Integer> heldControls, net.minecraft.world.entity.player.Player player) - Overrides:
controlin classcom.simibubi.create.content.contraptions.AbstractContraptionEntity
-
startControlling
public boolean startControlling(net.minecraft.core.BlockPos controlsLocalPos, @Nullable @Nullable net.minecraft.world.entity.player.Player player) - Overrides:
startControllingin classcom.simibubi.create.content.contraptions.AbstractContraptionEntity
-
stopControlling
public void stopControlling(net.minecraft.core.BlockPos controlsLocalPos) - Overrides:
stopControllingin classcom.simibubi.create.content.contraptions.AbstractContraptionEntity
-
isActorActive
protected boolean isActorActive(com.simibubi.create.content.contraptions.behaviour.MovementContext context, com.simibubi.create.api.behaviour.movement.MovementBehaviour actor) - Overrides:
isActorActivein classcom.simibubi.create.content.contraptions.AbstractContraptionEntity
-
onSync
-
writeAdditional
protected void writeAdditional(net.minecraft.nbt.CompoundTag compound, boolean spawnPacket) - Overrides:
writeAdditionalin classcom.simibubi.create.content.contraptions.AbstractContraptionEntity
-
readAdditional
protected void readAdditional(net.minecraft.nbt.CompoundTag compound, boolean spawnData) - Overrides:
readAdditionalin classcom.simibubi.create.content.contraptions.AbstractContraptionEntity
-
changeDimension
@Nullable public @Nullable net.minecraft.world.entity.Entity changeDimension(net.minecraft.server.level.ServerLevel destination) - Overrides:
changeDimensionin classnet.minecraft.world.entity.Entity
-
changeDimension
@Nullable public @Nullable net.minecraft.world.entity.Entity changeDimension(net.minecraft.server.level.ServerLevel destination, net.minecraftforge.common.util.ITeleporter teleporter) - Overrides:
changeDimensionin classnet.minecraft.world.entity.Entity
-
getDismountLocationForPassenger
public net.minecraft.world.phys.Vec3 getDismountLocationForPassenger(net.minecraft.world.entity.LivingEntity entityLiving) - Overrides:
getDismountLocationForPassengerin classcom.simibubi.create.content.contraptions.AbstractContraptionEntity
-
getAnchorPosition
public net.minecraft.core.BlockPos getAnchorPosition(net.minecraft.core.BlockPos waypointPos, @Nullable @Nullable net.minecraft.core.Direction waypointDir) -
isOutOfWorld
public boolean isOutOfWorld() -
getContraption
- Overrides:
getContraptionin classcom.simibubi.create.content.contraptions.AbstractContraptionEntity
-
setContraption
protected void setContraption(com.simibubi.create.content.contraptions.Contraption contraption) - Overrides:
setContraptionin classcom.simibubi.create.content.contraptions.AbstractContraptionEntity
-
applyRotation
public net.minecraft.world.phys.Vec3 applyRotation(net.minecraft.world.phys.Vec3 localPos, float partialTicks) - Specified by:
applyRotationin classcom.simibubi.create.content.contraptions.AbstractContraptionEntity
-
reverseRotation
public net.minecraft.world.phys.Vec3 reverseRotation(net.minecraft.world.phys.Vec3 localPos, float partialTicks) - Specified by:
reverseRotationin classcom.simibubi.create.content.contraptions.AbstractContraptionEntity
-
makeStructureTransform
protected com.simibubi.create.content.contraptions.StructureTransform makeStructureTransform()- Specified by:
makeStructureTransformin classcom.simibubi.create.content.contraptions.AbstractContraptionEntity
-
getStalledAngle
protected float getStalledAngle()- Specified by:
getStalledAnglein classcom.simibubi.create.content.contraptions.AbstractContraptionEntity
-
handleStallInformation
protected void handleStallInformation(double x, double y, double z, float angle) - Specified by:
handleStallInformationin classcom.simibubi.create.content.contraptions.AbstractContraptionEntity
-
getRotationState
public com.simibubi.create.content.contraptions.AbstractContraptionEntity.ContraptionRotationState getRotationState()- Specified by:
getRotationStatein classcom.simibubi.create.content.contraptions.AbstractContraptionEntity
-
applyLocalTransforms
public void applyLocalTransforms(com.mojang.blaze3d.vertex.PoseStack matrixStack, float partialTicks) - Specified by:
applyLocalTransformsin classcom.simibubi.create.content.contraptions.AbstractContraptionEntity
-
lerpTo
public void lerpTo(double x, double y, double z, float yRot, float xRot, int lerpSteps, boolean teleport) - Overrides:
lerpToin classnet.minecraft.world.entity.Entity
-
getPassengerPosition
public net.minecraft.world.phys.Vec3 getPassengerPosition(net.minecraft.world.entity.Entity passenger, float partialTick) - Overrides:
getPassengerPositionin classcom.simibubi.create.content.contraptions.AbstractContraptionEntity
-
removePassenger
protected void removePassenger(net.minecraft.world.entity.Entity passenger) - Overrides:
removePassengerin classcom.simibubi.create.content.contraptions.AbstractContraptionEntity
-
getControllingPlayerInstance
@Nullable public @Nullable net.minecraft.world.entity.player.Player getControllingPlayerInstance() -
getStatus
-
setStatus
-
getCountdown
public int getCountdown() -
getVelocity
public float getVelocity() -
areThrustersEnabled
public boolean areThrustersEnabled() -
getVirtualSeats
-