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.

WatIzDat

Members
  • Joined

  • Last visited

  1. what im not understanding is how to put what you are saying into code.
  2. so basically i made an event that checks if the player is crouching. If you are crouching, you get 2 potion effects. This worked, but when i released shift the potion effects still appeared on my gui, though the effects weren't doing anything. How do i fix this? package com.watizdat.mysterymod.events; import com.watizdat.mysterymod.MysteryMod; import net.minecraft.entity.LivingEntity; import net.minecraft.potion.EffectInstance; import net.minecraft.potion.Effects; import net.minecraftforge.client.event.InputUpdateEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus; @Mod.EventBusSubscriber(modid = MysteryMod.MOD_ID, bus = Bus.FORGE) public class PlayerSneakEvent { @SubscribeEvent public static void playerSneakEvent(InputUpdateEvent event){ if(event.getMovementInput().sneaking) { System.out.println("hello"); LivingEntity livingEntity = event.getEntityLiving(); livingEntity.addPotionEffect(new EffectInstance(Effects.STRENGTH, 20, 2)); livingEntity.addPotionEffect(new EffectInstance(Effects.SLOWNESS, 20, 2)); } } }
  3. can you help me with code? as i said, i'm new to modding, sry
  4. hello, a new modder here. So i've been in the process of making my first mod, when i hit a block. I can't figure out how to detect what a player is holding in their hand. I'm trying to make it so that when the player crouches and they are holding a sword in their hand they get strength and slowness. I've already tried to find an answer by looking it up on google, no luck.

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.