Skip to content

Commit

Permalink
Rework entire creative category/group mapping system
Browse files Browse the repository at this point in the history
  • Loading branch information
rtm516 committed Apr 5, 2024
1 parent 30cdb6c commit 53ad95c
Show file tree
Hide file tree
Showing 5 changed files with 420 additions and 78 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
package org.geysermc.hydraulic.item;

import org.geysermc.geyser.api.util.CreativeCategory;
import org.geysermc.hydraulic.util.ItemGroup;
import org.jetbrains.annotations.NotNull;

/**
* Represents a creative mapping for the creative
* group and {@link CreativeCategory category}.
*/
public record CreativeMapping(@NotNull String creativeGroup, @NotNull CreativeCategory creativeCategory) {
public CreativeMapping(String creativeGroup) {
this(creativeGroup, CreativeCategory.ITEMS);
}

public record CreativeMapping(@NotNull ItemGroup creativeGroup, @NotNull CreativeCategory creativeCategory) {
public CreativeMapping(CreativeCategory creativeCategory) {
this("", creativeCategory);
this(ItemGroup.NONE, creativeCategory);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.geysermc.hydraulic.item;

import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;

import java.util.List;

public record CreativeMappingTarget(List<Class<? extends Item>> itemClasses, List<TagKey<Item>> itemTags, List<Class<? extends Block>> blockClasses, List<TagKey<Block>> blockTags) {
}
Loading

0 comments on commit 53ad95c

Please sign in to comment.