-
Posts
16 -
Joined
-
Last visited
Everything posted by Choccy Biscuit
-
[1.19.2]How to change texture of a item when it is renamed
Choccy Biscuit replied to Leroidesafk's topic in Modder Support
Yes, but it's not modding, it's just modded -
Generating Blocks Around Lava Pool
Choccy Biscuit replied to Muryko_Casaril's topic in Modder Support
Unfortunately, only 1.20 and 1.19 are supported. Update to receive support. -
@Carrie PhelpsPlease don't revive old threads with problems like this, instead open a new thread
-
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?
-
This is modder support. Repost or move this to support and bug reports.
-
[1.19.2]How to change texture of a item when it is renamed
Choccy Biscuit replied to Leroidesafk's topic in Modder Support
Like, if the name changes it gets retextured? If so, that's a texture pack thing. No idea how to work with that. -
This is modder support. You should post this in regular support.
-
How to make the player move to the left and right
Choccy Biscuit replied to tlro's topic in Support & Bug Reports
You should probably do that, since forums only support 1.19 and 1.20 currently. -
How to make the player move to the left and right
Choccy Biscuit replied to tlro's topic in Support & Bug Reports
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. -
[1.16.5 JEI Plugin] Recipe that matches only one subtype.
Choccy Biscuit replied to Clan328's topic in Modder Support
Unfortunately, this version is no longer supported. You will need to update to a newer version to receive support. -
Yeah, you did. Try moving this to bug support.
-
How to make the player move to the left and right
Choccy Biscuit replied to tlro's topic in Support & Bug Reports
Not entirely sure how 1.16 works (not supported anymore), but do you want to teleport or set velocity? -
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?
-
1.19.1 - how do I add an effect to the player?
Choccy Biscuit replied to Choccy Biscuit's topic in Modder Support
nevermind, fixed -
1.19.1 - how do I add an effect to the player?
Choccy Biscuit replied to Choccy Biscuit's topic in Modder Support
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); } } -
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); } }