Jump to content

Greenem

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by Greenem

  1. 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 {
    
      @SubscribeEvent
      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?

  2. 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?

  3. Thanks, but I sill don't understand some details
    I tried your way and created this:

    Player p = Minecraft.getInstance().player;
    Item item = p.getInventory().getSelected().getItem();
    Block b = Block.byItem(item);
    Minecraft.getInstance().getItemRenderer().getModel(item.getDefaultInstance(), p.getLevel(), p, 1).getQuads(b.defaultBlockState(), Direction.NORTH, new Random()).get(0).getSprite()

    But what are the 4th argument in getModel(...) and 3rd argument in getQuads(...)? Am I using all of this in any supposed way? (I just don't know what to put in the arguments) Anyway, this (somehow) gives me the TextureAtlasSprite, but how can I save it to png file?

  4. Why are the lines with no text (completely) are getting highlighted? It happens for me only on Forge. Tested with own mod in it's dev environment, a default mod from mdk, tried "forge version" of a launcher I use and compared to vanilla behavior. Why is this a thing? Or is that something wrong with all of this only on my device?
    unknown.png

×
×
  • Create New...

Important Information

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