public abstract class ContainerMinecartEntity extends AbstractMinecartEntity implements IInventory, INamedContainerProvider
AbstractMinecartEntity.Type
Entity.IMoveCallback
Modifier and Type | Field and Description |
---|---|
private boolean |
dropContentsWhenDead |
private LazyOptional<?> |
itemHandler |
private ResourceLocation |
lootTable |
private long |
lootTableSeed |
private NonNullList<ItemStack> |
minecartContainerItems |
addedToChunk, cachedUniqueIdString, chunkCoordX, chunkCoordY, chunkCoordZ, collided, collidedHorizontally, collidedVertically, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, eyesInWater, fallDistance, firstUpdate, FLAGS, forceSpawn, glowing, hurtResistantTime, ignoreFrustumCheck, inLava, inPortal, inWater, isAirBorne, lastPortalPos, lastPortalVec, lastTickPosX, lastTickPosY, lastTickPosZ, LOGGER, motionMultiplier, noClip, onGround, portalCounter, POSE, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, removed, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, submergedHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, world
COLLISIONS, DEFAULT_AIR_DRAG, DEFAULT_MAX_SPEED_AIR_LATERAL, DEFAULT_MAX_SPEED_AIR_VERTICAL
DUMMY
Modifier | Constructor and Description |
---|---|
protected |
ContainerMinecartEntity(EntityType<?> p_i48537_1_,
double p_i48537_2_,
double p_i48537_4_,
double p_i48537_6_,
World p_i48537_8_) |
protected |
ContainerMinecartEntity(EntityType<?> p_i48536_1_,
World p_i48536_2_) |
Modifier and Type | Method and Description |
---|---|
void |
addLoot(PlayerEntity player) |
protected void |
applyDrag() |
Entity |
changeDimension(DimensionType destination,
ITeleporter teleporter) |
void |
clear() |
protected abstract Container |
createContainer(int id,
PlayerInventory playerInventoryIn) |
Container |
createMenu(int p_createMenu_1_,
PlayerInventory p_createMenu_2_,
PlayerEntity p_createMenu_3_) |
ItemStack |
decrStackSize(int index,
int count) |
void |
dropContentsWhenDead(boolean value) |
<T> LazyOptional<T> |
getCapability(Capability<T> capability,
Direction facing)
Retrieves the Optional handler for the capability requested on the specific side.
|
ItemStack |
getStackInSlot(int index) |
boolean |
isEmpty() |
boolean |
isUsableByPlayer(PlayerEntity player) |
void |
killMinecart(DamageSource source) |
void |
markDirty() |
boolean |
processInitialInteract(PlayerEntity player,
Hand hand) |
protected void |
readAdditional(CompoundNBT compound) |
void |
remove(boolean keepData) |
ItemStack |
removeStackFromSlot(int index) |
boolean |
replaceItemInInventory(int inventorySlot,
ItemStack itemStackIn) |
void |
setInventorySlotContents(int index,
ItemStack stack) |
void |
setLootTable(ResourceLocation lootTableIn,
long lootTableSeedIn) |
protected void |
writeAdditional(CompoundNBT compound) |
applyEntityCollision, attackEntityFrom, canBeCollidedWith, canBePushed, canTriggerWalking, canUseRail, create, createSpawnPacket, getAdjustedHorizontalFacing, getCollisionBox, getCurrentCartSpeedCapOnRail, getDamage, getDefaultDisplayTile, getDefaultDisplayTileOffset, getDisplayTile, getDisplayTileOffset, getDragAir, getMaximumSpeed, getMaxSpeedAirLateral, getMaxSpeedAirVertical, getMaxSpeedWithRail, getMinecartType, getMountedYOffset, getPos, getPosOffset, getRenderBoundingBox, getRollingAmplitude, getRollingDirection, hasDisplayTile, moveAlongTrack, moveDerailedMinecart, moveMinecartOnRail, onActivatorRailPass, performHurtAnimation, registerData, setCanUseRail, setCurrentCartSpeedCapOnRail, setDamage, setDisplayTile, setDisplayTileOffset, setDragAir, setHasDisplayTile, setMaxSpeedAirLateral, setMaxSpeedAirVertical, setPositionAndRotationDirect, setRollingAmplitude, setRollingDirection, setVelocity, tick
addPassenger, addTag, addTrackingPlayer, addVelocity, allowLogging, applyEnchantments, applyOrientationToEntity, applyPlayerInteraction, areEyesInFluid, areEyesInFluid, awardKillScore, baseTick, calculateUpVector, canBeAttackedWithItem, canBeRidden, canBeRiddenInWater, canExplosionDestroyBlock, canFitPassenger, canPassengerSteer, canRenderOnFire, canSwim, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, checkDespawn, collideBoundingBox, collideBoundingBoxHeuristically, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, detach, determineNextStepDistance, doBlockCollisions, doesEntityNotTriggerPressurePlate, doWaterSplashEffect, entityDropItem, entityDropItem, entityDropItem, entityDropItem, equals, extinguish, fillCrashReport, forceSetPosition, getAir, getAllowedMovement, getAlwaysRenderNameTagForRender, getArmorInventoryList, getBoundingBox, getBoundingBox, getBrightness, getCachedUniqueIdString, getCollisionBorderSize, getCollisionBoundingBox, getCommandSource, getControllingPassenger, getCustomName, getDataManager, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSq, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getEyeHeight, getEyeHeight, getEyeHeight, getEyePosition, getFireImmuneTicks, getFireTimer, getFlag, getForward, getHeight, getHeldEquipment, getHighspeedSplashSound, getHorizontalFacing, getHoverEvent, getJumpFactor, getLastPortalVec, getLook, getLookVec, getLowestRidingEntity, getMaxAir, getMaxFallHeight, getMaxInPortalTime, getMirroredYaw, getMotion, getName, getOnPosition, getPassengers, getPermissionLevel, getPersistentData, getPitch, getPitchYaw, getPortalCooldown, getPose, getPosition, getPositionUnderneath, getPositionVec, getPositionVector, getPosX, getPosXRandom, getPosXWidth, getPosY, getPosYEye, getPosYHeight, getPosYRandom, getPosZ, getPosZRandom, getPosZWidth, getProfessionName, getPushReaction, getRecursivePassengers, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getRotationYawHead, getScoreboardName, getSelfAndPassengers, getServer, getSize, getSoundCategory, getSpeedFactor, getSplashSound, getSubmergedHeight, getSwimSound, getTags, getTeam, getTeamColor, getTeleportDirection, getType, getUniqueID, getUpVector, getVectorForRotation, getWidth, getYaw, getYOffset, handleFluidAcceleration, handlePistonMovement, handleStatusUpdate, handleWaterMovement, hasCustomName, hashCode, hasNoGravity, hasPermissionLevel, hitByEntity, horizontalMag, ignoreItemEntityData, isActualySwimming, isAddedToWorld, isAlive, isBeingRidden, isBurning, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEntityEqual, isEntityInsideOpaqueBlock, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInvisible, isInvisibleToPlayer, isInvulnerable, isInvulnerableTo, isInWater, isInWaterOrBubbleColumn, isInWaterRainOrBubbleColumn, isLiving, isNonBoss, isOffsetPositionInLiquid, isOnePlayerRiding, isOnSameTeam, isOnScoreboardTeam, isPassenger, isPassenger, isPassenger, isPoseClear, isPushedByWater, isRidingOrBeingRiddenBy, isRidingSameEntity, isSilent, isSneaking, isSpectatedByPlayer, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isVisuallySwimming, isWet, lookAt, makeFlySound, markVelocityChanged, maybeBackOffFromEdge, move, moveForced, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, notifyDataManagerChange, onAddedToWorld, onCollideWithPlayer, onEnterBubbleColumn, onEnterBubbleColumnWithAirAbove, onInsideBlock, onKillCommand, onKillEntity, onLivingFall, onRemovedFromWorld, onStruckByLightning, outOfWorld, pick, playFlySound, playSound, playStepSound, playSwimSound, positionRider, preparePlayerToSpawn, pushOutOfBlocks, read, recalculateSize, recenterBoundingBox, remove, removePassenger, removePassengers, removeTag, removeTrackingPlayer, repositionDirectPassengers, resetPositionToBB, revive, rotateTowards, sendMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFire, setFireTimer, setFlag, setGlowing, setHeadRotation, setInLava, setInvisible, setInvulnerable, setItemStackToSlot, setLocationAndAngles, setMotion, setMotion, setMotionMultiplier, setNoGravity, setOnFireFromLava, setPacketCoordinates, setPortal, setPose, setPosition, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRawPosition, setRenderDistanceWeight, setRenderYawOffset, setRotation, setRotationYawHead, setSilent, setSneaking, setSprinting, setSwimming, setUniqueId, setWorld, shouldReceiveErrors, shouldReceiveFeedback, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, startRiding, stopRiding, teleportKeepLoaded, toString, updateFallState, updatePassenger, updatePortal, updateRidden, updateSwimming, writeUnlessPassenger, writeUnlessRemoved, writeWithoutTypeId
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, invalidateCaps, reviveCaps, serializeCaps
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
closeInventory, count, getInventoryStackLimit, getSizeInventory, hasAny, isItemValidForSlot, openInventory
clearObj
getDisplayName
canBeRidden, getCartItem, getCollisionHandler, getComparatorLevel, getCurrentRailPosition, getMaxCartSpeedOnRail, getMinecart, getSlopeAdjustment, isPoweredCart, shouldDoRailFunctions
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getEntity, getPickedResult, serializeNBT, shouldRiderSit
getCapability
private NonNullList<ItemStack> minecartContainerItems
private boolean dropContentsWhenDead
@Nullable private ResourceLocation lootTable
private long lootTableSeed
private LazyOptional<?> itemHandler
protected ContainerMinecartEntity(EntityType<?> p_i48536_1_, World p_i48536_2_)
protected ContainerMinecartEntity(EntityType<?> p_i48537_1_, double p_i48537_2_, double p_i48537_4_, double p_i48537_6_, World p_i48537_8_)
public void killMinecart(DamageSource source)
killMinecart
in class AbstractMinecartEntity
public boolean isEmpty()
isEmpty
in interface IInventory
public ItemStack getStackInSlot(int index)
getStackInSlot
in interface IInventory
public ItemStack decrStackSize(int index, int count)
decrStackSize
in interface IInventory
public ItemStack removeStackFromSlot(int index)
removeStackFromSlot
in interface IInventory
public void setInventorySlotContents(int index, ItemStack stack)
setInventorySlotContents
in interface IInventory
public boolean replaceItemInInventory(int inventorySlot, ItemStack itemStackIn)
replaceItemInInventory
in class Entity
public void markDirty()
markDirty
in interface IInventory
public boolean isUsableByPlayer(PlayerEntity player)
isUsableByPlayer
in interface IInventory
@Nullable public Entity changeDimension(DimensionType destination, ITeleporter teleporter)
changeDimension
in class Entity
protected void writeAdditional(CompoundNBT compound)
writeAdditional
in class AbstractMinecartEntity
protected void readAdditional(CompoundNBT compound)
readAdditional
in class AbstractMinecartEntity
public boolean processInitialInteract(PlayerEntity player, Hand hand)
processInitialInteract
in class Entity
protected void applyDrag()
applyDrag
in class AbstractMinecartEntity
public void addLoot(@Nullable PlayerEntity player)
public void clear()
clear
in interface IClearable
public void setLootTable(ResourceLocation lootTableIn, long lootTableSeedIn)
@Nullable public Container createMenu(int p_createMenu_1_, PlayerInventory p_createMenu_2_, PlayerEntity p_createMenu_3_)
createMenu
in interface IContainerProvider
protected abstract Container createContainer(int id, PlayerInventory playerInventoryIn)
public <T> LazyOptional<T> getCapability(Capability<T> capability, @Nullable Direction facing)
ICapabilityProvider
getCapability
in interface ICapabilityProvider
getCapability
in class CapabilityProvider<Entity>
public void dropContentsWhenDead(boolean value)