How do I make it so an Entity does not move when I push it?

Started by Yisus_2 on

Topic category: Help with MCreator software

Active 3 years ago
Joined Jan 2021
Points:
581

User statistics:

  • Modifications: 0
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
How do I make it so an Entity does not move when I push it?

I am making a rideable rocket entity, but when I push it slightly it moves a lot and does not feel like an actual rocket. Is there any form to make it solid and stable? I dont want the entity to move if it collides with a player.

Active 2 years ago
Joined Mar 2021
Points:
637

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 190
just make it stay in place…
Sun, 03/28/2021 - 16:45

just make it stay in place or swap it for a no ai version that can't move and then on lift of change it to an entity with ai. you could also turn on and of colision

Active 1 year ago
Joined Aug 2021
Points:
497

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 29
I had to do the same in my…
Thu, 08/19/2021 - 17:27

I had to do the same in my mod and 'Disable collision box' doesn't seem to work as supposed so I had to edit the code and add these lines:

	@Override
	protected void collideWithEntity(Entity p_82167_1_) {
	}

	@Override
	public void applyEntityCollision(Entity entityIn) {
	}

You can add them between the other @Override ones by selecting your Entity and clicking here: https://imgur.com/IGrQPmK
Then you just have to find a spot for those lines and place them there like in this example: https://imgur.com/Q2AXIM7
But I warn you, every change you make in the Entity using the MCreator menu will reset the entire code, so you will need to paste it again after that.

Hope it helps!