Programming Minecraft plugins. Define entity?

ne
- in Plugins
3

I'm currently working on packets. However, I need an Entity (no EntityType) for a certain packet. How do I define one?

So:

Entity t =?

What's in place of that? There?

Al

What do you want to do exactly? You are not sending an entity object in a package, but an entity ID.

ne

If you are in the Spectate and right click on a creeper, you get the view of a creeper. A creeper's view is green, and I intend to bet that on a player that a player can move freely, but has the green view. Then I came across the PacketPlayOutCamera package. However, you have to specify an entity.

Do you know another method to get this green view?

Al

With the package you set the player's view of an entity. The green one is a shader that is set by the client if the entity is a creeper.

You can put the player in creative mode, then spawn a creeper in the same place, and let the player take over the security of the creeper with the package. However, the player then no longer has any player characteristics.

A shader can also be packed into a resource pack. However, I don't think it will be activated automatically when you change the ResourcePack. You can try to find out more.