callback DoWithBlockEntityAt why not work - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Plugins (https://forum.cuberite.org/forum-1.html) +--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html) +--- Thread: callback DoWithBlockEntityAt why not work (/thread-2502.html) Pages:
1
2
|
RE: callback DoWithBlockEntityAt why not work - DrMasik - 08-30-2016 (08-30-2016, 01:43 AM)as123456 Wrote: Not the reason! Show your updated code RE: callback DoWithBlockEntityAt why not work - as123456 - 08-30-2016 (08-30-2016, 01:44 AM)DrMasik Wrote:(08-30-2016, 01:43 AM)as123456 Wrote: Not the reason! Code: function OnPlayerRightClick(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, CursorY, CursorZ) RE: callback DoWithBlockEntityAt why not work - as123456 - 08-30-2016 Not other RE: callback DoWithBlockEntityAt why not work - DrMasik - 08-30-2016 (08-30-2016, 01:47 AM)as123456 Wrote: You must start from "function Initialize(Plugin)" functon, register hooks in the function. Plugin starts from the "function Initialize(Plugin)" function.So, I post simple plugin template code: Code: function Initialize(Plugin) RE: callback DoWithBlockEntityAt why not work - as123456 - 08-30-2016 Not the case!but 3q RE: callback DoWithBlockEntityAt why not work - NiLSPACE - 08-30-2016 There probably isn't a blockentity there. What block are you clicking on? Blockentities are things like chests, furnaces, signs and that sort of stuff. RE: callback DoWithBlockEntityAt why not work - as123456 - 08-30-2016 (08-30-2016, 02:52 AM)NiLSPACE Wrote: There probably isn't a blockentity there. What block are you clicking on? Blockentities are things like chests, furnaces, signs and that sort of stuff. trees,crop and other block,but fail RE: callback DoWithBlockEntityAt why not work - DrMasik - 08-30-2016 Are you activate (load) the plugin? If yes - put up all your code, settings.ini file and server directory listing including sub directories and files RE: callback DoWithBlockEntityAt why not work - xoft - 08-30-2016 Neither trees nor crops have a blockentity attached to them at all. What is it that you're trying to achieve anyway? Perhaps you're using the wrong approach here. RE: callback DoWithBlockEntityAt why not work - NiLSPACE - 08-30-2016 You're confusing blockentities with blocks. Use "Player:GetWorld():GetBlock(BlockX, BlockY, BlockZ)" in order to get the block id of the clicked block. |