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.

Choccy Biscuit

Members
  • Joined

  • Last visited

Everything posted by Choccy Biscuit

  1. Yes, but it's not modding, it's just modded
  2. Unfortunately, only 1.20 and 1.19 are supported. Update to receive support.
  3. @Carrie PhelpsPlease don't revive old threads with problems like this, instead open a new thread
  4. package net.choccy.darksteel.item.custom; import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResultHolder; import net.minecraft.world.effect.MobEffectInstance; import net.minecraft.world.effect.MobEffects; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; public class DarksteelHornItem extends Item { public DarksteelHornItem(Properties properties) { super(properties); } @Override public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand hand) { if (!level.isClientSide()) { player.addEffect(new MobEffectInstance(MobEffects.DAMAGE_BOOST, 200, 4)); level.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.RAID_HORN, SoundSource.PLAYERS, 1.0F, 1.0F); player.getCooldowns().addCooldown(this, 400); } return super.use(level, player, hand); } } This is the code. The strength and cooldown work, but the sound does not play. Anyone know why?
  5. This is modder support. Repost or move this to support and bug reports.
  6. Like, if the name changes it gets retextured? If so, that's a texture pack thing. No idea how to work with that.
  7. This is modder support. You should post this in regular support.
  8. You should probably do that, since forums only support 1.19 and 1.20 currently.
  9. In 1.19, you can use lerpMotion, not sure what to do for 1.16 entity.lerpMotion(0.5F,0,0); This will apply some velocity on the X axis, and can be changed easily (probably a bit high still). Also, should be player and not entity.
  10. Unfortunately, this version is no longer supported. You will need to update to a newer version to receive support.
  11. Yeah, you did. Try moving this to bug support.
  12. Not entirely sure how 1.16 works (not supported anymore), but do you want to teleport or set velocity?
  13. I can't seem to find the 'libs' folder in build, and can't find the 'external libraries' folder. I am using intelliJ IDEA. I think some other folders may also be missing in build. Any ideas why?
  14. I've changed it to this, but I get the error "'MobEffect(net.minecraft.world.effect.MobEffectCategory, int)' has protected access in 'net.minecraft.world.effect.MobEffect'" It also returns the error on run: "required: MobEffectCategory,int found: no arguments reason: actual and formal argument lists differ in length" public class DarksteelHornItem extends Item { public DarksteelHornItem(Properties properties) { super(properties); } @Override public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand hand) { if(level.isClientSide() == true && hand == InteractionHand.MAIN_HAND) { level.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.RAID_HORN, SoundSource.PLAYERS, 1.0F, 1.0F); if(level.isClientSide() == false && hand == InteractionHand.MAIN_HAND){ player.addEffect(new MobEffectInstance(new MobEffect(),5)); } player.getCooldowns().addCooldown(this,400); } return super.use(level, player, hand); } }
  15. I am trying to add strength to the player on use, along with playing a sound. here's the code: public class DarksteelHornItem extends Item { public DarksteelHornItem(Properties properties) { super(properties); } @Override public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand hand) { if(level.isClientSide() && hand == InteractionHand.MAIN_HAND) { level.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.RAID_HORN, SoundSource.PLAYERS, 1.0F, 1.0F); player.addEffect(new MobEffectInstance(new MobEffect(), 5)); } return super.use(level, player, hand); } }

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.