Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Hummel009 committed Feb 14, 2024
1 parent e21ad56 commit 4aa0325
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import legendarium.Config;
import legendarium.item.ItemColdWeapon;
import legendarium.item.ItemGem;
import net.minecraft.src.EnumRarity;
import net.minecraft.src.Item;

@SuppressWarnings({"WeakerAccess", "PublicField"})
Expand Down Expand Up @@ -121,8 +122,8 @@ public static void preInit() {
weaponUrfael = new ItemColdWeapon(Config.idWeaponUrfael - 256);
weaponWitchking = new ItemColdWeapon(Config.idWeaponWitchking - 256);

arkenstone = new ItemGem(Config.idArkenstone - 256);
silmaril = new ItemGem(Config.idSilmaril - 256);
arkenstone = new ItemGem(Config.idArkenstone - 256, EnumRarity.rare);
silmaril = new ItemGem(Config.idSilmaril - 256, EnumRarity.epic);

int id = 0;
arkenstone.setIconIndex(id++);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
package legendarium.item;

import legendarium.init.ItemGroups;
import net.minecraft.src.EnumRarity;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;

public class ItemGem extends Item {
public ItemGem(int id) {
private final EnumRarity rarity;

public ItemGem(int id, EnumRarity rarity) {
super(id);
setMaxStackSize(1);
setCreativeTab(ItemGroups.TAB_ARTIFACTS);
this.rarity = rarity;
}

@Override
public EnumRarity getRarity(ItemStack var1) {
return rarity;
}
}

0 comments on commit 4aa0325

Please sign in to comment.