User Tools

Site Tools


tutorial:blocks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
tutorial:blocks [2024/04/15 01:52] – [Custom Shape] solidblocktutorial:blocks [2024/06/13 08:12] – update parameters needed for onUse s1lverposting
Line 211: Line 211:
     // For versions below 1.20.5, the parameters should be "BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit"     // For versions below 1.20.5, the parameters should be "BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit"
     @Override     @Override
-    public ActionResult onUse(World world, PlayerEntity player, BlockHitResult hit) {+    public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
         if (!world.isClient) {         if (!world.isClient) {
             player.sendMessage(Text.literal("Hello, world!"), false);             player.sendMessage(Text.literal("Hello, world!"), false);
tutorial/blocks.txt · Last modified: 2024/07/04 16:29 by mineblock11