Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Is it possible to get all loaded entities in the registry (from all other mods) at runtime, to then be able to spawn in said entity within my mod? I feel it might be possible now, with how structured the registry events are in 1.14.

I am also trying to generate new entities at runtime based on this by using a builder pattern of sorts.

  • Author

I've been doing some research. What are your thoughts on this method?

	@SubscribeEvent
	public static void onRegisterEntities(final RegistryEvent.Register<EntityType<?>> event)
	{
		DeferredWorkQueue.runLater(() -> {
			entityBuilder(event);
		});
	}

	private static void entityBuilder(final RegistryEvent.Register<EntityType<?>> event)
	{
		ArrayList<EntityType<?>> all_entities;
		all_entities = (ArrayList<EntityType<?>>) event.getRegistry().getValues();

		Main.LOGGER.debug("ALL LOADED ENTITIES:");
		all_entities.forEach(p -> Main.LOGGER.debug(p));
	}

 

And will I be able to register new entities under new IDs using the methods within EntityType and ForgeRegistries.ENTITIES? (If I don't go with this method ^)

Edited by MSpace-Dev

  • Author

I want to expand my mod's features lots in 1.14.4. I want users to be able to specify mobIDs from other mods in JSON to initialise a new item, block and entity for the specified id. To do this, I need to be able to dynamically create these objects.

 

It would be perfect for my mod. You will be able to see that at a quick glance I think:

https://www.curseforge.com/minecraft/mc-mods/monster-totems

 

  • MSpace-Dev changed the title to [1.14.4] Dynamic block/entity/item etc based on other mods
  • Author

Ah, thanks. I will look into it further tomorrow morning. I have to head off to sleep, but hope I can get something working. Forge 1.14 is a rather large step in the right direction from what I've seen so far!

Edited by MSpace-Dev

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.