Package net.minecraft.entity.vehicle
Class StorageMinecartEntity
java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.vehicle.AbstractMinecartEntity
net.minecraft.entity.vehicle.StorageMinecartEntity
- All Implemented Interfaces:
VehicleInventory
,Inventory
,NamedScreenHandlerFactory
,ScreenHandlerFactory
,CommandOutput
,Clearable
,Nameable
,EntityLike
- Direct Known Subclasses:
ChestMinecartEntity
,HopperMinecartEntity
public abstract class StorageMinecartEntity
extends AbstractMinecartEntity
implements VehicleInventory
- Mappings:
Namespace Name official bvu
intermediary net/minecraft/class_1693
named net/minecraft/entity/vehicle/StorageMinecartEntity
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.vehicle.AbstractMinecartEntity
AbstractMinecartEntity.Type
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.MoveEffect, Entity.PositionUpdater, Entity.RemovalReason
-
Field Summary
Modifier and TypeFieldDescriptionprivate DefaultedList<ItemStack>
private long
private @Nullable Identifier
Fields inherited from class net.minecraft.entity.vehicle.AbstractMinecartEntity
VELOCITY_SLOWDOWN_MULTIPLIER
Fields inherited from class net.minecraft.entity.Entity
age, collidedSoftly, dataTracker, DEFAULT_FRICTION, DEFAULT_MIN_FREEZE_DAMAGE_TICKS, DEFAULT_PORTAL_COOLDOWN, distanceTraveled, FALL_FLYING_FLAG_INDEX, fallDistance, field_29991, field_36331, firstUpdate, FLAGS, fluidHeight, FREEZING_DAMAGE_INTERVAL, GLOWING_FLAG_INDEX, horizontalCollision, horizontalSpeed, ID_KEY, ignoreCameraFrustum, inNetherPortal, inPowderSnow, intersectionChecked, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, MAX_RIDING_COOLDOWN, MAX_SCOREBOARD_TAGS, MIN_RISING_BUBBLE_COLUMN_SPEED, movementMultiplier, netherPortalTime, noClip, ON_FIRE_FLAG_INDEX, onGround, PASSENGERS_KEY, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, random, ridingCooldown, speed, stepHeight, submergedInWater, timeUntilRegen, touchingWater, uuid, UUID_KEY, uuidString, VELOCITY_AFFECTING_POS_Y_OFFSET, velocityDirty, velocityModified, verticalCollision, wasInPowderSnow, wasOnFire, world
Fields inherited from interface net.minecraft.server.command.CommandOutput
DUMMY
Fields inherited from interface net.minecraft.inventory.Inventory
MAX_COUNT_PER_STACK
-
Constructor Summary
ModifierConstructorDescriptionprotected
StorageMinecartEntity
(EntityType<?> type, double x, double y, double z, World world) protected
StorageMinecartEntity
(EntityType<?> type, World world) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
boolean
canPlayerUse
(PlayerEntity player) void
clear()
createMenu
(int syncId, PlayerInventory inv, PlayerEntity player) void
dropItems
(DamageSource damageSource) long
protected abstract ScreenHandler
getScreenHandler
(int syncId, PlayerInventory playerInventory) getStack
(int slot) Fetches the stack currently stored at the given slot.getStackReference
(int mappedIndex) Obtains a stack reference to be modified.interact
(PlayerEntity player, Hand hand) Called when a player interacts with this entity.void
protected void
Reads custom data fromnbt
.void
remove
(Entity.RemovalReason reason) Removes the entity.removeStack
(int slot) Removes the stack currently stored at the indicated slot.removeStack
(int slot, int amount) Removes a specific number of items from the given slot.void
void
setLootTable
(Identifier id, long lootSeed) void
setLootTableId
(@Nullable Identifier lootTableId) void
setLootTableSeed
(long lootTableSeed) void
protected void
Writes custom data tonbt
.Methods inherited from class net.minecraft.entity.vehicle.AbstractMinecartEntity
animateDamage, canHit, collidesWith, create, createSpawnPacket, damage, getBlockOffset, getContainedBlock, getDamageWobbleSide, getDamageWobbleStrength, getDamageWobbleTicks, getDefaultBlockOffset, getDefaultContainedBlock, getItem, getMaxSpeed, getMinecartType, getMountedHeightOffset, getMoveEffect, getMovementDirection, getPickBlockStack, getVelocityMultiplier, getVisibilityBoundingBox, hasCustomBlock, initDataTracker, isPushable, moveOffRail, moveOnRail, onActivatorRail, positionInPortal, pushAwayFrom, setCustomBlock, setCustomBlockOffset, setCustomBlockPresent, setDamageWobbleSide, setDamageWobbleStrength, setDamageWobbleTicks, setVelocityClient, snapPositionToRail, snapPositionToRailWithOffset, tick, updatePassengerForDismount, updateTrackedPositionAndAngles
Methods inherited from class net.minecraft.entity.Entity
addAirTravelEffects, addFlapEffects, addPassenger, addScoreboardTag, addVelocity, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, applyDamageEffects, applyMirror, applyRotation, attemptTickInVoid, baseTick, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundingBox, calculateBoundsForPose, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeRiddenInWater, canBeSpectated, canExplosionDestroyBlock, canFreeze, canModifyAt, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, checkDespawn, collidesWithStateAtPos, copyFrom, copyPositionAndRotation, detach, discard, dismountVehicle, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, emitGameEvent, emitGameEvent, entityDataRequiresOperator, equals, equipStack, extinguish, fall, getAir, getArmorItems, getBlockPos, getBlockStateAtPos, getBlockX, getBlockY, getBlockZ, getBodyY, getBodyYaw, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getChunkPos, getClientCameraPosVec, getCommandSource, getCustomName, getDataTracker, getDefaultName, getDefaultPortalCooldown, getDimensions, getDisplayName, getEffectiveExplosionResistance, getEntityName, getEntityWorld, getEyeHeight, getEyeHeight, getEyePos, getEyeY, getFireTicks, getFirstPassenger, getFlag, getFluidHeight, getFreezingScale, getFrozenTicks, getHandItems, getHandPosOffset, getHeadYaw, getHeight, getHeightOffset, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getId, getItemsEquipped, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getLeashOffset, getLeashPos, getLerpedPos, getMaxAir, getMaxNetherPortalTime, getMessageSourceProfile, getMinFreezeDamageTicks, getName, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerDismountOffset, getPassengerList, getPassengersDeep, getPermissionLevel, getPistonBehavior, getPitch, getPitch, getPortalRect, getPos, getPose, getPrimaryPassenger, getRandomBodyY, getRemovalReason, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSafeFallDistance, getSavedEntityId, getScoreboardTags, getScoreboardTeam, getServer, getSoundCategory, getSplashSound, getStandingEyeHeight, getSteppingBlockState, getSteppingPos, getSwimHeight, getSwimSound, getSyncedPos, getTargetingMargin, getTeamColorValue, getTeleportTarget, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVelocity, getVelocityAffectingPos, getWidth, getWorld, getX, getY, getYaw, getYaw, getZ, handleAttack, handleFallDamage, handleStatus, hasCollidedSoftly, hasCustomName, hashCode, hasNoGravity, hasPassenger, hasPassenger, hasPassengerDeep, hasPassengers, hasPermissionLevel, hasPlayerRider, hasPortalCooldownn, hasPrimaryPassenger, hasVehicle, hasWings, interactAt, isAlive, isAttackable, isCollidable, isConnectedThroughVehicle, isCrawling, isCustomNameVisible, isDescending, isFireImmune, isFrozen, isGlowing, isGlowingLocal, isImmuneToExplosion, isInLava, isInPose, isInRange, isInRange, isInsideWall, isInsideWaterOrBubbleColumn, isInSneakingPose, isInSwimmingPose, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isLiving, isLogicalSideForUpdatingMovement, isOnFire, isOnGround, isPartOf, isPlayer, isPushedByFluids, isRegionUnloaded, isRemoved, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, kill, lookAt, move, moveToWorld, occludeVibrationSignals, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onLanding, onPassengerLookAround, onPlayerCollision, onRemoved, onSpawnPacket, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, onTrackedDataSet, playExtinguishSound, playSound, playSoundIfNotSilent, playStepSound, playSwimSound, populateCrashReport, pushOutOfBlocks, raycast, readNbt, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, removeAllPassengers, removeFromDimension, removePassenger, removeScoreboardTag, requestTeleport, requestTeleportAndDismount, resetPortalCooldown, resetPosition, saveNbt, saveSelfNbt, scheduleVelocityUpdate, sendMessage, setAir, setBodyYaw, setBoundingBox, setChangeListener, setCustomName, setCustomNameVisible, setFireTicks, setFlag, setFrozenTicks, setGlowing, setHeadYaw, setId, setInNetherPortal, setInPowderSnow, setInvisible, setInvulnerable, setNoGravity, setOnFire, setOnFireFor, setOnFireFromLava, setOnGround, setPitch, setPos, setPose, setPosition, setPosition, setRemoved, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSprinting, setSwimming, setUuid, setVelocity, setVelocity, setYaw, shouldBroadcastConsoleToOps, shouldEscapePowderSnow, shouldReceiveFeedback, shouldRender, shouldRender, shouldRenderName, shouldSave, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, startRiding, startRiding, stopRiding, streamPassengersAndSelf, streamSelfAndPassengers, teleport, tickInVoid, tickPortal, tickPortalCooldown, tickRiding, toNbtList, toNbtList, toString, tryCheckBlockCollision, unsetRemoved, updateEventHandler, updateKilledAdvancementCriterion, updateMovementInFluid, updatePassengerPosition, updatePosition, updatePositionAndAngles, updateSwimming, updateTrackedHeadRotation, updateTrackedPosition, updateVelocity, updateWaterState, wouldPoseNotCollide, writeNbt
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.server.command.CommandOutput
cannotBeSilenced
Methods inherited from interface net.minecraft.inventory.Inventory
containsAny, containsAny, count, getMaxCountPerStack, isValid, onClose, onOpen, size
Methods inherited from interface net.minecraft.screen.NamedScreenHandlerFactory
getDisplayName
Methods inherited from interface net.minecraft.entity.vehicle.VehicleInventory
canPlayerAccess, clearInventory, generateInventoryLoot, getInventoryStack, getInventoryStackReference, getPos, getWorld, isEmpty, isInventoryEmpty, isRemoved, onBroken, open, readInventoryFromNbt, removeInventoryStack, removeInventoryStack, setInventoryStack, writeInventoryToNbt
-
Field Details
-
inventory
- Mappings:
Namespace Name Mixin selector official c
Lbvu;c:Lhi;
intermediary field_7735
Lnet/minecraft/class_1693;field_7735:Lnet/minecraft/class_2371;
named inventory
Lnet/minecraft/entity/vehicle/StorageMinecartEntity;inventory:Lnet/minecraft/util/collection/DefaultedList;
-
lootTableId
- Mappings:
Namespace Name Mixin selector official d
Lbvu;d:Labb;
intermediary field_7734
Lnet/minecraft/class_1693;field_7734:Lnet/minecraft/class_2960;
named lootTableId
Lnet/minecraft/entity/vehicle/StorageMinecartEntity;lootTableId:Lnet/minecraft/util/Identifier;
-
lootSeed
private long lootSeed- Mappings:
Namespace Name Mixin selector official e
Lbvu;e:J
intermediary field_7732
Lnet/minecraft/class_1693;field_7732:J
named lootSeed
Lnet/minecraft/entity/vehicle/StorageMinecartEntity;lootSeed:J
-
-
Constructor Details
-
StorageMinecartEntity
- Mappings:
Namespace Name Mixin selector official <init>
Lbbn;<init>(Lbbr;Lcgx;)V
intermediary <init>
Lnet/minecraft/class_1297;<init>(Lnet/minecraft/class_1299;Lnet/minecraft/class_1937;)V
named <init>
Lnet/minecraft/entity/Entity;<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)V
-
StorageMinecartEntity
- Mappings:
Namespace Name Mixin selector official <init>
Lbvu;<init>(Lbbr;DDDLcgx;)V
intermediary <init>
Lnet/minecraft/class_1693;<init>(Lnet/minecraft/class_1299;DDDLnet/minecraft/class_1937;)V
named <init>
Lnet/minecraft/entity/vehicle/StorageMinecartEntity;<init>(Lnet/minecraft/entity/EntityType;DDDLnet/minecraft/world/World;)V
-
-
Method Details
-
dropItems
- Overrides:
dropItems
in classAbstractMinecartEntity
- Mappings:
Namespace Name Mixin selector official a
Lbvt;a(Lbaw;)V
intermediary method_7516
Lnet/minecraft/class_1688;method_7516(Lnet/minecraft/class_1282;)V
named dropItems
Lnet/minecraft/entity/vehicle/AbstractMinecartEntity;dropItems(Lnet/minecraft/entity/damage/DamageSource;)V
-
getStack
Fetches the stack currently stored at the given slot. If the slot is empty, or is outside the bounds of this inventory, returns seeItemStack.EMPTY
. -
removeStack
Removes a specific number of items from the given slot.- Specified by:
removeStack
in interfaceInventory
- Returns:
- the removed items as a stack
- Mappings:
Namespace Name Mixin selector official a
Lbac;a(II)Lcax;
intermediary method_5434
Lnet/minecraft/class_1263;method_5434(II)Lnet/minecraft/class_1799;
named removeStack
Lnet/minecraft/inventory/Inventory;removeStack(II)Lnet/minecraft/item/ItemStack;
-
removeStack
Removes the stack currently stored at the indicated slot.- Specified by:
removeStack
in interfaceInventory
- Returns:
- the stack previously stored at the indicated slot.
- Mappings:
Namespace Name Mixin selector official b
Lbac;b(I)Lcax;
intermediary method_5441
Lnet/minecraft/class_1263;method_5441(I)Lnet/minecraft/class_1799;
named removeStack
Lnet/minecraft/inventory/Inventory;removeStack(I)Lnet/minecraft/item/ItemStack;
-
setStack
-
getStackReference
Obtains a stack reference to be modified. Used by commands like/loot
or/item
.- Overrides:
getStackReference
in classEntity
- Parameters:
mappedIndex
- the mapped index as given by the item slot argument- See Also:
- Mappings:
Namespace Name Mixin selector official k
Lbbn;k(I)Lbct;
intermediary method_32318
Lnet/minecraft/class_1297;method_32318(I)Lnet/minecraft/class_5630;
named getStackReference
Lnet/minecraft/entity/Entity;getStackReference(I)Lnet/minecraft/inventory/StackReference;
-
markDirty
public void markDirty() -
canPlayerUse
- Specified by:
canPlayerUse
in interfaceInventory
- Mappings:
Namespace Name Mixin selector official a
Lbac;a(Lbuc;)Z
intermediary method_5443
Lnet/minecraft/class_1263;method_5443(Lnet/minecraft/class_1657;)Z
named canPlayerUse
Lnet/minecraft/inventory/Inventory;canPlayerUse(Lnet/minecraft/entity/player/PlayerEntity;)Z
-
remove
Removes the entity.- Overrides:
remove
in classEntity
- See Also:
- Mappings:
Namespace Name Mixin selector official a
Lbbn;a(Lbbn$c;)V
intermediary method_5650
Lnet/minecraft/class_1297;method_5650(Lnet/minecraft/class_1297$class_5529;)V
named remove
Lnet/minecraft/entity/Entity;remove(Lnet/minecraft/entity/Entity$RemovalReason;)V
-
writeCustomDataToNbt
Writes custom data tonbt
. Subclasses has to implement this.NBT is a storage format; therefore, a data from NBT is loaded to an entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the entity.
- Overrides:
writeCustomDataToNbt
in classAbstractMinecartEntity
- See Also:
- Mappings:
Namespace Name Mixin selector official b
Lbbn;b(Lpj;)V
intermediary method_5652
Lnet/minecraft/class_1297;method_5652(Lnet/minecraft/class_2487;)V
named writeCustomDataToNbt
Lnet/minecraft/entity/Entity;writeCustomDataToNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
readCustomDataFromNbt
Reads custom data fromnbt
. Subclasses has to implement this.NBT is a storage format; therefore, a data from NBT is loaded to an entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the entity.
nbt
might not have all expected keys, or might have a key whose value does not meet the requirement (such as the type or the range). This method should fall back to a reasonable default value instead of throwing an exception.- Overrides:
readCustomDataFromNbt
in classAbstractMinecartEntity
- See Also:
- Mappings:
Namespace Name Mixin selector official a
Lbbn;a(Lpj;)V
intermediary method_5749
Lnet/minecraft/class_1297;method_5749(Lnet/minecraft/class_2487;)V
named readCustomDataFromNbt
Lnet/minecraft/entity/Entity;readCustomDataFromNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
interact
Called when a player interacts with this entity.- Overrides:
interact
in classEntity
- Parameters:
player
- the playerhand
- the hand the player used to interact with this entity- Mappings:
Namespace Name Mixin selector official a
Lbbn;a(Lbuc;Lbai;)Lbaj;
intermediary method_5688
Lnet/minecraft/class_1297;method_5688(Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1269;
named interact
Lnet/minecraft/entity/Entity;interact(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/ActionResult;
-
applySlowdown
protected void applySlowdown()- Overrides:
applySlowdown
in classAbstractMinecartEntity
- Mappings:
Namespace Name Mixin selector official l
Lbvt;l()V
intermediary method_7525
Lnet/minecraft/class_1688;method_7525()V
named applySlowdown
Lnet/minecraft/entity/vehicle/AbstractMinecartEntity;applySlowdown()V
-
clear
public void clear() -
setLootTable
- Mappings:
Namespace Name Mixin selector official a
Lbvu;a(Labb;J)V
intermediary method_7562
Lnet/minecraft/class_1693;method_7562(Lnet/minecraft/class_2960;J)V
named setLootTable
Lnet/minecraft/entity/vehicle/StorageMinecartEntity;setLootTable(Lnet/minecraft/util/Identifier;J)V
-
createMenu
@Nullable public @Nullable ScreenHandler createMenu(int syncId, PlayerInventory inv, PlayerEntity player) - Specified by:
createMenu
in interfaceScreenHandlerFactory
- Mappings:
Namespace Name Mixin selector official createMenu
Lbxp;createMenu(ILbub;Lbuc;)Lbwm;
intermediary createMenu
Lnet/minecraft/class_1270;createMenu(ILnet/minecraft/class_1661;Lnet/minecraft/class_1657;)Lnet/minecraft/class_1703;
named createMenu
Lnet/minecraft/screen/ScreenHandlerFactory;createMenu(ILnet/minecraft/entity/player/PlayerInventory;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/screen/ScreenHandler;
-
getScreenHandler
- Mappings:
Namespace Name Mixin selector official a
Lbvu;a(ILbub;)Lbwm;
intermediary method_17357
Lnet/minecraft/class_1693;method_17357(ILnet/minecraft/class_1661;)Lnet/minecraft/class_1703;
named getScreenHandler
Lnet/minecraft/entity/vehicle/StorageMinecartEntity;getScreenHandler(ILnet/minecraft/entity/player/PlayerInventory;)Lnet/minecraft/screen/ScreenHandler;
-
getLootTableId
- Specified by:
getLootTableId
in interfaceVehicleInventory
- Mappings:
Namespace Name Mixin selector official y
Lbvx;y()Labb;
intermediary method_42276
Lnet/minecraft/class_7265;method_42276()Lnet/minecraft/class_2960;
named getLootTableId
Lnet/minecraft/entity/vehicle/VehicleInventory;getLootTableId()Lnet/minecraft/util/Identifier;
-
setLootTableId
- Specified by:
setLootTableId
in interfaceVehicleInventory
- Mappings:
Namespace Name Mixin selector official a
Lbvx;a(Labb;)V
intermediary method_42275
Lnet/minecraft/class_7265;method_42275(Lnet/minecraft/class_2960;)V
named setLootTableId
Lnet/minecraft/entity/vehicle/VehicleInventory;setLootTableId(Lnet/minecraft/util/Identifier;)V
-
getLootTableSeed
public long getLootTableSeed()- Specified by:
getLootTableSeed
in interfaceVehicleInventory
- Mappings:
Namespace Name Mixin selector official z
Lbvx;z()J
intermediary method_42277
Lnet/minecraft/class_7265;method_42277()J
named getLootTableSeed
Lnet/minecraft/entity/vehicle/VehicleInventory;getLootTableSeed()J
-
setLootTableSeed
public void setLootTableSeed(long lootTableSeed) - Specified by:
setLootTableSeed
in interfaceVehicleInventory
- Mappings:
Namespace Name Mixin selector official a
Lbvx;a(J)V
intermediary method_42274
Lnet/minecraft/class_7265;method_42274(J)V
named setLootTableSeed
Lnet/minecraft/entity/vehicle/VehicleInventory;setLootTableSeed(J)V
-
getInventory
- Specified by:
getInventory
in interfaceVehicleInventory
- Mappings:
Namespace Name Mixin selector official A
Lbvx;A()Lhi;
intermediary method_42278
Lnet/minecraft/class_7265;method_42278()Lnet/minecraft/class_2371;
named getInventory
Lnet/minecraft/entity/vehicle/VehicleInventory;getInventory()Lnet/minecraft/util/collection/DefaultedList;
-
resetInventory
public void resetInventory()- Specified by:
resetInventory
in interfaceVehicleInventory
- Mappings:
Namespace Name Mixin selector official C
Lbvx;C()V
intermediary method_42273
Lnet/minecraft/class_7265;method_42273()V
named resetInventory
Lnet/minecraft/entity/vehicle/VehicleInventory;resetInventory()V
-