Home›Java›Mods›EntityRegistrer | from 1.6.x to 1.11.x
EntityRegistrer | from 1.6.x to 1.11.x
ModsJava

EntityRegistrer | from 1.6.x to 1.11.x

Java mod listed for Minecraft 1.7–1.11. Downloads from the MC Java Mods app on Android.

⬇ Download on Spigot
[​IMG] Donations will help me to keep up the work. It's a way for you to support me, and saying me thanks ;)

WARNING FOR 1.11 USERS: The 1.11 support is not fully optimized, and does not yet support the /reload command. YOU WILL NOT GET ANY SUPPORT WHEN USING /reload


What is EntityRegistrer?

EntityRegistrer is an API I wrote while having issues with custom entities overriding vanilla ones on server restart / chunk reload.
It allows you to register custom insentient entities, as non-insentient ones does not need to be registered and can instantly be spawned, like ArmorStand or EnderCrystal, without having any weird NMS behaviour aside.



How are you bypassing these issues?

After some attempts, I found out that you do not need to register the entity in the BiomeBase lists. Doing this will cause overriding issues that you probably don't want to have.

However, without registering them in these lists, when the chunk is reloaded or server restarted, the entity will just disappear.

So here is how this API works:


  1. When a chunk is unloaded, check for any custom entity in it, and save its NBT in the plugin folder, then remove it.
  2. When a chunk is loaded, check if its folder exists in the plugin folder. If yes, respawn every custom entity saved as files in the chunk folder.
  3. When a custom entity is registered, add it in the EntityTypes lists, then check every saved entity file of the loaded chunks of every world. If it is a file of an instance of this entity, spawn it.
  4. When a custom entity is unregistered, save all instance of it and remove them from all the worlds.
By doing so, custom entities will only be spawned if they are registered. If they are not, they are saved as files in the plugin folder, and will be respawned if registered again.

This way, if you fail and start the server without the plugin, load chunks where some custom entities should be, then close it, put the plugin back and restart, your custom entities will still be there.
.



Is there any documentation?

There is no proper documentation as of today, however I managed to provide a temp one right here, into spoilers. There is an internal javadoc to tell you what does this method and what are the params, I'm gonna host it somewhere soon.
But that's better than nothing, I guess.

Spoiler: Provided methods
EntityRegistrer#register (String name, int id, EntityType type, Class<?> nmsClass, Class<?> customClass)

EntityRegistrer#register (String name, EntityAppearence appearence, EntityType type, Class<?> nmsClass, Class<?> customClass)

EntityRegistrer#unsafeRegister
(String name, int id, EntityType type, Class<?> nmsClass, Class<?> customClass)

EntityRegistrer#unsafeRegister
(String name, EntityAppearence appearence, EntityType type, Class<?> nmsClass, Class<?> customClass)

EntityRegistrer#unregister (String name)

Spoiler: NMS Methods documentation
Coming soon, still empty yet

Spoiler: v1_11_R1
public void A_();
Method called every tick.

Spoiler: v1_10_R1
public void m();
Method called every tick.

Spoiler: v1_9_R2
public void m();
Method called every tick.

Spoiler: v1_9_R1
public void m();
Method called every tick.

Spoiler: v1_8_R3
public void t_();
Method called every tick.

Spoiler: v1_8_R2
public void t_();
Method called every tick.

Spoiler: v1_8_R1
public void s_();
Method called every tick.

Spoiler: v1_7_R4
public void h();
Method called every tick.

Spoiler: v1_7_R3
public void h();
Method called every tick.

Spoiler: v1_7_R2
public void h();
Method called every tick.

Spoiler: v1_7_R1
public void h();
Method called every tick.

Spoiler: v1_6_R3
public void l_();
Method called every tick.

Spoiler: v1_6_R2
public void l_();
Method called every tick.

Spoiler: v1_6_R1
public void l_();
Method called every tick.




[​IMG] Donator wall

  1. Nobody yet

Wanna make a donation? You can write down your username when making it, and your server IP if you wish to, or website URL.



You can access the source code of this API, as well as look at an example of its usage, on the GitHub repo:

[​IMG] ​

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

EntityRegistrer | from 1.6.x to 1.11.x is a free Minecraft Java mod. Compatible with Minecraft 1.7, 1.8, 1.9, 1.10 and newer. Downloaded 221 times (via Spigot). Download it and open it directly in the game.

Explore more