Class AbstractMinecartContainer
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<Entity>
net.minecraft.world.entity.Entity
net.minecraft.world.entity.vehicle.AbstractMinecart
net.minecraft.world.entity.vehicle.AbstractMinecartContainer
- All Implemented Interfaces:
CommandSource
,Clearable
,Container
,ContainerEntity
,MenuConstructor
,EntityAccess
,MenuProvider
,Nameable
,ICapabilityProvider
,ICapabilityProviderImpl<Entity>
,ICapabilitySerializable<CompoundTag>
,IForgeAbstractMinecart
,IForgeEntity
,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.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
Field Summary
Modifier and TypeFieldDescriptionprivate LazyOptional<?>
private NonNullList<ItemStack>
private ResourceLocation
private long
Fields inherited from class net.minecraft.world.entity.vehicle.AbstractMinecart
WATER_SLOWDOWN_FACTOR
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_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 interface net.minecraft.commands.CommandSource
NULL
Fields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZE
Fields inherited from interface net.minecraftforge.common.extensions.IForgeAbstractMinecart
DEFAULT_AIR_DRAG, DEFAULT_MAX_SPEED_AIR_LATERAL, DEFAULT_MAX_SPEED_AIR_VERTICAL
-
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_) <T> LazyOptional<T>
getCapability
(Capability<T> capability, Direction facing) Retrieves the Optional handler for the capability requested on the specific side.getItem
(int p_38218_) long
getSlot
(int p_150257_) interact
(Player p_38232_, InteractionHand p_38233_) void
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
void
setLootTable
(ResourceLocation p_219859_) void
setLootTable
(ResourceLocation p_38237_, 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, getDamage, getDefaultDisplayBlockState, getDefaultDisplayOffset, getDismountLocationForPassenger, getDisplayBlockState, getDisplayOffset, getDragAir, getDropItem, getHurtDir, getHurtTime, getMaxSpeed, getMaxSpeedAirLateral, getMaxSpeedAirVertical, getMaxSpeedWithRail, getMinecartType, getMotionDirection, getMovementEmission, getPassengersRidingOffset, getPickResult, getPos, getPosOffs, getRelativePortalPosition, hasCustomDisplay, hurt, isOnRails, isPickable, isPushable, lerpMotion, lerpTo, moveAlongTrack, moveMinecartOnRail, push, registerCollisionHandler, setCanUseRail, setCurrentCartSpeedCapOnRail, setCustomDisplay, setDamage, setDisplayBlockState, setDisplayOffset, setDragAir, setHurtDir, setHurtTime, setMaxSpeedAirLateral, setMaxSpeedAirVertical, tick
Methods inherited from class net.minecraft.world.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addDeltaMovement, addPassenger, addTag, awardKillScore, baseTick, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canBeHitByProjectile, canChangeDimensions, canEnterPose, canFreeze, canRide, canSpawnSprintParticle, canSprint, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, causeFallDamage, changeDimension, changeDimension, 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, doWaterSplashEffect, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, fixupDimensions, gameEvent, gameEvent, getAddEntityPacket, getAirSupply, getAllSlots, getArmorSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, 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, getMyRidingOffset, getName, getNameTagOffsetY, getOnPos, getOnPos, getOnPosLegacy, 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, 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, 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, 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, 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, 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, removeAfterChangingDimensions, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, restoreFrom, revive, rideTick, rotate, save, saveAsPassenger, saveWithoutId, sendSystemMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setItemSlot, setLevel, setLevelCallback, setMaxUpStep, setNoGravity, setOldPosAndRot, setOnGround, setOnGroundWithKnownMovement, setPortalCooldown, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemainingFireTicks, setRemoved, setRot, setSecondsOnFire, 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, updateInWaterStateAndDoFluidPushing, updateSwimming, waterSwimSound
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, 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.minecraft.world.Container
canPlaceItem, canTakeItem, countItem, getContainerSize, getMaxStackSize, hasAnyMatching, hasAnyOf, startOpen, stopOpen
Methods inherited from interface net.minecraft.world.entity.vehicle.ContainerEntity
addChestVehicleSaveData, chestVehicleDestroyed, clearChestVehicleContent, getChestVehicleItem, getChestVehicleSlot, interactWithContainerVehicle, isChestVehicleEmpty, isChestVehicleStillValid, isEmpty, isRemoved, level, position, readChestVehicleSaveData, removeChestVehicleItem, removeChestVehicleItemNoUpdate, setChestVehicleItem, unpackChestVehicleLootTable
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
Methods inherited from interface net.minecraftforge.common.extensions.IForgeAbstractMinecart
canBeRidden, getComparatorLevel, getCurrentRailPosition, getMaxCartSpeedOnRail, getSlopeAdjustment, isPoweredCart, shouldDoRailFunctions
Methods 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, shouldUpdateFluidWhileBoating
Methods inherited from interface net.minecraft.world.MenuProvider
getDisplayName
-
Field Details
-
itemStacks
-
lootTable
-
lootTableSeed
private long lootTableSeed -
itemHandler
-
-
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 classAbstractMinecart
-
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
-
getCapability
Description copied from interface:ICapabilityProvider
Retrieves the Optional handler for the capability requested on the specific side. The return value CAN be the same for multiple faces. Modders are encouraged to cache this value, using the listener capabilities of the Optional to be notified if the requested capability get lost.- Specified by:
getCapability
in interfaceICapabilityProvider
- Overrides:
getCapability
in classCapabilityProvider<Entity>
- Parameters:
capability
- The capability to checkfacing
- The Side to check from, CAN BE NULL. Null is defined to represent 'internal' or 'self'- Returns:
- The requested an optional holding the requested capability.
-
invalidateCaps
public void invalidateCaps()- Specified by:
invalidateCaps
in interfaceICapabilityProviderImpl<Entity>
- Overrides:
invalidateCaps
in classCapabilityProvider<Entity>
-
reviveCaps
public void reviveCaps()- Specified by:
reviveCaps
in interfaceICapabilityProviderImpl<Entity>
- Overrides:
reviveCaps
in classCapabilityProvider<Entity>
-
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
-