nbt tag and gear_set will not work if the entity has default weapon.
YumisLink opened this issue · 2 comments
MC Version
1.20.1
forge Version
47.2.0
Mod Version
GatewaysToEternity-1.20.1-4.2.4 (lasted in curseforge)
Question Descript
I tried the following scenarios:
NBT tag and gear_set will not work if the entity has default weapon or armor.
i try to spawn a skeleton and with following codes and without any modifiers:
"entity": "minecraft:skeleton",
"count": 1,
"nbt": {
"CustomName": "{\"translate\":\"name.xueyuan_wuhao\",\"color\":\"gold\"}",
"HandItems": [
{
"Count": 1,
"id": "simplyswords:storms_edge",
"tag": {
"Damage": 0
}
},
{
"Count": 1,
"id": "simplyswords:storms_edge",
"tag": {
"Damage": 0
}
}
]
the result is this skeleton's mainhand item is bow and offhand item is simplyswords:storms_edge.
next i try to write code in gear_sets to let this skeleton's mainhand and offhand item are diamond sword.
{
"weight": 0,
"quality": 0,
"mainhands": [
{
"weight": 1,
"stack": {
"item": "minecraft:diamond_sword"
},
"drop_chance": 0.5
}
],
"offhands": [
{
"weight": 1,
"stack": {
"item": "minecraft:diamond_sword"
},
"drop_chance": 0.5
}
],
"helmets": [
{
"weight": 1,
"stack": {
"item": "twilightforest:fiery_helmet"
},
"drop_chance": 0
}
],
"chestplates": [
{
"weight": 1,
"stack": {
"item": "twilightforest:fiery_chestplate"
},
"drop_chance": 0
}
],
"leggings": [
{
"weight": 1,
"stack": {
"item": "twilightforest:fiery_leggings"
},
"drop_chance": 0
}
],
"boots": [
{
"weight": 1,
"stack": {
"item": "twilightforest:fiery_boots"
},
"drop_chance": 0
}
],
"tags": []
}
then i use nbtedit in game to see this entity's nbttag ,the nbt shows
dropchange was successfully applied, but mainhand item still is bow
final I changed the entity to a zombie it can take two diamond sword.
Similarly, my use of wither skeleton doesn't work, including the giant_miner in the TwilightForest mod
Add "finalize_spawn": false
to your wave entity objects, which will prevent addition of default equipment.