[Feature] Add options in .tesf file for persistent MOBs
radqnico opened this issue ยท 3 comments
Pre-Request Checklist
- [x ] I have checked that I am on the latest version of Terra.
- [x ] I have searched github for similar features requests, including closed ones, and found none.
- [x ] I believe this is within the scope of Terra.
- [x ] This feature request is for all of Terra, and isn't something that should be implemented by a pack or addon.
Feature Description
In .tesf files there are the
entity(-18, y + 9, -25, "ELDER_GUARDIAN");
lines.
It should be possible to add an option like
entity(-18, y + 9, -25, "ELDER_GUARDIAN", persistent);
to make the mob spawn with setPersistent(true) option.
What Problem Does This Solve?
Guardians despawning, pillager despawning, mob despawning in general.
A Solution You'd Like
Just check in the TESF file parser if hte persistent keywork is present, and if it is, set myEntity.setPersistent(true);
Alternative Solutions
No alternative.
Additonal Context
--
#111 sort of, this issue as a whole is simply invalid, because spawned mobs are already persistent.
Duplicates/Invalid issues will be closed without explanation if it's obvious why they're being closed.
Spawned mobs are not persistent if you don't manually set setPersistent(true)
, exception made for Elder Guardians and other bosses.
I fixed it myself with literraly one line of code in the BukkitWorld.java
file in the spawnEntity(...)
method:
bukkitEntity.getHandle().setPersistent(true);
(after saving the new entity in a variable of course)