Boat like entities

Started by GarGan on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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?

Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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

Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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...

Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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

Joined Apr 2021
Points:

User statistics:

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

Thanks!

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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?

Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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

Joined Apr 2021
Points:

User statistics:

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

Hmm alright. But thanks for trying to help anyway!