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

Updating project to 1.19 (from 1.18.2)


Recommended Posts

Hello, I'm updating my mod to 1.19 and, as usual, there are a lot of changes I can't understand it all myself. (Is there like a list of all renamed classes and other changed stuff? The forge 1.19 changelog didn't help)

I'm having issues with this:
- RenderGameOverlayEvent.Text, I used it before for changing f3 screen (with those useful ".getLeft()" and ".getRight()") and now I can't find the replacement
- TextComponent(String s), which was used in player#displayClientMessage(...)

Can someone help me?

Link to comment
Share on other sites

3 minutes ago, Greenem said:

RenderGameOverlayEvent.Text, I used it before for changing f3 screen (with those useful ".getLeft()" and ".getRight()") and now I can't find the replacement


3 minutes ago, Greenem said:

TextComponent(String s), which was used in player#displayClientMessage(...)

Use the static factory methods in Component.

Link to comment
Share on other sites

Thank you so much! I hope it all will work now

And one more question (forgot to ask before): what is the replacement for that class?


(for .registerKeyBinding(key))

Link to comment
Share on other sites

I have tried it, but it just doesn't call the method

@Mod.EventBusSubscriber(modid = LessF3.MODID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT)
public class TheEvents {

  public static void registerKeys(RegisterKeyMappingsEvent e) {
      System.out.println("registering keys"); // to debug this
      // registring


Other events in that class work (can be checked with sout), but this doesn't fire at all. What am I doing wrong?

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 also use hd graphics 3000 apparently Minecraft fully supports only 4000 and above 🥲 All you need to do is right click on the project folder(if you’re using the eclipse ide) select the build path option in the context menu click on the java build path on the left hand side of the screen go to the top of the screen and select the libraries tab scroll down through all your dependencies and click on jre system library select edit on the right hand side  and click on “use workspace jre which should be jre_1.80_51”   select apply and close the. Run the client again should fix your problem 
    • @Mod.EventBusSubscriber(modid = MOD_ID, value = Dist.CLIENT) public class ClientEvents { @SubscribeEvent public static void camera(ViewportEvent.ComputeCameraAngles event) { event.setRoll(180f); } }  
    • @SubscribeEvent public static void onRenderTick(TickEvent.RenderTickEvent event) { Player player = Minecraft.getInstance().player; if (player != null) { Vec2 rotation = new Vec2(player.getXRot(), player.getYRot()); Vec2 addition = Vec2Rot(new Vec3(0, 0, 0.01)); player.setXRot(rotation.x + addition.x); player.setYRot(rotation.y + addition.y); } } So i was thinking that minecraft camera rotation is kinda boring so i try to make it rotate on z-axis (like how it did when the player get damage), i soonly writing codes to test it and the x, y works fine but when i try to set the z rotation, there is no setZRot method. I went to find class like Renderers, Camera, etc in the sources but still can't find how to do it. Does anyone know how to do it, or is this not possible?
    • Hello, I have a block entity that is using entity.teleportTo(x, y, z); to teleport an entity(Armor Stand in this case) into a chunk that's being kept loaded with ForgeChunkManager.forceChunk(level.getServer().getLevel(Level.OVERWORLD), StargateJourney.MODID, getBlockPos(), level.getChunk(getBlockPos()).getPos().x, level.getChunk(getBlockPos()).getPos().z, true, true); It works well, however, when I teleport the player alongside the entity, the entity doesn't load. It's still there, because if the player leaves to unload the chunk and then returns, the entity appears where it should. I've tried fixing it by not forceloading the chunk and the entity loads without problems, but I actually need to have the chunk loaded, because I have a block entity in said chunk, that is ticking(essentially, it's the second end of a teleporter mechanism). Is there a workaround to load the entity manually or even better, have it never unload in the first place?
    • Apologies, but as this is written with MCreator, we do not support it on this forum. Please ask their support forums for help.
  • Topics

  • Create New...

Important Information

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