-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework entire creative category/group mapping system
- Loading branch information
Showing
5 changed files
with
420 additions
and
78 deletions.
There are no files selected for viewing
9 changes: 3 additions & 6 deletions
9
shared/src/main/java/org/geysermc/hydraulic/item/CreativeMapping.java
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 |
---|---|---|
@@ -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); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
shared/src/main/java/org/geysermc/hydraulic/item/CreativeMappingTarget.java
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,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) { | ||
} |
Oops, something went wrong.