Class AbstractMinecartContainer
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.entity.Entity
net.minecraft.world.entity.vehicle.VehicleEntity
net.minecraft.world.entity.vehicle.AbstractMinecart
net.minecraft.world.entity.vehicle.AbstractMinecartContainer
- All Implemented Interfaces:
CommandSource
,SyncedDataHolder
,Clearable
,Container
,ContainerEntity
,MenuConstructor
,EntityAccess
,MenuProvider
,Nameable
,ScoreHolder
,IAttachmentHolder
,IMenuProviderExtension
,IAbstractMinecartExtension
,IEntityExtension
,INBTSerializable<CompoundTag>
- Direct Known Subclasses:
MinecartChest
,MinecartHopper
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.vehicle.AbstractMinecart
AbstractMinecart.Type
Nested classes/interfaces inherited from class net.minecraft.world.entity.Entity
Entity.MoveFunction, Entity.MovementEmission, Entity.RemovalReason
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField
-
Field Summary
Modifier and TypeFieldDescriptionprivate NonNullList
<ItemStack> private ResourceKey
<LootTable> private long
Fields inherited from class net.minecraft.world.entity.vehicle.AbstractMinecart
WATER_SLOWDOWN_FACTOR
Fields inherited from class net.minecraft.world.entity.vehicle.VehicleEntity
DATA_ID_DAMAGE, DATA_ID_HURT, DATA_ID_HURTDIR
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, 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, zOld
Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY
Fields inherited from interface net.minecraft.commands.CommandSource
NULL
Fields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER
Fields inherited from interface net.neoforged.neoforge.common.extensions.IAbstractMinecartExtension
DEFAULT_AIR_DRAG, DEFAULT_MAX_SPEED_AIR_LATERAL, DEFAULT_MAX_SPEED_AIR_VERTICAL
Fields inherited from interface net.minecraft.world.scores.ScoreHolder
WILDCARD, WILDCARD_NAME
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractMinecartContainer
(EntityType<?> p_38207_, double p_38208_, double p_38209_, double p_38210_, Level p_38211_) protected
AbstractMinecartContainer
(EntityType<?> p_38213_, Level p_38214_) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAdditionalSaveData
(CompoundTag p_38248_) protected void
void
void
protected abstract AbstractContainerMenu
createMenu
(int p_38222_, Inventory p_38223_) createMenu
(int p_38251_, Inventory p_38252_, Player p_38253_) void
destroy
(DamageSource p_38228_) getItem
(int p_38218_) long
getSlot
(int p_150257_) interact
(Player p_38232_, InteractionHand p_38233_) protected void
readAdditionalSaveData
(CompoundTag p_38235_) void
remove
(Entity.RemovalReason p_150255_) removeItem
(int p_38220_, int p_38221_) removeItemNoUpdate
(int p_38244_) void
void
void
setLootTable
(ResourceKey<LootTable> p_336075_) void
setLootTable
(ResourceKey<LootTable> p_335456_, long p_38238_) void
setLootTableSeed
(long p_219857_) boolean
stillValid
(Player p_38230_) Methods inherited from class net.minecraft.world.entity.vehicle.AbstractMinecart
activateMinecart, animateHurt, canCollideWith, canUseRail, comeOffTrack, createMinecart, defineSynchedData, getBlockSpeedFactor, getBoundingBoxForCulling, getCollisionHandler, getCurrentCartSpeedCapOnRail, getDefaultDisplayBlockState, getDefaultDisplayOffset, getDefaultGravity, getDismountLocationForPassenger, getDisplayBlockState, getDisplayOffset, getDragAir, getMaxSpeed, getMaxSpeedAirLateral, getMaxSpeedAirVertical, getMaxSpeedWithRail, getMinecartType, getMotionDirection, getMovementEmission, getPassengerAttachmentPoint, getPickResult, getPos, getPosOffs, getRelativePortalPosition, hasCustomDisplay, isOnRails, isPickable, isPushable, lerpMotion, lerpTargetX, lerpTargetXRot, lerpTargetY, lerpTargetYRot, lerpTargetZ, lerpTo, moveAlongTrack, moveMinecartOnRail, push, registerCollisionHandler, setCanUseRail, setCurrentCartSpeedCapOnRail, setCustomDisplay, setDisplayBlockState, setDisplayOffset, setDragAir, setMaxSpeedAirLateral, setMaxSpeedAirVertical, tick
Methods inherited from class net.minecraft.world.entity.vehicle.VehicleEntity
destroy, getDamage, getDropItem, getHurtDir, getHurtTime, hurt, setDamage, setHurtDir, setHurtTime, shouldSourceDestroy
Methods inherited from class net.minecraft.world.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addDeltaMovement, addPassenger, addTag, applyGravity, awardKillScore, baseTick, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canBeHitByProjectile, canChangeDimensions, canControlVehicle, canFreeze, canRide, canSpawnSprintParticle, canSprint, canTrample, captureDrops, captureDrops, causeFallDamage, changeDimension, changeDimension, checkBelowWorld, checkDespawn, checkFallDamage, checkInsideBlocks, checkSlowFallDistance, checkSupportingBlock, chunkPosition, clearFire, closerThan, closerThan, collideBoundingBox, copyPosition, couldAcceptPassenger, countPlayerPassengers, createCommandSourceStack, createHoverEvent, damageSources, dampensVibrations, deflection, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, doWaterSplashEffect, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, fixupDimensions, gameEvent, gameEvent, getAddEntityPacket, getAirSupply, getAttachments, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getCapability, getCapability, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControlledVehicle, getControllingPassenger, getCustomName, getDefaultPassengerAttachmentPoint, getDeltaMovement, getDimensionChangingDelay, getDimensions, getDirection, getDisplayName, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyeInFluidType, getEyePosition, getEyePosition, getEyeY, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getFluidTypeHeight, getForward, getGravity, getHandHoldingItemAngle, getId, getInBlockState, getIndirectPassengers, getLeashOffset, getLeashOffset, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMaxHeightFluidType, getName, getNearestViewDirection, getOnPos, getOnPos, getOnPosLegacy, getPassengerClosestTo, getPassengerRidingPosition, getPassengers, getPassengersAndSelf, getPercentFrozen, getPermissionLevel, getPersistentData, getPickRadius, getPistonPushReaction, getPortalCooldown, getPortalWaitTime, getPose, getPosition, getPositionCodec, getPrimaryStepSoundBlockPos, getRandomX, getRandomY, getRandomZ, getRemainingFireTicks, getRemovalReason, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getTicksFrozen, getTicksRequiredToFreeze, getType, getTypeName, getUpVector, getUUID, getVehicle, getVehicleAttachmentPoint, getViewScale, getViewVector, getViewXRot, getViewYRot, getVisualRotationYInDegrees, getX, getX, getXRot, getY, getY, getYHeadRot, getYRot, getZ, getZ, handleDamageEvent, handleEntityEvent, handleInsidePortal, handleNetherPortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, hasPose, igniteForSeconds, igniteForTicks, ignoreExplosion, interactAt, is, isAddedToWorld, isAlive, isAlliedTo, isAlliedTo, isAlwaysTicking, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCurrentlyGlowing, isCustomNameVisible, isDescending, isDiscrete, isEffectiveAi, isEyeInFluid, isFlapping, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInFluidType, isInFluidType, isInLava, isInLiquid, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isInWall, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isNoGravity, isOnFire, isOnPortalCooldown, isPassenger, isPassengerOfSameVehicle, isPushedByFluid, isRemoved, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSupportedBy, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, isVisuallySwimming, kill, killedEntity, lavaHurt, lerpHeadTo, lerpPositionAndRotationStep, level, limitPistonMovement, load, lookAt, makeBoundingBox, makeStuckInBlock, markHurt, maxUpStep, maybeBackOffFromEdge, mayInteract, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onBelowWorld, onClientRemoval, onExplosionHit, onFlap, onGround, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, onSyncedDataUpdated, onSyncedDataUpdated, pick, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSound, playStepSound, playSwimSound, position, positionRider, positionRider, processFlappingMovement, processPortalCooldown, push, reapplyPosition, recreateFromPacket, refreshDimensions, registryAccess, removeAfterChangingDimensions, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, restoreFrom, revive, rideTick, rotate, save, saveAsPassenger, saveWithoutId, sendSystemMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setData, setDeltaMovement, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setLevel, setLevelCallback, setNoGravity, setOldPosAndRot, setOnGround, setOnGroundWithKnownMovement, setPortalCooldown, setPortalCooldown, setPos, 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, updateInWaterStateAndDoFluidPushing, updateSwimming, waterSwimSound
Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingData, hasAttachments, hasData, removeData, serializeAttachments
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.minecraft.world.Container
canPlaceItem, canTakeItem, countItem, getContainerSize, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, startOpen, stopOpen
Methods inherited from interface net.minecraft.world.entity.vehicle.ContainerEntity
addChestVehicleSaveData, chestVehicleDestroyed, clearChestVehicleContent, getBoundingBox, getChestVehicleItem, getChestVehicleSlot, interactWithContainerVehicle, isChestVehicleEmpty, isChestVehicleStillValid, isEmpty, isRemoved, level, position, readChestVehicleSaveData, removeChestVehicleItem, removeChestVehicleItemNoUpdate, setChestVehicleItem, unpackChestVehicleLootTable
Methods inherited from interface net.neoforged.neoforge.common.extensions.IAbstractMinecartExtension
canBeRidden, getComparatorLevel, getCurrentRailPosition, getMaxCartSpeedOnRail, getSlopeAdjustment, isPoweredCart, shouldDoRailFunctions
Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, hasData, removeData, setData
Methods inherited from interface net.neoforged.neoforge.common.extensions.IEntityExtension
canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canSwimInFluidType, copyAttachmentsFrom, deserializeNBT, getClassification, getFluidFallDistanceModifier, getFluidMotionScale, getParts, getPickedResult, getSoundFromFluidType, hasCustomOutlineRendering, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, sendPairingData, serializeNBT, shouldRiderSit
Methods inherited from interface net.neoforged.neoforge.client.extensions.IMenuProviderExtension
shouldTriggerClientSideContainerClosingOnOpen
Methods inherited from interface net.minecraft.world.MenuProvider
getDisplayName
Methods inherited from interface net.minecraft.world.scores.ScoreHolder
getFeedbackDisplayName
-
Field Details
-
itemStacks
-
lootTable
-
lootTableSeed
private long lootTableSeed
-
-
Constructor Details
-
AbstractMinecartContainer
-
AbstractMinecartContainer
protected AbstractMinecartContainer(EntityType<?> p_38207_, double p_38208_, double p_38209_, double p_38210_, Level p_38211_)
-
-
Method Details
-
destroy
- Overrides:
destroy
in classVehicleEntity
-
getItem
-
removeItem
- Specified by:
removeItem
in interfaceContainer
-
removeItemNoUpdate
- Specified by:
removeItemNoUpdate
in interfaceContainer
-
setItem
-
getSlot
-
setChanged
public void setChanged()- Specified by:
setChanged
in interfaceContainer
-
stillValid
- Specified by:
stillValid
in interfaceContainer
-
remove
-
addAdditionalSaveData
- Overrides:
addAdditionalSaveData
in classAbstractMinecart
-
readAdditionalSaveData
- Overrides:
readAdditionalSaveData
in classAbstractMinecart
-
interact
-
applyNaturalSlowdown
protected void applyNaturalSlowdown()- Overrides:
applyNaturalSlowdown
in classAbstractMinecart
-
clearContent
public void clearContent()- Specified by:
clearContent
in interfaceClearable
-
setLootTable
-
createMenu
@Nullable public AbstractContainerMenu createMenu(int p_38251_, Inventory p_38252_, Player p_38253_) - Specified by:
createMenu
in interfaceMenuConstructor
-
createMenu
-
getLootTable
- Specified by:
getLootTable
in interfaceContainerEntity
-
setLootTable
- Specified by:
setLootTable
in interfaceContainerEntity
-
getLootTableSeed
public long getLootTableSeed()- Specified by:
getLootTableSeed
in interfaceContainerEntity
-
setLootTableSeed
public void setLootTableSeed(long p_219857_) - Specified by:
setLootTableSeed
in interfaceContainerEntity
-
getItemStacks
- Specified by:
getItemStacks
in interfaceContainerEntity
-
clearItemStacks
public void clearItemStacks()- Specified by:
clearItemStacks
in interfaceContainerEntity
-