[Doc] Using the /summon command with easy_npc
mcmdarcs2 opened this issue · 9 comments
You can look at a NPC and press F3+i to get all of their current data with a /summon
command like:
´´´
/summon easy_npc:orc -15.50 70.00 9.50 {Brain: {memories: {}}, ModelData: {Position: {}, Pose: "DEFAULT", Visible: {}, Rotation: {}, DefaultPose: "STANDING"}, HurtByTimestamp: 0, Owner: [I; 940439953, -167562164, -1601161573, -1389718966], ForgeData: {}, Attributes: [{Base: 0.699999988079071d, Name: "minecraft:generic.movement_speed"}, {Base: 32.0d, Modifiers: [{Amount: -0.03237451325730065d, Operation: 1, UUID: [I; -357824034, 515588271, -1106256546, 1653757810], Name: "Random spawn bonus"}], Name: "minecraft:generic.follow_range"}], Invulnerable: 1b, FallFlying: 0b, ActionData: {ActionEventSet: {}, ActionPermissionLevel: 0}, EasyNPCVersion: 1, PortalCooldown: 0, AbsorptionAmount: 0.0f, DialogData: {DialogDataSet: [], Type: "NONE"}, FallDistance: 0.0f, CanUpdate: 1b, DeathTime: 0s, Aggressive: 0b, HandDropChances: [0.085f, 0.085f], PersistenceRequired: 0b, AngerTime: 0, Motion: [0.0d, 0.0d, 0.0d], Navigation: {Home: {X: -16, Y: 70, Z: 9}}, EntityAttribute: {CanFloat: 0b, IsPushable: 0b, CanBeLeashed: 0b, Freefall: 0b, PushEntities: 0b, CanCloseDoor: 0b, CanPassDoor: 0b, CanUseNetherPortal: 0b, CanOpenDoor: 0b, IsAttackable: 0b, LightLevel: 7}, Health: 20.0f, LeftHanded: 0b, Air: 300s, OnGround: 1b, Offers: {TradingType: "BASIC", BasicMaxUses: 64, BasicRewardedXP: 1, Recipes: {Recipes: [{maxUses: 64, buyB: {id: "minecraft:air", Count: 1b}, buy: {id: "minecraft:stone", Count: 1b}, sell: {id: "minecraft:grass_block", Count: 1b}, xp: 1, uses: 0, priceMultiplier: 1.0f, specialPrice: 0, demand: 0, rewardExp: 1b}, {maxUses: 64, buyB: {id: "minecraft:air", Count: 1b}, buy: {id: "minecraft:stone", Count: 3b}, sell: {id: "minecraft:grass_block", Count: 3b}, xp: 1, uses: 0, priceMultiplier: 1.0f, specialPrice: 0, demand: 0, rewardExp: 1b}, {maxUses: 64, buyB: {id: "minecraft:air", Count: 1b}, buy: {id: "minecraft:stone", Count: 2b}, sell: {id: "minecraft:grass_block", Count: 2b}, xp: 1, uses: 0, priceMultiplier: 1.0f, specialPrice: 0, demand: 0, rewardExp: 1b}, {maxUses: 64, buyB: {id: "minecraft:air", Count: 1b}, buy: {id: "minecraft:air", Count: 1b}, sell: {id: "minecraft:air", Count: 1b}, xp: 1, uses: 0, priceMultiplier: 1.0f, specialPrice: 0, demand: 0, rewardExp: 1b}, {maxUses: 64, buyB: {id: "minecraft:air", Count: 1b}, buy: {id: "minecraft:air", Count: 1b}, sell: {id: "minecraft:air", Count: 1b}, xp: 1, uses: 0, priceMultiplier: 1.0f, specialPrice: 0, demand: 0, rewardExp: 1b}, {maxUses: 64, buyB: {id: "minecraft:air", Count: 1b}, buy: {id: "minecraft:air", Count: 1b}, sell: {id: "minecraft:air", Count: 1b}, xp: 1, uses: 0, priceMultiplier: 1.0f, specialPrice: 0, demand: 0, rewardExp: 1b}, {maxUses: 64, buyB: {id: "minecraft:air", Count: 1b}, buy: {id: "minecraft:air", Count: 1b}, sell: {id: "minecraft:air", Count: 1b}, xp: 1, uses: 0, priceMultiplier: 1.0f, specialPrice: 0, demand: 0, rewardExp: 1b}, {maxUses: 64, buyB: {id: "minecraft:air", Count: 1b}, buy: {id: "minecraft:air", Count: 1b}, sell: {id: "minecraft:air", Count: 1b}, xp: 1, uses: 0, priceMultiplier: 1.0f, specialPrice: 0, demand: 0, rewardExp: 1b}, {maxUses: 64, buyB: {id: "minecraft:air", Count: 1b}, buy: {id: "minecraft:air", Count: 1b}, sell: {id: "minecraft:air", Count: 1b}, xp: 1, uses: 0, priceMultiplier: 1.0f, specialPrice: 0, demand: 0, rewardExp: 1b}, {maxUses: 64, buyB: {id: "minecraft:air", Count: 1b}, buy: {id: "minecraft:air", Count: 1b}, sell: {id: "minecraft:air", Count: 1b}, xp: 1, uses: 0, priceMultiplier: 1.0f, specialPrice: 0, demand: 0, rewardExp: 1b}, {maxUses: 64, buyB: {id: "minecraft:air", Count: 1b}, buy: {id: "minecraft:air", Count: 1b}, sell: {id: "minecraft:air", Count: 1b}, xp: 1, uses: 0, priceMultiplier: 1.0f, specialPrice: 0, demand: 0, rewardExp: 1b}, {maxUses: 64, buyB: {id: "minecraft:air", Count: 1b}, buy: {id: "minecraft:air", Count: 1b}, sell: {id: "minecraft:air", Count: 1b}, xp: 1, uses: 0, priceMultiplier: 1.0f, specialPrice: 0, demand: 0, rewardExp: 1b}]}, ResetsEveryMin: 0, Inventory: {}}, ScaleY: 1.0f, Rotation: [85.81406f, 7.0945764f], ScaleX: 1.0f, HandItems: [{}, {}], SkinData: {SkinURL: "", SkinType: "DEFAULT", Skin: ""}, Variant: "DEFAULT", ArmorDropChances: [0.085f, 0.085f, 0.085f, 0.085f], Profession: "NONE", ScaleZ: 1.0f, ObjectiveData: {ObjectiveDataSet: [{Type: "LOOK_AT_PLAYER", Prio: 9}, {Type: "LOOK_AT_MOB", Prio: 10}, {Type: "LOOK_AT_RESET", Prio: 9}], HasObjectives: 1b}, Fire: -1s, ArmorItems: [{}, {}, {}, {}], CanPickUpLoot: 0b, HurtTime: 0s}
´´´
However the command is too long to paste it directly into the game so you need to use .mcfunctions or something like this to be able to use it.
You can also shorten the data, because some of them are not needed for all NPCs like the trading data.
Alternative you can try the NPC Spawner see:
https://github.com/MarkusBordihn/BOs-Easy-NPC/wiki/Spawner
Mob loot, is not implemented yet, see:
#111
You could work around this by using the On Dead
action, see:
https://github.com/MarkusBordihn/BOs-Easy-NPC/wiki/Actions#basic-actions-
wait I ask you once more. in Epic Fight combining with Easy NPC how to make npc mob shoot using modded ranged weapon? And change weapon attack speed and damage too
Depends on the modded range weapon.
If this is just an normal item with a lot of Mixins, then it is not support like "MrCrayfish's Gun Mod".
If it's a real range weapon which is based on the crossbow or bow, it should work out of the box.
Could you please share an example what modded range weapon you are referring to.
By default the NPC are not attacking, you need to define the corresponding objectives see:
https://github.com/MarkusBordihn/BOs-Easy-NPC/wiki/Objectives#attack-objectives-%EF%B8%8F
If modded weapons are not working with any of these options, please open a new issue report with the details about the mod and I'm happy to take a closer look.
By default the NPC are not attacking, you need to define the corresponding objectives see: https://github.com/MarkusBordihn/BOs-Easy-NPC/wiki/Objectives#attack-objectives-%EF%B8%8F
If modded weapons are not working with any of these options, please open a new issue report with the details about the mod and I'm happy to take a closer look.
ok now i'll find out soon cuz this mod combined with epic fight. It's somewhat delayed with other modded weapons. So is there any way to make npc attack each others? Cuz i try to enable attack mobs but they didn't attack