How to get lava bottle

Started by AppleMod on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to get lava bottle

How can I make a procedure where if a player right clicks lava they get my custom item a lava bottle? I've been experimenting and my main problem is where to trigger the event from.

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Using "Player right clicks…
Wed, 06/22/2022 - 12:55

Using "Player right clicks with item" global trigger:

1. Check if the player is holding a glass bottle, only proceed with the rest of the method if this is true, else do nothing.
2. Create 3 local number variables, [x], [y], and [z]. Set them to "Look [x/y/z] position of [event entity] with raytrace distance..."
3. Set the raytrace distance to the reach distance of the player (from memory it should be 4?) and set fluid mode to
    SOURCE_ONLY or ANY, depending on whether you want to target only lava sources or lava regardless of slope level.
4. If {Get block at [x], [y], [z] == [Lava Still]} (For SOURCE_ONLY)
    If {Get block at [x], [y], [z] == [Lava]} (For ANY)
    Remove block at [x], [y], [z] (Skip if you dont want to remove the lava)
    Remove 1 glass bottle from the inventory event entity
    Add 1 lava bottle to inventory of event entity

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks, but I'm having…
Wed, 06/22/2022 - 23:04

Thanks, but I'm having trouble. I get that I have to make variables, but what are the names of the blocks at the beginning. This is what I have so far. Please help

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(No subject)
Wed, 06/22/2022 - 23:46

procedure

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Let me know if there are any…
Thu, 06/23/2022 - 00:27

Let me know if there are any issues; this was working for me!

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'll try it as soon as I can…
Wed, 07/06/2022 - 15:39

I'll try it as soon as I can! Thanks

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I started work on it: Sorry,…
Wed, 07/06/2022 - 19:23

I started work on it:

Sorry, how do I actually make the variable?

Where do I find the Set Local block?

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
To create a variable at left…
Wed, 07/06/2022 - 19:59

To create a variable at left of your mcreator app there is a place that says "Variables" just click that and you can create your variables. Here are information about their types and usage - https://mcreator.net/wiki/variables

As for "Set local block" you could probably type it in search bar in procedures or just check every single procedure blocks tbh

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry, what do I do here? …
Thu, 07/07/2022 - 13:54

Sorry, what do I do here? 

Also I've tried searching and looking through every block manually I just can't find it. What am I missing?