Jump to content

SonPlaying

Members
  • Posts

    24
  • Joined

  • Last visited

Recent Profile Visitors

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

SonPlaying's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. That automatically adds when i implement IArmorMaterial, but ok.
  2. 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.
  3. That errors too for some reason, saying that EffectInstance is undefined. I'm not on my PC right now.
  4. 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
  5. I'm not in my PC right now, so I'll try it later.
  6. Yes, it does work but that's not what i want.
  7. 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.
  8. I guess so. I guess I'll look around the forum first before posting my own question.
  9. 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?
  10. 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?
  11. 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
  12. 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.
  13. 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?
  14. i only registered public static final RegistryObject<SecondWindEffect> SECOND_WIND_EFFECT = EFFECTS.register("second_wind_effect", () -> new SecondWindEffect(EffectType.BENEFICIAL, 152512));
  15. 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?
×
×
  • Create New...

Important Information

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