Jump to content

OutCraft

Members
  • Posts

    190
  • Joined

  • Last visited

Everything posted by OutCraft

  1. Why closest.getX() and closest.getY()? Just pass in waypoint.getX() and waypoint.getY()
  2. just renders a "Name tag" in the air. You need it with color, right?
  3. Click on the arrow pointing down next to the launch or debug button. Then click on "Debug configurations", find the configuration for your project and change the name in the text field at the top of the config
  4. Ohh.. Learned something new again
  5. How do you check the vanilla keybind? Just like a custom?
  6. Hi! net.minecraft.client.renderer.debug.DebugRenderer has a method for rendering text in the air, it's called renderFloatingText
  7. I would make a ClientTickEvent in my EventBusSubscriber and change the key to the jump key there. The keybind has a method for changing the key, pass in
  8. The keybind has a method for this, doesn't it? Edit: Are you trying to modify the default value or change it back to space on change through player?
  9. Ok, thanks for your help
  10. Ahh, this makes sense! Can I get the goals with a clientside mod or do I need the mod on the Server and transfer packets?
  11. @SubscribeEvent public void showGoal(RenderNameplateEvent event) { Entity entity = event.getEntity(); System.out.println(entity + ": " + "Hi!"); <- This triggers for all entities ((Mob) entity).goalSelector.getRunningGoals().forEach(goal -> { System.out.println(entity + ": " + "Hi!"); <- This never triggers event.setContent(new TextComponent(goal.getGoal().getClass().getName())); }); System.out.println(((Mob) entity).goalSelector.getRunningGoals().toArray().length); <- This gives length 0 }
  12. The problem is that it gives me the living entity as Entity. I can cast it to Mob (I know Java, I know how to cast), but then I also can't get the goals because the Entity that I get doesn't have goals. Goals are only registered on Mobs and Entities that extend Mob
  13. Hi! I want to make a debug mod. One feature of it is to show the active goals over all living entities. So I made some code in my EventHandler: @SubscribeEvent public void showGoal(RenderNameplateEvent event) { if (event.getEntity instanceof ItemEntity || event.getEntity instanceof Player) return; if (((Mob) event.getEntity())goalSelector.getRunningGoals().toArray().length <= 0) return; ((Mob) event.getEntity()).goalSelector.getRunningGoals().forEach(goal -> { //Set the name to the goal that I want }); } The problem is, that event.getEntity() returns an Entity, but for getting the goals of the entity I need a Mob (no, there isn't an event.getEntityLiving()). How would I get the entity as a Mob? Ps: I can get the world of the entity with event.getEntity().getCommandSenderWorld();
  14. Hi! Is this the full log? If not, post the debug.log
  15. You can get the jump key with Minecraft.getInstance().options.keyJump.getKey()
  16. I solved it: ModLoadingContext.get().registerExtensionPoint(ConfigGuiHandler.ConfigGuiFactory.class, () -> new ConfigGuiHandler.ConfigGuiFactory(new BiFunction<Minecraft, Screen, Screen>() { @Override public Screen apply(Minecraft mc, Screen screen) { return new MyConfigGuiScreen(); } })); (Sorry for all that needed this, I forgot to post the answer)
  17. Hi! I needed to make the same thing and got it to work with this: ModLoadingContext.get().registerExtensionPoint(ConfigGuiHandler.ConfigGuiFactory.class, () -> new ConfigGuiHandler.ConfigGuiFactory(new BiFunction<Minecraft, Screen, Screen>() { @Override public Screen apply(Minecraft mc, Screen screen) { return new MyConfigGuiScreen(); })); (I don't know if this is the intended way of doing it, but for me it worked like this)
  18. Open command prompt and type cd C:/Users/*yourusername*/Desktop then type java -jar "forge-1.18-38.0.15-installer 2.jar" These commands are for Windows, but should also work on Mac It will print the error
  19. But you can change the Keybind while the game is running What do you want to do?
  20. If you want to know why, look if something is weird inside it. But most time it's just a forgotten " or an extra letter somewhere
  21. Try deleting the config "forge-server.toml". It will recreate itself and the game shouldn't crash. If it does, post an updated log
  22. You can make a Keybind for this. This isn't very hard. The problem is that the player can change the key for triggering the Keybind. I wouldn't make a keybind, I just wouldn't change the y value of the player motion vector (set it to playerMotionVector.y).
  23. For an example look into the slab class (that all the slabs extend)
  24. You need to override the method getShape or getVoxelShape or something like that in your Block class and return your own VoxelShape
×
×
  • Create New...

Important Information

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