Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom item API v2 #5189

Draft
wants to merge 123 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
61f5db1
First work on a new API (wow that's a lot of TODOs)
eclipseisoffline Nov 29, 2024
ea6c3c6
Add component readers for all the planned components
eclipseisoffline Nov 29, 2024
0922b18
Fix equippable slot reading and add support for all consume animations
eclipseisoffline Nov 29, 2024
435b73d
Add use cooldown support
eclipseisoffline Nov 29, 2024
cce49fa
Fix max stack size and max damage components
eclipseisoffline Nov 30, 2024
1dd854a
Implement block item and entity placer properties
eclipseisoffline Nov 30, 2024
4af8e12
Add documentation and change some stuff in the API
eclipseisoffline Nov 30, 2024
efae1f3
Implement the changes in Geyser
eclipseisoffline Nov 30, 2024
8bbad9d
Implement the changes in Geyser part 2
eclipseisoffline Nov 30, 2024
7eeb5bb
Remove old custom item options
eclipseisoffline Nov 30, 2024
4514f55
Work on support for the old format
eclipseisoffline Nov 30, 2024
8ea3c97
Start work on predicates, somewhat
eclipseisoffline Nov 30, 2024
7888956
More work on predicates, I'll probably simplify it later
eclipseisoffline Dec 1, 2024
ce55d88
Clean up predicates a bit
eclipseisoffline Dec 1, 2024
52f2b9f
Add model grouping
eclipseisoffline Dec 2, 2024
49f31c9
Work on range dispatch predicate
eclipseisoffline Dec 6, 2024
9139af2
Implement range dispatch predicates when converting old mappings to n…
eclipseisoffline Dec 6, 2024
4d09104
Implement reading range dispatch predicates from mappings
eclipseisoffline Dec 6, 2024
0346a80
Implement sorting for range dispatch predicates, needs testing
eclipseisoffline Dec 6, 2024
c38bf26
Add model check to custom item comparator
eclipseisoffline Dec 6, 2024
79bf4af
Clean up predicates a bit
eclipseisoffline Dec 6, 2024
f6f6423
Merge remote-tracking branch 'upstream/master' into custom-item-api-v2
eclipseisoffline Dec 12, 2024
fd09a05
Update custom item translator for 1.21.4, implement custom model data
eclipseisoffline Dec 6, 2024
7fabf0c
Implement/update register items event for new custom item definitions
eclipseisoffline Dec 11, 2024
04d7f48
More stuff in the custom item registry populator
eclipseisoffline Dec 12, 2024
04fe043
Add priority option to definitions, deprecate texture size and render…
eclipseisoffline Dec 12, 2024
5ecc61f
Implement priority option
eclipseisoffline Dec 12, 2024
12499bf
Read priority option from mappings
eclipseisoffline Dec 12, 2024
bca98c7
Add unbreakable condition predicate
eclipseisoffline Dec 12, 2024
6e0e3c0
Use unbreakable predicate when converting v1 to v2 mappings
eclipseisoffline Dec 12, 2024
774e556
Remove BedrockCreativeTab in favour of CreativeCategory
eclipseisoffline Dec 12, 2024
1685918
Remove adventure from API module
eclipseisoffline Dec 12, 2024
7164ca0
Some fixes
eclipseisoffline Dec 12, 2024
2263cc8
Remove this
eclipseisoffline Dec 12, 2024
3fac2cd
Reimplement unbreakable predicate check
eclipseisoffline Dec 12, 2024
361df16
Fix build
eclipseisoffline Dec 12, 2024
b80c054
Fix charge type predicate
eclipseisoffline Dec 12, 2024
eb0b40c
I'm very confused at why this doesn't work
eclipseisoffline Dec 12, 2024
a4c17da
Fix adding multiple definitions for same item model and sorting of pr…
eclipseisoffline Dec 12, 2024
a80e90d
Fix adding multiple definitions for same item model again
eclipseisoffline Dec 12, 2024
e7d7a9d
Improve mapping custom items
eclipseisoffline Dec 14, 2024
12f2e1a
Improve the reading and error handling of item mappings
eclipseisoffline Dec 16, 2024
fe8336a
Some of Adventure was left in the API
eclipseisoffline Dec 16, 2024
f44f368
Improve predicate reading error handling
eclipseisoffline Dec 16, 2024
a997820
Make item definitions in group able to override the group's model
eclipseisoffline Dec 16, 2024
7ed830a
Improve error handling when registering custom items
eclipseisoffline Dec 16, 2024
b5cef99
Clean up custom item registry populator a bit
eclipseisoffline Dec 16, 2024
66e288f
Improve documentation of (predicate) new API
eclipseisoffline Dec 16, 2024
852c5c2
Apparently Javadoc can break builds
eclipseisoffline Dec 16, 2024
18cde32
Improve documentation just a bit
eclipseisoffline Dec 16, 2024
885c4d9
Merge remote-tracking branch 'upstream/master' into custom-item-api-v2
eclipseisoffline Dec 16, 2024
25109b7
Add predicate caching
eclipseisoffline Dec 19, 2024
635c8c4
Default to definition type when no type key is given
eclipseisoffline Dec 19, 2024
e84f8a3
Whoops got to include the lib
eclipseisoffline Dec 19, 2024
bcc7915
Factor in range dispatch scaling when sorting predicate
eclipseisoffline Dec 19, 2024
4aea17a
Component combination validation
eclipseisoffline Dec 19, 2024
1683243
Fix max stack size validation when reading json mappings
eclipseisoffline Dec 19, 2024
4629f7b
"Implement" v2 block mappings reading
eclipseisoffline Dec 19, 2024
2b9f519
Cleanup item registry populator a bit
eclipseisoffline Dec 19, 2024
ff35c6e
Fix mapping reading
eclipseisoffline Dec 19, 2024
b254594
Move identifierToKey out of ItemRegistryPopulator
eclipseisoffline Dec 19, 2024
56c508d
Throw UnsupportedOperationException when reading block v2 mappings
eclipseisoffline Dec 19, 2024
5620f0a
Move predicate implementations out of API module
eclipseisoffline Jan 10, 2025
0986203
Send nutrition and saturation to the client
eclipseisoffline Jan 10, 2025
e8bd2a1
Refactor mappings reading with proper type checking and conversions a…
eclipseisoffline Jan 10, 2025
aa365d9
Small cleanup
eclipseisoffline Jan 10, 2025
aa13113
Clean up predicates in the API
eclipseisoffline Jan 10, 2025
094ff41
Merge remote-tracking branch 'upstream/master' into custom-item-api-v2
eclipseisoffline Jan 10, 2025
7af9518
Implement predicate strategies
eclipseisoffline Jan 10, 2025
f4c9c3d
Read predicate strategies from mappings
eclipseisoffline Jan 10, 2025
46e6fd3
Remove MCPL from API module, but now stuff is broken. Also still need…
eclipseisoffline Jan 11, 2025
03402d4
Update implementations and mappings reader, but populator is broken
eclipseisoffline Jan 11, 2025
aabd537
My IDE did something it shouldn't have
eclipseisoffline Jan 11, 2025
d06ad0b
Improve enum reader error message
eclipseisoffline Jan 11, 2025
1dce683
Move predicate classes up
eclipseisoffline Jan 11, 2025
7e973ea
Fix component patching, MCPL removal is done now
eclipseisoffline Jan 11, 2025
9f21221
Component validation in the API
eclipseisoffline Jan 11, 2025
ffb94ff
Proper support for the enchantable value property
eclipseisoffline Jan 13, 2025
44a1bba
Reformat some stuff my IDE shouldn't have done
eclipseisoffline Jan 13, 2025
33b49eb
Properly implement protection value
eclipseisoffline Jan 13, 2025
0e5dba1
Documentation improvements, add converter for enchantable component
eclipseisoffline Jan 13, 2025
0308388
Remove unused stuff
eclipseisoffline Jan 13, 2025
d522f61
Remove rarely used method
eclipseisoffline Jan 13, 2025
61b703c
Merge remote-tracking branch 'upstream/master' into custom-item-api-v2
eclipseisoffline Jan 13, 2025
ebbd1c5
Small documentation stuff
eclipseisoffline Jan 13, 2025
1afb733
Work on tool component stuff
eclipseisoffline Jan 14, 2025
75e371c
Add tool component to API
eclipseisoffline Jan 14, 2025
67b615e
Implement tool component in custom item populator
eclipseisoffline Jan 14, 2025
261b6ca
Add tool component mappings reader
eclipseisoffline Jan 14, 2025
c63386a
Update documentation
eclipseisoffline Jan 14, 2025
2558620
Add repairable mappings reader
eclipseisoffline Jan 14, 2025
373eeac
Implement repairable component in custom item registry populator
eclipseisoffline Jan 14, 2025
fbbf210
Documentation whoopsy
eclipseisoffline Jan 14, 2025
ab174b5
Javadoc broke my build again (this isn't proper HTML)
eclipseisoffline Jan 14, 2025
422c5a9
Update MCPL
eclipseisoffline Jan 17, 2025
a5d6fb1
Consistency renames, start on has component predicate
eclipseisoffline Jan 17, 2025
af76cd0
Update API module with has component predicate
eclipseisoffline Jan 17, 2025
505a74b
Update implementations and implement has component predicate
eclipseisoffline Jan 18, 2025
dee7b5a
Update reading of match predicate property
eclipseisoffline Jan 18, 2025
6705513
Fix broken/damaged predicates
eclipseisoffline Jan 18, 2025
bd7e471
Remove enchantable stuff from chargeable properties as that is decide…
eclipseisoffline Jan 18, 2025
ea850f4
Clean up custom item registry populator
eclipseisoffline Jan 18, 2025
020e78e
Make new item definition register method throw exception
eclipseisoffline Jan 18, 2025
27b2ec7
Charge type javadocs
eclipseisoffline Jan 18, 2025
fc0103b
Make air model constant
eclipseisoffline Jan 18, 2025
2662c81
Rename creative category internal name to bedrock name
eclipseisoffline Jan 18, 2025
6f67814
Make sure deprecated getExistingCustomItems method still functions
eclipseisoffline Jan 18, 2025
c1bd5fa
Data component map javadoc
eclipseisoffline Jan 18, 2025
99b01ee
Apply suggestions from code review
eclipseisoffline Jan 18, 2025
b2776a3
Forgot one
eclipseisoffline Jan 18, 2025
5ac8a24
Merge remote-tracking branch 'upstream/master' into custom-item-api-v2
eclipseisoffline Jan 18, 2025
ec9e9fc
I messed up the merge conflicts, whoops
eclipseisoffline Jan 18, 2025
d22e815
Work on component javadoc
eclipseisoffline Jan 18, 2025
4b7ef99
Some fixes
eclipseisoffline Jan 19, 2025
a0b785c
Whoops
eclipseisoffline Jan 19, 2025
92d3296
Work on changing mappings reader to Gson
eclipseisoffline Jan 19, 2025
af371b1
Update data component readers to use Gson
eclipseisoffline Jan 19, 2025
2c9596d
Mappings reader gson part 1
eclipseisoffline Jan 19, 2025
4095f89
Mappings reader gson part 2
eclipseisoffline Jan 19, 2025
a7fbcc6
Mappings reader gson part 3
eclipseisoffline Jan 19, 2025
0ae556c
Whoops almost removed v2 mappings
eclipseisoffline Jan 19, 2025
3fff601
Some fixes and stuff
eclipseisoffline Jan 19, 2025
de95eb5
Bye bye render offsets
eclipseisoffline Jan 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ plugins {
dependencies {
api(libs.base.api)
api(libs.math)

// Adventure text serialization
api(libs.bundles.adventure)

// TODO? can we exclude more
api(libs.mcprotocollib) {
exclude("io.netty", "netty-all")
exclude("net.raphimc", "MinecraftAuth")
}
}

version = property("version")!!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,23 @@

package org.geysermc.geyser.api.item.custom;

import net.kyori.adventure.key.Key;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.geysermc.geyser.api.GeyserApi;
import org.geysermc.geyser.api.item.custom.v2.BedrockCreativeTab;
import org.geysermc.geyser.api.item.custom.v2.CustomItemBedrockOptions;
import org.geysermc.geyser.api.item.custom.v2.CustomItemDefinition;

import java.util.OptionalInt;
import java.util.Set;

/**
* This is used to store data for a custom item.
*
* @deprecated use the new {@link org.geysermc.geyser.api.item.custom.v2.CustomItemDefinition}
*/
@Deprecated
public interface CustomItemData {
/**
* Gets the item's name.
Expand Down Expand Up @@ -118,6 +125,23 @@ static CustomItemData.Builder builder() {
return GeyserApi.api().provider(CustomItemData.Builder.class);
}

default CustomItemDefinition toDefinition(String javaItem) {
// TODO predicate
return CustomItemDefinition.builder(Key.key(javaItem), Key.key(javaItem))
.displayName(displayName())
.bedrockOptions(CustomItemBedrockOptions.builder()
.icon(icon())
.allowOffhand(allowOffhand())
.displayHandheld(displayHandheld())
.creativeCategory(creativeCategory().isEmpty() ? BedrockCreativeTab.NONE : BedrockCreativeTab.values()[creativeCategory().getAsInt()])
.creativeGroup(creativeGroup())
.textureSize(textureSize())
.renderOffsets(renderOffsets())
.tags(tags())
)
.build();
}

interface Builder {
/**
* Will also set the display name and icon to the provided parameter, if it is currently not set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@

/**
* This class represents the different ways you can register custom items
*
* @deprecated use the new {@link org.geysermc.geyser.api.item.custom.v2.CustomItemDefinition}.
*/
@Deprecated
public interface CustomItemOptions {
/**
* Gets if the item should be unbreakable.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (c) 2024 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author GeyserMC
* @link https://github.com/GeyserMC/Geyser
*/

package org.geysermc.geyser.api.item.custom.v2;

public enum BedrockCreativeTab {
onebeastchris marked this conversation as resolved.
Show resolved Hide resolved
NONE,
CONSTRUCTION,
NATURE,
EQUIPMENT,
ITEMS
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
/*
* Copyright (c) 2024 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author GeyserMC
* @link https://github.com/GeyserMC/Geyser
*/

package org.geysermc.geyser.api.item.custom.v2;

import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.geysermc.geyser.api.GeyserApi;
import org.geysermc.geyser.api.item.custom.CustomRenderOffsets;

import java.util.Set;

/**
* This is used to store options for a custom item that can't be described using item components.
*/
public interface CustomItemBedrockOptions {

/**
* Gets the item's icon. When not present, the item's Bedrock identifier is used.
*
* @return the item's icon
* @see CustomItemDefinition#icon()
*/
@Nullable
String icon();

/**
* If the item is allowed to be put into the offhand. Defaults to true.
*
* @return true if the item is allowed to be used in the offhand, false otherwise
*/
boolean allowOffhand();

/**
* If the item should be displayed as handheld, like a tool.
*
* @return true if the item should be displayed as handheld, false otherwise
*/
boolean displayHandheld();

/**
* The item's creative category. Defaults to {@code NONE}.
*
* @return the item's creative category
*/
@NonNull
BedrockCreativeTab creativeCategory();

/**
* Gets the item's creative group.
*
* @return the item's creative group
*/
@Nullable
String creativeGroup();

/**
* Gets the item's texture size. This is to resize the item if the texture is not 16x16.
*
* @return the item's texture size
*/
int textureSize();

/**
* Gets the item's render offsets. If it is null, the item will be rendered normally, with no offsets.
*
* @return the item's render offsets
*/
@Nullable
CustomRenderOffsets renderOffsets();

/**
* Gets the item's set of tags that can be used in Molang.
* Equivalent to "tag:some_tag"
*
* @return the item's tags, if they exist
*/
@NonNull
Set<String> tags();

static Builder builder() {
return GeyserApi.api().provider(Builder.class);
}

interface Builder {

Builder icon(@Nullable String icon);

Builder allowOffhand(boolean allowOffhand);

Builder displayHandheld(boolean displayHandheld);

Builder creativeCategory(BedrockCreativeTab creativeCategory);

Builder creativeGroup(@Nullable String creativeGroup);

Builder textureSize(int textureSize);

Builder renderOffsets(@Nullable CustomRenderOffsets renderOffsets);

Builder tags(@Nullable Set<String> tags);

CustomItemBedrockOptions build();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
/*
* Copyright (c) 2024 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author GeyserMC
* @link https://github.com/GeyserMC/Geyser
*/

package org.geysermc.geyser.api.item.custom.v2;

import net.kyori.adventure.key.Key;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.geysermc.geyser.api.GeyserApi;
import org.geysermc.geyser.api.item.custom.v2.predicate.CustomItemPredicate;
import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents;

import java.util.List;

/**
* This is used to define a custom item and its properties.
*/
// TODO note that definitions will be sorted by predicates
public interface CustomItemDefinition {

/**
* The Bedrock identifier for this custom item. This can't be in the {@code minecraft} namespace. If the {@code minecraft} namespace is given in the builder, the default
* namespace of the implementation is used.
*
* @implNote for Geyser, the default namespace is the {@code geyser_custom} namespace.
*/
@NonNull Key bedrockIdentifier();

/**
* The display name of the item. If none is set, the display name is taken from the item's Bedrock identifier.
*/
@NonNull String displayName();

/**
* The item model this definition is for. If the model is in the {@code minecraft} namespace, then the definition is required to have a predicate.
*
* <p>If multiple item definitions for a model are registered, then only one can have no predicate.</p>
*/
@NonNull Key model();

/**
* The icon used for this item.
*
* <p>If none is set in the item's Bedrock options, then the item's Bedrock identifier is used,
* the namespace separator replaced with {@code .} and the path separators ({@code /}) replaced with {@code _}.</p>
*/
default @NonNull String icon() {
return bedrockOptions().icon() == null ? bedrockIdentifier().asString().replaceAll(":", ".").replaceAll("/", "_") : bedrockOptions().icon();
}

/**
* The predicates that have to match for this item to be used. These predicates are similar to the Java item model predicates.
*
* <p>If all predicates match for multiple definitions, then the first registered item with all matching predicates is used. If no predicates match, then the item definition without any predicates
* is used, if any.</p>
*/
@NonNull List<CustomItemPredicate> predicates();

/**
* The item's Bedrock options. These describe item properties that can't be described in item components, e.g. item texture size and if the item is allowed in the off-hand.
*/
@NonNull CustomItemBedrockOptions bedrockOptions();

/**
* The item's data components. It is expected that the item <em>always</em> has these components on the server. If the components mismatch, bugs will occur.
*
* <p>Currently, the following components are supported:</p>
*
* <ul>
* <li>{@code minecraft:consumable}</li>
* <li>{@code minecraft:equippable}</li>
* <li>{@code minecraft:food}</li>
* <li>{@code minecraft:max_damage}</li>
* <li>{@code minecraft:max_stack_size}</li>
* <li>{@code minecraft:use_cooldown}</li>
* </ul>
*
* <p>Note: some components, for example {@code minecraft:rarity}, {@code minecraft:enchantment_glint_override}, and {@code minecraft:attribute_modifiers} are translated automatically,
* and do not have to be specified here.</p>
*/
@NonNull DataComponents components();

static Builder builder(Key identifier, Key itemModel) {
return GeyserApi.api().provider(Builder.class, identifier, itemModel);
}

interface Builder {

Builder displayName(String displayName);

Builder predicate(@NonNull CustomItemPredicate predicate);

Builder bedrockOptions(CustomItemBedrockOptions.@NonNull Builder options);

// TODO do we want another format for this?
Builder components(@NonNull DataComponents components);

CustomItemDefinition build();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright (c) 2024 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author GeyserMC
* @link https://github.com/GeyserMC/Geyser
*/

package org.geysermc.geyser.api.item.custom.v2.predicate;

public interface CustomItemPredicate { // TODO this probably needs to be different since people can implement this
}
Loading
Loading