#NMS Entity Disappearing
1 messages · Page 1 of 1 (latest)
code?
what part
anything related to nms
ok
public class CustomSilverfish extends EntitySilverfish {
public CustomSilverfish(World world) {
super(world);
}
public CustomSilverfish(Location loc) {
super(((CraftWorld)loc.getWorld()).getHandle());
this.setPosition(loc.getX(), loc.getY(), loc.getZ());
this.persistent = true;
}
}
```My entity
thats it?
https://www.toptal.com/developers/hastebin/ikigotuyel.java My entity enum
No I have more
public void spawnSilverfish(Location l, Team ownerTeam) {
EntityTypes.spawnEntity(new CustomSilverfish(l), l);
}
That's it
Any ideas?
I thought that enum was registering it
If it doesn't, then how do I register it?
(I assume it doesn't)
I did
ok
so
there are some errors
hang on I'll send them
well snip & sketch has stopped working
oh I cant send screenshots here
that's the problem
all those errors are because of private access stuff
i dont think "d" method returns a map
oh
well they're all because of private access stuff so lets handle that in a moment
how can I fix it
Also: https://ibb.co/2ZzzVf0
which class is that
im not using this now, I moved to the one from https://www.spigotmc.org/threads/nms-tutorials-2-custom-nms-entities-1-11.205192/
all right, still need to call registerEntities() method in your onEnable
ok, but what about the private access errors?
what errors
.
gtg to bed, I'll be back in around 14 hours
ah use the CustomEntities enum with useless reflection in section 2 if you dont have direct access
I don't need reflection but OK
well you are saying i dont have access, so how do you think to access those methods
no idea
with reflection of course lol
gonna stay for a couple mins to see if you reply tonight :)
no sorry
@raw sandal I made a spigot forums post if you want to look
https://www.spigotmc.org/threads/custom-entity-he.532159/