-
Recently Browsing
- No registered users viewing this page.
-
Posts
-
Hello, I am trying to replace every rendered mob's model (not the mob itself) with the model of a custom entity, under certain conditions. I was looking at this forum (https://forums.minecraftforge.net/topic/75986-114-how-to-change-rendered-entity/) and found out that I need to use EntityRenderManager::renderEntity. But since that is from a previous version, I assume it would be EntityRenderDispatcher::render. Here's what I tried to do so far: @SubscribeEvent public static void replaceMobModel(RenderLivingEvent.Pre<LivingEntity, EntityModel<LivingEntity>> event) { LocalPlayer localPlayer = Minecraft.getInstance().player; if (localPlayer != null && event.getEntity() instanceof Mob mob) { // I would set up the conditions later once I get this working event.setCanceled(true); CustomEntity customEntity = ModEntities.CUSTOM_ENTITY.get().create(localPlayer.clientLevel); if (customEntity != null) { customEntity.setXRot(mob.getXRot()); customEntity.setYRot(mob.getYRot()); Minecraft.getInstance().getEntityRenderDispatcher().render( customEntity, mob.getX(), mob.getY(), mob.getZ(), mob.getViewYRot(event.getPartialTick()), event.getPartialTick(), event.getPoseStack(), event.getMultiBufferSource(), event.getPackedLight() ); } } } This results in a stack overflow (EntityRenderDispatcher::render seems to cause RenderLivingEvent to fire, causing an infinite recursion). Is this even the right thing to do? Or do I have to go to my CustomEntity renderer class and override render()? If that's the case, I don't know what I should put in that method.
-
By 31293812saWw1 · Posted
Above is the output I got when I tried to run run.bat -
By 31293812saWw1 · Posted
C:\Users\user\Desktop\ModdedPlay>REM Forge requires a configured set of both JVM and program arguments. C:\Users\user\Desktop\ModdedPlay>REM Add custom JVM arguments to the user_jvm_args.txt C:\Users\user\Desktop\ModdedPlay>REM Add custom program arguments {such as nogui} to this file in the next line before the or C:\Users\user\Desktop\ModdedPlay>REM pass them to this script directly C:\Users\user\Desktop\ModdedPlay>java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.18.2-40.1.21/win_args.txt Error: Could not find or load main class @user_jvm_args.txt C:\Users\user\Desktop\ModdedPlay>pause Press any key to continue . . . -
By LuccaPossamai · Posted
I want to make the item decrease its durability when it is used. I mean, "hurt" the item when the player tries to use it seems like the better option. I've tried to call it when inside the elytraFlightTick method and cancel the flight later, the item durability reduces, but the player keep starting the boring flight animation. Sorry if i wrote a little weird, i'm not very good at english. -
By diesieben07 · Posted
Your version of Xaero's Minimap is not compatible with 1.18.2.
-
-
Topics
-
Who's Online (See full list)
Recommended Posts
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.