-
Armor Constructor Error
That automatically adds when i implement IArmorMaterial, but ok.
-
Armor Constructor Error
I'm trying to make an armor set... i saw other modders go through this perfectly w/o errors, but i do. public enum ModArmorMaterial implements IArmorMaterial { ; // ruby_layer_1 ruby_layer_2 // this constructor \/ is the error WOOD(Main.MOD_ID + ":wood", 5, new int[] { 1, 1, 1, 1 }, 6, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC, 0.3f, () -> { return Ingredient.fromItems(Items.OAK_WOOD, Items.ACACIA_WOOD, Items.SPRUCE_WOOD, Items.BIRCH_WOOD, Items.DARK_OAK_WOOD); }); private static final int[] MAX_DAMAGE_ARRAY = new int[] { 13, 16, 15, 11 }; private final String name; private final int maxDamageFactor; private final int[] damageReductionAmountArray; private final int enchantability; private final SoundEvent soundEvent; private final float toughness; private final Supplier<Ingredient> repairMaterial; ModArmorMaterial(String name, int maxDamageFactor, int[] damageReductionAmountArray, int enchantability, SoundEvent soundEvent, float toughness, Supplier<Ingredient> repairMaterial) { this.name = name; this.maxDamageFactor = maxDamageFactor; this.damageReductionAmountArray = damageReductionAmountArray; this.enchantability = enchantability; this.soundEvent = soundEvent; this.toughness = toughness; this.repairMaterial = repairMaterial; } @Override public int getDurability(EquipmentSlotType slotIn) { // TODO Auto-generated method stub return MAX_DAMAGE_ARRAY[slotIn.getIndex()] + this.maxDamageFactor; } @Override public int getDamageReductionAmount(EquipmentSlotType slotIn) { // TODO Auto-generated method stub return this.damageReductionAmountArray[slotIn.getIndex()]; } @Override public int getEnchantability() { // TODO Auto-generated method stub return this.enchantability; } @Override public SoundEvent getSoundEvent() { // TODO Auto-generated method stub return this.soundEvent; } @Override public Ingredient getRepairMaterial() { // TODO Auto-generated method stub return this.repairMaterial.get(); } @OnlyIn(Dist.CLIENT) @Override public String getName() { // TODO Auto-generated method stub return this.name; } @Override public float getToughness() { // TODO Auto-generated method stub return this.toughness; } @Override public float func_230304_f_() { // TODO Auto-generated method stub return 0; } } I don't know what to do. Am i forgetting something? Suggestion fixes suggest me to either add void modifier or change to constructor.
-
Invulnerability Effect help
That errors too for some reason, saying that EffectInstance is undefined. I'm not on my PC right now.
-
Invulnerability Effect help
It says i should change my effect registry to Effect. You told me to register it as a Potion, right? I registered the items as then i put it in my item : But it errors and says that i should change the effect type to Effect
-
Invulnerability Effect help
I'm not in my PC right now, so I'll try it later.
-
Invulnerability Effect help
Yes, it does work but that's not what i want.
-
Invulnerability Effect help
It just adds the food that gives the effect separately one by one. Main question is, how to make a custom single effect(such as absorption, regeneration) that reduces the damage received on the user, regenerates the user, and makes the player fireproof. In other words, a mix of all those effects(regeneration, resistance, fire resitance) in one custom effect, so the food doesn't give the effects separately.
-
Play sound and particle 1.16.2
I guess so. I guess I'll look around the forum first before posting my own question.
-
Play sound and particle 1.16.2
How do i play a minecraft's cloud(particle that appears when an entity is killed) on the player's position? Also, how do i play a dragon's roar sound, too?
-
Effect doing nothing
Yes, it works. I've put return this == REGISTRY.EFFECT_NAME.get(); and it works. But it's different though. I've put heal, right? It's really fast for some reason. How do i slow it down? Do i just change the float value?
-
Invulnerability Effect help
I put that without the recipe, because i want the effect to be given when a player eats a certain food, but it didn't add anything. Is it an effect? Is it a potion item? I didn't add anything that relates to those both
-
Item consume after use?
I can't find i way to remove(consume) an item after onItemRightClick... help please? I tried doing @Override public ActionResult<ItemStack> onItemRightClick(World worldIn, PlayerEntity playerIn, Hand handIn) { playerIn.heal(1.0f); return ActionResult.resultConsume(playerIn.getHeldItem(handIn)); } but it still doesn't do anything.
-
Invulnerability Effect help
I am trying to make a custom forge effect that is a mix of resistance, regen, and fire resist. But i can only find heal at LivingEntity. Help?
-
Effect doing nothing
i only registered public static final RegistryObject<SecondWindEffect> SECOND_WIND_EFFECT = EFFECTS.register("second_wind_effect", () -> new SecondWindEffect(EffectType.BENEFICIAL, 152512));
-
Effect doing nothing
I registered the effect in my registryhandler. I put the type EffectType.BENEFICIAL... wait, what do you mean effect type? Is it POTION_TYPE? Do i have to register that as well?
IPS spam blocked by CleanTalk.