Jump to content

WatIzDat

Members
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

WatIzDat's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  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.
×
×
  • Create New...

Important Information

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