Boat like entities

Started by GarGan on

Topic category: Help with Minecraft modding (Java Edition)

Active 2 years ago
Joined Apr 2021
Points:
524

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
Boat like entities

So I wanted to create a mob that you could ride, but I thought it would be cool if you could stand on it as if it was a block. You do see this in the boat as you can stand on it. I was wondering if there was any way to achieve this?

Active 1 year ago
Joined May 2018
Points:
867

User statistics:

  • Modifications: 5
  • Forum topics: 13
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 162
first, add this to your…
Thu, 06/10/2021 - 20:19

first, add this to your imports:
import net.minecraft.util.math.AxisAlignedBB;
import javax.annotation.Nullable;

then, add this somewhere in your code (if you're in doubt, add below the registerGoals function):
        @Nullable
        public AxisAlignedBB getCollisionBoundingBox() {
          return this.getBoundingBox();
        }

not mine i just found it on the mctoolkit server

Active 1 month ago
Joined Nov 2020
Points:
966

User statistics:

  • Modifications: 1
  • Forum topics: 57
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 243
can you go more in-depth? i…
Thu, 06/10/2021 - 23:57

can you go more in-depth? i have the same problem and have no idea what imports are...

Active 1 year ago
Joined May 2018
Points:
867

User statistics:

  • Modifications: 5
  • Forum topics: 13
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 162
https://ibb.co/hMPj8fL so go…
Fri, 06/11/2021 - 05:24

https://ibb.co/hMPj8fL

so go into your mobs code and add the code that starts with imports under somewhere in that list (i dont think it matter where)
and then with that bottom part of code add it anywhere else in the mobs code just not in imports

Active 2 years ago
Joined Apr 2021
Points:
524

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
Thanks!
Fri, 06/11/2021 - 13:16

Thanks!

Active 2 years ago
Joined Apr 2021
Points:
524

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
I tried it, But it seems to…
Fri, 06/11/2021 - 18:38

I tried it, But it seems to not affect anything at all. Do you know why this happens?

Active 1 year ago
Joined May 2018
Points:
867

User statistics:

  • Modifications: 5
  • Forum topics: 13
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 162
I tried it too and it didnt…
Sat, 06/12/2021 - 01:53

I tried it too and it didnt work either so I guess its just the wrong code, I dunno I thought it worked

Active 2 years ago
Joined Apr 2021
Points:
524

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
Hmm alright. But thanks for…
Sat, 06/12/2021 - 08:03

Hmm alright. But thanks for trying to help anyway!