-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d930d96
commit a0d5636
Showing
9 changed files
with
112 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package artifality.item; | ||
|
||
import artifality.registry.ArtifalityBlocks; | ||
import artifality.registry.ArtifalityEnchants; | ||
import artifality.registry.ArtifalityItems; | ||
import com.glisco.owo.itemgroup.OwoItemGroup; | ||
import com.glisco.owo.itemgroup.gui.ItemGroupButton; | ||
import net.minecraft.enchantment.EnchantmentLevelEntry; | ||
import net.minecraft.item.EnchantedBookItem; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.item.Items; | ||
import net.minecraft.util.Identifier; | ||
import net.minecraft.util.collection.DefaultedList; | ||
|
||
public class ArtifalityItemGroup extends OwoItemGroup { | ||
|
||
public ArtifalityItemGroup(Identifier id) { | ||
super(id); | ||
} | ||
|
||
@Override | ||
protected void setup() { | ||
addButton(ItemGroupButton.discord("https://discord.gg/DcemWeskeZ")); | ||
} | ||
|
||
@Override | ||
public ItemStack createIcon() { | ||
return ArtifalityItems.WRATH_CRYSTAL_WAND.getDefaultStack(); | ||
} | ||
|
||
@Override | ||
public void appendStacks(DefaultedList<ItemStack> stacks) { | ||
ArtifalityItems.ITEMS.forEach((id, item) -> stacks.add(item.getDefaultStack())); | ||
ArtifalityBlocks.ITEMS.forEach((id, item) -> stacks.add(item.getDefaultStack())); | ||
ArtifalityEnchants.ENCHANTMENTS.forEach((id, enchantment) -> { | ||
ItemStack book = new ItemStack(Items.ENCHANTED_BOOK); | ||
EnchantedBookItem.addEnchantment(book, new EnchantmentLevelEntry(enchantment, enchantment.getMaxLevel())); | ||
stacks.add(book); | ||
}); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters