Posted October 13, 20213 yr Thanks to this forum, I succeeded to summon my own entity. Now I want to control it by command, but can not access to it. MyEntity.java has a property, ‘isFlying’ like this: public class MyEntity extends Animal { public boolean isFlying = false; … } And I want to change the flag by command like these, of course failed (showed no error message): data merge entity @e[type=mymod:myentity, limit=1, name="myentity"] {isFlying: 1b} data merge entity @e[type=mymod:myentity, limit=1, name="myentity"] {Attributes: [{Name:"generic.isFlying", Base:1b}]} Any good way to change the flag of the entity object? Thanks in advance.
October 14, 20213 yr Author Thank you for your reply! At first, the property changed only in server side, so I used SynchedEntityData, then it worked!!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.