Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[Contributing 1.14.x] [Solved] How to use test mods when building using eclipse?


Recommended Posts

I've gotten so far as to fork the repository, run the `setup` and `eclipse` tasks, and import the project into Eclipse (and I can run it). I've made my contribution, but I can't seem to figure out how to test it. The tutorial on the docs websites does not include anything for setting up the test mods on Eclipse, only IntelliJ. Does anyone know how to do it?

Sorry if this is the wrong forum for this, I didn't know of any other spots.

Edited by FireController1847

I am on my journey of making a remake of matmos, as explained here.

Link to comment
Share on other sites

For anyone looking at this in future reference, I figured it out. There's a Gradle task that you need to run that will generate all of the test files that are needed to, well, test. This is not stated in the documentation. Once you've done that you can find example test mods in the "test-java" source package.

I am on my journey of making a remake of matmos, as explained here.

Link to comment
Share on other sites

  • 1 month later...

And the gradle task you need to run is... what exactly? I have this same problem. The Contributing to Forge docs for 1.13.x described a very different environment to the one I cloned. I was able to get as far as being able to make changes, run forge, and see those changes by a process of experimentation.


As of this writing I am unable to enable the test mods or run my own mods to test my changes. (I need a buddy)

Edited by Zeigfreid
Link to comment
Share on other sites

The test mods are included in the workspace already, you just have to create a new one (in src/test/java/net/minecraftforge/debug/) and add it to the mods.toml (src/test/resources/META-INF/).

See the files changed:


Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.


Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.


DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

The real answer is: use Eclipse!


1.14 forge development setup guide for Eclipse (OSX):


git clone https://github.com/<User>/MinecraftForge Forge
cd Forge
./gradlew setup eclipse forge:genEclipseRuns


open Eclipse


File -> Import -> General -> Existing Projects into workspace


Run and Done!

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • i found it guys
    • So i just bought a RLcraft server for me and my friends to play on. I launched it and it is working fine but it tells me that i need to download all the mods i go to mods and press "minecraft forge" and nothing shows up that i can open files. If anyone have a suggestion i would need the help. This is the server hosting i  used 
    • i did it in 1.12.2 not walking for me can anyone help me get it pls???  
    • Got the rotation working. I had to look at LivingEntityRenderer#render and setupRotations a little more closely, and I realized that I needed to change the custom entity's yBodyRot and yBodyRotO.  private static boolean renderingCustomEntity = false; private static CustomEntity customEntity; private static void refreshCustomEntity(LocalPlayer localPlayer, LivingEntity livingEntity) { if (customEntity == null || customEntity.isRemoved()) { customEntity = ModEntities.CUSTOM_ENTITY.get().create(localPlayer.clientLevel); } if (!customEntity.level.dimension().equals(livingEntity.level.dimension())) { customEntity.discard(); } } @SubscribeEvent public static void replaceMobModel(RenderLivingEvent.Pre<LivingEntity, EntityModel<LivingEntity>> event) { LocalPlayer localPlayer = Minecraft.getInstance().player; if (localPlayer != null && event.getEntity() instanceof Mob mob) { if (/* put your own condition here */) { if (!renderingCustomEntity) { try { renderingCustomEntity = true; event.setCanceled(true); refreshCustomEntity(localPlayer, mob); // (truth be told, my custom entity does not have a "head", so these lines aren't needed) // customEntity.setYHeadRot(mob.getYHeadRot()); // customEntity.yHeadRotO = mob.yHeadRotO; customEntity.setYBodyRot(mob.yBodyRot); customEntity.yBodyRotO = mob.yBodyRotO; customEntity.setPose(mob.getPose()); Minecraft.getInstance().getEntityRenderDispatcher().getRenderer(customEntity).render( customEntity, customEntity.yBodyRot, event.getPartialTick(), event.getPoseStack(), event.getMultiBufferSource(), event.getPackedLight() ); } finally { renderingCustomEntity = false; } } } } }   As shown in my code, if the mob whose model is replaced moves to a different dimension, I unload the custom entity with Entity#discard and then reinitialize it on the next tick. I wonder if I also have to unload the custom entity when the mob it is "replacing" dies.
  • Topics

  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.