- The command /gamerule keepInventory true does not work (minecraft version=1.7.10) I have turned my cheats on but when i typed /gamerule keepInventory true the chat goes 'Your game rule has been updated' or something like that, but when i kill my self it drops all the items even if the gamerule is on.
- Gamepedia Minecraft Wiki has another review of the problem, showing that 'activated hoppers' are the problem, and if you understand what 'activated' means in this context, it matches with the rest. Covering a hopper with an inventory-slot block deactivates the hopper until an item is in the neighbor block's inventory.
Crafting Card Slot. Applied Energistics. There are 2 options at the top left corner of the Interface GUI: Blocking mode. Ignore the contents of the target inventory. Do not push crafting items if inventory contains items. Export crafted items from ME crafting assembly machine. Export only stocked items. The bug Some slots in the top right of the inventory cannot be accessed in the survival inventory. Players have reported that upon hovering over these slots, the game starts lagging, and they can only access the items in these slots by opening a chest.
This page contains information about features that have been removed in the latest development versions.Restrictions | |
---|---|
First introduced | Java Edition 1.8 (14w26a) |
Replaces items in the inventories of blocks (chest, furnaces, etc.) or entities (players or mobs) with the given item(s).
Syntax[edit]
- Java Edition
replaceitem block <pos> <slot> <item> [<count>]
replaceitem entity <targets> <slot> <item> [<count>]
- Bedrock Edition
replaceitem block <position: x y z> slot.container <slotId: int> <itemName: Item> [amount: int] [data: int] [components: json]
replaceitem entity <target: target> <slotType: EntityEquipmentSlot> <slotId: int> <itemName: Item> [amount: int] [data: int] [components: json]
replaceitem block <position: x y z> slot.container <slotId: int> <oldItemHandling: ReplaceMode> <itemName: Item> [amount: int] [data: int] [components: json]
replaceitem entity <target: target> <slotType: EntityEquipmentSlot> <slotId: int> <oldItemHandling: ReplaceMode> <itemName: Item> [amount: int] [data: int] [components: json]
Arguments[edit]
JE: <pos>
: block_pos
BE: position: x y z
: CommandPosition
- In Java Edition, it must be a block position composed of <x>, <y> and <z>, each of which must be an integer or tilde and caret notation.In Bedrock Edition, it must be a three-dimensional coordinates composed of <x>, <y> and <z>, each of which must be a floating-point number or tilde and caret notation.
- Specifies the position of the block to be modified.
JE: <targets>
: entity
BE: target: target
: CommandSelector<Actor>
- Must be a player name, a target selector or a UUID[Java Edition only].
- Specifies one or more entities to modify.
JE: <slot>
: item_slot
BE: slotType: EntityEquipmentSlot
: EquipmentSlot, slot.container
and <slotId: int>
: int
- Specifies the inventory slot to be modified. Valid values depend on whether a block or an entity is being modified.
- In Bedrock Edition,
slotId: int
must be a 32-bit integer number. And it must be between -2147483648 and 2147483647 (inclusive).
Overpowered Inventory - Mods - Minecraft - CurseForge
container.<slot_number>
(BE: slot.container <slotId: int>
) where <slot_number> or <slotId: int> is replaced with a number specifying the slot.- Chests, dispensers, droppers, hoppers, and trapped chests are numbered 0 for the top-left slot and then increase first horizontally, then vertically (so, for example, a chest's top row slots are numbered 0 to 8 from left to right). Double chests and double trapped chests are treated as two single container blocks.
- A brewing stand's bottom slots are numbered 0 to 2 from left to right, its top slot is 3 and the fuel slot is 4.
- A furnace's slots are numbered 0 for the input slot, 1 for the fuel slot, and 2 for the output slot.
/data
.Slot | Slot Numbers | Restrictions |
---|---|---|
armor.chest (BE: slot.armor.chest <slotId: int> ) | any number[Bedrock Edition only] | armor stands, mobs, and players only (though not all mobs will show or make use of the items) |
armor.feet (BE: slot.armor.feet <slotId: int> ) | any number[Bedrock Edition only] | |
armor.head (BE: slot.armor.head <slotId: int> ) | any number[Bedrock Edition only] | |
armor.legs (BE: slot.armor.legs <slotId: int> ) | any number[Bedrock Edition only] | |
weapon.mainhand (BE: slot.weapon.mainhand <slotId: int> ) | any number[Bedrock Edition only] | |
weapon.offhand (BE: slot.weapon.offhand <slotId: int> ) | any number[Bedrock Edition only] | |
container.<slot_number> (BE: slot.container <slotId: int> ) | 0–53 | players, item frames[Java Edition only] (slot 0), and minecarts only |
enderchest.<slot_number> (BE: slot.enderchest <slotId: int> ) | 0–26 | players only |
hotbar.<slot_number> (BE: slot.hotbar <slotId: int> ) | 0–8 | |
inventory.<slot_number> (BE: slot.inventory <slotId: int> ) | 0–26 | |
horse.saddle (BE: slot.saddle <slotId: int> ) | any number[Bedrock Edition only] | horses, donkeys, and mules only; <item> or itemName: Item must be a saddle |
horse.chest [Java Edition only] | donkeys, and mules only; <item> must be a chest | |
horse.armor (BE: slot.armor <slotId: int> ) | any number[Bedrock Edition only] | horses and llamas only; <item> or itemName: Item must be a type of horse armor (if a horse) or a carpet (if a llama) |
horse.<slot_number> (BE: slot.chest <slotId: int> ) | 0–14 | donkeys and mules with chests only |
villager.<slot_number> (BE: slot.inventory <slotId: int> ) | 0–7 | villagers only |

JE: <item>
: item_stack
BE: itemName: Item
: CommandItem
- Specifies the item to be placed in the block or entity's inventory slot.
JE: <count>
: integer
BE: amount: int
: int
- Must be a 32-bit integer number. In Java Edition, it must be between -2147483648 and 2147483647 (inclusive). And it must be between 1 and 64 (inclusive).
- Specifies the number of items to be placed in the block or entity's inventory slot.
BE: data: int
: int
- Must be a 32-bit integer number. It must be between -2147483648 and 2147483647 (inclusive).
- Specifies the item data for the item(s) to be placed in the block or entity's inventory slot. Values which are invalid for the specified item id will default to 0. If not specified, defaults to 0.
BE: components: json
: Json::Value
- Must be a JSON Object.
- Specifies the item components. Like data tags but supports only
minecraft:can_place_on
,minecraft:can_destroy
,minecraft:item_lock
, andminecraft:keep_on_death
functions (see Commands/give#Examples)
BE: oldItemHandling: ReplaceMode
- Must be one of:
destroy
- Directly replaces items ignoring the original items in the specified slot.keep
- Does not replace items if an item occupies that slot.
Result[edit]
Command | Trigger | Java Edition | Bedrock Edition |
---|---|---|---|
any | the arguments are not specified correctly | Unparseable | Failed |
<count> exceeds the stack limit of the specified item | Failed | Successful | |
/replaceitem block ... | if the specified block is not a container | Failed | |
if the specified block does not have the specified slot | |||
/replaceitem entity ... | if <targets> or target: target fails to resolve to one or more entities (named players must be online) | ||
if none of the targets have the specified slot (for example, zombies don't have horse.armor ) | |||
if specified item cannot be place into the specified slot of any targeted entity(for example, place a stone into armor.chest of a player) | |||
/replaceitem ... keep | if an item occupies the specified slot in keep mode | N/A | |
any | On success | Replaces the items in the specified slot with the specified items (previous items in that slot are lost). |
Output[edit]
Command | Edition | Situation | Success Count | /execute store success ... | /execute store result ... |
---|---|---|---|---|---|
any | Java Edition | On fail | 0 | 0 | 0 |
/replaceitem block ... | On success | 1 | 1 | 1 | |
/replaceitem entity ... | On success | 1 | 1 | the number of entities whose items are successfully replaced | |
any | Bedrock Edition | On fail | 0 | N/A | N/A |
/replaceitem block ... | On success | 1 | N/A | N/A | |
/replaceitem entity ... | On success | the number of entities whose items are successfully replaced | N/A | N/A |
Examples[edit]
- To replace the items in the bottom-right slot of a single chest two block above with four spruce saplings:
replaceitem block ~ ~2 ~ container.26 minecraft:spruce_sapling 4
[Java Edition only]replaceitem block ~ ~2 ~ slot.container 26 sapling 4 1
[Bedrock Edition only]
- To replace the items in the rightmost hotbar slot of the nearest player with four spruce saplings:
replaceitem entity @p hotbar.8 minecraft:spruce_sapling 4
[Java Edition only]replaceitem entity @p slot.hotbar 8 sapling 4 1
[Bedrock Edition only]
History[edit]
Java Edition | |||||
---|---|---|---|---|---|
1.8 | 14w26a | Added /replaceitem . | |||
1.14 | 18w43a | /replaceitem can now be used on item frames. | |||
Upcoming Java Edition | |||||
1.17 | 20w46a | Removed /replaceitem . Replaced with /item replace . | |||
Pocket Edition | |||||
1.0.5 | alpha 1.0.5.0 | Added /replaceitem . | |||
1.1.0 | alpha 1.1.0.0 | CanPlaceOn and CanDestroy functions are now supported for /replaceitem . | |||
Bedrock Edition | |||||
1.16.0 | beta 1.16.0.55 | Added new overload for /replaceitem with an option for destroy or keep. |
See also[edit]
/data
— can also replace items in a container, or a mob's inventory/give
— give items to players without specifying specific inventory slots or overwriting other items/blockdata
(outdated) — can also replace items in a container/entitydata
(outdated) — can also replace items in a mob's inventory, or modify the drop chances of armor and weapons
I want to start off by extending a big thank you to everyone who helped with this update. Not only did our team do a lot of work, we had PLENTY of help from contributors. So thank you to everyone who helped make this update possible.
Below is a list of almost everything that was added/fixed/changed since 2.4.1. I left out issues which pertain to things that were broken along the way during the development of 2.5.
Items
This update had a lot of new things added, but here are a few notable additions we thought you'd love to hear about.
BlockData
We added a blockdata type, as well as expression for getting block data. BlockData is very similar to how you would set a block with the vanilla Minecraft /setblock
command. This allows users to better customize blocks in the world, without having to struggle figuring out the aliases they need. For more info see the BlockData Type and BlockData Expression in the docs.
Skript Info Command
We added an info sub-command to the /skript
command which will provide links to docs and aliases, and also includes Skript version, server version as well as installed addons (including their versions and websites). This will be super helpful in the future, when a user is asking for help, rather than having to ask them a bunch of questions about versions, you can simply say 'hey, could you please send me the output of /sk info
'
Minecraft 1.16
We added all of the Minecraft 1.16 related stuff, including item/block aliases, entities, enchantment (just one), particles and biomes. We also added support for 1.16's HEX text colors.
Minecraft Inventory Slots Not Working Remotely
- Added an effect and a condition for silencing entity sounds
- Added support for non-player entities to item pickup event
- Added location for block command senders
- Added recursive list size as an option to 'amount' expression
- Added an expression for toggling entity AI on and off
- Added an event for players propelling through air due to riptide enchantment
- Added a condition to check if entities are leashed
- Added more descriptive alternative syntax for 'blocking' condition
- Added an expression to get how long players have been online
- Added support for mooshroom variations
- Added an expression to get max durability of items
- Added different capitalization styles to 'case text'
- Added an effect and a condition for entity invulnerability
- Added syntaxes for Minecraft 1.14+ CustomModelData
- Added support for Paper's per-client view distance (not supported on all Paper versions)
- Added an expression to get all blocks destroyed by explosions
- Added a way to replace only first occurrance with replace effect
- Added an event value for selected hotbar button in inventory click events
- Added an event for armor changes
- Added support for taming entities
- Added an expression for counting characters in a string
- Added a way to convert unix timestamps to dates
- Added an event for sponge absorbing blocks
- Added support for item (tool or armor) damage
- Added an option to temp-ban players
- Added support for llamas in entity equip effect
- Added an expression to get/set number of arrows stuck in an entity
- Added an expression to get/set no damage ticks of entities
- Added support for creating fiery explosions within the explode effect
- Added syntax to replace existing potion effects
- Added syntax to get the entities in a chunk
- Added new line expression
- Added an effect and condition to change/check charged creepers
- Added some spawn reasons which were recently added to the Bukkit API
- Added explode creeper effect and ignition condition
- Added an expression to get all scripts, or just the enabled or disabled ones.
- Added a condition and expression for checking Redstone block power
- Added several syntaxes for enchanting events and their values
- Added Korean language support
- Added more preload functionality to the API for internal use and addon developers
- Added a ‘time since’ expression
- Added an expression for entity attributes
- Added an expression for entity fall distance
- Added several syntaxes relating to explosions
- Added syntaxes for world game rules
- Added the hit block event value to the on projectile hit event
- Added a heal reason type and expression to be used in the heal event
- Added a projectile collide event
- Added better handling of a stack overflow error
- Added an expression for first/last login of player
- Added a block fertilize event
- Added an effect to stop/restart the server
- Updated money expression to support offline player balances
See Full List On Minecraft.gamepedia.com
- Fixed asterisks not being allowed in expressions in variable names
- Fixed flickering fireworks not working
- Fixed 'all foxes' not actually referring to all foxes
- Fixed exceptions caused by passing invalid arguments to functions
- Fixed player-specific weather not being always set correctly
- Fixed random fish spawning not working
- Fixed some types not being parseable
- Fixed comparisons between entities and entity types with similarly named aliases
- Fixed parsing of overlapping syntaxes in comparisons
- Fixed numerous conditions, expressions, and events using ItemStack instead of ItemType
- Fixed exception error in replace effect
- Fixed damage effect not showing damage
- Fixed some tree types not working in grow tree effect
- Fixed experience spawn event firing more than once after script reloads
- Fixed an issue with damaging items throwing console errors
- Fixed an issue with reloading functions throwing errors
- Fixed an issue with the item damage event missing an event-item value
- Fixed an issue with
final damage
returning the same value asdamage
- Fixed an issue where setting a block would always set it to the default block state
- Fixed an issue with retrieving inventory names
- Fixed an issue with setting the player's tab list name
- Fixed an issue with spawning thrown potions
- Fixed an issue with spawning a dropped item of a specific item type
- Fixed an issue with level progress expression throwing errors
- Fixed an issue with teleporting ignoring yaw and pitch
- Fixed an issue with event-items
- Fixed an issue with default values in damage events
- Fixed an issue with event-value time states
- Fixed an issue with villager data in legacy versions causing issue to last spawned entity syntax
- Fixed an issue with ‘show inventory’ expression showing the wrong inventory
- Fixed a bug with
%number% of %itemtype%
expression - Fixed an issue with the
is between
condition not comparing when the first number is larger than the latter - Fixed an issue with not being able to parse experience
- Fixed an issue with filters throwing console errors
- Fixed an issue with some block datas not setting (ie: snow layers)
- Fixed an issue with setting item amount of inventory slots
- Fixed an issue with furnace slot expression not accounting for smoker and blast furnace
- Fixed an issue with not being able to compare some entities with a baby entity
- Fixed an issue with “item crack” particle not working
- Fixed an issue with custom inventories not actually returning an inventory
- Fixed an issue with data value expression not working on 1.12.2 and below
- Fixed an issue with
chunk is loaded
condition forcing chunks to load therefor always returning true - Fixed an issue with some entities returning their super type
- Fixed an issue with viewers of inventory expression only returning a single value
- Fixed some issues with visual effects, namely offset issues and coloured dust particle issues
- Fixed an issue with the soft depends in the plugin.yml
- Fixed an issue with FAWE’s WorldGuard not working
- Fixed an issue with event-slot throwing errors when clicking outside of an inventory
- Fixed an issue with spawn egg aliases not working in 1.12.2
