Class CarriageContraptionEntity

java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.entity.Entity>
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

public class CarriageContraptionEntity extends OrientedContraptionEntity
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity

    AbstractContraptionEntity.ContraptionRotationState

    Nested 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.RemovalReason

    Nested 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

    Fields
    Modifier and Type
    Field
    Description
    int
     
    boolean
     
    boolean
     
    boolean
     
     
     
     
    boolean
     

    Fields inherited from class com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntity

    forceAngle, motionBeforeStall, nonDamageTicks, pitch, prevPitch, prevYaw, targetYaw, yaw

    Fields inherited from class com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity

    collidingEntities, contraption, initialized, prevPosInvalid, staleTicks

    Fields 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, ENTITY_COUNTER, 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, zOld

    Fields inherited from interface net.minecraft.commands.CommandSource

    NULL
  • Constructor Summary

    Constructors
    Constructor
    Description
    CarriageContraptionEntity(net.minecraft.world.entity.EntityType<?> type, net.minecraft.world.level.Level world)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addPassenger(net.minecraft.world.entity.Entity pPassenger)
     
    void
     
     
    boolean
    control(net.minecraft.core.BlockPos controlsLocalPos, Collection<Integer> heldControls, net.minecraft.world.entity.player.Player player)
     
    create(net.minecraft.world.level.Level world, CarriageContraption contraption)
     
    protected void
     
     
     
    net.minecraft.network.chat.Component
     
    net.minecraft.network.chat.Component
     
    net.minecraft.world.phys.Vec3
     
    protected void
    handleStallInformation(float x, float y, float z, float angle)
     
    boolean
     
    protected boolean
     
    boolean
     
    boolean
    isLocalCoordWithin(net.minecraft.core.BlockPos localPos, int min, int max)
     
    boolean
     
    void
     
    void
    onSyncedDataUpdated(net.minecraft.network.syncher.EntityDataAccessor<?> key)
     
    protected void
    readAdditional(net.minecraft.nbt.CompoundTag compound, boolean spawnPacket)
     
    void
    setBlock(net.minecraft.core.BlockPos localPos, net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo newInfo)
     
    void
     
    void
     
    boolean
     
    boolean
    startControlling(net.minecraft.core.BlockPos controlsLocalPos, net.minecraft.world.entity.player.Player player)
     
    void
     
    void
     
    void
     
    protected void
     
    void
     
    protected void
    writeAdditional(net.minecraft.nbt.CompoundTag compound, boolean spawnPacket)
     

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

    absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, 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, 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, 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, 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, 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, updateSwimming

    Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider

    areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface net.minecraft.commands.CommandSource

    alwaysAccepts

    Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider

    getCapability, getCapability

    Methods inherited from interface net.minecraftforge.common.extensions.IForgeEntity

    canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getParts, getPickedResult, getStepHeight, isMultipartEntity, serializeNBT, shouldRiderSit
  • Field Details

    • trainId

      public UUID trainId
    • carriageIndex

      public int carriageIndex
    • validForRender

      public boolean validForRender
    • movingBackwards

      public boolean movingBackwards
    • leftTickingChunks

      public boolean leftTickingChunks
    • firstPositionUpdate

      public boolean firstPositionUpdate
    • sounds

      public CarriageSounds sounds
    • particles

      public CarriageParticles particles
  • Constructor Details

    • CarriageContraptionEntity

      public CarriageContraptionEntity(net.minecraft.world.entity.EntityType<?> type, net.minecraft.world.level.Level world)
  • Method Details

    • isControlledByLocalInstance

      public boolean isControlledByLocalInstance()
      Overrides:
      isControlledByLocalInstance in class net.minecraft.world.entity.Entity
    • defineSynchedData

      protected void defineSynchedData()
      Overrides:
      defineSynchedData in class OrientedContraptionEntity
    • syncCarriage

      public void syncCarriage()
    • onSyncedDataUpdated

      public void onSyncedDataUpdated(net.minecraft.network.syncher.EntityDataAccessor<?> key)
      Overrides:
      onSyncedDataUpdated in class OrientedContraptionEntity
    • getCarriageData

      public CarriageSyncData getCarriageData()
    • hasSchedule

      public boolean hasSchedule()
    • setServerSidePrevPosition

      public void setServerSidePrevPosition()
    • getPrevPositionVec

      public net.minecraft.world.phys.Vec3 getPrevPositionVec()
      Overrides:
      getPrevPositionVec in class AbstractContraptionEntity
    • isLocalCoordWithin

      public boolean isLocalCoordWithin(net.minecraft.core.BlockPos localPos, int min, int max)
    • create

      public static CarriageContraptionEntity create(net.minecraft.world.level.Level world, CarriageContraption contraption)
    • tick

      public void tick()
      Overrides:
      tick in class AbstractContraptionEntity
    • setBlock

      public void setBlock(net.minecraft.core.BlockPos localPos, net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo newInfo)
      Overrides:
      setBlock in class AbstractContraptionEntity
    • tickContraption

      protected void tickContraption()
      Overrides:
      tickContraption in class OrientedContraptionEntity
    • tickActors

      public void tickActors()
      Overrides:
      tickActors in class AbstractContraptionEntity
    • isActorActive

      protected boolean isActorActive(MovementContext context, MovementBehaviour actor)
      Overrides:
      isActorActive in class AbstractContraptionEntity
    • handleStallInformation

      protected void handleStallInformation(float x, float y, float z, float angle)
      Overrides:
      handleStallInformation in class OrientedContraptionEntity
    • addPassenger

      protected void addPassenger(net.minecraft.world.entity.Entity pPassenger)
      Overrides:
      addPassenger in class net.minecraft.world.entity.Entity
    • onClientRemoval

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

      protected void writeAdditional(net.minecraft.nbt.CompoundTag compound, boolean spawnPacket)
      Overrides:
      writeAdditional in class OrientedContraptionEntity
    • readAdditional

      protected void readAdditional(net.minecraft.nbt.CompoundTag compound, boolean spawnPacket)
      Overrides:
      readAdditional in class OrientedContraptionEntity
    • getContraptionName

      public net.minecraft.network.chat.Component getContraptionName()
      Overrides:
      getContraptionName in class AbstractContraptionEntity
    • checkConductors

      public Couple<Boolean> checkConductors()
    • startControlling

      public boolean startControlling(net.minecraft.core.BlockPos controlsLocalPos, net.minecraft.world.entity.player.Player player)
      Overrides:
      startControlling in class AbstractContraptionEntity
    • getDisplayName

      public net.minecraft.network.chat.Component getDisplayName()
      Specified by:
      getDisplayName in interface net.minecraft.world.Nameable
      Overrides:
      getDisplayName in class net.minecraft.world.entity.Entity
    • control

      public boolean control(net.minecraft.core.BlockPos controlsLocalPos, Collection<Integer> heldControls, net.minecraft.world.entity.player.Player player)
      Overrides:
      control in class AbstractContraptionEntity
    • shouldBeSaved

      public boolean shouldBeSaved()
      Specified by:
      shouldBeSaved in interface net.minecraft.world.level.entity.EntityAccess
      Overrides:
      shouldBeSaved in class net.minecraft.world.entity.Entity
    • getCarriage

      public Carriage getCarriage()
    • setCarriage

      public void setCarriage(Carriage carriage)
    • isReadyForRender

      public boolean isReadyForRender()
      Overrides:
      isReadyForRender in class AbstractContraptionEntity
    • bindInstance

      public void bindInstance(CarriageContraptionInstance instance)
    • updateRenderedPortalCutoff

      public void updateRenderedPortalCutoff()