Mcreator 2021 Tame Code

Started by gustavowizard123 on

Topic category: Help with modding (Java Edition)

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mcreator 2021 Tame Code

so im trying to make my mobs to Sit, i got the animations and goal right, but on the Tame code Mcreator 2021 generates below, i dont know where to add the command to actually make the mob Sit (engage the sitting animation), i tried like on 1.15 (worked), on the line marked // <--

 

} else {
				if (this.isTamed()) {
					if (this.isOwner(sourceentity)) {
						if (item.isFood() && this.isBreedingItem(itemstack) && this.getHealth() < this.getMaxHealth()) {
							this.consumeItemFromStack(sourceentity, itemstack);
							this.heal((float) item.getFood().getHealing());
							retval = ActionResultType.func_233537_a_(this.world.isRemote());
						} else if (this.isBreedingItem(itemstack) && this.getHealth() < this.getMaxHealth()) {
							this.consumeItemFromStack(sourceentity, itemstack);
							this.heal(4);
							retval = ActionResultType.func_233537_a_(this.world.isRemote());
						} else {
							retval = super.func_230254_b_(sourceentity, hand);
							//this.sitGoal.setSitting(!this.isSitting()); // is it here?
						}
					}

 

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ouch i insert the code but…
Sat, 05/01/2021 - 23:26

ouch i insert the code but it came out so bad :(

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
what i need here is the code…
Sat, 05/01/2021 - 23:27

what i need here is the code line to activate the SitGoal