ItemPhysic Full

ItemPhysic Full

24M Downloads

Dropping behavior with CraftTweaker player.give

Oethever opened this issue ยท 1 comments

commented

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:

  1. 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); }
);
  1. 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

commented

This issue has been resolved by CraftTweaker directly.