9
0
mirror of https://github.com/HibiscusMC/HibiscusCommons.git synced 2025-12-19 15:09:26 +00:00

feat: custom model ids for 1.21.6 toast

This commit is contained in:
LoJoSho
2025-06-28 19:47:14 -05:00
parent 7dad432c89
commit 397189dfd0

View File

@@ -35,10 +35,7 @@ import net.minecraft.world.level.GameType;
import net.minecraft.world.phys.Vec3;
import net.minecraft.world.scores.PlayerTeam;
import net.minecraft.world.scores.Team;
import org.bukkit.Bukkit;
import org.bukkit.Color;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.*;
import org.bukkit.craftbukkit.CraftEquipmentSlot;
import org.bukkit.craftbukkit.entity.CraftEntityType;
import org.bukkit.craftbukkit.entity.CraftPlayer;
@@ -430,6 +427,11 @@ public class NMSPackets extends NMSCommon implements me.lojosho.hibiscuscommons.
components.add("minecraft:custom_model_data", customModelDataComponentJson);
}
NamespacedKey itemModel = meta.getItemModel();
if (itemModel != null) {
components.addProperty("minecraft:item_model", itemModel.toString());
}
iconObj.add("components", components);
}