public abstract class StorageMinecartEntity extends AbstractMinecartEntity implements Inventory, NamedScreenHandlerFactory
AbstractMinecartEntity.Type
Entity.PositionUpdater
Modifier and Type | Field and Description |
---|---|
private boolean |
field_7733 |
private DefaultedList<ItemStack> |
inventory |
private long |
lootSeed |
private Identifier |
lootTableId |
age, chunkX, chunkY, chunkZ, dataTracker, distanceTraveled, fallDistance, field_25599, firstUpdate, FLAGS, fluidHeight, glowing, horizontalCollision, horizontalSpeed, ignoreCameraFrustum, inanimate, inNetherPortal, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, LOGGER, movementMultiplier, netherPortalTime, noClip, onGround, pitch, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, pushSpeedReduction, random, removed, ridingCooldown, stepHeight, submergedInWater, teleporting, timeUntilRegen, touchingWater, updateNeeded, uuid, uuidString, velocityDirty, velocityModified, verticalCollision, world, yaw
DUMMY
Modifier | Constructor and Description |
---|---|
protected |
StorageMinecartEntity(EntityType<?> type,
double x,
double y,
double z,
World world) |
protected |
StorageMinecartEntity(EntityType<?> type,
World world) |
Modifier and Type | Method and Description |
---|---|
protected void |
applySlowdown() |
boolean |
canPlayerUse(PlayerEntity player) |
void |
clear() |
ScreenHandler |
createMenu(int syncId,
PlayerInventory inv,
PlayerEntity player) |
void |
dropItems(DamageSource damageSource) |
boolean |
equip(int slot,
ItemStack item) |
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() |
Entity |
moveToWorld(ServerWorld destination)
Moves this entity to another world.
|
protected void |
readCustomDataFromTag(CompoundTag tag) |
void |
remove() |
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) |
animateDamage, canClimb, collides, collidesWith, create, createSpawnPacket, damage, getBlockOffset, getContainedBlock, getDamageWobbleSide, getDamageWobbleStrength, getDamageWobbleTicks, getDefaultBlockOffset, getDefaultContainedBlock, getMaxOffRailSpeed, getMinecartType, getMountedHeightOffset, getMovementDirection, getVelocityMultiplier, getVisibilityBoundingBox, hasCustomBlock, initDataTracker, isPushable, method_30633, moveOffRail, moveOnRail, onActivatorRail, pushAwayFrom, setCustomBlock, setCustomBlockOffset, setCustomBlockPresent, setDamageWobbleSide, setDamageWobbleStrength, setDamageWobbleTicks, setVelocityClient, snapPositionToRail, snapPositionToRailWithOffset, tick, updatePassengerForDismount, updateTrackedPositionAndAngles
addPassenger, addScoreboardTag, addVelocity, adjustMovementForCollisions, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, adjustSingleAxisMovementForCollisions, afterSpawn, applyMirror, applyRotation, baseTick, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundsForPose, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeRiddenInWater, canBeSpectated, canExplosionDestroyBlock, canFly, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, checkDespawn, copyFrom, copyPositionAndRotation, dealDamage, destroy, detach, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, entityDataRequiresOperator, equals, equipStack, extinguish, fall, fromTag, getAir, getArmorItems, getBlockPos, getBodyY, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getCommandSource, getCustomName, getDataTracker, getDefaultName, getDefaultNetherPortalCooldown, getDimensions, getDisplayName, getEffectiveExplosionResistance, getEntityId, getEntityName, getEntityWorld, getEyeHeight, getEyeHeight, getEyeY, getFireTicks, getFlag, getFluidHeight, getHeadYaw, getHeight, getHeightOffset, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getItemsEquipped, getItemsHand, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getMaxAir, getMaxNetherPortalTime, 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, isChunkPosUpdateRequested, isCollidable, isConnectedThroughVehicle, isCustomNameVisible, isDescending, isFireImmune, isGlowing, isImmuneToExplosion, isInLava, isInRange, isInsideWall, isInsideWaterOrBubbleColumn, isInSneakingPose, isInSwimmingPose, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isLiving, isLogicalSideForUpdatingMovement, isOnFire, isOnGround, isPartOf, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, kill, lookAt, method_29239, method_29241, method_29919, method_30076, method_30330, method_30632, method_30634, method_30950, method_30951, method_31166, move, moveToBoundingBoxCenter, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onPassengerLookAround, onPlayerCollision, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, onTrackedDataSet, playFlySound, playSound, playStepSound, playSwimSound, populateCrashReport, pushOutOfBlocks, raycast, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, removeAllPassengers, removePassenger, removeScoreboardTag, requestTeleport, resetNetherPortalCooldown, resetPosition, saveSelfToTag, saveToTag, scheduleVelocityUpdate, sendSystemMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFireTicks, setFlag, setGlowing, setHeadYaw, setInNetherPortal, setInvisible, setInvulnerable, setNoGravity, setOnFireFor, setOnFireFromLava, setOnGround, setPos, setPose, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSprinting, setSwimming, setUuid, setVelocity, setVelocity, setWorld, setYaw, shouldBroadcastConsoleToOps, shouldLeaveSwimmingPose, shouldReceiveFeedback, shouldRender, shouldRender, shouldRenderName, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, squaredHorizontalLength, startRiding, startRiding, stopRiding, streamPassengersRecursively, teleport, teleportRequested, tickNetherPortal, tickNetherPortalCooldown, tickRiding, toListTag, toListTag, toString, toTag, updateKilledAdvancementCriterion, updateMovementInFluid, updatePassengerPosition, updatePosition, updatePositionAndAngles, updateSwimming, updateTrackedHeadRotation, updateTrackedPosition, updateTrackedPosition, updateVelocity, updateWaterState, wouldPoseNotCollide
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
containsAny, count, getMaxCountPerStack, isValid, onClose, onOpen, size
getDisplayName
private DefaultedList<ItemStack> inventory
private boolean field_7733
@Nullable private Identifier lootTableId
private long lootSeed
protected StorageMinecartEntity(EntityType<?> type, World world)
protected StorageMinecartEntity(EntityType<?> type, double x, double y, double z, World world)
public void dropItems(DamageSource damageSource)
dropItems
in class AbstractMinecartEntity
public ItemStack getStack(int slot)
ItemStack.EMPTY
.public ItemStack removeStack(int slot, int amount)
removeStack
in interface Inventory
public ItemStack removeStack(int slot)
removeStack
in interface Inventory
public void setStack(int slot, ItemStack stack)
public boolean canPlayerUse(PlayerEntity player)
canPlayerUse
in interface Inventory
@Nullable public Entity moveToWorld(ServerWorld destination)
Note all entities except server player entities are completely recreated at the destination.
moveToWorld
in class Entity
protected void writeCustomDataToTag(CompoundTag tag)
writeCustomDataToTag
in class AbstractMinecartEntity
protected void readCustomDataFromTag(CompoundTag tag)
readCustomDataFromTag
in class AbstractMinecartEntity
public ActionResult interact(PlayerEntity player, Hand hand)
protected void applySlowdown()
applySlowdown
in class AbstractMinecartEntity
public void generateLoot(@Nullable PlayerEntity player)
public void setLootTable(Identifier id, long lootSeed)
@Nullable public ScreenHandler createMenu(int syncId, PlayerInventory inv, PlayerEntity player)
createMenu
in interface ScreenHandlerFactory
protected abstract ScreenHandler getScreenHandler(int syncId, PlayerInventory playerInventory)