Topic category: Help with MCreator software
The command extract option is floored (1.7.4)
for one it creates the hole thing in one big string after cleaning it up it just errors out on a basic summens command
if(true){
if(entity instanceof EntityPlayerMP){
MinecraftServer minecraftserver = FMLCommonHandler.instance().getMinecraftServerInstance();
if(minecraftserver!=null)
minecraftserver.getCommandManager().executeCommand((EntityPlayerMP)entity, "summon Villager ~1 ~ ~ {Profession:5,CustomName:\"Frank\",CustomNameVisible:1,Career:1,CareerLevel:42,CanPickUpLoot:0,PersistenceRequired:1,Invulnerable:1,Offers:{Recipes:[{buy:{id:\"wheat_seeds\",Count:1},maxUses:9999999,sell:{id:\"diamond\",Count:64},rewardExp:false},{buy:{id:\"stone\",Count:1},maxUses:9999999,sell:{id:\"stone\",Count:1},rewardExp:false}]}}");
}
}
Why have a option to extract a command what MCreator can't handel
First of all, it would be nice if you provide the actual error.
Furthermore, I recommend you rather spawn the entity and add your desired attributes to it directly by code. It has many positives. (Like being executed faster)
@#1 Can you spawn a villager and update there store that way? if you can, can you provide a example please, There is no main error until it's in the game, the extract works in the chat but when using the command extract I just get can't spawn in read no error like it does when there is a symtex error.
I used to make server and game settings in command blocks with these very same commands and wanted to put them to use.
But if I can spawn it in and add the attributes I would love that but some clean examples would be needed.
Something like this could work:
EntityVillager entityvillager = new EntityVillager(world,1);
entityvillager.setLocationAndAngles(x,y,z, 0.0F, 0.0F);
entityvillager.setCustomNameTag("TESTIFICATE");
MerchantRecipeList list = new MerchantRecipeList();
ReflectionHelper.setPrivateValue(EntityVillager.class,entityvillager,list,"buyingList","field_70963_i");
EntityVillager.ITradeList trade = new ListEnchantedBookForEmeralds(){
public void addMerchantRecipe(IMerchant merchant, MerchantRecipeList recipeList, Random random){
recipeList.add(new MerchantRecipe(new ItemStack(Items.WHEAT_SEEDS),ItemStack.EMPTY,new ItemStack(Items.DIAMOND,64),0,9999999));
}
};
trade.addMerchantRecipe(entityvillager, (MerchantRecipeList)(ReflectionHelper.getPrivateValue(EntityVillager.class,entityvillager,"buyingList","field_70963_i")), entityvillager.rand);
if(!world.isRemote){
world.spawnEntityInWorld(entityvillager);
}
This comment can change everything! Lots of mods with custom trades coming! XD