This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Quote from Quintollium I am trying to make a mod that involves removing an item from the inventory after I use an item, please help.
clearInventorySlot(1,2); // Will that work ?
Quote from CakeArmyShaderGameing i can do clearInventorySlot(1,2); // Will that work ?
Quote from goldenquick Player.clearInventorySlot(slot number); there you go
Quote from 99FireyMan99 Idk, but that would be useful in what i am doing to!!!
addItemInventory(256, -1)
Quote from 500 Internal Server Error The hacky method is addItemInventory(256, -1) i.e. add a negative amount. This was reported to work. (replace 256 with the ID of the item you want removed)
Back to modding! Follow me on Twitter @byteandahalf
Click Banner to SUBSCRIBE!!! I'm in the Team Flame Clan!!! Click that little green arrow!! -------------->
there you go
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumThe hacky method is
i.e. add a negative amount. This was reported to work.
(replace 256 with the ID of the item you want removed)
Click Banner to SUBSCRIBE!!! I'm in the Team Flame Clan!!! Click that little green arrow!! -------------->
Click Banner to SUBSCRIBE!!! I'm in the Team Flame Clan!!! Click that little green arrow!! -------------->
I thought I tried this but didn't work but I'll try again.
I wanted to get rid of a specific item not in a specific slot.
It did work, but the item still looks like it is in the inventory until the world is reloaded.
In which case you could do
Player.setInventorySlot(0, 7, Player.getInventorySlotCount(0) - 1, 0);
Could remove 1 bedrock from slot 0.
Back to modding! Follow me on Twitter @byteandahalf