Jump to content

chunkertown

Members
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

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

chunkertown's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. @Danebi Thank you this worked sorry for my other reply been stuck for quite some time and was fairly agitated. Im new to java coding and assumed it was some new concept that was fucking me over but im just big dumb haha
  2. First time using lambda's. Any idea how this would be solved as the whole statement results in an error stating "Int is not a functional interface" SAPPHIRE(4, 3122, 10.0f, 12, () -> { return Ingredient.fromItems(RegistryHandler.SAPPHIRE.get()); });
  3. @Danebi Obviously that was the first thing I tried smh
  4. On line 12 it says "; expected" and I know what that means but can't for the life of me find where it is expected. I have made sure all braces are closed. Code is below package com.chunk.tutorialmod.tools; import com.chunk.tutorialmod.util.RegistryHandler; import net.minecraft.item.IItemTier; import net.minecraft.item.crafting.Ingredient; import java.util.function.Supplier; public enum ModItemTier implements IItemTier { CHUNGITE(4, 3122, 10.0f, 12, () -> { return Ingredient.fromItems(RegistryHandler.CHUNGITE.get()) }); private final int harvestLevel; private final int maxUses; private final float efficiency; private final float attackDamage; private final int enchantability; private final Supplier<Ingredient> repairMaterial; ModItemTier(int harvestLevel, int maxUses, float efficiency, float attackDamage, int enchantability, Supplier<Ingredient> repairMaterial) { this.harvestLevel = harvestLevel; this.maxUses = maxUses; this.efficiency = efficiency; this.attackDamage = attackDamage; this.enchantability = enchantability; this.repairMaterial = repairMaterial; } @Override public int getMaxUses() { return maxUses; } @Override public float getEfficiency() { return efficiency; } @Override public float getAttackDamage() { return attackDamage; } @Override public int getHarvestLevel() { return harvestLevel; } @Override public int getEnchantability() { return enchantability; } @Override public Ingredient getRepairMaterial() { return repairMaterial.get(); } } ModItemTier.java
×
×
  • Create New...

Important Information

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