mirror of
https://github.com/HibiscusMC/HibiscusCommons.git
synced 2025-12-19 15:09:26 +00:00
fix: setCustomModelId in ItemBuilder using method not found in older versions
This commit is contained in:
@@ -65,7 +65,7 @@ public class ItemBuilder {
|
||||
}
|
||||
|
||||
public ItemBuilder setCustomModelId(int number) {
|
||||
if (onPaper) {
|
||||
if (onPaper && NMSHandlers.getVersion().isHigherOrEqual(MinecraftVersion.v1_21_5)) {
|
||||
CustomModelDataComponent modelDataComponent = itemMeta.getCustomModelDataComponent();
|
||||
modelDataComponent.setFloats(List.of((float) number));
|
||||
itemMeta.setCustomModelDataComponent(modelDataComponent);
|
||||
|
||||
Reference in New Issue
Block a user