Class OrientedContraptionEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.entity.Entity>
net.minecraft.world.entity.Entity
com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity
com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntity
- All Implemented Interfaces:
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
- Direct Known Subclasses:
CarriageContraptionEntity
Ex: Minecarts, Couplings
Oriented Contraption Entities can rotate freely around two axes simultaneously.
Oriented Contraption Entities can rotate freely around two axes simultaneously.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity
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 TypeFieldDescriptionprotected booleanprotected net.minecraft.world.phys.Vec3intfloatfloatfloatfloatfloatFields inherited from class com.simibubi.create.content.contraptions.components.structureMovement.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, entityData, fallDistance, firstTick, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_ONFIRE, fluidHeight, flyDist, FREEZE_HURT_FREQUENCY, hasImpulse, horizontalCollision, hurtMarked, ID_TAG, invulnerableTime, isInPowderSnow, isInsidePortal, level, MAX_ENTITY_TAG_COUNT, maxUpStep, minorHorizontalCollision, moveDist, noCulling, noPhysics, onGround, PASSENGERS_TAG, portalEntrancePos, portalTime, random, removalReason, 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
ConstructorsConstructorDescriptionOrientedContraptionEntity(net.minecraft.world.entity.EntityType<?> type, net.minecraft.world.level.Level world) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.phys.Vec3applyRotation(net.minecraft.world.phys.Vec3 localPos, float partialTicks) protected voidattachInventoriesFromRidingCarts(net.minecraft.world.entity.Entity riding, boolean isOnCoupling, UUID couplingId) static OrientedContraptionEntitycreate(net.minecraft.world.level.Level world, Contraption contraption, net.minecraft.core.Direction initialOrientation) static OrientedContraptionEntitycreateAtYaw(net.minecraft.world.level.Level world, Contraption contraption, net.minecraft.core.Direction initialOrientation, float initialYaw) protected voidvoiddoLocalTransforms(float partialTicks, com.mojang.blaze3d.vertex.PoseStack[] matrixStacks) net.minecraft.world.phys.Vec3net.minecraft.core.Directionfloatprotected floatfloatgetViewXRot(float partialTicks) floatgetViewYRot(float partialTicks) floatstatic voidprotected voidhandleStallInformation(float x, float y, float z, float angle) booleanprotected StructureTransformvoidonSyncedDataUpdated(net.minecraft.network.syncher.EntityDataAccessor<?> key) protected voidpowerFurnaceCartWithFuelFromStorage(net.minecraft.world.entity.Entity riding) protected voidreadAdditional(net.minecraft.nbt.CompoundTag compound, boolean spawnPacket) net.minecraft.world.phys.Vec3reverseRotation(net.minecraft.world.phys.Vec3 localPos, float partialTicks) net.minecraft.nbt.CompoundTagsaveWithoutId(net.minecraft.nbt.CompoundTag nbt) voidsetCouplingId(UUID id) voidsetInitialOrientation(net.minecraft.core.Direction direction) voidvoidstartAtYaw(float yaw) voidprotected voidprotected booleanupdateOrientation(boolean rotationLock, boolean wasStalled, net.minecraft.world.entity.Entity riding, boolean isOnCoupling) protected voidwriteAdditional(net.minecraft.nbt.CompoundTag compound, boolean spawnPacket) Methods inherited from class com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity
addAdditionalSaveData, addSittingPassenger, alignPassenger, build, canAddPassenger, canCollideWith, collisionEnabled, contraptionInitialize, control, disassemble, doWaterSplashEffect, getAddEntityPacket, getContactPointMotion, getContraption, getContraptionName, getControllingPlayer, getDismountLocationForPassenger, getPassengerPosition, getPistonPushReaction, getPrevPositionVec, handleBlockChange, handlePlayerInteraction, hasExactlyOnePlayerPassenger, hurt, isActorActive, isAliveOrStale, isPickable, isReadyForRender, isStalled, kill, move, onContraptionStalled, onRemovedFromWorld, outOfWorld, pitchFromVector, positionRider, readAdditionalSaveData, readSpawnData, refreshPSIs, remove, removePassenger, setBlock, setContraption, setContraptionMotion, setControllingPlayer, setDeltaMovement, setPos, setSecondsOnFire, shouldActorTrigger, startControlling, stopControlling, supportsTerrainCollision, tick, tickActors, toGlobalVector, toLocalVector, updateInWaterStateAndDoFluidPushing, writeSpawnData, yawFromVectorMethods inherited from class net.minecraft.world.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addPassenger, addTag, animateHurt, awardKillScore, baseTick, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canBeCollidedWith, canChangeDimensions, canEnterPose, canFreeze, canRide, canSpawnSprintParticle, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, causeFallDamage, changeDimension, changeDimension, checkDespawn, checkFallDamage, checkInsideBlocks, checkOutOfWorld, chunkPosition, clearFire, closerThan, collideBoundingBox, copyPosition, createCommandSourceStack, createHoverEvent, discard, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, ejectPassengers, equals, eyeBlockPosition, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, gameEvent, gameEvent, gameEvent, gameEvent, getAirSupply, getAllSlots, getArmorSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockSpeedFactor, getBlockStateOn, getBlockX, getBlockY, getBlockZ, getBoundingBox, getBoundingBoxForCulling, getBoundingBoxForPose, getBrightness, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControllingPassenger, getCustomName, getDeltaMovement, getDimensionChangingDelay, getDimensions, getDirection, getDisplayName, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyePosition, getEyePosition, getEyeY, getFeetBlockState, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getForward, getGameEventListenerRegistrar, getHandHoldingItemAngle, getHandSlots, getId, getIndirectPassengers, getLeashOffset, getLevel, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMotionDirection, getMovementEmission, getMyRidingOffset, getName, getOnPos, getPacketCoordinates, getPassengers, getPassengersAndSelf, getPassengersRidingOffset, getPercentFrozen, getPermissionLevel, getPersistentData, getPickRadius, getPickResult, getPortalWaitTime, getPose, getPosition, 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, getX, getX, getXRot, getY, getY, getYHeadRot, getYRot, getZ, getZ, handleEntityEvent, handleInsidePortal, handleNetherPortal, hasCustomName, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, ignoreExplosion, interact, interactAt, is, isAddedToWorld, isAlive, isAlliedTo, isAlliedTo, isAlwaysTicking, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCurrentlyGlowing, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFlapping, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInLava, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isInWall, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isNoGravity, isOnFire, isOnGround, isOnPortalCooldown, isPassenger, isPassengerOfSameVehicle, isPushable, isPushedByFluid, isRemoved, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, isVisuallySwimming, killed, lavaHurt, lerpHeadTo, lerpMotion, lerpTo, limitPistonMovement, load, lookAt, makeBoundingBox, makeStuckInBlock, markHurt, maybeBackOffFromEdge, mayInteract, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, occludesVibrations, onAboveBubbleCol, onAddedToWorld, onClientRemoval, onFlap, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, pick, playEntityOnFireExtinguishedSound, playerTouch, playSound, playStepSound, playSwimSound, position, positionRider, processFlappingMovement, processPortalCooldown, push, push, reapplyPosition, recreateFromPacket, refreshDimensions, removeAfterChangingDimensions, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, restoreFrom, revive, rideableUnderWater, rideTick, rotate, save, saveAsPassenger, sendMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setItemSlot, setLevelCallback, setNoGravity, setOldPosAndRot, setOnGround, setPacketCoordinates, setPacketCoordinates, 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, stopSeenByPlayer, teleportTo, teleportToWithTicket, thunderHit, toString, touchingUnloadedChunk, tryCheckInsideBlocks, turn, unRide, unsetRemoved, updateFluidHeightAndDoFluidPushing, updateSwimmingMethods 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.common.extensions.IForgeEntity
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getParts, getPickedResult, isMultipartEntity, serializeNBT, shouldRiderSit
-
Field Details
-
motionBeforeStall
protected net.minecraft.world.phys.Vec3 motionBeforeStall -
forceAngle
protected boolean forceAngle -
prevYaw
public float prevYaw -
yaw
public float yaw -
targetYaw
public float targetYaw -
prevPitch
public float prevPitch -
pitch
public float pitch -
nonDamageTicks
public int nonDamageTicks
-
-
Constructor Details
-
OrientedContraptionEntity
public OrientedContraptionEntity(net.minecraft.world.entity.EntityType<?> type, net.minecraft.world.level.Level world)
-
-
Method Details
-
create
public static OrientedContraptionEntity create(net.minecraft.world.level.Level world, Contraption contraption, net.minecraft.core.Direction initialOrientation) -
createAtYaw
public static OrientedContraptionEntity createAtYaw(net.minecraft.world.level.Level world, Contraption contraption, net.minecraft.core.Direction initialOrientation, float initialYaw) -
setInitialOrientation
public void setInitialOrientation(net.minecraft.core.Direction direction) -
getInitialOrientation
public net.minecraft.core.Direction getInitialOrientation() -
getYawOffset
public float getYawOffset()- Overrides:
getYawOffsetin classAbstractContraptionEntity
-
getInitialYaw
public float getInitialYaw() -
defineSynchedData
protected void defineSynchedData()- Overrides:
defineSynchedDatain classAbstractContraptionEntity
-
getRotationState
- Specified by:
getRotationStatein classAbstractContraptionEntity
-
stopRiding
public void stopRiding()- Overrides:
stopRidingin classnet.minecraft.world.entity.Entity
-
readAdditional
protected void readAdditional(net.minecraft.nbt.CompoundTag compound, boolean spawnPacket) - Overrides:
readAdditionalin classAbstractContraptionEntity
-
writeAdditional
protected void writeAdditional(net.minecraft.nbt.CompoundTag compound, boolean spawnPacket) - Overrides:
writeAdditionalin classAbstractContraptionEntity
-
onSyncedDataUpdated
public void onSyncedDataUpdated(net.minecraft.network.syncher.EntityDataAccessor<?> key) - Overrides:
onSyncedDataUpdatedin classnet.minecraft.world.entity.Entity
-
isInitialOrientationPresent
public boolean isInitialOrientationPresent() -
startAtInitialYaw
public void startAtInitialYaw() -
startAtYaw
public void startAtYaw(float yaw) -
applyRotation
public net.minecraft.world.phys.Vec3 applyRotation(net.minecraft.world.phys.Vec3 localPos, float partialTicks) - Specified by:
applyRotationin classAbstractContraptionEntity
-
reverseRotation
public net.minecraft.world.phys.Vec3 reverseRotation(net.minecraft.world.phys.Vec3 localPos, float partialTicks) - Specified by:
reverseRotationin classAbstractContraptionEntity
-
getViewYRot
public float getViewYRot(float partialTicks) - Overrides:
getViewYRotin classnet.minecraft.world.entity.Entity
-
getViewXRot
public float getViewXRot(float partialTicks) - Overrides:
getViewXRotin classnet.minecraft.world.entity.Entity
-
tickContraption
protected void tickContraption()- Specified by:
tickContraptionin classAbstractContraptionEntity
-
updateOrientation
protected boolean updateOrientation(boolean rotationLock, boolean wasStalled, net.minecraft.world.entity.Entity riding, boolean isOnCoupling) -
powerFurnaceCartWithFuelFromStorage
protected void powerFurnaceCartWithFuelFromStorage(net.minecraft.world.entity.Entity riding) -
getCoupledCartsIfPresent
-
attachInventoriesFromRidingCarts
protected void attachInventoriesFromRidingCarts(net.minecraft.world.entity.Entity riding, boolean isOnCoupling, UUID couplingId) -
saveWithoutId
public net.minecraft.nbt.CompoundTag saveWithoutId(net.minecraft.nbt.CompoundTag nbt) - Overrides:
saveWithoutIdin classAbstractContraptionEntity
-
getCouplingId
-
setCouplingId
-
getAnchorVec
public net.minecraft.world.phys.Vec3 getAnchorVec()- Overrides:
getAnchorVecin classAbstractContraptionEntity
-
makeStructureTransform
- Specified by:
makeStructureTransformin classAbstractContraptionEntity
-
getStalledAngle
protected float getStalledAngle()- Specified by:
getStalledAnglein classAbstractContraptionEntity
-
handleStallInformation
protected void handleStallInformation(float x, float y, float z, float angle) - Specified by:
handleStallInformationin classAbstractContraptionEntity
-
doLocalTransforms
public void doLocalTransforms(float partialTicks, com.mojang.blaze3d.vertex.PoseStack[] matrixStacks) - Specified by:
doLocalTransformsin classAbstractContraptionEntity
-
handleRelocationPacket
-