Dropping behavior with CraftTweaker player.give
Oethever opened this issue ยท 1 comments
Minecraft: 1.12.2
Forge: 14.23.5.2854
Mods: ItemPhysic Full (1.4.34); CraftTweaker (4.1.20.574)
I found a very specific behaviour that is probably not intended, and is related to the CraftTweaker command player.give(IItemStack)
. Here are the steps to reproduce:
- Add a ZenScript file in
scripts/
with the following content:
recipes.addShapeless(
"recipe1", <minecraft:stick>, [<minecraft:glass>], null,
function(output, craftInfo, player) { player.give(<minecraft:dirt> * 2); }
);
- Use the added recipe on a crafting table (1 Glass).
This results in the 2 blocks of Dirt being given in the player's inventory, and a new itemblock of dirt being spawn next to the player. This itemblock has a lifetime that seems to be proportional to ItemPhysic's general.despawnItem
config entry, minus 6000 (e.g. if we set general.despawnItem
to 6040, this itemblock will last 2 seconds).
I am unsure if the problem is on your end or CraftTweaker's end, so I am posting it here. I any case, I posted it there as well: CraftTweaker/CraftTweaker#1002