Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

goldenfire64

Members
  • Joined

  • Last visited

  1. I was trying to lock the player rotation. The zeros in the code were just placeholders, as I intended to freeze the yaw and pitch of the player.
  2. I tried changing the camera rotation with this player.rotationYaw = 0; player.prevRotationYaw = 0; but when I moved my mouse, the camera rotation changed but next frame it snapped back to 0. I know that at the start of the frame the rotation is being set to zero in my code and later in it it's being changed based on my mouse movements. If there's a fix for this that'd be great. I won't be able to respond for a couple hours.
  3. Thanks! I used that and it worked.
  4. I was trying to make a mod that cancels any chat that starts with ",chatmod", but when I tried event.setCanceled(true), my client didn't show the message but the clients of other players did show the message. Here's a snippet of my code: @SubscribeEvent public void onChat(ClientChatReceivedEvent event) { String message = event.getMessage().getUnformattedText(); print(message+" (printed)"); if (message.split(" ")[0].contentEquals(",chatmod")) { print("CHATMOD COMMAND"); print("TYPE: "+message.split(" ")[2]); event.setCanceled(true); } } Also, here's the print function I made: void print(String toP) { Minecraft.getMinecraft().player.sendMessage(new TextComponentString(toP)); }; What event could be canceled so that the message wouldn't be sent in the first place?
  5. I downloaded it and ran gradlew build. It worked! Thanks so much!
  6. If this helps, I ran it with --stacktrace:
  7. I tried that, and there was an error: In all the websites that I check, 11.0.1 works for them.
  8. When I try to compile a simple mod that I have, every single one of the mods supposedly doesn't exist. Here's the code: package cMod; import net.minecraft.client.Minecraft; import net.minecraft.init.Blocks; import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import org.apache.logging.log4j.Logger; @Mod(modid = ExampleMod.MODID, name = ExampleMod.NAME, version = ExampleMod.VERSION) public class ExampleMod { public static final String MODID = "examplemod"; public static final String NAME = "Example Mod"; public static final String VERSION = "1.0"; private static Logger logger; @EventHandler public void preInit(FMLPreInitializationEvent event) { logger = event.getModLog(); } @EventHandler public void init(FMLInitializationEvent event) { FMLCommonHandler.instance().bus().register(this); MinecraftForge.EVENT_BUS.register(this); } @SubscribeEvent public void onChat(ClientChatReceivedEvent event) { String message = event.getMessage().getUnformattedText(); if(message.contains("hi")) { Minecraft.getMinecraft().toggleFullscreen(); } } } And here's the error:

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.