1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix item duplication if player dies during interact callback (alternative) (#11662)

This commit is contained in:
sfan5 2021-10-25 20:30:27 +02:00 committed by GitHub
parent d4b89eb106
commit 660e63dbae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 118 additions and 56 deletions

View file

@ -477,7 +477,7 @@ int ModApiEnvMod::l_place_node(lua_State *L)
return 1;
}
// Create item to place
ItemStack item(ndef->get(n).name, 1, 0, idef);
Optional<ItemStack> item = ItemStack(ndef->get(n).name, 1, 0, idef);
// Make pointed position
PointedThing pointed;
pointed.type = POINTEDTHING_NODE;