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:
EntityLike
,Inventory
,NamedScreenHandlerFactory
,ScreenHandlerFactory
,CommandOutput
,Clearable
,Nameable
- Direct Known Subclasses:
ChestMinecartEntity
,HopperMinecartEntity
public abstract class StorageMinecartEntity extends AbstractMinecartEntity implements Inventory, NamedScreenHandlerFactory
- Mappings:
Namespace Name official bjb
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.class_5799, Entity.PositionUpdater, Entity.RemovalReason
-
Field Summary
Fields Modifier and Type Field Description private DefaultedList<ItemStack>
inventory
private long
lootSeed
private Identifier
lootTableId
Fields inherited from class net.minecraft.entity.Entity
age, dataTracker, distanceTraveled, fallDistance, field_28627, field_28629, firstUpdate, FLAGS, fluidHeight, glowing, horizontalCollision, horizontalSpeed, ignoreCameraFrustum, inanimate, inNetherPortal, inPowderSnow, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, LOGGER, movementMultiplier, netherPortalTime, noClip, onGround, pitch, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, pushSpeedReduction, random, ridingCooldown, stepHeight, submergedFluidTag, submergedInWater, timeUntilRegen, touchingWater, uuid, uuidString, velocityDirty, velocityModified, verticalCollision, wasInPowderSnow, world, yaw
Fields inherited from interface net.minecraft.server.command.CommandOutput
DUMMY
-
Constructor Summary
Constructors Modifier Constructor Description protected
StorageMinecartEntity(EntityType<?> type, double x, double y, double z, World world)
protected
StorageMinecartEntity(EntityType<?> type, World world)
-
Method Summary
Modifier and Type Method Description protected void
applySlowdown()
boolean
canPlayerUse(PlayerEntity player)
void
clear()
ScreenHandler
createMenu(int syncId, PlayerInventory inv, PlayerEntity player)
void
dropItems(DamageSource damageSource)
void
generateLoot(PlayerEntity player)
protected abstract ScreenHandler
getScreenHandler(int syncId, PlayerInventory playerInventory)
ItemStack
getStack(int slot)
Fetches the stack currently stored at the given slot.ActionResult
interact(PlayerEntity player, Hand hand)
Called when a player interacts with this entity.boolean
isEmpty()
void
markDirty()
class_5630
method_32318(int int2)
protected void
readCustomDataFromTag(CompoundTag tag)
void
remove(Entity.RemovalReason reason)
ItemStack
removeStack(int slot)
Removes the stack currently stored at the indicated slot.ItemStack
removeStack(int slot, int amount)
Removes a specific number of items from the given slot.void
setLootTable(Identifier id, long lootSeed)
void
setStack(int slot, ItemStack stack)
protected void
writeCustomDataToTag(CompoundTag tag)
Methods inherited from class net.minecraft.entity.vehicle.AbstractMinecartEntity
animateDamage, collides, collidesWith, create, createSpawnPacket, damage, getBlockOffset, getContainedBlock, getDamageWobbleSide, getDamageWobbleStrength, getDamageWobbleTicks, getDefaultBlockOffset, getDefaultContainedBlock, getMaxOffRailSpeed, getMinecartType, getMountedHeightOffset, getMovementDirection, getPickBlockStack, getVelocityMultiplier, getVisibilityBoundingBox, hasCustomBlock, initDataTracker, isPushable, method_30633, method_33570, moveOffRail, moveOnRail, onActivatorRail, pushAwayFrom, setCustomBlock, setCustomBlockOffset, setCustomBlockPresent, setDamageWobbleSide, setDamageWobbleStrength, setDamageWobbleTicks, setVelocityClient, snapPositionToRail, snapPositionToRailWithOffset, tick, updatePassengerForDismount, updateTrackedPositionAndAngles
Methods inherited from class net.minecraft.entity.Entity
addPassenger, addScoreboardTag, addVelocity, adjustMovementForCollisions, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, adjustSingleAxisMovementForCollisions, applyMirror, applyRotation, attemptTickInVoid, baseTick, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundsForPose, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeRiddenInWater, canBeSpectated, canExplosionDestroyBlock, canFly, canFreeze, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, checkDespawn, collidesWithStateAtPos, copyFrom, copyPositionAndRotation, dealDamage, detach, discard, dismountVehicle, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, emitGameEvent, emitGameEvent, entityDataRequiresOperator, equals, equipStack, extinguish, fall, fromTag, getAir, getArmorItems, getBlockPos, getBlockX, getBlockY, getBlockZ, getBodyY, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getChunkPos, getClientCameraPosVec, getCommandSource, getCustomName, getDataTracker, getDefaultName, getDefaultNetherPortalCooldown, getDimensions, getDisplayName, getEffectiveExplosionResistance, getEntityName, getEntityWorld, getEyeHeight, getEyeHeight, getEyeY, getFireTicks, getFirstPassenger, getFlag, getFluidHeight, getFreezingScale, getFrozenTicks, getHeadYaw, getHeight, getHeightOffset, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getId, getItemsEquipped, getItemsHand, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getLerpedPos, getMaxAir, getMaxNetherPortalTime, getMinFreezeDamageTicks, getName, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerDismountOffset, getPassengerList, getPassengersDeep, getPermissionLevel, getPistonBehavior, getPitch, getPos, getPose, getPrimaryPassenger, getRandomBodyY, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSafeFallDistance, getSavedEntityId, getScoreboardTags, getScoreboardTeam, getServer, getSoundCategory, getSplashSound, getStandingEyeHeight, getSwimSound, getTargetingMargin, getTeamColorValue, getTeleportTarget, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVelocity, getVelocityAffectingPos, getWidth, getX, getY, getYaw, getZ, handleAttack, handleFallDamage, handleStatus, hasCustomName, hashCode, hasNetherPortalCooldown, hasNoGravity, hasPassenger, hasPassengerDeep, hasPassengers, hasPassengerType, hasPermissionLevel, hasPlayerRider, hasVehicle, hasWings, interactAt, isAlive, isAttackable, isCollidable, isConnectedThroughVehicle, isCustomNameVisible, isDescending, isFireImmune, isFreezing, isGlowing, isImmuneToExplosion, isInLava, isInRange, isInsideWall, isInsideWaterOrBubbleColumn, isInSneakingPose, isInSwimmingPose, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isLiving, isLogicalSideForUpdatingMovement, isOnFire, isOnGround, isPartOf, isPlayer, isRemoved, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, kill, lookAt, method_29241, method_29919, method_30330, method_30951, method_31744, method_32877, method_33332, method_33567, method_33568, method_33569, method_33571, method_33573, method_33574, method_33575, move, moveToWorld, occludeVibrationSignals, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onPassengerLookAround, onPlayerCollision, onSpawnPacket, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, onTrackedDataSet, playFlySound, playSound, playStepSound, playSwimSound, populateCrashReport, pushOutOfBlocks, raycast, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, removeAllPassengers, removeFromDimension, removePassenger, removeScoreboardTag, requestTeleport, resetNetherPortalCooldown, resetPosition, saveSelfToTag, saveToTag, scheduleVelocityUpdate, sendSystemMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFireTicks, setFlag, setFrozenTicks, setGlowing, setHeadYaw, setInNetherPortal, setInPowderSnow, setInvisible, setInvulnerable, setNoGravity, setOnFire, setOnFireFor, setOnFireFromLava, setOnGround, setPos, setPose, setPosition, setRemoved, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSprinting, setSwimming, setUuid, setVelocity, setVelocity, setYaw, shouldBroadcastConsoleToOps, shouldLeaveSwimmingPose, shouldReceiveFeedback, shouldRender, shouldRender, shouldRenderName, shouldSave, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, squaredHorizontalLength, startRiding, startRiding, stopRiding, streamPassengers, streamPassengersRecursively, teleport, tickInVoid, tickNetherPortal, tickNetherPortalCooldown, tickRiding, toListTag, toListTag, toString, toTag, unsetRemoved, updateKilledAdvancementCriterion, updateMovementInFluid, updatePassengerPosition, updatePosition, updatePositionAndAngles, updateSwimming, updateTrackedHeadRotation, updateTrackedPosition, updateTrackedPosition, updateVelocity, updateWaterState, wouldPoseNotCollide
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.inventory.Inventory
containsAny, count, getMaxCountPerStack, isValid, onClose, onOpen, size
Methods inherited from interface net.minecraft.screen.NamedScreenHandlerFactory
getDisplayName
-
Field Details
-
inventory
- Mappings:
Namespace Name Mixin selector official b
Lbjb;b:Lgj;
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 c
Lbjb;c:Lwb;
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 d
Lbjb;d: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>
Laqv;<init>(Laqz;Lbtv;)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>
Lbjb;<init>(Laqz;DDDLbtv;)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
Lbja;a(Laqf;)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
-
isEmpty
public boolean isEmpty() -
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
Lapj;a(II)Lbnv;
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
Lapj;b(I)Lbnv;
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
-
method_32318
- Overrides:
method_32318
in classEntity
- Mappings:
Namespace Name Mixin selector official k
Laqv;k(I)Lary;
intermediary method_32318
Lnet/minecraft/class_1297;method_32318(I)Lnet/minecraft/class_5630;
named method_32318
Lnet/minecraft/entity/Entity;method_32318(I)Lnet/minecraft/class_5630;
-
markDirty
public void markDirty() -
canPlayerUse
- Specified by:
canPlayerUse
in interfaceInventory
- Mappings:
Namespace Name Mixin selector official a
Lapj;a(Lbhl;)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
-
writeCustomDataToTag
- Overrides:
writeCustomDataToTag
in classAbstractMinecartEntity
- Mappings:
Namespace Name Mixin selector official b
Laqv;b(Lmq;)V
intermediary method_5652
Lnet/minecraft/class_1297;method_5652(Lnet/minecraft/class_2487;)V
named writeCustomDataToTag
Lnet/minecraft/entity/Entity;writeCustomDataToTag(Lnet/minecraft/nbt/CompoundTag;)V
-
readCustomDataFromTag
- Overrides:
readCustomDataFromTag
in classAbstractMinecartEntity
- Mappings:
Namespace Name Mixin selector official a
Laqv;a(Lmq;)V
intermediary method_5749
Lnet/minecraft/class_1297;method_5749(Lnet/minecraft/class_2487;)V
named readCustomDataFromTag
Lnet/minecraft/entity/Entity;readCustomDataFromTag(Lnet/minecraft/nbt/CompoundTag;)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
Laqv;a(Lbhl;Lapp;)Lapq;
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 i
Lbja;i()V
intermediary method_7525
Lnet/minecraft/class_1688;method_7525()V
named applySlowdown
Lnet/minecraft/entity/vehicle/AbstractMinecartEntity;applySlowdown()V
-
generateLoot
- Mappings:
Namespace Name Mixin selector official d
Lbjb;d(Lbhl;)V
intermediary method_7563
Lnet/minecraft/class_1693;method_7563(Lnet/minecraft/class_1657;)V
named generateLoot
Lnet/minecraft/entity/vehicle/StorageMinecartEntity;generateLoot(Lnet/minecraft/entity/player/PlayerEntity;)V
-
clear
public void clear() -
setLootTable
- Mappings:
Namespace Name Mixin selector official a
Lbjb;a(Lwb;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
- Specified by:
createMenu
in interfaceScreenHandlerFactory
- Mappings:
Namespace Name Mixin selector official createMenu
Lbkt;createMenu(ILbhk;Lbhl;)Lbjr;
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
Lbjb;a(ILbhk;)Lbjr;
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;
-