public class OrientedContraptionEntity extends AbstractContraptionEntity
AbstractContraptionEntity.ContraptionRotationState| Modifier and Type | Field and Description |
|---|---|
protected boolean |
forceAngle |
protected net.minecraft.util.math.vector.Vector3d |
motionBeforeStall |
float |
pitch |
float |
prevPitch |
float |
prevYaw |
float |
targetPitch |
float |
targetYaw |
float |
yaw |
collidingEntities, contraption, initialized, prevPosInvalidblocksBuilding, boardingCooldown, DATA_POSE, DATA_SHARED_FLAGS_ID, entityData, fallDistance, firstTick, fluidHeight, fluidOnEyes, forcedLoading, glowing, hasImpulse, horizontalCollision, hurtMarked, inChunk, invulnerableTime, isInsidePortal, level, LOGGER, maxUpStep, moveDist, noCulling, noPhysics, onGround, portalEntrancePos, portalTime, pushthrough, random, removed, stringUUID, stuckSpeedMultiplier, tickCount, uuid, verticalCollision, walkDist, walkDistO, wasEyeInWater, wasTouchingWater, xChunk, xo, xOld, xRot, xRotO, yChunk, yo, yOld, yRot, yRotO, zChunk, zo, zOld| Constructor and Description |
|---|
OrientedContraptionEntity(net.minecraft.entity.EntityType<?> type,
net.minecraft.world.World world) |
| Modifier and Type | Method and Description |
|---|---|
net.minecraft.util.math.vector.Vector3d |
applyRotation(net.minecraft.util.math.vector.Vector3d localPos,
float partialTicks) |
protected void |
attachInventoriesFromRidingCarts(net.minecraft.entity.Entity riding,
boolean isOnCoupling,
java.util.UUID couplingId) |
static OrientedContraptionEntity |
create(net.minecraft.world.World world,
Contraption contraption,
net.minecraft.util.Direction initialOrientation) |
static OrientedContraptionEntity |
createAtYaw(net.minecraft.world.World world,
Contraption contraption,
net.minecraft.util.Direction initialOrientation,
float initialYaw) |
void |
deferOrientation(net.minecraft.util.Direction newInitialAngle) |
protected void |
defineSynchedData() |
void |
doLocalTransforms(float partialTicks,
com.mojang.blaze3d.matrix.MatrixStack[] matrixStacks) |
net.minecraft.util.math.vector.Vector3d |
getAnchorVec() |
Couple<MinecartController> |
getCoupledCartsIfPresent() |
java.util.UUID |
getCouplingId() |
net.minecraft.util.Direction |
getInitialOrientation() |
float |
getInitialYaw() |
AbstractContraptionEntity.ContraptionRotationState |
getRotationState() |
protected float |
getStalledAngle() |
float |
getViewXRot(float partialTicks) |
float |
getViewYRot(float partialTicks) |
float |
getYawOffset() |
protected void |
handleStallInformation(float x,
float y,
float z,
float angle) |
boolean |
isInitialOrientationPresent() |
protected StructureTransform |
makeStructureTransform() |
void |
onSyncedDataUpdated(net.minecraft.network.datasync.DataParameter<?> key) |
protected void |
powerFurnaceCartWithFuelFromStorage(net.minecraft.entity.Entity riding) |
protected void |
readAdditional(net.minecraft.nbt.CompoundNBT compound,
boolean spawnPacket) |
net.minecraft.util.math.vector.Vector3d |
reverseRotation(net.minecraft.util.math.vector.Vector3d localPos,
float partialTicks) |
net.minecraft.nbt.CompoundNBT |
saveWithoutId(net.minecraft.nbt.CompoundNBT nbt) |
void |
setCouplingId(java.util.UUID id) |
void |
setInitialOrientation(net.minecraft.util.Direction direction) |
void |
startAtInitialYaw() |
void |
startAtYaw(float yaw) |
void |
stopRiding() |
protected void |
tickContraption() |
protected boolean |
updateOrientation(boolean rotationLock,
boolean wasStalled,
net.minecraft.entity.Entity riding,
boolean isOnCoupling) |
protected void |
writeAdditional(net.minecraft.nbt.CompoundNBT compound,
boolean spawnPacket) |
addAdditionalSaveData, addSittingPassenger, build, canAddPassenger, canCollideWith, collisionEnabled, contraptionInitialize, disassemble, doWaterSplashEffect, getAddEntityPacket, getContactPointMotion, getContraption, getPassengerPosition, getPistonPushReaction, getPrevPositionVec, handlePlayerInteraction, hasOnePlayerPassenger, hurt, isPickable, isStalled, kill, move, onContraptionStalled, onRemovedFromWorld, outOfWorld, pitchFromVector, positionRider, readAdditionalSaveData, readSpawnData, remove, removePassenger, setContraption, setContraptionMotion, setDeltaMovement, setPos, setSecondsOnFire, shouldActorTrigger, supportsTerrainCollision, tick, tickActors, toGlobalVector, toLocalVector, updateInWaterStateAndDoFluidPushing, writeSpawnData, yawFromVectorabsMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addPassenger, addTag, animateHurt, awardKillScore, baseTick, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canBeCollidedWith, canChangeDimensions, canEnterPose, canRide, canSpawnSprintParticle, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, causeFallDamage, changeDimension, changeDimension, checkAndResetForcedChunkAdditionFlag, checkAndResetUpdateChunkPos, checkDespawn, checkFallDamage, checkInsideBlocks, clearFire, closerThan, collideBoundingBox, collideBoundingBoxHeuristically, collideBoundingBoxLegacy, copyPosition, createCommandSourceStack, createHoverEvent, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, ejectPassengers, equals, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, getAirSupply, getAllSlots, getArmorSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockSpeedFactor, getBlockStateOn, getBoundingBox, getBoundingBoxForCulling, getBoundingBoxForPose, getBrightness, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControllingPassenger, getCustomName, getDeltaMovement, getDimensionChangingDelay, getDimensions, getDirection, getDismountLocationForPassenger, getDisplayName, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyePosition, getEyeY, getFireImmuneTicks, getFluidHeight, getFluidJumpThreshold, getForward, getHandSlots, getHorizontalDistanceSqr, getId, getIndirectPassengers, getLeashOffset, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMotionDirection, getMyRidingOffset, getName, getOnPos, getPacketCoordinates, getPassengers, getPassengersRidingOffset, getPermissionLevel, getPersistentData, getPickRadius, getPortalWaitTime, getPose, getPosition, getRandomX, getRandomY, getRandomZ, getRelativePortalPosition, getRemainingFireTicks, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getType, getTypeName, getUpVector, getUUID, getVehicle, getViewScale, getViewVector, getX, getX, getY, getY, getYHeadRot, getZ, getZ, handleEntityEvent, handleInsidePortal, handleNetherPortal, hasCustomName, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, ignoreExplosion, interact, interactAt, is, isAddedToWorld, isAlive, isAlliedTo, isAlliedTo, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFree, isGlowing, isIgnoringBlockTriggers, isInLava, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isInWall, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isMovementNoisy, isNoGravity, isOnFire, isOnGround, isOnPortalCooldown, isPassenger, isPassengerOfSameVehicle, isPushable, isPushedByFluid, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, isVisuallySwimming, killed, lavaHurt, lerpHeadTo, lerpMotion, lerpTo, limitPistonMovement, load, lookAt, makeFlySound, makeStuckInBlock, markHurt, maybeBackOffFromEdge, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, pick, playerTouch, playFlySound, playSound, playStepSound, playSwimSound, position, positionRider, processPortalCooldown, push, push, reapplyPosition, refreshDimensions, remove, removeAfterChangingDimensions, removeTag, removeVehicle, repositionEntityAfterLoad, resetPos, restoreFrom, revive, rideableUnderWater, rideTick, rotate, save, saveAsPassenger, sendMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setGlowing, setId, setInvisible, setInvulnerable, setItemSlot, setLevel, setLocationFromBoundingbox, setNoGravity, setOnGround, setPacketCoordinates, setPacketCoordinates, setPortalCooldown, setPosAndOldPos, setPose, setPosRaw, setRemainingFireTicks, setRot, setSharedFlag, setShiftKeyDown, setSilent, setSlot, setSprinting, setSwimming, setUUID, setViewScale, setYBodyRot, setYHeadRot, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldRenderAtSqrDistance, shouldShowName, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startRiding, startSeenByPlayer, stopSeenByPlayer, teleportTo, teleportToWithTicket, thunderHit, toString, turn, unRide, updateFluidHeightAndDoFluidPushing, updateSwimmingareCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapsclone, finalize, getClass, notify, notifyAll, wait, wait, waitprotected net.minecraft.util.math.vector.Vector3d motionBeforeStall
protected boolean forceAngle
public float prevYaw
public float yaw
public float targetYaw
public float prevPitch
public float pitch
public float targetPitch
public OrientedContraptionEntity(net.minecraft.entity.EntityType<?> type,
net.minecraft.world.World world)
public static OrientedContraptionEntity create(net.minecraft.world.World world, Contraption contraption, net.minecraft.util.Direction initialOrientation)
public static OrientedContraptionEntity createAtYaw(net.minecraft.world.World world, Contraption contraption, net.minecraft.util.Direction initialOrientation, float initialYaw)
public void setInitialOrientation(net.minecraft.util.Direction direction)
public net.minecraft.util.Direction getInitialOrientation()
public void deferOrientation(net.minecraft.util.Direction newInitialAngle)
public float getYawOffset()
getYawOffset in class AbstractContraptionEntitypublic float getInitialYaw()
protected void defineSynchedData()
defineSynchedData in class AbstractContraptionEntitypublic AbstractContraptionEntity.ContraptionRotationState getRotationState()
getRotationState in class AbstractContraptionEntitypublic void stopRiding()
stopRiding in class net.minecraft.entity.Entityprotected void readAdditional(net.minecraft.nbt.CompoundNBT compound,
boolean spawnPacket)
readAdditional in class AbstractContraptionEntityprotected void writeAdditional(net.minecraft.nbt.CompoundNBT compound,
boolean spawnPacket)
writeAdditional in class AbstractContraptionEntitypublic void onSyncedDataUpdated(net.minecraft.network.datasync.DataParameter<?> key)
onSyncedDataUpdated in class net.minecraft.entity.Entitypublic boolean isInitialOrientationPresent()
public void startAtInitialYaw()
public void startAtYaw(float yaw)
public net.minecraft.util.math.vector.Vector3d applyRotation(net.minecraft.util.math.vector.Vector3d localPos,
float partialTicks)
applyRotation in class AbstractContraptionEntitypublic net.minecraft.util.math.vector.Vector3d reverseRotation(net.minecraft.util.math.vector.Vector3d localPos,
float partialTicks)
reverseRotation in class AbstractContraptionEntitypublic float getViewYRot(float partialTicks)
getViewYRot in class net.minecraft.entity.Entitypublic float getViewXRot(float partialTicks)
getViewXRot in class net.minecraft.entity.Entityprotected void tickContraption()
tickContraption in class AbstractContraptionEntityprotected boolean updateOrientation(boolean rotationLock,
boolean wasStalled,
net.minecraft.entity.Entity riding,
boolean isOnCoupling)
protected void powerFurnaceCartWithFuelFromStorage(net.minecraft.entity.Entity riding)
@Nullable public Couple<MinecartController> getCoupledCartsIfPresent()
protected void attachInventoriesFromRidingCarts(net.minecraft.entity.Entity riding,
boolean isOnCoupling,
java.util.UUID couplingId)
public net.minecraft.nbt.CompoundNBT saveWithoutId(net.minecraft.nbt.CompoundNBT nbt)
saveWithoutId in class AbstractContraptionEntity@Nullable public java.util.UUID getCouplingId()
public void setCouplingId(java.util.UUID id)
public net.minecraft.util.math.vector.Vector3d getAnchorVec()
getAnchorVec in class AbstractContraptionEntityprotected StructureTransform makeStructureTransform()
makeStructureTransform in class AbstractContraptionEntityprotected float getStalledAngle()
getStalledAngle in class AbstractContraptionEntityprotected void handleStallInformation(float x,
float y,
float z,
float angle)
handleStallInformation in class AbstractContraptionEntitypublic void doLocalTransforms(float partialTicks,
com.mojang.blaze3d.matrix.MatrixStack[] matrixStacks)
doLocalTransforms in class AbstractContraptionEntity