Everything posted by OutCraft
-
[1.16.5] Help with drawInBatch
Why closest.getX() and closest.getY()? Just pass in waypoint.getX() and waypoint.getY()
-
[1.16.5] Help with drawInBatch
just renders a "Name tag" in the air. You need it with color, right?
-
Different name for Launch Files generated by gradle
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
-
Get if key pressed for PlayerEntity
Ohh.. Learned something new again
-
Get if key pressed for PlayerEntity
How do you check the vanilla keybind? Just like a custom?
-
[1.16.5] Help with drawInBatch
Hi! net.minecraft.client.renderer.debug.DebugRenderer has a method for rendering text in the air, it's called renderFloatingText
-
Get if key pressed for PlayerEntity
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
-
Get if key pressed for PlayerEntity
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?
-
Convert Entity to Mob
Ok, thanks for your help
-
Convert Entity to Mob
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?
-
Convert Entity to Mob
@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 }
-
Convert Entity to Mob
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
-
Convert Entity to Mob
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();
-
[forge-1.12.2-14.23.5.2858] Broken formatting and error spam on startup
Hi! Is this the full log? If not, post the debug.log
-
Get if key pressed for PlayerEntity
You can get the jump key with Minecraft.getInstance().options.keyJump.getKey()
-
[Solved] [1.17.1] Add Config GUI
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)
-
[1.18] How to register a GUI Screen for the config?
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)
-
"check console" Error message appears when I try to open installer.jar file
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
-
Get if key pressed for PlayerEntity
But you can change the Keybind while the game is running What do you want to do?
-
Minecraft freezes then crashes when trying to join worlds. (forge 1.16.5 36.2.9)
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
-
Minecraft freezes then crashes when trying to join worlds. (forge 1.16.5 36.2.9)
Yes, I think so
-
Minecraft freezes then crashes when trying to join worlds. (forge 1.16.5 36.2.9)
Try deleting the config "forge-server.toml". It will recreate itself and the game shouldn't crash. If it does, post an updated log
-
Get if key pressed for PlayerEntity
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).
-
How do you add a custom hitbox to a block?
For an example look into the slab class (that all the slabs extend)
-
How do you add a custom hitbox to a block?
You need to override the method getShape or getVoxelShape or something like that in your Block class and return your own VoxelShape
IPS spam blocked by CleanTalk.